=0;_-=1){var O=i(n[_]),M=r.get(O);if(void 0===M){p=!0;break}if((E-=M)<=0)break}switch(v){case"top":g=y-u;break;case"bottom":g=x-h+u;break;default:var P=e.current.scrollTop;yP+h&&(m="bottom")}null!==g&&s(g),g!==d.lastTop&&(p=!0)}p&&f(lt(lt({},d),{},{times:d.times+1,targetAlign:m,lastTop:g}))}}),[d,e.current]),function(e){if(null!==e&&void 0!==e){if(gl.cancel(l.current),"number"===typeof e)s(e);else if(e&&"object"===it(e)){var t,r=e.align;t="index"in e?e.index:n.findIndex((function(t){return i(t)===e.key}));var o=e.offset;f({times:0,index:t,offset:void 0===o?0:o,originAlign:r})}}else c()}}(I,N,te,c,q,(function(){return ee(!0)}),G,Pe);t.useImperativeHandle(n,(function(){return{getScrollInfo:xe,scrollTo:function(e){var t;(t=e)&&"object"===it(t)&&("left"in t||"top"in t)?(void 0!==e.left&&F(Ce(e.left)),Te(e.top)):Te(e)}}})),Yr((function(){if(S){var e=N.slice(ie,ae+1);S(e,N)}}),[ie,ae,N]);var Ne=function(e,n,r,o){var i=wt(t.useMemo((function(){return[new Map,[]]}),[e,r.id,o]),2),a=i[0],s=i[1];return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=a.get(t),l=a.get(i);if(void 0===c||void 0===l)for(var u=e.length,d=s.length;ds&&t.createElement(KC,{ref:de,prefixCls:i,scrollOffset:j,scrollRange:oe,rtl:P,onScroll:ke,onStartMove:V,onStopMove:Y,spinSize:pe,containerSize:le.height,style:null===E||void 0===E?void 0:E.verticalScrollBar,thumbStyle:null===E||void 0===E?void 0:E.verticalScrollBarThumb}),M&&v>le.width&&t.createElement(KC,{ref:fe,prefixCls:i,scrollOffset:L,scrollRange:v,rtl:P,onScroll:ke,onStartMove:V,onStopMove:Y,spinSize:he,containerSize:le.width,horizontal:!0,style:null===E||void 0===E?void 0:E.horizontalScrollBar,thumbStyle:null===E||void 0===E?void 0:E.horizontalScrollBarThumb}))}var dE=t.forwardRef(uE);dE.displayName="List";const fE=dE;var hE=["disabled","title","children","style","className"];function pE(e){return"string"===typeof e||"number"===typeof e}var mE=function(e,n){var r=t.useContext(gC),o=r.prefixCls,i=r.id,a=r.open,s=r.multiple,c=r.mode,l=r.searchValue,u=r.toggleOpen,d=r.notFoundContent,f=r.onPopupScroll,h=t.useContext(AC),p=h.maxCount,m=h.flattenOptions,g=h.onActiveValue,v=h.defaultActiveFirstOption,b=h.onSelect,y=h.menuItemSelectedIcon,x=h.rawValues,w=h.fieldNames,S=h.virtual,k=h.direction,C=h.listHeight,E=h.listItemHeight,_=h.optionRender,O="".concat(o,"-item"),M=ar((function(){return m}),[a,m],(function(e,t){return t[0]&&e[1]!==t[1]})),P=t.useRef(null),T=t.useMemo((function(){return s&&"undefined"!==typeof p&&(null===x||void 0===x?void 0:x.size)>=p}),[s,p,null===x||void 0===x?void 0:x.size]),N=function(e){e.preventDefault()},I=function(e){var t;null===(t=P.current)||void 0===t||t.scrollTo("number"===typeof e?{index:e}:e)},R=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=M.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];A(e);var n={source:t?"keyboard":"mouse"},r=M[e];r?g(r.value,e,n):g(null,-1,n)};(0,t.useEffect)((function(){z(!1!==v?R(0):-1)}),[M.length,l]);var L=t.useCallback((function(e){return x.has(e)&&"combobox"!==c}),[c,nt(x).toString(),x.size]);(0,t.useEffect)((function(){var e,t=setTimeout((function(){if(!s&&a&&1===x.size){var e=Array.from(x)[0],t=M.findIndex((function(t){return t.data.value===e}));-1!==t&&(z(t),I(t))}}));a&&(null===(e=P.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[a,l]);var F=function(e){void 0!==e&&b(e,{selected:!x.has(e)}),s||u(!1)};if(t.useImperativeHandle(n,(function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case ac.N:case ac.P:case ac.UP:case ac.DOWN:var r=0;if(t===ac.UP?r=-1:t===ac.DOWN?r=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===ac.N?r=1:t===ac.P&&(r=-1)),0!==r){var o=R(j+r,r);I(o),z(o,!0)}break;case ac.ENTER:var i,s=M[j];!s||null!==s&&void 0!==s&&null!==(i=s.data)&&void 0!==i&&i.disabled||T?F(void 0):F(s.value),a&&e.preventDefault();break;case ac.ESC:u(!1),a&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){I(e)}}})),0===M.length)return t.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(O,"-empty"),onMouseDown:N},d);var H=Object.keys(w).map((function(e){return w[e]})),B=function(e){return e.label};function W(e,t){return{role:e.group?"presentation":"option",id:"".concat(i,"_list_").concat(t)}}var V=function(e){var n=M[e];if(!n)return null;var r=n.data||{},o=r.value,i=n.group,a=Gy(r,!0),s=B(n);return n?t.createElement("div",vt({"aria-label":"string"!==typeof s||i?null:s},a,{key:e},W(n,e),{"aria-selected":L(o)}),o):null},Y={role:"listbox",id:"".concat(i,"_list")};return t.createElement(t.Fragment,null,S&&t.createElement("div",vt({},Y,{style:{height:0,width:0,overflow:"hidden"}}),V(j-1),V(j),V(j+1)),t.createElement(fE,{itemKey:"key",ref:P,data:M,height:C,itemHeight:E,fullHeight:!1,onMouseDown:N,onScroll:f,virtual:S,direction:k,innerProps:S?null:Y},(function(e,n){var r,o=e.group,i=e.groupOption,a=e.data,s=e.label,c=e.value,l=a.key;if(o){var u,d=null!==(u=a.title)&&void 0!==u?u:pE(s)?s.toString():void 0;return t.createElement("div",{className:ot()(O,"".concat(O,"-group")),title:d},void 0!==s?s:l)}var f=a.disabled,h=a.title,p=(a.children,a.style),m=a.className,g=ut(St(a,hE),H),v=L(c),b=f||!v&&T,x="".concat(O,"-option"),w=ot()(O,x,m,(st(r={},"".concat(x,"-grouped"),i),st(r,"".concat(x,"-active"),j===n&&!b),st(r,"".concat(x,"-disabled"),b),st(r,"".concat(x,"-selected"),v),r)),k=B(e),C=!y||"function"===typeof y||v,E="number"===typeof k?k:k||c,M=pE(E)?E.toString():void 0;return void 0!==h&&(M=h),t.createElement("div",vt({},Gy(g),S?{}:W(e,n),{"aria-selected":v,className:w,title:M,onMouseMove:function(){j===n||b||z(n)},onClick:function(){b||F(c)},style:p}),t.createElement("div",{className:"".concat(x,"-content")},"function"===typeof _?_(e,{index:n}):E),t.isValidElement(y)||v,C&&t.createElement(mC,{className:"".concat(O,"-option-state"),customizeIcon:y,customizeIconProps:{value:c,disabled:b,isSelected:v}},v?"\u2713":null))})))};const gE=t.forwardRef(mE);function vE(e,t){return xC(e).join("").toUpperCase().includes(t)}var bE=0,yE=ln();function xE(e){var n=wt(t.useState(),2),r=n[0],o=n[1];return t.useEffect((function(){o("rc_select_".concat(function(){var e;return yE?(e=bE,bE+=1):e="TEST_OR_SSR",e}()))}),[]),e||r}var wE=["children","value"],SE=["children"];function kE(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return gt(e).map((function(e,r){if(!t.isValidElement(e)||!e.type)return null;var o=e,i=o.type.isSelectOptGroup,a=o.key,s=o.props,c=s.children,l=St(s,SE);return n||!i?function(e){var t=e,n=t.key,r=t.props,o=r.children,i=r.value;return lt({key:n,value:void 0!==i?i:n,children:o},St(r,wE))}(e):lt(lt({key:"__RC_SELECT_GRP__".concat(null===a?r:a,"__"),label:a},l),{},{options:kE(c)})})).filter((function(e){return e}))}const CE=function(e,n,r,o,i){return t.useMemo((function(){var t=e;!e&&(t=kE(n));var a=new Map,s=new Map,c=function(e,t,n){n&&"string"===typeof n&&e.set(t[n],t)};return function e(t){for(var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=0;l1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,o=[],i=DC(n,!1),a=i.label,s=i.value,c=i.options,l=i.groupLabel;return function e(t,n){Array.isArray(t)&&t.forEach((function(t){if(n||!(c in t)){var i=t[s];o.push({key:RC(t,o.length),groupOption:n,data:t,label:t[a],value:i})}else{var u=t[l];void 0===u&&r&&(u=t.label),o.push({key:RC(t,o.length),group:!0,data:t,label:u}),e(t[c],!0)}}))}(e,!1),o}(de,{fieldNames:V,childrenAsData:B})}),[de,V,B]),he=function(e){var t=Q(e);if(ee(t),A&&(t.length!==oe.length||t.some((function(e,t){var n;return(null===(n=oe[t])||void 0===n?void 0:n.value)!==(null===e||void 0===e?void 0:e.value)})))){var n=j?t:t.map((function(e){return e.value})),r=t.map((function(e){return jC(ie(e.value))}));A(H?n:n[0],H?r:r[0])}},pe=wt(t.useState(null),2),me=pe[0],ge=pe[1],ve=wt(t.useState(0),2),be=ve[0],ye=ve[1],xe=void 0!==E?E:"combobox"!==o,we=t.useCallback((function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).source,r=void 0===n?"keyboard":n;ye(t),s&&"combobox"===o&&null!==e&&"keyboard"===r&&ge(String(e))}),[s,o]),Se=function(e,t,n){var r=function(){var t,n=ie(e);return[j?{label:null===n||void 0===n?void 0:n[V.label],value:e,key:null!==(t=null===n||void 0===n?void 0:n.key)&&void 0!==t?t:e}:e,jC(n)]};if(t&&p){var o=wt(r(),2),i=o[0],a=o[1];p(i,a)}else if(!t&&m&&"clear"!==n){var s=wt(r(),2),c=s[0],l=s[1];m(c,l)}},ke=EE((function(e,t){var n,r=!H||t.selected;n=r?H?[].concat(nt(oe),[e]):[e]:oe.filter((function(t){return t.value!==e})),he(n),Se(e,r),"combobox"===o?ge(""):FC&&!h||(U(""),ge(""))})),Ce=t.useMemo((function(){var e=!1!==O&&!1!==v;return lt(lt({},G),{},{flattenOptions:fe,onActiveValue:we,defaultActiveFirstOption:xe,onSelect:ke,menuItemSelectedIcon:_,rawValues:se,fieldNames:V,virtual:e,direction:M,listHeight:T,listItemHeight:I,childrenAsData:B,maxCount:z,optionRender:k})}),[z,G,fe,we,xe,ke,_,se,V,O,v,M,T,I,B,k]);return t.createElement(AC.Provider,{value:Ce},t.createElement(BC,vt({},L,{id:F,prefixCls:a,ref:n,omitDomProps:OE,mode:o,displayValues:ae,onDisplayValuesChange:function(e,t){he(e);var n=t.type,r=t.values;"remove"!==n&&"clear"!==n||r.forEach((function(e){Se(e.value,!1,n)}))},direction:M,searchValue:q,onSearch:function(e,t){if(U(e),ge(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===o&&he(e),null===d||void 0===d||d(e));else{var n=(e||"").trim();if(n){var r=Array.from(new Set([].concat(nt(se),[n])));he(r),Se(n,!0),U("")}}},autoClearSearchValue:h,onSearchSplit:function(e){var t=e;"tags"!==o&&(t=e.map((function(e){var t=X.get(e);return null===t||void 0===t?void 0:t.value})).filter((function(e){return void 0!==e})));var n=Array.from(new Set([].concat(nt(se),nt(t))));he(n),n.forEach((function(e){Se(e,!0)}))},dropdownMatchSelectWidth:v,OptionList:gE,emptyOptions:!fe.length,activeValue:me,activeDescendantId:"".concat(F,"_list_").concat(be)})))}));var PE=ME;PE.Option=qC,PE.OptGroup=VC;const TE=PE,NE=(0,t.createContext)(void 0);let IE=Object.assign({},vc.Modal),RE=[];const DE=()=>RE.reduce(((e,t)=>Object.assign(Object.assign({},e),t)),vc.Modal);const jE=e=>{const{locale:n={},children:r,_ANT_MARK__:o}=e;t.useEffect((()=>{const e=function(e){if(e){const t=Object.assign({},e);return RE.push(t),IE=DE(),()=>{RE=RE.filter((e=>e!==t)),IE=DE()}}IE=Object.assign({},vc.Modal)}(n&&n.Modal);return e}),[n]);const i=t.useMemo((()=>Object.assign(Object.assign({},n),{exist:!0})),[n]);return t.createElement(dc.Provider,{value:i},r)},AE="-ant-".concat(Date.now(),"-").concat(Math.random());function zE(e,t){const n=function(e,t){const n={},r=(e,t)=>{let n=e.clone();return n=(null===t||void 0===t?void 0:t(n))||n,n.toRgbString()},o=(e,t)=>{const o=new Fi(e),i=tn(o.toRgbString());n["".concat(t,"-color")]=r(o),n["".concat(t,"-color-disabled")]=i[1],n["".concat(t,"-color-hover")]=i[4],n["".concat(t,"-color-active")]=i[6],n["".concat(t,"-color-outline")]=o.clone().setAlpha(.2).toRgbString(),n["".concat(t,"-color-deprecated-bg")]=i[0],n["".concat(t,"-color-deprecated-border")]=i[2]};if(t.primaryColor){o(t.primaryColor,"primary");const e=new Fi(t.primaryColor),i=tn(e.toRgbString());i.forEach(((e,t)=>{n["primary-".concat(t+1)]=e})),n["primary-color-deprecated-l-35"]=r(e,(e=>e.lighten(35))),n["primary-color-deprecated-l-20"]=r(e,(e=>e.lighten(20))),n["primary-color-deprecated-t-20"]=r(e,(e=>e.tint(20))),n["primary-color-deprecated-t-50"]=r(e,(e=>e.tint(50))),n["primary-color-deprecated-f-12"]=r(e,(e=>e.setAlpha(.12*e.getAlpha())));const a=new Fi(i[0]);n["primary-color-active-deprecated-f-30"]=r(a,(e=>e.setAlpha(.3*e.getAlpha()))),n["primary-color-active-deprecated-d-02"]=r(a,(e=>e.darken(2)))}t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info");const i=Object.keys(n).map((t=>"--".concat(e,"-").concat(t,": ").concat(n[t],";")));return"\n :root {\n ".concat(i.join("\n"),"\n }\n ").trim()}(e,t);ln()&&xn(n,"".concat(AE,"-dynamic-theme"))}const LE=function(){return{componentDisabled:(0,t.useContext)(Wd),componentSize:(0,t.useContext)(Ga)}},FE=Object.assign({},r),{useId:HE}=FE,BE="undefined"===typeof HE?()=>"":HE;function WE(e){const{children:n}=e,[,r]=ia(),{motion:o}=r,i=t.useRef(!1);return i.current=i.current||!1===o,i.current?t.createElement(zc,{motion:o},n):n}const VE=()=>null;var YE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o({getPrefixCls:(e,t)=>t||(e?"".concat(KE(),"-").concat(e):KE()),getIconPrefixCls:QE,getRootPrefixCls:()=>UE||KE(),getTheme:()=>$E,holderRender:XE}),JE=e=>{const{children:n,csp:r,autoInsertSpaceInButton:o,alert:i,anchor:a,form:s,locale:c,componentSize:l,direction:u,space:d,virtual:f,dropdownMatchSelectWidth:h,popupMatchSelectWidth:p,popupOverflow:m,legacyLocale:g,parentContext:v,iconPrefixCls:b,theme:y,componentDisabled:x,segmented:w,statistic:S,spin:k,calendar:C,carousel:E,cascader:_,collapse:O,typography:M,checkbox:P,descriptions:T,divider:N,drawer:I,skeleton:R,steps:D,image:j,layout:A,list:z,mentions:L,modal:F,progress:H,result:B,slider:W,breadcrumb:V,menu:Y,pagination:q,input:U,empty:G,badge:$,radio:X,rate:K,switch:Q,transfer:Z,avatar:J,message:ee,tag:te,table:ne,card:re,tabs:oe,timeline:ie,timePicker:ae,upload:se,notification:ce,tree:le,colorPicker:ue,datePicker:de,rangePicker:fe,flex:he,wave:pe,dropdown:me,warning:ge,tour:ve}=e,be=t.useCallback(((t,n)=>{const{prefixCls:r}=e;if(n)return n;const o=r||v.getPrefixCls("");return t?"".concat(o,"-").concat(t):o}),[v.getPrefixCls,e.prefixCls]),ye=b||v.iconPrefixCls||dt,xe=r||v.csp;Ca(ye,xe);const we=function(e,t){var n;Hu("ConfigProvider");const r=e||{},o=!1!==r.inherit&&t?t:Object.assign(Object.assign({},$i),{hashed:null!==(n=null===t||void 0===t?void 0:t.hashed)&&void 0!==n?n:$i.hashed,cssVar:null===t||void 0===t?void 0:t.cssVar}),i=BE();return ar((()=>{var n,a;if(!e)return t;const s=Object.assign({},o.components);Object.keys(e.components||{}).forEach((t=>{s[t]=Object.assign(Object.assign({},s[t]),e.components[t])}));const c="css-var-".concat(i.replace(/:/g,"")),l=(null!==(n=r.cssVar)&&void 0!==n?n:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:"ant"},"object"===typeof o.cssVar?o.cssVar:{}),"object"===typeof r.cssVar?r.cssVar:{}),{key:"object"===typeof r.cssVar&&(null===(a=r.cssVar)||void 0===a?void 0:a.key)||c});return Object.assign(Object.assign(Object.assign({},o),r),{token:Object.assign(Object.assign({},o.token),r.token),components:s,cssVar:l})}),[r,o],((e,t)=>e.some(((e,n)=>{const r=t[n];return!sr(e,r,!0)}))))}(y,v.theme);const Se={csp:xe,autoInsertSpaceInButton:o,alert:i,anchor:a,locale:c||g,direction:u,space:d,virtual:f,popupMatchSelectWidth:null!==p&&void 0!==p?p:h,popupOverflow:m,getPrefixCls:be,iconPrefixCls:ye,theme:we,segmented:w,statistic:S,spin:k,calendar:C,carousel:E,cascader:_,collapse:O,typography:M,checkbox:P,descriptions:T,divider:N,drawer:I,skeleton:R,steps:D,image:j,input:U,layout:A,list:z,mentions:L,modal:F,progress:H,result:B,slider:W,breadcrumb:V,menu:Y,pagination:q,empty:G,badge:$,radio:X,rate:K,switch:Q,transfer:Z,avatar:J,message:ee,tag:te,table:ne,card:re,tabs:oe,timeline:ie,timePicker:ae,upload:se,notification:ce,tree:le,colorPicker:ue,datePicker:de,rangePicker:fe,flex:he,wave:pe,dropdown:me,warning:ge,tour:ve},ke=Object.assign({},v);Object.keys(Se).forEach((e=>{void 0!==Se[e]&&(ke[e]=Se[e])})),qE.forEach((t=>{const n=e[t];n&&(ke[t]=n)}));const Ce=ar((()=>ke),ke,((e,t)=>{const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some((n=>e[n]!==t[n]))})),Ee=t.useMemo((()=>({prefixCls:ye,csp:xe})),[ye,xe]);let _e=t.createElement(t.Fragment,null,t.createElement(VE,{dropdownMatchSelectWidth:h}),n);const Oe=t.useMemo((()=>{var e,t,n,r;return Mi((null===(e=vc.Form)||void 0===e?void 0:e.defaultValidateMessages)||{},(null===(n=null===(t=Ce.locale)||void 0===t?void 0:t.Form)||void 0===n?void 0:n.defaultValidateMessages)||{},(null===(r=Ce.form)||void 0===r?void 0:r.validateMessages)||{},(null===s||void 0===s?void 0:s.validateMessages)||{})}),[Ce,null===s||void 0===s?void 0:s.validateMessages]);Object.keys(Oe).length>0&&(_e=t.createElement(NE.Provider,{value:Oe},_e)),c&&(_e=t.createElement(jE,{locale:c,_ANT_MARK__:"internalMark"},_e)),(ye||xe)&&(_e=t.createElement(cn.Provider,{value:Ee},_e)),l&&(_e=t.createElement(Ua,{size:l},_e)),_e=t.createElement(WE,null,_e);const Me=t.useMemo((()=>{const e=we||{},{algorithm:t,token:n,components:r,cssVar:o}=e,i=YE(e,["algorithm","token","components","cssVar"]),a=t&&(!Array.isArray(t)||t.length>0)?Er(t):Gi,s={};Object.entries(r||{}).forEach((e=>{let[t,n]=e;const r=Object.assign({},n);"algorithm"in r&&(!0===r.algorithm?r.theme=a:(Array.isArray(r.algorithm)||"function"===typeof r.algorithm)&&(r.theme=Er(r.algorithm)),delete r.algorithm),s[t]=r}));const c=Object.assign(Object.assign({},Li),n);return Object.assign(Object.assign({},i),{theme:a,token:c,components:s,override:Object.assign({override:c},s),cssVar:o})}),[we]);return y&&(_e=t.createElement(Xi.Provider,{value:Me},_e)),Ce.warning&&(_e=t.createElement(Fu.Provider,{value:Ce.warning},_e)),void 0!==x&&(_e=t.createElement(Bd,{disabled:x},_e)),t.createElement(ft.Provider,{value:Ce},_e)},e_=e=>{const n=t.useContext(ft),r=t.useContext(dc);return t.createElement(JE,Object.assign({parentContext:n,legacyLocale:r},e))};e_.ConfigContext=ft,e_.SizeContext=Ga,e_.config=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e;void 0!==t&&(UE=t),void 0!==n&&(GE=n),"holderRender"in e&&(XE=o),r&&(!function(e){return Object.keys(e).some((e=>e.endsWith("Color")))}(r)?$E=r:zE(KE(),r))},e_.useConfig=LE,Object.defineProperty(e_,"SizeContext",{get:()=>Ga});const t_=e_;const n_=(e,n,r,o)=>function(e){return n=>t.createElement(t_,{theme:{token:{motion:!1,zIndexPopupBase:0}}},t.createElement(e,Object.assign({},n)))}((i=>{const{prefixCls:a,style:s}=i,c=t.useRef(null),[l,u]=t.useState(0),[d,f]=t.useState(0),[h,p]=vi(!1,{value:i.open}),{getPrefixCls:m}=t.useContext(ft),g=m(n||"select",a);t.useEffect((()=>{if(p(!0),"undefined"!==typeof ResizeObserver){const e=new ResizeObserver((e=>{const t=e[0].target;u(t.offsetHeight+8),f(t.offsetWidth)})),t=setInterval((()=>{var n;const o=r?".".concat(r(g)):".".concat(g,"-dropdown"),i=null===(n=c.current)||void 0===n?void 0:n.querySelector(o);i&&(clearInterval(t),e.observe(i))}),10);return()=>{clearInterval(t),e.disconnect()}}}),[]);let v=Object.assign(Object.assign({},i),{style:Object.assign(Object.assign({},s),{margin:0}),open:h,visible:h,getPopupContainer:()=>c.current});o&&(v=o(v));const b={paddingBottom:l,position:"relative",minWidth:d};return t.createElement("div",{ref:c,style:b},t.createElement(e,Object.assign({},v)))}));const r_=()=>{const[,e]=ia(),n=new Fi(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return t.createElement("svg",{style:n,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},t.createElement("g",{fill:"none",fillRule:"evenodd"},t.createElement("g",{transform:"translate(24 31.67)"},t.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),t.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),t.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),t.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),t.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),t.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),t.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},t.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),t.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};const o_=()=>{const[,e]=ia(),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:o,colorBgContainer:i}=e,{borderColor:a,shadowColor:s,contentColor:c}=(0,t.useMemo)((()=>({borderColor:new Fi(n).onBackground(i).toHexShortString(),shadowColor:new Fi(r).onBackground(i).toHexShortString(),contentColor:new Fi(o).onBackground(i).toHexShortString()})),[n,r,o,i]);return t.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},t.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},t.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),t.createElement("g",{fillRule:"nonzero",stroke:a},t.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),t.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:c}))))},i_=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:o,fontSize:i,lineHeight:a}=e;return{[t]:{marginInline:r,fontSize:i,lineHeight:a,textAlign:"center",["".concat(t,"-image")]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},["".concat(t,"-description")]:{color:e.colorText},["".concat(t,"-footer")]:{marginTop:n},"&-normal":{marginBlock:o,color:e.colorTextDisabled,["".concat(t,"-description")]:{color:e.colorTextDisabled},["".concat(t,"-image")]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDisabled,["".concat(t,"-image")]:{height:e.emptyImgHeightSM}}}}},a_=Pa("Empty",(e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,o=xa(e,{emptyImgCls:"".concat(t,"-img"),emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return[i_(o)]}));var s_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{var{className:n,rootClassName:r,prefixCls:o,image:i=c_,description:a,children:s,imageStyle:c,style:l}=e,u=s_(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:d,direction:f,empty:h}=t.useContext(ft),p=d("empty",o),[m,g,v]=a_(p),[b]=bc("Empty"),y="undefined"!==typeof a?a:null===b||void 0===b?void 0:b.description,x="string"===typeof y?y:"empty";let w=null;return w="string"===typeof i?t.createElement("img",{alt:x,src:i}):i,m(t.createElement("div",Object.assign({className:ot()(g,v,p,null===h||void 0===h?void 0:h.className,{["".concat(p,"-normal")]:i===l_,["".concat(p,"-rtl")]:"rtl"===f},n,r),style:Object.assign(Object.assign({},null===h||void 0===h?void 0:h.style),l)},u),t.createElement("div",{className:"".concat(p,"-image"),style:c},w),y&&t.createElement("div",{className:"".concat(p,"-description")},y),s&&t.createElement("div",{className:"".concat(p,"-footer")},s)))};u_.PRESENTED_IMAGE_DEFAULT=c_,u_.PRESENTED_IMAGE_SIMPLE=l_;const d_=u_,f_=e=>{const{componentName:n}=e,{getPrefixCls:r}=(0,t.useContext)(ft),o=r("empty");switch(n){case"Table":case"List":return t.createElement(d_,{image:d_.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return t.createElement(d_,{image:d_.PRESENTED_IMAGE_SIMPLE,className:"".concat(o,"-small")});default:return t.createElement(d_,null)}};const h_=function(e,t){return e||(e=>{const t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:"scroll"===e?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},t),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},t),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},t),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},t),{points:["br","tr"],offset:[0,-4]})}})(t)},p_=new fi("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),m_=new fi("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),g_=new fi("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),v_=new fi("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),b_=new fi("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),y_=new fi("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),x_={"move-up":{inKeyframes:new fi("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),outKeyframes:new fi("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}})},"move-down":{inKeyframes:p_,outKeyframes:m_},"move-left":{inKeyframes:g_,outKeyframes:v_},"move-right":{inKeyframes:b_,outKeyframes:y_}},w_=(e,t)=>{const{antCls:n}=e,r="".concat(n,"-").concat(t),{inKeyframes:o,outKeyframes:i}=x_[t];return[Vu(r,o,i,e.motionDurationMid),{["\n ".concat(r,"-enter,\n ").concat(r,"-appear\n ")]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},["".concat(r,"-leave")]:{animationTimingFunction:e.motionEaseInOutCirc}}]},S_=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},k_=e=>{const{antCls:t,componentCls:n}=e,r="".concat(n,"-item"),o="&".concat(t,"-slide-up-enter").concat(t,"-slide-up-enter-active"),i="&".concat(t,"-slide-up-appear").concat(t,"-slide-up-appear-active"),a="&".concat(t,"-slide-up-leave").concat(t,"-slide-up-leave-active"),s="".concat(n,"-dropdown-placement-");return[{["".concat(n,"-dropdown")]:Object.assign(Object.assign({},Ti(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,["\n ".concat(o).concat(s,"bottomLeft,\n ").concat(i).concat(s,"bottomLeft\n ")]:{animationName:Tb},["\n ".concat(o).concat(s,"topLeft,\n ").concat(i).concat(s,"topLeft,\n ").concat(o).concat(s,"topRight,\n ").concat(i).concat(s,"topRight\n ")]:{animationName:Ib},["".concat(a).concat(s,"bottomLeft")]:{animationName:Nb},["\n ".concat(a).concat(s,"topLeft,\n ").concat(a).concat(s,"topRight\n ")]:{animationName:Rb},"&-hidden":{display:"none"},["".concat(r)]:Object.assign(Object.assign({},S_(e)),{cursor:"pointer",transition:"background ".concat(e.motionDurationSlow," ease"),borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Pi),"&-state":{flex:"none",display:"flex",alignItems:"center"},["&-active:not(".concat(r,"-option-disabled)")]:{backgroundColor:e.optionActiveBg},["&-selected:not(".concat(r,"-option-disabled)")]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,["".concat(r,"-option-state")]:{color:e.colorPrimary},["&:has(+ ".concat(r,"-option-selected:not(").concat(r,"-option-disabled))")]:{borderEndStartRadius:0,borderEndEndRadius:0,["& + ".concat(r,"-option-selected:not(").concat(r,"-option-disabled)")]:{borderStartStartRadius:0,borderStartEndRadius:0}}},"&-disabled":{["&".concat(r,"-option-selected")]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},S_(e)),{color:e.colorTextDisabled})}),"&-rtl":{direction:"rtl"}})},Fb(e,"slide-up"),Fb(e,"slide-down"),w_(e,"move-up"),w_(e,"move-down")]},C_=(e,t)=>{const{componentCls:n,iconCls:r}=e,o="".concat(n,"-selection-overflow"),i=e.multipleSelectItemHeight,a=(e=>{const{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()})(e),s=t?"".concat(n,"-").concat(t):"";return{["".concat(n,"-multiple").concat(s)]:{[o]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},["".concat(n,"-selector")]:{display:"flex",flexWrap:"wrap",alignItems:"center",height:"100%",paddingInline:e.calc(2).mul(2).equal(),paddingBlock:e.calc(a).sub(2).equal(),borderRadius:e.borderRadius,["".concat(n,"-disabled&")]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:"".concat(Ar(2)," 0"),lineHeight:Ar(i),visibility:"hidden",content:'"\\a0"'}},["".concat(n,"-selection-item")]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:i,marginTop:2,marginBottom:2,lineHeight:Ar(e.calc(i).sub(e.calc(e.lineWidth).mul(2)).equal()),borderRadius:e.borderRadiusSM,cursor:"default",transition:"font-size ".concat(e.motionDurationSlow,", line-height ").concat(e.motionDurationSlow,", height ").concat(e.motionDurationSlow),marginInlineEnd:e.calc(2).mul(2).equal(),paddingInlineStart:e.paddingXS,paddingInlineEnd:e.calc(e.paddingXS).div(2).equal(),["".concat(n,"-disabled&")]:{color:e.multipleItemColorDisabled,borderColor:e.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(e.paddingXS).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{display:"inline-flex",alignItems:"center",color:e.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",["> ".concat(r)]:{verticalAlign:"-0.2em"},"&:hover":{color:e.colorIconHover}})},["".concat(o,"-item + ").concat(o,"-item")]:{["".concat(n,"-selection-search")]:{marginInlineStart:0}},["".concat(o,"-item-suffix")]:{height:"100%"},["".concat(n,"-selection-search")]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:i,fontFamily:e.fontFamily,lineHeight:Ar(i),transition:"all ".concat(e.motionDurationSlow)},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},["".concat(n,"-selection-placeholder")]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:"all ".concat(e.motionDurationSlow)}}}};function E_(e,t){const{componentCls:n}=e,r=t?"".concat(n,"-").concat(t):"",o={["".concat(n,"-multiple").concat(r)]:{fontSize:e.fontSize,["".concat(n,"-selector")]:{["".concat(n,"-show-search&")]:{cursor:"text"}},["\n &".concat(n,"-show-arrow ").concat(n,"-selector,\n &").concat(n,"-allow-clear ").concat(n,"-selector\n ")]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[C_(e,t),o]}const __=e=>{const{componentCls:t}=e,n=xa(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.controlHeightXS,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=xa(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[E_(e),E_(n,"sm"),{["".concat(t,"-multiple").concat(t,"-sm")]:{["".concat(t,"-selection-placeholder")]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},["".concat(t,"-selection-search")]:{marginInlineStart:2}}},E_(r,"lg")]};function O_(e,t){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:o}=e,i=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),a=t?"".concat(n,"-").concat(t):"";return{["".concat(n,"-single").concat(a)]:{fontSize:e.fontSize,height:e.controlHeight,["".concat(n,"-selector")]:Object.assign(Object.assign({},Ti(e,!0)),{display:"flex",borderRadius:o,["".concat(n,"-selection-search")]:{position:"absolute",top:0,insetInlineStart:r,insetInlineEnd:r,bottom:0,"&-input":{width:"100%",WebkitAppearance:"textfield"}},["\n ".concat(n,"-selection-item,\n ").concat(n,"-selection-placeholder\n ")]:{padding:0,lineHeight:Ar(i),transition:"all ".concat(e.motionDurationSlow,", visibility 0s"),alignSelf:"center"},["".concat(n,"-selection-placeholder")]:{transition:"none",pointerEvents:"none"},[["&:after","".concat(n,"-selection-item:empty:after"),"".concat(n,"-selection-placeholder:empty:after")].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),["\n &".concat(n,"-show-arrow ").concat(n,"-selection-item,\n &").concat(n,"-show-arrow ").concat(n,"-selection-placeholder\n ")]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},["&".concat(n,"-open ").concat(n,"-selection-item")]:{color:e.colorTextPlaceholder},["&:not(".concat(n,"-customize-input)")]:{["".concat(n,"-selector")]:{width:"100%",height:"100%",padding:"0 ".concat(Ar(r)),["".concat(n,"-selection-search-input")]:{height:i},"&:after":{lineHeight:Ar(i)}}},["&".concat(n,"-customize-input")]:{["".concat(n,"-selector")]:{"&:after":{display:"none"},["".concat(n,"-selection-search")]:{position:"static",width:"100%"},["".concat(n,"-selection-placeholder")]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:"0 ".concat(Ar(r)),"&:after":{display:"none"}}}}}}}function M_(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[O_(e),O_(xa(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{["".concat(t,"-single").concat(t,"-sm")]:{["&:not(".concat(t,"-customize-input)")]:{["".concat(t,"-selection-search")]:{insetInlineStart:n,insetInlineEnd:n},["".concat(t,"-selector")]:{padding:"0 ".concat(Ar(n))},["&".concat(t,"-show-arrow ").concat(t,"-selection-search")]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},["\n &".concat(t,"-show-arrow ").concat(t,"-selection-item,\n &").concat(t,"-show-arrow ").concat(t,"-selection-placeholder\n ")]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},O_(xa(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const P_=(e,t)=>{const{componentCls:n,antCls:r,controlOutlineWidth:o}=e;return{["&:not(".concat(n,"-customize-input) ").concat(n,"-selector")]:{border:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(t.borderColor),background:e.selectorBg},["&:not(".concat(n,"-disabled):not(").concat(n,"-customize-input):not(").concat(r,"-pagination-size-changer)")]:{["&:hover ".concat(n,"-selector")]:{borderColor:t.hoverBorderHover},["".concat(n,"-focused& ").concat(n,"-selector")]:{borderColor:t.activeBorderColor,boxShadow:"0 0 0 ".concat(Ar(o)," ").concat(t.activeShadowColor),outline:0}}}},T_=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status)]:Object.assign({},P_(e,t))}),N_=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},P_(e,{borderColor:e.colorBorder,hoverBorderHover:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadowColor:e.controlOutline})),T_(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeShadowColor:e.colorErrorOutline})),T_(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeShadowColor:e.colorWarningOutline})),{["&".concat(e.componentCls,"-disabled")]:{["&:not(".concat(e.componentCls,"-customize-input) ").concat(e.componentCls,"-selector")]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},["&".concat(e.componentCls,"-multiple ").concat(e.componentCls,"-selection-item")]:{background:e.multipleItemBg,border:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(e.multipleItemBorderColor)}})}),I_=(e,t)=>{const{componentCls:n,antCls:r}=e;return{["&:not(".concat(n,"-customize-input) ").concat(n,"-selector")]:{background:t.bg,border:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," transparent"),color:t.color},["&:not(".concat(n,"-disabled):not(").concat(n,"-customize-input):not(").concat(r,"-pagination-size-changer)")]:{["&:hover ".concat(n,"-selector")]:{background:t.hoverBg},["".concat(n,"-focused& ").concat(n,"-selector")]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},R_=(e,t)=>({["&".concat(e.componentCls,"-status-").concat(t.status)]:Object.assign({},I_(e,t))}),D_=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},I_(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.colorPrimary,color:e.colorText})),R_(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),R_(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{["&".concat(e.componentCls,"-disabled")]:{["&:not(".concat(e.componentCls,"-customize-input) ").concat(e.componentCls,"-selector")]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},["&".concat(e.componentCls,"-multiple ").concat(e.componentCls,"-selection-item")]:{background:e.colorBgContainer,border:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)}})}),j_=e=>({"&-borderless":{["".concat(e.componentCls,"-selector")]:{background:"transparent",borderColor:"transparent"},["&".concat(e.componentCls,"-disabled")]:{["&:not(".concat(e.componentCls,"-customize-input) ").concat(e.componentCls,"-selector")]:{color:e.colorTextDisabled}},["&".concat(e.componentCls,"-multiple ").concat(e.componentCls,"-selection-item")]:{background:e.multipleItemBg,border:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(e.multipleItemBorderColor)}}}),A_=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign({},N_(e)),D_(e)),j_(e))}),z_=e=>{const{componentCls:t}=e;return{position:"relative",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseInOut),input:{cursor:"pointer"},["".concat(t,"-show-search&")]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},["".concat(t,"-disabled&")]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},L_=e=>{const{componentCls:t}=e;return{["".concat(t,"-selection-search-input")]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},F_=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:o}=e;return{[n]:Object.assign(Object.assign({},Ti(e)),{position:"relative",display:"inline-block",cursor:"pointer",["&:not(".concat(n,"-customize-input) ").concat(n,"-selector")]:Object.assign(Object.assign({},z_(e)),L_(e)),["".concat(n,"-selection-item")]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Pi),{["> ".concat(t,"-typography")]:{display:"inline"}}),["".concat(n,"-selection-placeholder")]:Object.assign(Object.assign({},Pi),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),["".concat(n,"-arrow")]:Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:"opacity ".concat(e.motionDurationSlow," ease"),[o]:{verticalAlign:"top",transition:"transform ".concat(e.motionDurationSlow),"> svg":{verticalAlign:"top"},["&:not(".concat(n,"-suffix)")]:{pointerEvents:"auto"}},["".concat(n,"-disabled &")]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),["".concat(n,"-clear")]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:"color ".concat(e.motionDurationMid," ease, opacity ").concat(e.motionDurationSlow," ease"),textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},"&:hover":{["".concat(n,"-clear")]:{opacity:1},["".concat(n,"-arrow:not(:last-child)")]:{opacity:0}}}),["".concat(n,"-has-feedback")]:{["".concat(n,"-clear")]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}},H_=e=>{const{componentCls:t}=e;return[{[t]:{["&".concat(t,"-in-form-item")]:{width:"100%"}}},F_(e),M_(e),__(e),k_(e),{["".concat(t,"-rtl")]:{direction:"rtl"}},yh(e,{borderElCls:"".concat(t,"-selector"),focusElCls:"".concat(t,"-focused")})]},B_=Pa("Select",((e,t)=>{let{rootPrefixCls:n}=t;const r=xa(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[H_(r),A_(r)]}),(e=>{const{fontSize:t,lineHeight:n,controlHeight:r,controlPaddingHorizontal:o,zIndexPopupBase:i,colorText:a,fontWeightStrong:s,controlItemBgActive:c,controlItemBgHover:l,colorBgContainer:u,colorFillSecondary:d,controlHeightLG:f,controlHeightSM:h,colorBgContainerDisabled:p,colorTextDisabled:m}=e;return{zIndexPopup:i+50,optionSelectedColor:a,optionSelectedFontWeight:s,optionSelectedBg:c,optionActiveBg:l,optionPadding:"".concat((r-t*n)/2,"px ").concat(o,"px"),optionFontSize:t,optionLineHeight:n,optionHeight:r,selectorBg:u,clearBg:u,singleItemHeightLG:f,multipleItemBg:d,multipleItemBorderColor:"transparent",multipleItemHeight:h,multipleItemHeightLG:r,multipleSelectorBgDisabled:p,multipleItemColorDisabled:m,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize)}}),{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});const W_={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};var V_=function(e,n){return t.createElement(Vn,vt({},e,{ref:n,icon:W_}))};const Y_=t.forwardRef(V_);const q_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};var U_=function(e,n){return t.createElement(Vn,vt({},e,{ref:n,icon:q_}))};const G_=t.forwardRef(U_);const $_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};var X_=function(e,n){return t.createElement(Vn,vt({},e,{ref:n,icon:$_}))};const K_=t.forwardRef(X_);function Q_(e){let{suffixIcon:n,clearIcon:r,menuItemSelectedIcon:o,removeIcon:i,loading:a,multiple:s,hasFeedback:c,prefixCls:l,showSuffixIcon:u,feedbackIcon:d,showArrow:f,componentName:h}=e;const p=null!==r&&void 0!==r?r:t.createElement(xd,null),m=e=>null!==n||c||f?t.createElement(t.Fragment,null,!1!==u&&e,c&&d):null;let g=null;if(void 0!==n)g=m(n);else if(a)g=m(t.createElement(Vm,{spin:!0}));else{const e="".concat(l,"-suffix");g=n=>{let{open:r,showSearch:o}=n;return m(r&&o?t.createElement(K_,{className:e}):t.createElement(G_,{className:e}))}}let v=null;v=void 0!==o?o:s?t.createElement(ps,null):null;let b=null;return b=void 0!==i?i:t.createElement(Y_,null),{clearIcon:p,suffixIcon:g,itemIcon:v,removeIcon:b}}var Z_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{var r;const{prefixCls:o,bordered:i,className:a,rootClassName:s,getPopupContainer:c,popupClassName:l,dropdownClassName:u,listHeight:d=256,placement:f,listItemHeight:h,size:p,disabled:m,notFoundContent:g,status:v,builtinPlacements:b,dropdownMatchSelectWidth:y,popupMatchSelectWidth:x,direction:w,style:S,allowClear:k,variant:C,dropdownStyle:E,transitionName:_,tagRender:O,maxCount:M}=e,P=Z_(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount"]),{getPopupContainer:T,getPrefixCls:N,renderEmpty:I,direction:R,virtual:D,popupMatchSelectWidth:j,popupOverflow:A,select:z}=t.useContext(ft),[,L]=ia(),F=null!==h&&void 0!==h?h:null===L||void 0===L?void 0:L.controlHeight,H=N("select",o),B=N(),W=null!==w&&void 0!==w?w:R,{compactSize:V,compactItemClassnames:Y}=ts(H,W),[q,U]=Kh(C,i),G=$h(H),[$,X,K]=B_(H,G),Q=t.useMemo((()=>{const{mode:t}=e;if("combobox"!==t)return t===J_?"combobox":t}),[e.mode]),Z="multiple"===Q||"tags"===Q,J=function(e,t){return void 0!==t?t:null!==e}(e.suffixIcon,e.showArrow),ee=null!==(r=null!==x&&void 0!==x?x:y)&&void 0!==r?r:j,{status:te,hasFeedback:ne,isFormItemInput:re,feedbackIcon:oe}=t.useContext(hh),ie=Fd(te,v);let ae;ae=void 0!==g?g:"combobox"===Q?null:(null===I||void 0===I?void 0:I("Select"))||t.createElement(f_,{componentName:"Select"});const{suffixIcon:se,itemIcon:ce,removeIcon:le,clearIcon:ue}=Q_(Object.assign(Object.assign({},P),{multiple:Z,hasFeedback:ne,feedbackIcon:oe,showSuffixIcon:J,prefixCls:H,componentName:"Select"})),de=!0===k?{clearIcon:ue}:k,fe=ut(P,["suffixIcon","itemIcon"]),he=ot()(l||u,{["".concat(H,"-dropdown-").concat(W)]:"rtl"===W},s,K,G,X),pe=$a((e=>{var t;return null!==(t=null!==p&&void 0!==p?p:V)&&void 0!==t?t:e})),me=t.useContext(Wd),ge=null!==m&&void 0!==m?m:me,ve=ot()({["".concat(H,"-lg")]:"large"===pe,["".concat(H,"-sm")]:"small"===pe,["".concat(H,"-rtl")]:"rtl"===W,["".concat(H,"-").concat(q)]:U,["".concat(H,"-in-form-item")]:re},Ld(H,ie,ne),Y,null===z||void 0===z?void 0:z.className,a,s,K,G,X),be=t.useMemo((()=>void 0!==f?f:"rtl"===W?"bottomRight":"bottomLeft"),[f,W]);const[ye]=bu("SelectLike",null===E||void 0===E?void 0:E.zIndex);return $(t.createElement(TE,Object.assign({ref:n,virtual:D,showSearch:null===z||void 0===z?void 0:z.showSearch},fe,{style:Object.assign(Object.assign({},null===z||void 0===z?void 0:z.style),S),dropdownMatchSelectWidth:ee,transitionName:ku(B,"slide-up",_),builtinPlacements:h_(b,A),listHeight:d,listItemHeight:F,mode:Q,prefixCls:H,placement:be,direction:W,suffixIcon:se,menuItemSelectedIcon:ce,removeIcon:le,allowClear:de,notFoundContent:ae,className:ve,getPopupContainer:c||T,dropdownClassName:he,disabled:ge,dropdownStyle:Object.assign(Object.assign({},E),{zIndex:ye}),maxCount:Z?M:void 0,tagRender:Z?O:void 0})))};const tO=t.forwardRef(eO),nO=n_(tO);tO.SECRET_COMBOBOX_MODE_DO_NOT_USE=J_,tO.Option=qC,tO.OptGroup=VC,tO._InternalPanelDoNotUseOrYouWillBeFired=nO;const rO=tO;const oO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var iO=function(e,n){return t.createElement(Vn,vt({},e,{ref:n,icon:oO}))};const aO=t.forwardRef(iO),sO=(0,t.createContext)(null);const cO=function(e){var n=e.activeTabOffset,r=e.horizontal,o=e.rtl,i=e.indicator,a=void 0===i?{}:i,s=a.size,c=a.align,l=void 0===c?"center":c,u=wt((0,t.useState)(),2),d=u[0],f=u[1],h=(0,t.useRef)(),p=t.useCallback((function(e){return"function"===typeof s?s(e):"number"===typeof s?s:e}),[s]);function m(){gl.cancel(h.current)}return(0,t.useEffect)((function(){var e={};if(n)if(r){e.width=p(n.width);var t=o?"right":"left";"start"===l&&(e[t]=n[t]),"center"===l&&(e[t]=n[t]+n.width/2,e.transform=o?"translateX(50%)":"translateX(-50%)"),"end"===l&&(e[t]=n[t]+n.width,e.transform="translateX(-100%)")}else e.height=p(n.height),"start"===l&&(e.top=n.top),"center"===l&&(e.top=n.top+n.height/2,e.transform="translateY(-50%)"),"end"===l&&(e.top=n.top+n.height,e.transform="translateY(-100%)");return m(),h.current=gl((function(){f(e)})),m}),[n,r,o,l,p]),{style:d}};var lO={width:0,height:0,left:0,top:0};function uO(e,n){var r=t.useRef(e),o=wt(t.useState({}),2)[1];return[r.current,function(e){var t="function"===typeof e?e(r.current):e;t!==r.current&&n(t,r.current),r.current=t,o({})}]}var dO=Math.pow(.995,20);function fO(e){var n=wt((0,t.useState)(0),2),r=n[0],o=n[1],i=(0,t.useRef)(0),a=(0,t.useRef)();return a.current=e,Vr((function(){var e;null===(e=a.current)||void 0===e||e.call(a)}),[r]),function(){i.current===r&&(i.current+=1,o(i.current))}}var hO={width:0,height:0,left:0,top:0,right:0};function pO(e){var t;return e instanceof Map?(t={},e.forEach((function(e,n){t[n]=e}))):t=e,JSON.stringify(t)}function mO(e){return String(e).replace(/"/g,"TABS_DQ")}function gO(e,t,n,r){return!(!n||r||!1===e||void 0===e&&(!1===t||null===t))}var vO=t.forwardRef((function(e,n){var r=e.prefixCls,o=e.editable,i=e.locale,a=e.style;return o&&!1!==o.showAdd?t.createElement("button",{ref:n,type:"button",className:"".concat(r,"-nav-add"),style:a,"aria-label":(null===i||void 0===i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){o.onEdit("add",{event:e})}},o.addIcon||"+"):null}));const bO=vO;var yO=t.forwardRef((function(e,n){var r,o=e.position,i=e.prefixCls,a=e.extra;if(!a)return null;var s={};return"object"!==it(a)||t.isValidElement(a)?s.right=a:s=a,"right"===o&&(r=s.right),"left"===o&&(r=s.left),r?t.createElement("div",{className:"".concat(i,"-extra-content"),ref:n},r):null}));const xO=yO;var wO=ac.ESC,SO=ac.TAB;const kO=(0,t.forwardRef)((function(e,n){var r=e.overlay,o=e.arrow,i=e.prefixCls,a=(0,t.useMemo)((function(){return"function"===typeof r?r():r}),[r]),s=yi(n,null===a||void 0===a?void 0:a.ref);return t.createElement(t.Fragment,null,o&&t.createElement("div",{className:"".concat(i,"-arrow")}),t.cloneElement(a,{ref:wi(a)?s:void 0}))}));var CO={adjustX:1,adjustY:1},EO=[0,0];const _O={topLeft:{points:["bl","tl"],overflow:CO,offset:[0,-4],targetOffset:EO},top:{points:["bc","tc"],overflow:CO,offset:[0,-4],targetOffset:EO},topRight:{points:["br","tr"],overflow:CO,offset:[0,-4],targetOffset:EO},bottomLeft:{points:["tl","bl"],overflow:CO,offset:[0,4],targetOffset:EO},bottom:{points:["tc","bc"],overflow:CO,offset:[0,4],targetOffset:EO},bottomRight:{points:["tr","br"],overflow:CO,offset:[0,4],targetOffset:EO}};var OO=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function MO(e,n){var r,o=e.arrow,i=void 0!==o&&o,a=e.prefixCls,s=void 0===a?"rc-dropdown":a,c=e.transitionName,l=e.animation,u=e.align,d=e.placement,f=void 0===d?"bottomLeft":d,h=e.placements,p=void 0===h?_O:h,m=e.getPopupContainer,g=e.showAction,v=e.hideAction,b=e.overlayClassName,y=e.overlayStyle,x=e.visible,w=e.trigger,S=void 0===w?["hover"]:w,k=e.autoFocus,C=e.overlay,E=e.children,_=e.onVisibleChange,O=St(e,OO),M=wt(t.useState(),2),P=M[0],T=M[1],N="visible"in e?x:P,I=t.useRef(null),R=t.useRef(null),D=t.useRef(null);t.useImperativeHandle(n,(function(){return I.current}));var j=function(e){T(e),null===_||void 0===_||_(e)};!function(e){var n=e.visible,r=e.triggerRef,o=e.onVisibleChange,i=e.autoFocus,a=e.overlayRef,s=t.useRef(!1),c=function(){var e,t;n&&(null===(e=r.current)||void 0===e||null===(t=e.focus)||void 0===t||t.call(e),null===o||void 0===o||o(!1))},l=function(){var e;return!(null===(e=a.current)||void 0===e||!e.focus)&&(a.current.focus(),s.current=!0,!0)},u=function(e){switch(e.keyCode){case wO:c();break;case SO:var t=!1;s.current||(t=l()),t?e.preventDefault():c()}};t.useEffect((function(){return n?(window.addEventListener("keydown",u),i&&gl(l,3),function(){window.removeEventListener("keydown",u),s.current=!1}):function(){s.current=!1}}),[n])}({visible:N,triggerRef:D,onVisibleChange:j,autoFocus:k,overlayRef:R});var A=function(){return t.createElement(kO,{ref:R,overlay:C,prefixCls:s,arrow:i})},z=t.cloneElement(E,{className:ot()(null===(r=E.props)||void 0===r?void 0:r.className,N&&function(){var t=e.openClassName;return void 0!==t?t:"".concat(s,"-open")}()),ref:wi(E)?yi(D,E.ref):void 0}),L=v;return L||-1===S.indexOf("contextMenu")||(L=["click"]),t.createElement(iu,vt({builtinPlacements:p},O,{prefixCls:s,ref:I,popupClassName:ot()(b,st({},"".concat(s,"-show-arrow"),i)),popupStyle:y,action:S,showAction:g,hideAction:L,popupPlacement:f,popupAlign:u,popupTransitionName:c,popupAnimation:l,popupVisible:N,stretch:function(){var t=e.minOverlayWidthMatchTrigger,n=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?t:!n}()?"minWidth":"",popup:"function"===typeof C?A:A(),onPopupVisibleChange:j,onPopupClick:function(t){var n=e.onOverlayClick;T(!1),n&&n(t)},getPopupContainer:m}),z)}const PO=t.forwardRef(MO);var TO=t.forwardRef((function(e,n){var r=e.prefixCls,o=e.id,i=e.tabs,a=e.locale,s=e.mobile,c=e.moreIcon,l=void 0===c?"More":c,u=e.moreTransitionName,d=e.style,f=e.className,h=e.editable,p=e.tabBarGutter,m=e.rtl,g=e.removeAriaLabel,v=e.onTabClick,b=e.getPopupContainer,y=e.popupClassName,x=wt((0,t.useState)(!1),2),w=x[0],S=x[1],k=wt((0,t.useState)(null),2),C=k[0],E=k[1],_="".concat(o,"-more-popup"),O="".concat(r,"-dropdown"),M=null!==C?"".concat(_,"-").concat(C):null,P=null===a||void 0===a?void 0:a.dropdownAriaLabel;var T=t.createElement(mb,{onClick:function(e){var t=e.key,n=e.domEvent;v(t,n),S(!1)},prefixCls:"".concat(O,"-menu"),id:_,tabIndex:-1,role:"listbox","aria-activedescendant":M,selectedKeys:[C],"aria-label":void 0!==P?P:"expanded dropdown"},i.map((function(e){var n=e.closable,r=e.disabled,i=e.closeIcon,a=e.key,s=e.label,c=gO(n,i,h,r);return t.createElement(Hv,{key:a,id:"".concat(_,"-").concat(a),role:"option","aria-controls":o&&"".concat(o,"-panel-").concat(a),disabled:r},t.createElement("span",null,s),c&&t.createElement("button",{type:"button","aria-label":g||"remove",tabIndex:0,className:"".concat(O,"-menu-item-remove"),onClick:function(e){e.stopPropagation(),function(e,t){e.preventDefault(),e.stopPropagation(),h.onEdit("remove",{key:t,event:e})}(e,a)}},i||h.removeIcon||"\xd7"))})));function N(e){for(var t=i.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===C}))||0,r=t.length,o=0;ot?"left":"right"})})),T=wt(P,2),N=T[0],I=T[1],R=uO(0,(function(e,t){!M&&g&&g({direction:e>t?"top":"bottom"})})),D=wt(R,2),j=D[0],A=D[1],z=wt((0,t.useState)([0,0]),2),L=z[0],F=z[1],H=wt((0,t.useState)([0,0]),2),B=H[0],W=H[1],V=wt((0,t.useState)([0,0]),2),Y=V[0],q=V[1],U=wt((0,t.useState)([0,0]),2),G=U[0],$=U[1],X=function(e){var n=(0,t.useRef)([]),r=wt((0,t.useState)({}),2)[1],o=(0,t.useRef)("function"===typeof e?e():e),i=fO((function(){var e=o.current;n.current.forEach((function(t){e=t(e)})),n.current=[],o.current=e,r({})}));return[o.current,function(e){n.current.push(e),i()}]}(new Map),K=wt(X,2),Q=K[0],Z=K[1],J=function(e,n,r){return(0,t.useMemo)((function(){for(var t,r=new Map,o=n.get(null===(t=e[0])||void 0===t?void 0:t.key)||lO,i=o.left+o.width,a=0;ace?ce:e}M&&c?(se=0,ce=Math.max(0,te-ie)):(se=Math.min(0,ie-te),ce=0);var ue=(0,t.useRef)(null),de=wt((0,t.useState)(),2),fe=de[0],he=de[1];function pe(){he(Date.now())}function me(){ue.current&&clearTimeout(ue.current)}!function(e,n){var r=wt((0,t.useState)(),2),o=r[0],i=r[1],a=wt((0,t.useState)(0),2),s=a[0],c=a[1],l=wt((0,t.useState)(0),2),u=l[0],d=l[1],f=wt((0,t.useState)(),2),h=f[0],p=f[1],m=(0,t.useRef)(),g=(0,t.useRef)(),v=(0,t.useRef)(null);v.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;i({x:n,y:r}),window.clearInterval(m.current)},onTouchMove:function(e){if(o){e.preventDefault();var t=e.touches[0],r=t.screenX,a=t.screenY;i({x:r,y:a});var l=r-o.x,u=a-o.y;n(l,u);var f=Date.now();c(f),d(f-s),p({x:l,y:u})}},onTouchEnd:function(){if(o&&(i(null),p(null),h)){var e=h.x/u,t=h.y/u,r=Math.abs(e),a=Math.abs(t);if(Math.max(r,a)<.1)return;var s=e,c=t;m.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(c)<.01?window.clearInterval(m.current):n(20*(s*=dO),20*(c*=dO))}),20)}},onWheel:function(e){var t=e.deltaX,r=e.deltaY,o=0,i=Math.abs(t),a=Math.abs(r);i===a?o="x"===g.current?t:r:i>a?(o=t,g.current="x"):(o=r,g.current="y"),n(-o,-o)&&e.preventDefault()}},t.useEffect((function(){function t(e){v.current.onTouchMove(e)}function n(e){v.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){v.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){v.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(C,(function(e,t){function n(e,t){e((function(e){return le(e+t)}))}return!!oe&&(M?n(I,e):n(A,t),me(),pe(),!0)})),(0,t.useEffect)((function(){return me(),fe&&(ue.current=setTimeout((function(){he(0)}),100)),me}),[fe]);var ge=function(e,n,r,o,i,a,s){var c,l,u,d=s.tabs,f=s.tabPosition,h=s.rtl;return["top","bottom"].includes(f)?(c="width",l=h?"right":"left",u=Math.abs(r)):(c="height",l="top",u=-r),(0,t.useMemo)((function(){if(!d.length)return[0,0];for(var t=d.length,r=t,o=0;ou+n){r=o-1;break}}for(var a=0,s=t-1;s>=0;s-=1)if((e.get(d[s].key)||hO)[l]=r?[0,0]:[a,r]}),[e,n,o,i,a,u,f,d.map((function(e){return e.key})).join("_"),h])}(J,ie,M?N:j,te,ne,re,lt(lt({},e),{},{tabs:x})),ve=wt(ge,2),be=ve[0],ye=ve[1],xe=pi((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=J.get(e)||{width:0,height:0,left:0,right:0,top:0};if(M){var n=N;c?t.rightN+ie&&(n=t.right+t.width-ie):t.left<-N?n=-t.left:t.left+t.width>-N+ie&&(n=-(t.left+t.width-ie)),A(0),I(le(n))}else{var r=j;t.top<-j?r=-t.top:t.top+t.height>-j+ie&&(r=-(t.top+t.height-ie)),I(0),A(le(r))}})),we={};"top"===f||"bottom"===f?we[c?"marginRight":"marginLeft"]=h:we.marginTop=h;var Se=x.map((function(e,n){var r=e.key;return t.createElement(IO,{id:i,prefixCls:y,key:r,tab:e,style:0===n?void 0:we,closable:e.closable,editable:u,active:r===s,renderWrapper:p,removeAriaLabel:null===d||void 0===d?void 0:d.removeAriaLabel,onClick:function(e){m(r,e)},onFocus:function(){xe(r),pe(),C.current&&(c||(C.current.scrollLeft=0),C.current.scrollTop=0)}})})),ke=function(){return Z((function(){var e,t=new Map,n=null===(e=E.current)||void 0===e?void 0:e.getBoundingClientRect();return x.forEach((function(e){var r,o=e.key,i=null===(r=E.current)||void 0===r?void 0:r.querySelector('[data-node-key="'.concat(mO(o),'"]'));if(i){var a=function(e,t){var n=e.offsetWidth,r=e.offsetHeight,o=e.offsetTop,i=e.offsetLeft,a=e.getBoundingClientRect(),s=a.width,c=a.height,l=a.x,u=a.y;return Math.abs(s-n)<1?[s,c,l-t.x,u-t.y]:[n,r,i,o]}(i,n),s=wt(a,4),c=s[0],l=s[1],u=s[2],d=s[3];t.set(o,{width:c,height:l,left:u,top:d})}})),t}))};(0,t.useEffect)((function(){ke()}),[x.map((function(e){return e.key})).join("_")]);var Ce=fO((function(){var e=RO(w),t=RO(S),n=RO(k);F([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);var r=RO(O);q(r);var o=RO(_);$(o);var i=RO(E);W([i[0]-r[0],i[1]-r[1]]),ke()})),Ee=x.slice(0,be),_e=x.slice(ye+1),Oe=[].concat(nt(Ee),nt(_e)),Me=J.get(s),Pe=cO({activeTabOffset:Me,horizontal:M,indicator:v,rtl:c}).style;(0,t.useEffect)((function(){xe()}),[s,se,ce,pO(Me),pO(J),M]),(0,t.useEffect)((function(){Ce()}),[c]);var Te,Ne,Ie,Re,De=!!Oe.length,je="".concat(y,"-nav-wrap");return M?c?(Ne=N>0,Te=N!==ce):(Te=N<0,Ne=N!==se):(Ie=j<0,Re=j!==se),t.createElement(nc,{onResize:Ce},t.createElement("div",{ref:xi(n,w),role:"tablist",className:ot()("".concat(y,"-nav"),r),style:o,onKeyDown:function(){pe()}},t.createElement(xO,{ref:S,position:"left",extra:l,prefixCls:y}),t.createElement(nc,{onResize:Ce},t.createElement("div",{className:ot()(je,st(st(st(st({},"".concat(je,"-ping-left"),Te),"".concat(je,"-ping-right"),Ne),"".concat(je,"-ping-top"),Ie),"".concat(je,"-ping-bottom"),Re)),ref:C},t.createElement(nc,{onResize:Ce},t.createElement("div",{ref:E,className:"".concat(y,"-nav-list"),style:{transform:"translate(".concat(N,"px, ").concat(j,"px)"),transition:fe?"none":void 0}},Se,t.createElement(bO,{ref:O,prefixCls:y,locale:d,editable:u,style:lt(lt({},0===Se.length?void 0:we),{},{visibility:De?"hidden":null})}),t.createElement("div",{className:ot()("".concat(y,"-ink-bar"),st({},"".concat(y,"-ink-bar-animated"),a.inkBar)),style:Pe}))))),t.createElement(NO,vt({},e,{removeAriaLabel:null===d||void 0===d?void 0:d.removeAriaLabel,ref:_,prefixCls:y,tabs:Oe,className:!De&&ae,tabMoving:!!fe})),t.createElement(xO,{ref:k,position:"right",extra:l,prefixCls:y})))}));const AO=jO;var zO=t.forwardRef((function(e,n){var r=e.prefixCls,o=e.className,i=e.style,a=e.id,s=e.active,c=e.tabKey,l=e.children;return t.createElement("div",{id:a&&"".concat(a,"-panel-").concat(c),role:"tabpanel",tabIndex:s?0:-1,"aria-labelledby":a&&"".concat(a,"-tab-").concat(c),"aria-hidden":!s,style:i,className:ot()(r,s&&"".concat(r,"-active"),o),ref:n},l)}));const LO=zO;var FO=["renderTabBar"],HO=["label","key"];const BO=function(e){var n=e.renderTabBar,r=St(e,FO),o=t.useContext(sO).tabs;return n?n(lt(lt({},r),{},{panes:o.map((function(e){var n=e.label,r=e.key,o=St(e,HO);return t.createElement(LO,vt({tab:n,key:r,tabKey:r},o))}))}),AO):t.createElement(AO,r)};var WO=["key","forceRender","style","className","destroyInactiveTabPane"];const VO=function(e){var n=e.id,r=e.activeKey,o=e.animated,i=e.tabPosition,a=e.destroyInactiveTabPane,s=t.useContext(sO),c=s.prefixCls,l=s.tabs,u=o.tabPane,d="".concat(c,"-tabpane");return t.createElement("div",{className:ot()("".concat(c,"-content-holder"))},t.createElement("div",{className:ot()("".concat(c,"-content"),"".concat(c,"-content-").concat(i),st({},"".concat(c,"-content-animated"),u))},l.map((function(e){var i=e.key,s=e.forceRender,c=e.style,l=e.className,f=e.destroyInactiveTabPane,h=St(e,WO),p=i===r;return t.createElement(Dl,vt({key:i,visible:p,forceRender:s,removeOnLeave:!(!a&&!f),leavedClassName:"".concat(d,"-hidden")},o.tabPaneMotion),(function(e,r){var o=e.style,a=e.className;return t.createElement(LO,vt({},h,{prefixCls:d,id:n,tabKey:i,animated:u,active:p,style:lt(lt({},c),o),className:ot()(l,a),ref:r}))}))}))))};var YO=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],qO=0,UO=t.forwardRef((function(e,n){var r=e.id,o=e.prefixCls,i=void 0===o?"rc-tabs":o,a=e.className,s=e.items,c=e.direction,l=e.activeKey,u=e.defaultActiveKey,d=e.editable,f=e.animated,h=e.tabPosition,p=void 0===h?"top":h,m=e.tabBarGutter,g=e.tabBarStyle,v=e.tabBarExtraContent,b=e.locale,y=e.moreIcon,x=e.moreTransitionName,w=e.destroyInactiveTabPane,S=e.renderTabBar,k=e.onChange,C=e.onTabClick,E=e.onTabScroll,_=e.getPopupContainer,O=e.popupClassName,M=e.indicator,P=St(e,YO),T=t.useMemo((function(){return(s||[]).filter((function(e){return e&&"object"===it(e)&&"key"in e}))}),[s]),N="rtl"===c,I=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{inkBar:!0,tabPane:!1};return(e=!1===t?{inkBar:!1,tabPane:!1}:!0===t?{inkBar:!0,tabPane:!1}:lt({inkBar:!0},"object"===it(t)?t:{})).tabPaneMotion&&void 0===e.tabPane&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}(f),R=wt((0,t.useState)(!1),2),D=R[0],j=R[1];(0,t.useEffect)((function(){j(Dc())}),[]);var A=wt(vi((function(){var e;return null===(e=T[0])||void 0===e?void 0:e.key}),{value:l,defaultValue:u}),2),z=A[0],L=A[1],F=wt((0,t.useState)((function(){return T.findIndex((function(e){return e.key===z}))})),2),H=F[0],B=F[1];(0,t.useEffect)((function(){var e,t=T.findIndex((function(e){return e.key===z}));-1===t&&(t=Math.max(0,Math.min(H,T.length-1)),L(null===(e=T[t])||void 0===e?void 0:e.key));B(t)}),[T.map((function(e){return e.key})).join("_"),z,H]);var W=wt(vi(null,{value:r}),2),V=W[0],Y=W[1];(0,t.useEffect)((function(){r||(Y("rc-tabs-".concat(qO)),qO+=1)}),[]);var q={id:V,activeKey:z,animated:I,tabPosition:p,rtl:N,mobile:D},U=lt(lt({},q),{},{editable:d,locale:b,moreIcon:y,moreTransitionName:x,tabBarGutter:m,onTabClick:function(e,t){null===C||void 0===C||C(e,t);var n=e!==z;L(e),n&&(null===k||void 0===k||k(e))},onTabScroll:E,extra:v,style:g,panes:null,getPopupContainer:_,popupClassName:O,indicator:M});return t.createElement(sO.Provider,{value:{tabs:T,prefixCls:i}},t.createElement("div",vt({ref:n,id:r,className:ot()(i,"".concat(i,"-").concat(p),st(st(st({},"".concat(i,"-mobile"),D),"".concat(i,"-editable"),d),"".concat(i,"-rtl"),N),a)},P),t.createElement(BO,vt({},U,{renderTabBar:S})),t.createElement(VO,vt({destroyInactiveTabPane:w},q,{animated:I}))))}));const GO=UO,$O={motionAppear:!1,motionEnter:!0,motionLeave:!0};var XO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{["".concat(t,"-switch")]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:"opacity ".concat(n)}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:"opacity ".concat(n)}}}}},[Fb(e,"slide-up"),Fb(e,"slide-down")]]},QO=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:o,colorBorderSecondary:i,itemSelectedColor:a}=e;return{["".concat(t,"-card")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{margin:0,padding:n,background:r,border:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(i),transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut)},["".concat(t,"-tab-active")]:{color:a,background:e.colorBgContainer},["".concat(t,"-ink-bar")]:{visibility:"hidden"}},["&".concat(t,"-top, &").concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab + ").concat(t,"-tab")]:{marginLeft:{_skip_check_:!0,value:Ar(o)}}}},["&".concat(t,"-top")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:"".concat(Ar(e.borderRadiusLG)," ").concat(Ar(e.borderRadiusLG)," 0 0")},["".concat(t,"-tab-active")]:{borderBottomColor:e.colorBgContainer}}},["&".concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:"0 0 ".concat(Ar(e.borderRadiusLG)," ").concat(Ar(e.borderRadiusLG))},["".concat(t,"-tab-active")]:{borderTopColor:e.colorBgContainer}}},["&".concat(t,"-left, &").concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab + ").concat(t,"-tab")]:{marginTop:Ar(o)}}},["&".concat(t,"-left")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"".concat(Ar(e.borderRadiusLG)," 0 0 ").concat(Ar(e.borderRadiusLG))}},["".concat(t,"-tab-active")]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},["&".concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"0 ".concat(Ar(e.borderRadiusLG)," ").concat(Ar(e.borderRadiusLG)," 0")}},["".concat(t,"-tab-active")]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},ZO=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{["".concat(t,"-dropdown")]:Object.assign(Object.assign({},Ti(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},["".concat(t,"-dropdown-menu")]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:"".concat(Ar(r)," 0"),overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Pi),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:"".concat(Ar(e.paddingXXS)," ").concat(Ar(e.paddingSM)),color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},JO=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:o,verticalItemPadding:i,verticalItemMargin:a,calc:s}=e;return{["".concat(t,"-top, ").concat(t,"-bottom")]:{flexDirection:"column",["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{margin:o,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(r),content:"''"},["".concat(t,"-ink-bar")]:{height:e.lineWidthBold,"&-animated":{transition:"width ".concat(e.motionDurationSlow,", left ").concat(e.motionDurationSlow,",\n right ").concat(e.motionDurationSlow)}},["".concat(t,"-nav-wrap")]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},["&".concat(t,"-nav-wrap-ping-left::before")]:{opacity:1},["&".concat(t,"-nav-wrap-ping-right::after")]:{opacity:1}}}},["".concat(t,"-top")]:{["> ".concat(t,"-nav,\n > div > ").concat(t,"-nav")]:{"&::before":{bottom:0},["".concat(t,"-ink-bar")]:{bottom:0}}},["".concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},["".concat(t,"-ink-bar")]:{top:0}},["> ".concat(t,"-content-holder, > div > ").concat(t,"-content-holder")]:{order:0}},["".concat(t,"-left, ").concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{flexDirection:"column",minWidth:s(e.controlHeight).mul(1.25).equal(),["".concat(t,"-tab")]:{padding:i,textAlign:"center"},["".concat(t,"-tab + ").concat(t,"-tab")]:{margin:a},["".concat(t,"-nav-wrap")]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},["&".concat(t,"-nav-wrap-ping-top::before")]:{opacity:1},["&".concat(t,"-nav-wrap-ping-bottom::after")]:{opacity:1}},["".concat(t,"-ink-bar")]:{width:e.lineWidthBold,"&-animated":{transition:"height ".concat(e.motionDurationSlow,", top ").concat(e.motionDurationSlow)}},["".concat(t,"-nav-list, ").concat(t,"-nav-operations")]:{flex:"1 0 auto",flexDirection:"column"}}},["".concat(t,"-left")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-ink-bar")]:{right:{_skip_check_:!0,value:0}}},["> ".concat(t,"-content-holder, > div > ").concat(t,"-content-holder")]:{marginLeft:{_skip_check_:!0,value:Ar(s(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},["> ".concat(t,"-content > ").concat(t,"-tabpane")]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},["".concat(t,"-right")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{order:1,["".concat(t,"-ink-bar")]:{left:{_skip_check_:!0,value:0}}},["> ".concat(t,"-content-holder, > div > ").concat(t,"-content-holder")]:{order:0,marginRight:{_skip_check_:!0,value:s(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder)},["> ".concat(t,"-content > ").concat(t,"-tabpane")]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},eM=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,horizontalItemPaddingSM:o,horizontalItemPaddingLG:i}=e;return{[t]:{"&-small":{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:i,fontSize:e.titleFontSizeLG}}}},["".concat(t,"-card")]:{["&".concat(t,"-small")]:{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:n}},["&".concat(t,"-bottom")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:"0 0 ".concat(Ar(e.borderRadius)," ").concat(Ar(e.borderRadius))}},["&".concat(t,"-top")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:"".concat(Ar(e.borderRadius)," ").concat(Ar(e.borderRadius)," 0 0")}},["&".concat(t,"-right")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"0 ".concat(Ar(e.borderRadius)," ").concat(Ar(e.borderRadius)," 0")}}},["&".concat(t,"-left")]:{["> ".concat(t,"-nav ").concat(t,"-tab")]:{borderRadius:{_skip_check_:!0,value:"".concat(Ar(e.borderRadius)," 0 0 ").concat(Ar(e.borderRadius))}}}},["&".concat(t,"-large")]:{["> ".concat(t,"-nav")]:{["".concat(t,"-tab")]:{padding:r}}}}}},tM=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:o,tabsHorizontalItemMargin:i,horizontalItemPadding:a,itemSelectedColor:s,itemColor:c}=e,l="".concat(t,"-tab");return{[l]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:c,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:n}},Di(e)),"&-btn":{outline:"none",transition:"all 0.3s",["".concat(l,"-icon:not(:last-child)")]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),"&:hover":{color:e.colorTextHeading}},"&:hover":{color:r},["&".concat(l,"-active ").concat(l,"-btn")]:{color:s,textShadow:e.tabsActiveTextShadow},["&".concat(l,"-disabled")]:{color:e.colorTextDisabled,cursor:"not-allowed"},["&".concat(l,"-disabled ").concat(l,"-btn, &").concat(l,"-disabled ").concat(t,"-remove")]:{"&:focus, &:active":{color:e.colorTextDisabled}},["& ".concat(l,"-remove ").concat(o)]:{margin:0},["".concat(o,":not(:last-child)")]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},["".concat(l," + ").concat(l)]:{margin:{_skip_check_:!0,value:i}}}},nM=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:o,calc:i}=e;return{["".concat(t,"-rtl")]:{direction:"rtl",["".concat(t,"-nav")]:{["".concat(t,"-tab")]:{margin:{_skip_check_:!0,value:n},["".concat(t,"-tab:last-of-type")]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:Ar(e.marginSM)}},["".concat(t,"-tab-remove")]:{marginRight:{_skip_check_:!0,value:Ar(e.marginXS)},marginLeft:{_skip_check_:!0,value:Ar(i(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},["&".concat(t,"-left")]:{["> ".concat(t,"-nav")]:{order:1},["> ".concat(t,"-content-holder")]:{order:0}},["&".concat(t,"-right")]:{["> ".concat(t,"-nav")]:{order:0},["> ".concat(t,"-content-holder")]:{order:1}},["&".concat(t,"-card").concat(t,"-top, &").concat(t,"-card").concat(t,"-bottom")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-tab + ").concat(t,"-tab")]:{marginRight:{_skip_check_:!0,value:o},marginLeft:{_skip_check_:!0,value:0}}}}},["".concat(t,"-dropdown-rtl")]:{direction:"rtl"},["".concat(t,"-menu-item")]:{["".concat(t,"-dropdown-rtl")]:{textAlign:{_skip_check_:!0,value:"right"}}}}},rM=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:o,itemHoverColor:i,itemActiveColor:a,colorBorderSecondary:s}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Ti(e)),{display:"flex",["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{position:"relative",display:"flex",flex:"none",alignItems:"center",["".concat(t,"-nav-wrap")]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:"opacity ".concat(e.motionDurationSlow),content:"''",pointerEvents:"none"}},["".concat(t,"-nav-list")]:{position:"relative",display:"flex",transition:"opacity ".concat(e.motionDurationSlow)},["".concat(t,"-nav-operations")]:{display:"flex",alignSelf:"stretch"},["".concat(t,"-nav-operations-hidden")]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},["".concat(t,"-nav-more")]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},["".concat(t,"-nav-add")]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:o},padding:"0 ".concat(Ar(e.paddingXS)),background:"transparent",border:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(s),borderRadius:"".concat(Ar(e.borderRadiusLG)," ").concat(Ar(e.borderRadiusLG)," 0 0"),outline:"none",cursor:"pointer",color:e.colorText,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseInOut),"&:hover":{color:i},"&:active, &:focus:not(:focus-visible)":{color:a}},Di(e))},["".concat(t,"-extra-content")]:{flex:"none"},["".concat(t,"-ink-bar")]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),tM(e)),{["".concat(t,"-content")]:{position:"relative",width:"100%"},["".concat(t,"-content-holder")]:{flex:"auto",minWidth:0,minHeight:0},["".concat(t,"-tabpane")]:{outline:"none","&-hidden":{display:"none"}}}),["".concat(t,"-centered")]:{["> ".concat(t,"-nav, > div > ").concat(t,"-nav")]:{["".concat(t,"-nav-wrap")]:{["&:not([class*='".concat(t,"-nav-wrap-ping'])")]:{justifyContent:"center"}}}}}},oM=Pa("Tabs",(e=>{const t=xa(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:"0 0 0 ".concat(Ar(e.horizontalItemGutter)),tabsHorizontalItemMarginRTL:"0 0 0 ".concat(Ar(e.horizontalItemGutter))});return[eM(t),nM(t),JO(t),ZO(t),QO(t),rM(t),KO(t)]}),(e=>{const t=e.controlHeightLG;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:t,cardPadding:"".concat((t-Math.round(e.fontSize*e.lineHeight))/2-e.lineWidth,"px ").concat(e.padding,"px"),cardPaddingSM:"".concat(1.5*e.paddingXXS,"px ").concat(e.padding,"px"),cardPaddingLG:"".concat(e.paddingXS,"px ").concat(e.padding,"px ").concat(1.5*e.paddingXXS,"px"),titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:"0 0 ".concat(e.margin,"px 0"),horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:"".concat(e.paddingSM,"px 0"),horizontalItemPaddingSM:"".concat(e.paddingXS,"px 0"),horizontalItemPaddingLG:"".concat(e.padding,"px 0"),verticalItemPadding:"".concat(e.paddingXS,"px ").concat(e.paddingLG,"px"),verticalItemMargin:"".concat(e.margin,"px 0 0 0"),itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}));var iM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{var n,r,o,i,a,s,c;const{type:l,className:u,rootClassName:d,size:f,onEdit:h,hideAdd:p,centered:m,addIcon:g,moreIcon:v,popupClassName:b,children:y,items:x,animated:w,style:S,indicatorSize:k,indicator:C}=e,E=iM(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","moreIcon","popupClassName","children","items","animated","style","indicatorSize","indicator"]),{prefixCls:_}=E,{direction:O,tabs:M,getPrefixCls:P,getPopupContainer:T}=t.useContext(ft),N=P("tabs",_),I=$h(N),[R,D,j]=oM(N,I);let A;"editable-card"===l&&(A={onEdit:(e,t)=>{let{key:n,event:r}=t;null===h||void 0===h||h("add"===e?r:n,e)},removeIcon:t.createElement(Y_,null),addIcon:(null!==g&&void 0!==g?g:null===M||void 0===M?void 0:M.addIcon)||t.createElement(aO,null),showAdd:!0!==p});const z=P();const L=$a(f),F=function(e,n){if(e)return e;const r=gt(n).map((e=>{if(t.isValidElement(e)){const{key:t,props:n}=e,r=n||{},{tab:o}=r,i=XO(r,["tab"]);return Object.assign(Object.assign({key:String(t)},i),{label:o})}return null}));return function(e){return e.filter((e=>e))}(r)}(x,y),H=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{inkBar:!0,tabPane:!1};return t=!1===n?{inkBar:!1,tabPane:!1}:!0===n?{inkBar:!0,tabPane:!0}:Object.assign({inkBar:!0},"object"===typeof n?n:{}),t.tabPane&&(t.tabPaneMotion=Object.assign(Object.assign({},$O),{motionName:ku(e,"switch")})),t}(N,w),B=Object.assign(Object.assign({},null===M||void 0===M?void 0:M.style),S),W={align:null!==(n=null===C||void 0===C?void 0:C.align)&&void 0!==n?n:null===(r=null===M||void 0===M?void 0:M.indicator)||void 0===r?void 0:r.align,size:null!==(s=null!==(i=null!==(o=null===C||void 0===C?void 0:C.size)&&void 0!==o?o:k)&&void 0!==i?i:null===(a=null===M||void 0===M?void 0:M.indicator)||void 0===a?void 0:a.size)&&void 0!==s?s:null===M||void 0===M?void 0:M.indicatorSize};return R(t.createElement(GO,Object.assign({direction:O,getPopupContainer:T,moreTransitionName:"".concat(z,"-slide-up")},E,{items:F,className:ot()({["".concat(N,"-").concat(L)]:L,["".concat(N,"-card")]:["card","editable-card"].includes(l),["".concat(N,"-editable-card")]:"editable-card"===l,["".concat(N,"-centered")]:m},null===M||void 0===M?void 0:M.className,u,d,D,j,I),popupClassName:ot()(b,D,j,I),style:B,editable:A,moreIcon:null!==(c=null!==v&&void 0!==v?v:null===M||void 0===M?void 0:M.moreIcon)&&void 0!==c?c:t.createElement(bb,null),prefixCls:N,animated:H,indicator:W})))};aM.TabPane=()=>null;const sM=aM;var cM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{var{prefixCls:n,className:r,hoverable:o=!0}=e,i=cM(e,["prefixCls","className","hoverable"]);const{getPrefixCls:a}=t.useContext(ft),s=a("card",n),c=ot()("".concat(s,"-grid"),r,{["".concat(s,"-grid-hoverable")]:o});return t.createElement("div",Object.assign({},i,{className:c}))},uM=e=>{const{antCls:t,componentCls:n,headerHeight:r,cardPaddingBase:o,tabsMarginBottom:i}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:r,marginBottom:-1,padding:"0 ".concat(Ar(o)),color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary),borderRadius:"".concat(Ar(e.borderRadiusLG)," ").concat(Ar(e.borderRadiusLG)," 0 0")},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},Pi),{["\n > ".concat(n,"-typography,\n > ").concat(n,"-typography-edit-content\n ")]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),["".concat(t,"-tabs-top")]:{clear:"both",marginBottom:i,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary)}}})},dM=e=>{const{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:o}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:"\n ".concat(Ar(o)," 0 0 0 ").concat(n,",\n 0 ").concat(Ar(o)," 0 0 ").concat(n,",\n ").concat(Ar(o)," ").concat(Ar(o)," 0 0 ").concat(n,",\n ").concat(Ar(o)," 0 0 0 ").concat(n," inset,\n 0 ").concat(Ar(o)," 0 0 ").concat(n," inset;\n "),transition:"all ".concat(e.motionDurationMid),"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}},fM=e=>{const{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:o,colorBorderSecondary:i,actionsBg:a}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(i),display:"flex",borderRadius:"0 0 ".concat(Ar(e.borderRadiusLG)," ").concat(Ar(e.borderRadiusLG))},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:"color ".concat(e.motionDurationMid)},["a:not(".concat(t,"-btn), > ").concat(n)]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:Ar(e.fontHeight),transition:"color ".concat(e.motionDurationMid),"&:hover":{color:e.colorPrimary}},["> ".concat(n)]:{fontSize:o,lineHeight:Ar(e.calc(o).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(i)}}})},hM=e=>Object.assign(Object.assign({margin:"".concat(Ar(e.calc(e.marginXXS).mul(-1).equal())," 0"),display:"flex"},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},Pi),"&-description":{color:e.colorTextDescription}}),pM=e=>{const{componentCls:t,cardPaddingBase:n,colorFillAlter:r}=e;return{["".concat(t,"-head")]:{padding:"0 ".concat(Ar(n)),background:r,"&-title":{fontSize:e.fontSize}},["".concat(t,"-body")]:{padding:"".concat(Ar(e.padding)," ").concat(Ar(n))}}},mM=e=>{const{componentCls:t}=e;return{overflow:"hidden",["".concat(t,"-body")]:{userSelect:"none"}}},gM=e=>{const{antCls:t,componentCls:n,cardShadow:r,cardHeadPadding:o,colorBorderSecondary:i,boxShadowTertiary:a,cardPaddingBase:s,extraColor:c}=e;return{[n]:Object.assign(Object.assign({},Ti(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,["&:not(".concat(n,"-bordered)")]:{boxShadow:a},["".concat(n,"-head")]:uM(e),["".concat(n,"-extra")]:{marginInlineStart:"auto",color:c,fontWeight:"normal",fontSize:e.fontSize},["".concat(n,"-body")]:Object.assign({padding:s,borderRadius:" 0 0 ".concat(Ar(e.borderRadiusLG)," ").concat(Ar(e.borderRadiusLG))},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),["".concat(n,"-grid")]:dM(e),["".concat(n,"-cover")]:{"> *":{display:"block",width:"100%"},["img, img + ".concat(t,"-image-mask")]:{borderRadius:"".concat(Ar(e.borderRadiusLG)," ").concat(Ar(e.borderRadiusLG)," 0 0")}},["".concat(n,"-actions")]:fM(e),["".concat(n,"-meta")]:hM(e)}),["".concat(n,"-bordered")]:{border:"".concat(Ar(e.lineWidth)," ").concat(e.lineType," ").concat(i),["".concat(n,"-cover")]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},["".concat(n,"-hoverable")]:{cursor:"pointer",transition:"box-shadow ".concat(e.motionDurationMid,", border-color ").concat(e.motionDurationMid),"&:hover":{borderColor:"transparent",boxShadow:r}},["".concat(n,"-contain-grid")]:{borderRadius:"".concat(Ar(e.borderRadiusLG)," ").concat(Ar(e.borderRadiusLG)," 0 0 "),["".concat(n,"-body")]:{display:"flex",flexWrap:"wrap"},["&:not(".concat(n,"-loading) ").concat(n,"-body")]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},["".concat(n,"-contain-tabs")]:{["> ".concat(n,"-head")]:{minHeight:0,["".concat(n,"-head-title, ").concat(n,"-extra")]:{paddingTop:o}}},["".concat(n,"-type-inner")]:pM(e),["".concat(n,"-loading")]:mM(e),["".concat(n,"-rtl")]:{direction:"rtl"}}},vM=e=>{const{componentCls:t,cardPaddingSM:n,headerHeightSM:r,headerFontSizeSM:o}=e;return{["".concat(t,"-small")]:{["> ".concat(t,"-head")]:{minHeight:r,padding:"0 ".concat(Ar(n)),fontSize:o,["> ".concat(t,"-head-wrapper")]:{["> ".concat(t,"-extra")]:{fontSize:e.fontSize}}},["> ".concat(t,"-body")]:{padding:n}},["".concat(t,"-small").concat(t,"-contain-tabs")]:{["> ".concat(t,"-head")]:{["".concat(t,"-head-title, ").concat(t,"-extra")]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},bM=Pa("Card",(e=>{const t=xa(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[gM(t),vM(t)]}),(e=>({headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:"".concat(e.paddingSM,"px 0"),tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText})));var yM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const{actionClasses:n,actions:r=[],actionStyle:o}=e;return t.createElement("ul",{className:n,style:o},r.map(((e,n)=>{const o="action-".concat(n);return t.createElement("li",{style:{width:"".concat(100/r.length,"%")},key:o},t.createElement("span",null,e))})))},wM=t.forwardRef(((e,n)=>{const{prefixCls:r,className:o,rootClassName:i,style:a,extra:s,headStyle:c={},bodyStyle:l={},title:u,loading:d,bordered:f=!0,size:h,type:p,cover:m,actions:g,tabList:v,children:b,activeTabKey:y,defaultActiveTabKey:x,tabBarExtraContent:w,hoverable:S,tabProps:k={},classNames:C,styles:E}=e,_=yM(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:O,direction:M,card:P}=t.useContext(ft);const T=e=>{var t;return ot()(null===(t=null===P||void 0===P?void 0:P.classNames)||void 0===t?void 0:t[e],null===C||void 0===C?void 0:C[e])},N=e=>{var t;return Object.assign(Object.assign({},null===(t=null===P||void 0===P?void 0:P.styles)||void 0===t?void 0:t[e]),null===E||void 0===E?void 0:E[e])},I=t.useMemo((()=>{let e=!1;return t.Children.forEach(b,(t=>{t&&t.type&&t.type===lM&&(e=!0)})),e}),[b]),R=O("card",r),[D,j,A]=bM(R),z=t.createElement(wx,{loading:!0,active:!0,paragraph:{rows:4},title:!1},b),L=void 0!==y,F=Object.assign(Object.assign({},k),{[L?"activeKey":"defaultActiveKey"]:L?y:x,tabBarExtraContent:w});let H;const B=$a(h),W=B&&"default"!==B?B:"large",V=v?t.createElement(sM,Object.assign({size:W},F,{className:"".concat(R,"-head-tabs"),onChange:t=>{var n;null===(n=e.onTabChange)||void 0===n||n.call(e,t)},items:v.map((e=>{var{tab:t}=e,n=yM(e,["tab"]);return Object.assign({label:t},n)}))})):null;if(u||s||V){const e=ot()("".concat(R,"-head"),T("header")),n=ot()("".concat(R,"-head-title"),T("title")),r=ot()("".concat(R,"-extra"),T("extra")),o=Object.assign(Object.assign({},c),N("header"));H=t.createElement("div",{className:e,style:o},t.createElement("div",{className:"".concat(R,"-head-wrapper")},u&&t.createElement("div",{className:n,style:N("title")},u),s&&t.createElement("div",{className:r,style:N("extra")},s)),V)}const Y=ot()("".concat(R,"-cover"),T("cover")),q=m?t.createElement("div",{className:Y,style:N("cover")},m):null,U=ot()("".concat(R,"-body"),T("body")),G=Object.assign(Object.assign({},l),N("body")),$=t.createElement("div",{className:U,style:G},d?z:b),X=ot()("".concat(R,"-actions"),T("actions")),K=g&&g.length?t.createElement(xM,{actionClasses:X,actionStyle:N("actions"),actions:g}):null,Q=ut(_,["onTabChange"]),Z=ot()(R,null===P||void 0===P?void 0:P.className,{["".concat(R,"-loading")]:d,["".concat(R,"-bordered")]:f,["".concat(R,"-hoverable")]:S,["".concat(R,"-contain-grid")]:I,["".concat(R,"-contain-tabs")]:v&&v.length,["".concat(R,"-").concat(B)]:B,["".concat(R,"-type-").concat(p)]:!!p,["".concat(R,"-rtl")]:"rtl"===M},o,i,j,A),J=Object.assign(Object.assign({},null===P||void 0===P?void 0:P.style),a);return D(t.createElement("div",Object.assign({ref:n},Q,{className:Z,style:J}),H,q,$,K))}));var SM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const{prefixCls:n,className:r,avatar:o,title:i,description:a}=e,s=SM(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=t.useContext(ft),l=c("card",n),u=ot()("".concat(l,"-meta"),r),d=o?t.createElement("div",{className:"".concat(l,"-meta-avatar")},o):null,f=i?t.createElement("div",{className:"".concat(l,"-meta-title")},i):null,h=a?t.createElement("div",{className:"".concat(l,"-meta-description")},a):null,p=f||h?t.createElement("div",{className:"".concat(l,"-meta-detail")},f,h):null;return t.createElement("div",Object.assign({},s,{className:u}),d,p)},CM=wM;CM.Grid=lM,CM.Meta=kM;const EM=CM;var _M=n(178),OM=n.n(_M);const MM={"X-RapidAPI-Key":"35ba829ae0mshc74a68ae4717089p16b127jsne6140ff25e92","X-RapidAPI-Host":"crypto-news16.p.rapidapi.com"},PM=Xk({reducerPath:"cryptoNewsApi",baseQuery:ek({baseUrl:"https://crypto-news16.p.rapidapi.com/news"}),endpoints:e=>({getCryptoNews:e.query({query:e=>{let{count:t=10}=e;return{url:"/top/".concat(t),headers:MM}}})})}),{useGetCryptoNewsQuery:TM}=PM,{Title:NM}=Ap,{Option:IM}=rO,RM=e=>{let{simplified:n}=e;const[r,o]=(0,t.useState)("Cryptocurrency"),{data:i,isFetching:a}=TM({count:n?10:100});if(a)return(0,Cy.jsx)(fC,{});const s=n?null===i||void 0===i?void 0:i.slice(0,9):i;return(0,Cy.jsx)(Ay,{gutter:[24,24],children:null===s||void 0===s?void 0:s.map(((e,t)=>(0,Cy.jsxs)(Wy,{xs:24,sm:12,lg:8,children:[" ",(0,Cy.jsx)(EM,{hoverable:!0,children:(0,Cy.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",children:[(0,Cy.jsx)("div",{className:"news-image-container"}),(0,Cy.jsxs)("div",{className:"news-card-content",children:[(0,Cy.jsx)(NM,{className:"news-title",level:4,children:e.title}),(0,Cy.jsx)("p",{children:e.description&&e.description.length>100?"".concat(e.description.substring(0,100),"..."):e.description})]}),(0,Cy.jsx)("div",{className:"provider-container",children:(0,Cy.jsx)("div",{children:OM()(e.date).fromNow()})})]})})]},t)))})},DM=()=>(0,Cy.jsx)("div",{children:(0,Cy.jsx)("iframe",{src:"https://cryptoapp-1.onrender.com/",style:{width:"100%",height:"100vh",border:"none"}})});var jM=n(1);const AM=jM.default||jM;const zM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z"}}]},name:"dollar-circle",theme:"outlined"};var LM=function(e,n){return t.createElement(Vn,vt({},e,{ref:n,icon:zM}))};const FM=t.forwardRef(LM);const HM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 394c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H400V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v236H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h228v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h164c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V394h164zM628 630H400V394h228v236z"}}]},name:"number",theme:"outlined"};var BM=function(e,n){return t.createElement(Vn,vt({},e,{ref:n,icon:HM}))};const WM=t.forwardRef(BM);const VM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};var YM=function(e,n){return t.createElement(Vn,vt({},e,{ref:n,icon:VM}))};const qM=t.forwardRef(YM);const UM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 160h-92v-40c0-4.4-3.6-8-8-8H256c-4.4 0-8 3.6-8 8v40h-92a44 44 0 00-44 44v148c0 81.7 60 149.6 138.2 162C265.7 630.2 359 721.7 476 734.5v105.2H280c-17.7 0-32 14.3-32 32V904c0 4.4 3.6 8 8 8h512c4.4 0 8-3.6 8-8v-32.3c0-17.7-14.3-32-32-32H548V734.5C665 721.7 758.3 630.2 773.8 514 852 501.6 912 433.7 912 352V204a44 44 0 00-44-44zM184 352V232h64v207.6a91.99 91.99 0 01-64-87.6zm520 128c0 49.1-19.1 95.4-53.9 130.1-34.8 34.8-81 53.9-130.1 53.9h-16c-49.1 0-95.4-19.1-130.1-53.9-34.8-34.8-53.9-81-53.9-130.1V184h384v296zm136-128c0 41-26.9 75.8-64 87.6V232h64v120z"}}]},name:"trophy",theme:"outlined"};var GM=function(e,n){return t.createElement(Vn,vt({},e,{ref:n,icon:UM}))};const $M=t.forwardRef(GM);const XM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"};var KM=function(e,n){return t.createElement(Vn,vt({},e,{ref:n,icon:XM}))};const QM=t.forwardRef(KM);const ZM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};var JM=function(e,n){return t.createElement(Vn,vt({},e,{ref:n,icon:ZM}))};const eP=t.forwardRef(JM);function tP(e){return e+.5|0}const nP=(e,t,n)=>Math.max(Math.min(e,n),t);function rP(e){return nP(tP(2.55*e),0,255)}function oP(e){return nP(tP(255*e),0,255)}function iP(e){return nP(tP(e/2.55)/100,0,1)}function aP(e){return nP(tP(100*e),0,100)}const sP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},cP=[..."0123456789ABCDEF"],lP=e=>cP[15&e],uP=e=>cP[(240&e)>>4]+cP[15&e],dP=e=>(240&e)>>4===(15&e);function fP(e){var t=(e=>dP(e.r)&&dP(e.g)&&dP(e.b)&&dP(e.a))(e)?lP:uP;return e?"#"+t(e.r)+t(e.g)+t(e.b)+((e,t)=>e<255?t(e):"")(e.a,t):void 0}const hP=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function pP(e,t,n){const r=t*Math.min(n,1-n),o=function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+e/30)%12;return n-r*Math.max(Math.min(o-3,9-o,1),-1)};return[o(0),o(8),o(4)]}function mP(e,t,n){const r=function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(r+e/60)%6;return n-n*t*Math.max(Math.min(o,4-o,1),0)};return[r(5),r(3),r(1)]}function gP(e,t,n){const r=pP(e,1,.5);let o;for(t+n>1&&(o=1/(t+n),t*=o,n*=o),o=0;o<3;o++)r[o]*=1-t-n,r[o]+=t;return r}function vP(e){const t=e.r/255,n=e.g/255,r=e.b/255,o=Math.max(t,n,r),i=Math.min(t,n,r),a=(o+i)/2;let s,c,l;return o!==i&&(l=o-i,c=a>.5?l/(2-o-i):l/(o+i),s=function(e,t,n,r,o){return e===o?(t-n)/r+(t>16&255,i>>8&255,255&i]}return e}(),CP.transparent=[0,0,0,0]);const t=CP[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}const _P=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const OP=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,MP=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function PP(e,t,n){if(e){let r=vP(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,0===t?360:1)),r=yP(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function TP(e,t){return e?Object.assign(t||{},e):e}function NP(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=oP(e[3]))):(t=TP(e,{r:0,g:0,b:0,a:1})).a=oP(t.a),t}function IP(e){return"r"===e.charAt(0)?function(e){const t=_P.exec(e);let n,r,o,i=255;if(t){if(t[7]!==n){const e=+t[7];i=t[8]?rP(e):nP(255*e,0,255)}return n=+t[1],r=+t[3],o=+t[5],n=255&(t[2]?rP(n):nP(n,0,255)),r=255&(t[4]?rP(r):nP(r,0,255)),o=255&(t[6]?rP(o):nP(o,0,255)),{r:n,g:r,b:o,a:i}}}(e):wP(e)}class RP{constructor(e){if(e instanceof RP)return e;const t=typeof e;let n;"object"===t?n=NP(e):"string"===t&&(n=function(e){var t,n=e.length;return"#"===e[0]&&(4===n||5===n?t={r:255&17*sP[e[1]],g:255&17*sP[e[2]],b:255&17*sP[e[3]],a:5===n?17*sP[e[4]]:255}:7!==n&&9!==n||(t={r:sP[e[1]]<<4|sP[e[2]],g:sP[e[3]]<<4|sP[e[4]],b:sP[e[5]]<<4|sP[e[6]],a:9===n?sP[e[7]]<<4|sP[e[8]]:255})),t}(e)||EP(e)||IP(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=TP(this._rgb);return e&&(e.a=iP(e.a)),e}set rgb(e){this._rgb=NP(e)}rgbString(){return this._valid?(e=this._rgb)&&(e.a<255?"rgba(".concat(e.r,", ").concat(e.g,", ").concat(e.b,", ").concat(iP(e.a),")"):"rgb(".concat(e.r,", ").concat(e.g,", ").concat(e.b,")")):void 0;var e}hexString(){return this._valid?fP(this._rgb):void 0}hslString(){return this._valid?function(e){if(!e)return;const t=vP(e),n=t[0],r=aP(t[1]),o=aP(t[2]);return e.a<255?"hsla(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(iP(e.a),")"):"hsl(".concat(n,", ").concat(r,"%, ").concat(o,"%)")}(this._rgb):void 0}mix(e,t){if(e){const n=this.rgb,r=e.rgb;let o;const i=t===o?.5:t,a=2*i-1,s=n.a-r.a,c=((a*s===-1?a:(a+s)/(1+a*s))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=i*n.a+(1-i)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=function(e,t,n){const r=MP(iP(e.r)),o=MP(iP(e.g)),i=MP(iP(e.b));return{r:oP(OP(r+n*(MP(iP(t.r))-r))),g:oP(OP(o+n*(MP(iP(t.g))-o))),b:oP(OP(i+n*(MP(iP(t.b))-i))),a:e.a+n*(t.a-e.a)}}(this._rgb,e._rgb,t)),this}clone(){return new RP(this.rgb)}alpha(e){return this._rgb.a=oP(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=tP(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){return this._rgb.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return PP(this._rgb,2,e),this}darken(e){return PP(this._rgb,2,-e),this}saturate(e){return PP(this._rgb,1,e),this}desaturate(e){return PP(this._rgb,1,-e),this}rotate(e){return function(e,t){var n=vP(e);n[0]=xP(n[0]+t),n=yP(n),e.r=n[0],e.g=n[1],e.b=n[2]}(this._rgb,e),this}}function DP(){}const jP=(()=>{let e=0;return()=>e++})();function AP(e){return null===e||"undefined"===typeof e}function zP(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function LP(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function FP(e){return("number"===typeof e||e instanceof Number)&&isFinite(+e)}function HP(e,t){return FP(e)?e:t}function BP(e,t){return"undefined"===typeof e?t:e}const WP=(e,t)=>"string"===typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e;function VP(e,t,n){if(e&&"function"===typeof e.call)return e.apply(n,t)}function YP(e,t,n,r){let o,i,a;if(zP(e))if(i=e.length,r)for(o=i-1;o>=0;o--)t.call(n,e[o],o);else for(o=0;oe,x:e=>e.x,y:e=>e.y};function JP(e,t){const n=ZP[t]||(ZP[t]=function(e){const t=function(e){const t=e.split("."),n=[];let r="";for(const o of t)r+=o,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}(e);return e=>{for(const n of t){if(""===n)break;e=e&&e[n]}return e}}(t));return n(e)}function eT(e){return e.charAt(0).toUpperCase()+e.slice(1)}const tT=e=>"undefined"!==typeof e,nT=e=>"function"===typeof e,rT=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};const oT=Math.PI,iT=2*oT,aT=iT+oT,sT=Number.POSITIVE_INFINITY,cT=oT/180,lT=oT/2,uT=oT/4,dT=2*oT/3,fT=Math.log10,hT=Math.sign;function pT(e,t,n){return Math.abs(e-t)c&&l3&&void 0!==arguments[3]?arguments[3]:1e-6;return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function MT(e,t,n){n=n||(n=>e[n]1;)r=i+o>>1,n(r)?i=r:o=r;return{lo:i,hi:o}}const PT=(e,t,n,r)=>MT(e,n,r?r=>{const o=e[r][t];return oe[r][t]MT(e,n,(r=>e[r][t]>=n));const NT=["push","pop","shift","splice","unshift"];function IT(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,o=r.indexOf(t);-1!==o&&r.splice(o,1),r.length>0||(NT.forEach((t=>{delete e[t]})),delete e._chartjs)}function RT(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const DT="undefined"===typeof window?function(e){return e()}:window.requestAnimationFrame;function jT(e,t){let n=[],r=!1;return function(){for(var o=arguments.length,i=new Array(o),a=0;a{r=!1,e.apply(t,n)})))}}const AT=e=>"start"===e?"left":"end"===e?"right":"center",zT=(e,t,n)=>"start"===e?t:"end"===e?n:(t+n)/2;function LT(e,t,n){const r=t.length;let o=0,i=r;if(e._sorted){const{iScale:a,_parsed:s}=e,c=a.axis,{min:l,max:u,minDefined:d,maxDefined:f}=a.getUserBounds();d&&(o=_T(Math.min(PT(s,c,l).lo,n?r:PT(t,c,a.getPixelForValue(l)).lo),0,r-1)),i=f?_T(Math.max(PT(s,a.axis,u,!0).hi+1,n?0:PT(t,c,a.getPixelForValue(u),!0).hi+1),o,r)-o:r-o}return{start:o,count:i}}function FT(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,o={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=o,!0;const i=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,o),i}const HT=e=>0===e||1===e,BT=(e,t,n)=>-Math.pow(2,10*(e-=1))*Math.sin((e-t)*iT/n),WT=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*iT/n)+1,VT={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*lT),easeOutSine:e=>Math.sin(e*lT),easeInOutSine:e=>-.5*(Math.cos(oT*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>HT(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>HT(e)?e:BT(e,.075,.3),easeOutElastic:e=>HT(e)?e:WT(e,.075,.3),easeInOutElastic(e){const t=.1125;return HT(e)?e:e<.5?.5*BT(2*e,t,.45):.5+.5*WT(2*e-1,t,.45)},easeInBack(e){const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:e=>1-VT.easeOutBounce(1-e),easeOutBounce(e){const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?.5*VT.easeInBounce(2*e):.5*VT.easeOutBounce(2*e-1)+.5};function YT(e){if(e&&"object"===typeof e){const t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}function qT(e){return YT(e)?e:new RP(e)}function UT(e){return YT(e)?e:new RP(e).saturate(.5).darken(.1).hexString()}const GT=["x","y","borderWidth","radius","tension"],$T=["color","borderColor","backgroundColor"];const XT=new Map;function KT(e,t,n){return function(e,t){t=t||{};const n=e+JSON.stringify(t);let r=XT.get(n);return r||(r=new Intl.NumberFormat(e,t),XT.set(n,r)),r}(t,n).format(e)}const QT={values:e=>zP(e)?e:""+e,numeric(e,t,n){if(0===e)return"0";const r=this.chart.options.locale;let o,i=e;if(n.length>1){const t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>1e15)&&(o="scientific"),i=function(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e));return n}(e,n)}const a=fT(Math.abs(i)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),c={notation:o,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(c,this.options.ticks.format),KT(e,r,c)},logarithmic(e,t,n){if(0===e)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(fT(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?QT.numeric.call(this,e,t,n):""}};var ZT={formatters:QT};const JT=Object.create(null),eN=Object.create(null);function tN(e,t){if(!t)return e;const n=t.split(".");for(let r=0,o=n.length;re.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>UT(t.backgroundColor),this.hoverBorderColor=(e,t)=>UT(t.borderColor),this.hoverColor=(e,t)=>UT(t.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return nN(this,e,t)}get(e){return tN(this,e)}describe(e,t){return nN(eN,e,t)}override(e,t){return nN(JT,e,t)}route(e,t,n,r){const o=tN(this,e),i=tN(this,n),a="_"+t;Object.defineProperties(o,{[a]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){const e=this[a],t=i[r];return LP(e)?Object.assign({},t,e):BP(e,t)},set(e){this[a]=e}}})}apply(e){e.forEach((e=>e(this)))}}var oN=new rN({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}),e.set("animations",{colors:{type:"color",properties:$T},numbers:{type:"number",properties:GT}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>0|e}}}})},function(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ZT.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e,_indexable:e=>"borderDash"!==e&&"tickBorderDash"!==e&&"dash"!==e}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:e=>"backdropPadding"!==e&&"callback"!==e,_indexable:e=>"backdropPadding"!==e})}]);function iN(e,t,n,r,o){let i=t[o];return i||(i=t[o]=e.measureText(o).width,n.push(o)),i>r&&(r=i),r}function aN(e,t,n,r){let o=(r=r||{}).data=r.data||{},i=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(o=r.data={},i=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let a=0;const s=n.length;let c,l,u,d,f;for(c=0;cn.length){for(c=0;c0&&e.stroke()}}function dN(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y5&&void 0!==arguments[5]?arguments[5]:{};const a=zP(t)?t:[t],s=i.strokeWidth>0&&""!==i.strokeColor;let c,l;for(e.save(),e.font=o.string,function(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),AP(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}(e,i),c=0;c+e||0;function CN(e,t){const n={},r=LP(t),o=r?Object.keys(t):t,i=LP(e)?r?n=>BP(e[n],e[t[n]]):t=>e[t]:()=>e;for(const a of o)n[a]=kN(i(a));return n}function EN(e){return CN(e,{top:"y",right:"x",bottom:"y",left:"x"})}function _N(e){return CN(e,["topLeft","topRight","bottomLeft","bottomRight"])}function ON(e){const t=EN(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function MN(e,t){e=e||{},t=t||oN.font;let n=BP(e.size,t.size);"string"===typeof n&&(n=parseInt(n,10));let r=BP(e.style,t.style);r&&!(""+r).match(wN)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const o={family:BP(e.family,t.family),lineHeight:SN(BP(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:BP(e.weight,t.weight),string:""};return o.string=function(e){return!e||AP(e.size)||AP(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(o),o}function PN(e,t,n,r){let o,i,a,s=!0;for(o=0,i=e.length;o1&&void 0!==arguments[1]?arguments[1]:[""],n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>e[0];const o=(arguments.length>2?arguments[2]:void 0)||e;"undefined"===typeof n&&(n=WN("_fallback",e));const i={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:n,_getTarget:r,override:r=>NN([r,...e],t,o,n)};return new Proxy(i,{deleteProperty:(t,n)=>(delete t[n],delete t._keys,delete e[0][n],!0),get:(n,r)=>AN(n,r,(()=>function(e,t,n,r){let o;for(const i of t)if(o=WN(DN(i,e),n),"undefined"!==typeof o)return jN(e,o)?HN(n,r,e,o):o}(r,t,e,n))),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e._scopes[0],t),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(e,t)=>VN(e).includes(t),ownKeys:e=>VN(e),set(e,t,n){const o=e._storage||(e._storage=r());return e[t]=o[t]=n,delete e._keys,!0}})}function IN(e,t,n,r){const o={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:RN(e,r),setContext:t=>IN(e,t,n,r),override:o=>IN(e.override(o),t,n,r)};return new Proxy(o,{deleteProperty:(t,n)=>(delete t[n],delete e[n],!0),get:(e,t,n)=>AN(e,t,(()=>function(e,t,n){const{_proxy:r,_context:o,_subProxy:i,_descriptors:a}=e;let s=r[t];nT(s)&&a.isScriptable(t)&&(s=function(e,t,n,r){const{_proxy:o,_context:i,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let c=t(i,a||r);s.delete(e),jN(e,c)&&(c=HN(o._scopes,o,e,c));return c}(t,s,e,n));zP(s)&&s.length&&(s=function(e,t,n,r){const{_proxy:o,_context:i,_subProxy:a,_descriptors:s}=n;if("undefined"!==typeof i.index&&r(e))return t[i.index%t.length];if(LP(t[0])){const n=t,r=o._scopes.filter((e=>e!==n));t=[];for(const c of n){const n=HN(r,o,e,c);t.push(IN(n,i,a&&a[e],s))}}return t}(t,s,e,a.isIndexable));jN(t,s)&&(s=IN(s,o,i&&i[t],a));return s}(e,t,n))),getOwnPropertyDescriptor:(t,n)=>t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(t,n)=>Reflect.has(e,n),ownKeys:()=>Reflect.ownKeys(e),set:(t,n,r)=>(e[n]=r,delete t[n],!0)})}function RN(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0};const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:o=t.allKeys}=e;return{allKeys:o,scriptable:n,indexable:r,isScriptable:nT(n)?n:()=>n,isIndexable:nT(r)?r:()=>r}}const DN=(e,t)=>e?e+eT(t):t,jN=(e,t)=>LP(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object);function AN(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function zN(e,t,n){return nT(e)?e(t,n):e}const LN=(e,t)=>!0===e?t:"string"===typeof e?JP(t,e):void 0;function FN(e,t,n,r,o){for(const i of t){const t=LN(n,i);if(t){e.add(t);const i=zN(t._fallback,n,o);if("undefined"!==typeof i&&i!==n&&i!==r)return i}else if(!1===t&&"undefined"!==typeof r&&n!==r)return null}return!1}function HN(e,t,n,r){const o=t._rootScopes,i=zN(t._fallback,n,r),a=[...e,...o],s=new Set;s.add(r);let c=BN(s,a,n,i||n,r);return null!==c&&(("undefined"===typeof i||i===n||(c=BN(s,a,i,c,r),null!==c))&&NN(Array.from(s),[""],o,i,(()=>function(e,t,n){const r=e._getTarget();t in r||(r[t]={});const o=r[t];if(zP(o)&&LP(n))return n;return o||{}}(t,n,r))))}function BN(e,t,n,r,o){for(;n;)n=FN(e,t,n,r,o);return n}function WN(e,t){for(const n of t){if(!n)continue;const t=n[e];if("undefined"!==typeof t)return t}}function VN(e){let t=e._keys;return t||(t=e._keys=function(e){const t=new Set;for(const n of e)for(const e of Object.keys(n).filter((e=>!e.startsWith("_"))))t.add(e);return Array.from(t)}(e._scopes)),t}function YN(e,t,n,r){const{iScale:o}=e,{key:i="r"}=this._parsing,a=new Array(r);let s,c,l,u;for(s=0,c=r;st"x"===e?"y":"x";function $N(e,t,n,r){const o=e.skip?t:e,i=t,a=n.skip?t:n,s=ST(i,o),c=ST(a,i);let l=s/(s+c),u=c/(s+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;const d=r*l,f=r*u;return{previous:{x:i.x-d*(a.x-o.x),y:i.y-d*(a.y-o.y)},next:{x:i.x+f*(a.x-o.x),y:i.y+f*(a.y-o.y)}}}function XN(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x";const n=GN(t),r=e.length,o=Array(r).fill(0),i=Array(r);let a,s,c,l=UN(e,0);for(a=0;a2&&void 0!==arguments[2]?arguments[2]:"x";const r=GN(n),o=e.length;let i,a,s,c=UN(e,0);for(let l=0;l!e.skip))),"monotone"===t.cubicInterpolationMode)XN(e,o);else{let n=r?e[e.length-1]:e[0];for(i=0,a=e.length;ie.ownerDocument.defaultView.getComputedStyle(e,null);const nI=["top","right","bottom","left"];function rI(e,t,n){const r={};n=n?"-"+n:"";for(let o=0;o<4;o++){const i=nI[o];r[i]=parseFloat(e[t+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const oI=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function iI(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,o=tI(n),i="border-box"===o.boxSizing,a=rI(o,"padding"),s=rI(o,"border","width"),{x:c,y:l,box:u}=function(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:o,offsetY:i}=r;let a,s,c=!1;if(oI(o,i,e.target))a=o,s=i;else{const e=t.getBoundingClientRect();a=r.clientX-e.left,s=r.clientY-e.top,c=!0}return{x:a,y:s,box:c}}(e,n),d=a.left+(u&&s.left),f=a.top+(u&&s.top);let{width:h,height:p}=t;return i&&(h-=a.width+s.width,p-=a.height+s.height),{x:Math.round((c-d)/h*n.width/r),y:Math.round((l-f)/p*n.height/r)}}const aI=e=>Math.round(10*e)/10;function sI(e,t,n,r){const o=tI(e),i=rI(o,"margin"),a=eI(o.maxWidth,e,"clientWidth")||sT,s=eI(o.maxHeight,e,"clientHeight")||sT,c=function(e,t,n){let r,o;if(void 0===t||void 0===n){const i=JN(e);if(i){const e=i.getBoundingClientRect(),a=tI(i),s=rI(a,"border","width"),c=rI(a,"padding");t=e.width-c.width-s.width,n=e.height-c.height-s.height,r=eI(a.maxWidth,i,"clientWidth"),o=eI(a.maxHeight,i,"clientHeight")}else t=e.clientWidth,n=e.clientHeight}return{width:t,height:n,maxWidth:r||sT,maxHeight:o||sT}}(e,t,n);let{width:l,height:u}=c;if("content-box"===o.boxSizing){const e=rI(o,"border","width"),t=rI(o,"padding");l-=t.width+e.width,u-=t.height+e.height}l=Math.max(0,l-i.width),u=Math.max(0,r?l/r:u-i.height),l=aI(Math.min(l,a,c.maxWidth)),u=aI(Math.min(u,s,c.maxHeight)),l&&!u&&(u=aI(l/2));return(void 0!==t||void 0!==n)&&r&&c.height&&u>c.height&&(u=c.height,l=aI(Math.floor(u*r))),{width:l,height:u}}function cI(e,t,n){const r=t||1,o=Math.floor(e.height*r),i=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height="".concat(e.height,"px"),a.style.width="".concat(e.width,"px")),(e.currentDevicePixelRatio!==r||a.height!==o||a.width!==i)&&(e.currentDevicePixelRatio=r,a.height=o,a.width=i,e.ctx.setTransform(r,0,0,r,0,0),!0)}const lI=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};ZN()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(HH){}return e}();function uI(e,t){const n=function(e,t){return tI(e).getPropertyValue(t)}(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function dI(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function fI(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:"middle"===r?n<.5?e.y:t.y:"after"===r?n<1?e.y:t.y:n>0?t.y:e.y}}function hI(e,t,n,r){const o={x:e.cp2x,y:e.cp2y},i={x:t.cp1x,y:t.cp1y},a=dI(e,o,n),s=dI(o,i,n),c=dI(i,t,n),l=dI(a,s,n),u=dI(s,c,n);return dI(l,u,n)}function pI(e,t,n){return e?function(e,t){return{x:n=>e+e+t-n,setWidth(e){t=e},textAlign:e=>"center"===e?e:"right"===e?"left":"right",xPlus:(e,t)=>e-t,leftForLtr:(e,t)=>e-t}}(t,n):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,t)=>e+t,leftForLtr:(e,t)=>e}}function mI(e,t){let n,r;"ltr"!==t&&"rtl"!==t||(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function gI(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function vI(e){return"angle"===e?{between:ET,compare:kT,normalize:CT}:{between:OT,compare:(e,t)=>e-t,normalize:e=>e}}function bI(e){let{start:t,end:n,count:r,loop:o,style:i}=e;return{start:t%r,end:n%r,loop:o&&(n-t+1)%r===0,style:i}}function yI(e,t,n){if(!n)return[e];const{property:r,start:o,end:i}=n,a=t.length,{compare:s,between:c,normalize:l}=vI(r),{start:u,end:d,loop:f,style:h}=function(e,t,n){const{property:r,start:o,end:i}=n,{between:a,normalize:s}=vI(r),c=t.length;let l,u,{start:d,end:f,loop:h}=e;if(h){for(d+=c,f+=c,l=0,u=c;lb||c(o,v,m)&&0!==s(o,v),w=()=>!b||0===s(i,m)||c(i,v,m);for(let S=u,k=u;S<=d;++S)g=t[S%a],g.skip||(m=l(g[r]),m!==v&&(b=c(m,o,i),null===y&&x()&&(y=0===s(m,o)?S:k),null!==y&&w()&&(p.push(bI({start:y,end:S,loop:f,count:a,style:h})),y=null),k=S,v=m));return null!==y&&p.push(bI({start:y,end:d,loop:f,count:a,style:h})),p}function xI(e,t){const n=[],r=e.segments;for(let o=0;or({chart:e,initial:t.initial,numSteps:i,currentStep:Math.min(n-t.start,i)})))}_refresh(){this._request||(this._running=!0,this._request=DT.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),t=0;this._charts.forEach(((n,r)=>{if(!n.running||!n.items.length)return;const o=n.items;let i,a=o.length-1,s=!1;for(;a>=0;--a)i=o[a],i._active?(i._total>n.duration&&(n.duration=i._total),i.tick(e),s=!0):(o[a]=o[o.length-1],o.pop());s&&(r.draw(),this._notify(r,n,e,"progress")),o.length||(n.running=!1,this._notify(r,n,e,"complete"),n.initial=!1),t+=o.length})),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce(((e,t)=>Math.max(e,t._duration)),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const n=t.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var EI=new CI;const _I="transparent",OI={boolean:(e,t,n)=>n>.5?t:e,color(e,t,n){const r=qT(e||_I),o=r.valid&&qT(t||_I);return o&&o.valid?o.mix(r,n).hexString():t},number:(e,t,n)=>e+(t-e)*n};class MI{constructor(e,t,n,r){const o=t[n];r=PN([e.to,r,o,e.from]);const i=PN([e.from,o,r]);this._active=!0,this._fn=e.fn||OI[e.type||typeof i],this._easing=VT[e.easing]||VT.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=i,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);const r=this._target[this._prop],o=n-this._start,i=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(i,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=PN([e.to,t,r,e.from]),this._from=PN([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,n=this._duration,r=this._prop,o=this._from,i=this._loop,a=this._to;let s;if(this._active=o!==a&&(i||t1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(o,a,s))}wait(){const e=this._promises||(this._promises=[]);return new Promise(((t,n)=>{e.push({res:t,rej:n})}))}_notify(e){const t=e?"res":"rej",n=this._promises||[];for(let r=0;r{const o=e[r];if(!LP(o))return;const i={};for(const e of t)i[e]=o[e];(zP(o.properties)&&o.properties||[r]).forEach((e=>{e!==r&&n.has(e)||n.set(e,i)}))}))}_animateOptions(e,t){const n=t.options,r=function(e,t){if(!t)return;let n=e.options;if(!n)return void(e.options=t);n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(e,n);if(!r)return[];const o=this._createAnimations(r,n);return n.$shared&&function(e,t){const n=[],r=Object.keys(t);for(let o=0;o{e.options=n}),(()=>{})),o}_createAnimations(e,t){const n=this._properties,r=[],o=e.$animations||(e.$animations={}),i=Object.keys(t),a=Date.now();let s;for(s=i.length-1;s>=0;--s){const c=i[s];if("$"===c.charAt(0))continue;if("options"===c){r.push(...this._animateOptions(e,t));continue}const l=t[c];let u=o[c];const d=n.get(c);if(u){if(d&&u.active()){u.update(d,l,a);continue}u.cancel()}d&&d.duration?(o[c]=u=new MI(d,e,c,l),r.push(u)):e[c]=l}return r}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const n=this._createAnimations(e,t);return n.length?(EI.add(this._chart,n),!0):void 0}}function TI(e,t){const n=e&&e.options||{},r=n.reverse,o=void 0===n.min?t:0,i=void 0===n.max?t:0;return{start:r?i:o,end:r?o:i}}function NI(e,t){const n=[],r=e._getSortedDatasetMetas(t);let o,i;for(o=0,i=r.length;o3&&void 0!==arguments[3]?arguments[3]:{};const o=e.keys,i="single"===r.mode;let a,s,c,l;if(null!==t){for(a=0,s=o.length;a0||!n&&t<0)return o.index}return null}function AI(e,t){const{chart:n,_cachedMeta:r}=e,o=n._stacks||(n._stacks={}),{iScale:i,vScale:a,index:s}=r,c=i.axis,l=a.axis,u=function(e,t,n){return"".concat(e.id,".").concat(t.id,".").concat(n.stack||n.type)}(i,a,r),d=t.length;let f;for(let h=0;hn[e].axis===t)).shift()}function LI(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[r]||void 0===t[r][n])return;delete t[r][n],void 0!==t[r]._visualValues&&void 0!==t[r]._visualValues[n]&&delete t[r]._visualValues[n]}}}const FI=e=>"reset"===e||"none"===e,HI=(e,t)=>t?e:Object.assign({},e);class BI{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=RI(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&LI(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>"x"===e?t:"r"===e?r:n,o=t.xAxisID=BP(n.xAxisID,zI(e,"x")),i=t.yAxisID=BP(n.yAxisID,zI(e,"y")),a=t.rAxisID=BP(n.rAxisID,zI(e,"r")),s=t.indexAxis,c=t.iAxisID=r(s,o,i,a),l=t.vAxisID=r(s,i,o,a);t.xScale=this.getScaleForId(o),t.yScale=this.getScaleForId(i),t.rScale=this.getScaleForId(a),t.iScale=this.getScaleForId(c),t.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&IT(this._data,this),e._stacked&&LI(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),n=this._data;if(LP(t))this._data=function(e){const t=Object.keys(e),n=new Array(t.length);let r,o,i;for(r=0,o=t.length;r{const n="_onData"+eT(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(){for(var t=arguments.length,o=new Array(t),i=0;i{"function"===typeof e[n]&&e[n](...o)})),a}})})))}(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,n=this.getDataset();let r=!1;this._dataCheck();const o=t._stacked;t._stacked=RI(t.vScale,t),t.stack!==n.stack&&(r=!0,LI(t),t.stack=n.stack),this._resyncElements(e),(r||o!==t._stacked)&&AI(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:n,_data:r}=this,{iScale:o,_stacked:i}=n,a=o.axis;let s,c,l,u=0===e&&t===r.length||n._sorted,d=e>0&&n._parsed[e-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,l=r;else{l=zP(r[e])?this.parseArrayData(n,r,e,t):LP(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);const o=()=>null===c[a]||d&&c[a]e&&!t.hidden&&t._stacked&&{keys:NI(n,!0),values:null})(t,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:l,max:u}=function(e){const{min:t,max:n,minDefined:r,maxDefined:o}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:o?n:Number.POSITIVE_INFINITY}}(a);let d,f;function h(){f=r[d];const t=f[a.axis];return!FP(f[e.axis])||l>t||u=0;--d)if(!h()){this.updateRangeFromParsed(c,e,f,s);break}return c}getAllParsedValues(e){const t=this._cachedMeta._parsed,n=[];let r,o,i;for(r=0,o=t.length;r=0&&e1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0;const r="active"===t,o=this._cachedDataOpts,i=e+"-"+t,a=o[i],s=this.enableOptionSharing&&tT(n);if(a)return HI(a,s);const c=this.chart.config,l=c.datasetElementScopeKeys(this._type,e),u=r?["".concat(e,"Hover"),"hover",e,""]:[e,""],d=c.getOptionScopes(this.getDataset(),l),f=Object.keys(oN.elements[e]),h=c.resolveNamedOptions(d,f,(()=>this.getContext(n,r,t)),u);return h.$shared&&(h.$shared=s,o[i]=Object.freeze(HI(h,s))),h}_resolveAnimations(e,t,n){const r=this.chart,o=this._cachedDataOpts,i="animation-".concat(t),a=o[i];if(a)return a;let s;if(!1!==r.options.animation){const r=this.chart.config,o=r.datasetAnimationScopeKeys(this._type,t),i=r.getOptionScopes(this.getDataset(),o);s=r.createResolver(i,this.getContext(e,n,t))}const c=new PI(r,s&&s.animations);return s&&s._cacheable&&(o[i]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||FI(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,o=this.getSharedOptions(n),i=this.includeOptions(t,o)||o!==r;return this.updateSharedOptions(o,t,n),{sharedOptions:o,includeOptions:i}}updateElement(e,t,n,r){FI(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!FI(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;const o=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(o)||o})}removeHoverStyle(e,t,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,t,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,n=this._cachedMeta.data;for(const[a,s,c]of this._syncList)this[a](s,c);this._syncList=[];const r=n.length,o=t.length,i=Math.min(o,r);i&&this.parse(0,i),o>r?this._insertElements(r,o-r,e):o2&&void 0!==arguments[2])||arguments[2];const r=this._cachedMeta,o=r.data,i=e+t;let a;const s=e=>{for(e.length+=t,a=e.length-1;a>=i;a--)e[a]=e[a-t]};for(s(o),a=e;ae-t)))}return e._cache.$bar}(t,e.type);let r,o,i,a,s=t._length;const c=()=>{32767!==i&&-32768!==i&&(tT(a)&&(s=Math.min(s,Math.abs(i-a)||s)),a=i)};for(r=0,o=n.length;rMath.abs(s)&&(c=s,l=a),t[n.axis]=l,t._custom={barStart:c,barEnd:l,start:o,end:i,min:a,max:s}}(e,t,n,r):t[n.axis]=n.parse(e,r),t}function YI(e,t,n,r){const o=e.iScale,i=e.vScale,a=o.getLabels(),s=o===i,c=[];let l,u,d,f;for(l=n,u=n+r;le.x,n="left",r="right"):(t=e.basee.controller.options.grouped)),o=n.options.stacked,i=[],a=e=>{const n=e.controller.getParsed(t),r=n&&n[e.vScale.axis];if(AP(r)||isNaN(r))return!0};for(const s of r)if((void 0===t||!a(s))&&((!1===o||-1===i.indexOf(s.stack)||void 0===o&&void 0===s.stack)&&i.push(s.stack),s.index===e))break;return i.length||i.push(void 0),i}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,n){const r=this._getStacks(e,n),o=void 0!==t?r.indexOf(t):-1;return-1===o?r.length-1:o}_getRuler(){const e=this.options,t=this._cachedMeta,n=t.iScale,r=[];let o,i;for(o=0,i=t.data.length;o=n?1:-1)}(d,t,a)*i,f===a&&(g-=d/2);const e=t.getPixelForDecimal(0),o=t.getPixelForDecimal(1),c=Math.min(e,o),h=Math.max(e,o);g=Math.max(Math.min(g,h),c),u=g+d,n&&!l&&(s._stacks[t.axis]._visualValues[r]=t.getValueForPixel(u)-t.getValueForPixel(g))}if(g===t.getPixelForValue(a)){const e=hT(d)*t.getLineWidthForValue(a)/2;g+=e,d-=e}return{size:d,base:g,head:u,center:u+d/2}}_calculateBarIndexPixels(e,t){const n=t.scale,r=this.options,o=r.skipNull,i=BP(r.maxBarThickness,1/0);let a,s;if(t.grouped){const n=o?this._getStackCount(e):t.stackCount,c="flex"===r.barThickness?function(e,t,n,r){const o=t.pixels,i=o[e];let a=e>0?o[e-1]:null,s=e=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:o}=t,i=this.getParsed(e),a=r.getLabelForValue(i.x),s=o.getLabelForValue(i.y),c=i._custom;return{label:n[e]||"",value:"("+a+", "+s+(c?", "+c:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,n,r){const o="reset"===r,{iScale:i,vScale:a}=this._cachedMeta,{sharedOptions:s,includeOptions:c}=this._getSharedOptions(t,r),l=i.axis,u=a.axis;for(let d=t;d+n[e];if(LP(n[e])){const{key:e="value"}=this._parsing;a=t=>+JP(n[t],e)}for(o=e,i=e+t;oET(e,s,c,!0)?1:Math.max(t,t*n,r,r*n),p=(e,t,r)=>ET(e,s,c,!0)?-1:Math.min(t,t*n,r,r*n),m=h(0,l,d),g=h(lT,u,f),v=p(oT,l,d),b=p(oT+lT,u,f);r=(m-v)/2,o=(g-b)/2,i=-(m+v)/2,a=-(g+b)/2}return{ratioX:r,ratioY:o,offsetX:i,offsetY:a}}(f,d,s),v=(n.width-i)/h,b=(n.height-i)/p,y=Math.max(Math.min(v,b)/2,0),x=WP(this.options.radius,y),w=(x-Math.max(x*s,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*x,this.offsetY=g*x,r.total=this.calculateTotal(),this.outerRadius=x-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*u,0),this.updateElements(o,0,o.length,e)}_circumference(e,t){const n=this.options,r=this._cachedMeta,o=this._getCircumference();return t&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||null===r._parsed[e]||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*o/iT)}updateElements(e,t,n,r){const o="reset"===r,i=this.chart,a=i.chartArea,s=i.options.animation,c=(a.left+a.right)/2,l=(a.top+a.bottom)/2,u=o&&s.animateScale,d=u?0:this.innerRadius,f=u?0:this.outerRadius,{sharedOptions:h,includeOptions:p}=this._getSharedOptions(t,r);let m,g=this._getRotation();for(m=0;m0&&!isNaN(e)?iT*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=KT(t._parsed[e],n.options.locale);return{label:r[e]||"",value:o}}getMaxBorderWidth(e){let t=0;const n=this.chart;let r,o,i,a,s;if(!e)for(r=0,o=n.data.datasets.length;r"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),st(ZI,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map(((t,o)=>{const i=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:r,lineWidth:i.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}}))}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}});class JI extends BI{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:n,data:r=[],_dataset:o}=t,i=this.chart._animationsDisabled;let{start:a,count:s}=LT(t,r,i);this._drawStart=a,this._drawCount=s,FT(t)&&(a=0,s=r.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=r;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!i,options:c},e),this.updateElements(r,a,s,e)}updateElements(e,t,n,r){const o="reset"===r,{iScale:i,vScale:a,_stacked:s,_dataset:c}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(t,r),d=i.axis,f=a.axis,{spanGaps:h,segment:p}=this.options,m=gT(h)?h:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||o||"none"===r,v=t+n,b=e.length;let y=t>0&&this.getParsed(t-1);for(let x=0;x=v){h.skip=!0;continue}const b=this.getParsed(x),w=AP(b[f]),S=h[d]=i.getPixelForValue(b[d],x),k=h[f]=o||w?a.getBasePixel():a.getPixelForValue(s?this.applyStack(a,b,s):b[f],x);h.skip=isNaN(S)||isNaN(k)||w,h.stop=x>0&&Math.abs(b[d]-y[d])>m,p&&(h.parsed=b,h.raw=c.data[x]),u&&(h.options=l||this.resolveDataElementOptions(x,n.active?"active":r)),g||this.updateElement(n,x,h,r),y=b}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;const o=r[0].size(this.resolveDataElementOptions(0)),i=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,o,i)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}st(JI,"id","line"),st(JI,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),st(JI,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class eR extends BI{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=KT(t._parsed[e].r,n.options.locale);return{label:r[e]||"",value:o}}parseObjectData(e,t,n,r){return YN.bind(this)(e,t,n,r)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach(((e,n)=>{const r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(rt.max&&(t.max=r))})),t}_updateRadius(){const e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top),o=Math.max(r/2,0),i=(o-Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=o-i*this.index,this.innerRadius=this.outerRadius-i}updateElements(e,t,n,r){const o="reset"===r,i=this.chart,a=i.options.animation,s=this._cachedMeta.rScale,c=s.xCenter,l=s.yCenter,u=s.getIndexAngle(0)-.5*oT;let d,f=u;const h=360/this.countVisibleElements();for(d=0;d{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&t++})),t}_computeAngle(e,t,n){return this.chart.getDataVisibility(e)?bT(this.resolveDataElementOptions(e,t).angle||n):0}}st(eR,"id","polarArea"),st(eR,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),st(eR,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map(((t,o)=>{const i=e.getDatasetMeta(0).controller.getStyle(o);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:r,lineWidth:i.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}}))}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class tR extends ZI{}st(tR,"id","pie"),st(tR,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class nR extends BI{getLabelAndValue(e){const t=this._cachedMeta.vScale,n=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(n[t.axis])}}parseObjectData(e,t,n,r){return YN.bind(this)(e,t,n,r)}update(e){const t=this._cachedMeta,n=t.dataset,r=t.data||[],o=t.iScale.getLabels();if(n.points=r,"resize"!==e){const t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);const i={_loop:!0,_fullLoop:o.length===r.length,options:t};this.updateElement(n,void 0,i,e)}this.updateElements(r,0,r.length,e)}updateElements(e,t,n,r){const o=this._cachedMeta.rScale,i="reset"===r;for(let a=t;a0&&this.getParsed(t-1);for(let y=t;y0&&Math.abs(n[f]-b[f])>g,m&&(l.parsed=n,l.raw=c.data[y]),d&&(l.options=u||this.resolveDataElementOptions(y,t.active?"active":r)),v||this.updateElement(t,y,l,r),b=n}this.updateSharedOptions(u,r,l)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}const n=e.dataset,r=n.options&&n.options.borderWidth||0;if(!t.length)return r;const o=t[0].size(this.resolveDataElementOptions(0)),i=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(r,o,i)/2}}st(rR,"id","scatter"),st(rR,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),st(rR,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function oR(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class iR{static override(e){Object.assign(iR.prototype,e)}constructor(e){st(this,"options",void 0),this.options=e||{}}init(){}formats(){return oR()}parse(){return oR()}format(){return oR()}add(){return oR()}diff(){return oR()}startOf(){return oR()}endOf(){return oR()}}var aR={_date:iR};function sR(e,t,n,r){const{controller:o,data:i,_sorted:a}=e,s=o._cachedMeta.iScale;if(s&&t===s.axis&&"r"!==t&&a&&i.length){const e=s._reversePixels?TT:PT;if(!r)return e(i,t,n);if(o._sharedOptions){const r=i[0],o="function"===typeof r.getRange&&r.getRange(t);if(o){const r=e(i,t,n-o),a=e(i,t,n+o);return{lo:r.lo,hi:a.hi}}}}return{lo:0,hi:i.length-1}}function cR(e,t,n,r,o){const i=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,c=i.length;s{e[a](t[n],o)&&(i.push({element:e,datasetIndex:r,index:c}),s=s||e.inRange(t.x,t.y,o))})),r&&!s?[]:i}var hR={evaluateInteractionItems:cR,modes:{index(e,t,n,r){const o=iI(t,e),i=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?lR(e,o,i,r,a):dR(e,o,i,!1,r,a),c=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach((e=>{const t=s[0].index,n=e.data[t];n&&!n.skip&&c.push({element:n,datasetIndex:e.index,index:t})})),c):[]},dataset(e,t,n,r){const o=iI(t,e),i=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?lR(e,o,i,r,a):dR(e,o,i,!1,r,a);if(s.length>0){const t=s[0].datasetIndex,n=e.getDatasetMeta(t).data;s=[];for(let e=0;elR(e,iI(t,e),n.axis||"xy",r,n.includeInvisible||!1),nearest(e,t,n,r){const o=iI(t,e),i=n.axis||"xy",a=n.includeInvisible||!1;return dR(e,o,i,n.intersect,r,a)},x:(e,t,n,r)=>fR(e,iI(t,e),"x",n.intersect,r),y:(e,t,n,r)=>fR(e,iI(t,e),"y",n.intersect,r)}};const pR=["left","top","right","bottom"];function mR(e,t){return e.filter((e=>e.pos===t))}function gR(e,t){return e.filter((e=>-1===pR.indexOf(e.pos)&&e.box.axis===t))}function vR(e,t){return e.sort(((e,n)=>{const r=t?n:e,o=t?e:n;return r.weight===o.weight?r.index-o.index:r.weight-o.weight}))}function bR(e,t){const n=function(e){const t={};for(const n of e){const{stack:e,pos:r,stackWeight:o}=n;if(!e||!pR.includes(r))continue;const i=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=o}return t}(e),{vBoxMaxWidth:r,hBoxMaxHeight:o}=t;let i,a,s;for(i=0,a=e.length;i{r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function kR(e,t,n,r){const o=[];let i,a,s,c,l,u;for(i=0,a=e.length,l=0;ie.box.fullSize)),!0),r=vR(mR(t,"left"),!0),o=vR(mR(t,"right")),i=vR(mR(t,"top"),!0),a=vR(mR(t,"bottom")),s=gR(t,"x"),c=gR(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:o.concat(c).concat(a).concat(s),chartArea:mR(t,"chartArea"),vertical:r.concat(o).concat(c),horizontal:i.concat(a).concat(s)}}(e.boxes),c=s.vertical,l=s.horizontal;YP(e.boxes,(e=>{"function"===typeof e.beforeLayout&&e.beforeLayout()}));const u=c.reduce(((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1),0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:o,availableWidth:i,availableHeight:a,vBoxMaxWidth:i/2/u,hBoxMaxHeight:a/2}),f=Object.assign({},o);xR(f,ON(r));const h=Object.assign({maxPadding:f,w:i,h:a,x:o.left,y:o.top},o),p=bR(c.concat(l),d);kR(s.fullSize,h,d,p),kR(c,h,d,p),kR(l,h,d,p)&&kR(c,h,d,p),function(e){const t=e.maxPadding;function n(n){const r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(h),ER(s.leftAndTop,h,d,p),h.x+=h.w,h.y+=h.h,ER(s.rightAndBottom,h,d,p),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},YP(s.chartArea,(t=>{const n=t.box;Object.assign(n,e.chartArea),n.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})}))}};class OR{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}}class MR extends OR{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const PR="$chartjs",TR={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},NR=e=>null===e||""===e;const IR=!!lI&&{passive:!0};function RR(e,t,n){e.canvas.removeEventListener(t,n,IR)}function DR(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function jR(e,t,n){const r=e.canvas,o=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||DR(n.addedNodes,r),t=t&&!DR(n.removedNodes,r);t&&n()}));return o.observe(document,{childList:!0,subtree:!0}),o}function AR(e,t,n){const r=e.canvas,o=new MutationObserver((e=>{let t=!1;for(const n of e)t=t||DR(n.removedNodes,r),t=t&&!DR(n.addedNodes,r);t&&n()}));return o.observe(document,{childList:!0,subtree:!0}),o}const zR=new Map;let LR=0;function FR(){const e=window.devicePixelRatio;e!==LR&&(LR=e,zR.forEach(((t,n)=>{n.currentDevicePixelRatio!==e&&t()})))}function HR(e,t,n){const r=e.canvas,o=r&&JN(r);if(!o)return;const i=jT(((e,t)=>{const r=o.clientWidth;n(e,t),r{const t=e[0],n=t.contentRect.width,r=t.contentRect.height;0===n&&0===r||i(n,r)}));return a.observe(o),function(e,t){zR.size||window.addEventListener("resize",FR),zR.set(e,t)}(e,i),a}function BR(e,t,n){n&&n.disconnect(),"resize"===t&&function(e){zR.delete(e),zR.size||window.removeEventListener("resize",FR)}(e)}function WR(e,t,n){const r=e.canvas,o=jT((t=>{null!==e.ctx&&n(function(e,t){const n=TR[e.type]||e.type,{x:r,y:o}=iI(e,t);return{type:n,chart:t,native:e,x:void 0!==r?r:null,y:void 0!==o?o:null}}(t,e))}),e);return function(e,t,n){e.addEventListener(t,n,IR)}(r,t,o),o}class VR extends OR{acquireContext(e,t){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(function(e,t){const n=e.style,r=e.getAttribute("height"),o=e.getAttribute("width");if(e[PR]={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",NR(o)){const t=uI(e,"width");void 0!==t&&(e.width=t)}if(NR(r))if(""===e.style.height)e.height=e.width/(t||2);else{const t=uI(e,"height");void 0!==t&&(e.height=t)}}(e,t),n):null}releaseContext(e){const t=e.canvas;if(!t[PR])return!1;const n=t[PR].initial;["height","width"].forEach((e=>{const r=n[e];AP(r)?t.removeAttribute(e):t.setAttribute(e,r)}));const r=n.style||{};return Object.keys(r).forEach((e=>{t.style[e]=r[e]})),t.width=t.width,delete t[PR],!0}addEventListener(e,t,n){this.removeEventListener(e,t);const r=e.$proxies||(e.$proxies={}),o={attach:jR,detach:AR,resize:HR}[t]||WR;r[t]=o(e,t,n)}removeEventListener(e,t){const n=e.$proxies||(e.$proxies={}),r=n[t];if(!r)return;({attach:BR,detach:BR,resize:BR}[t]||RR)(e,t,r),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return sI(e,t,n,r)}isAttached(e){const t=JN(e);return!(!t||!t.isConnected)}}class YR{constructor(){st(this,"x",void 0),st(this,"y",void 0),st(this,"active",!1),st(this,"options",void 0),st(this,"$animations",void 0)}tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return gT(this.x)&&gT(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const r={};return e.forEach((e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]})),r}}function qR(e,t){const n=e.options.ticks,r=function(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),o=e._maxLength/n;return Math.floor(Math.min(r,o))}(e),o=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?function(e){const t=[];let n,r;for(n=0,r=e.length;no)return function(e,t,n,r){let o,i=0,a=n[0];for(r=Math.ceil(r),o=0;oe-t)).pop(),t}(r);for(let a=0,s=i.length-1;ao)return e}return Math.max(o,1)}(i,t,o);if(a>0){let e,n;const r=a>1?Math.round((c-s)/(a-1)):null;for(UR(t,l,u,AP(r)?0:s-r,s),e=0,n=a-1;e"top"===t||"left"===t?e[t]+n:e[t]-n,$R=(e,t)=>Math.min(t||e,e);function XR(e,t){const n=[],r=e.length/t,o=e.length;let i=0;for(;ia+s)))return l}function QR(e){return e.drawTicks?e.tickLength:0}function ZR(e,t){if(!e.display)return 0;const n=MN(e.font,t),r=ON(e.padding);return(zP(e.text)?e.text.length:1)*n.lineHeight+r.height}function JR(e,t,n){let r=AT(e);return(n&&"right"!==t||!n&&"right"===t)&&(r=(e=>"left"===e?"right":"right"===e?"left":e)(r)),r}class eD extends YR{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=HP(e,Number.POSITIVE_INFINITY),t=HP(t,Number.NEGATIVE_INFINITY),n=HP(n,Number.POSITIVE_INFINITY),r=HP(r,Number.NEGATIVE_INFINITY),{min:HP(e,n),max:HP(t,r),minDefined:FP(e),maxDefined:FP(t)}}getMinMax(e){let t,{min:n,max:r,minDefined:o,maxDefined:i}=this.getUserBounds();if(o&&i)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let s=0,c=a.length;sr?r:n,r=o&&n>r?n:r,{min:HP(n,HP(r,n)),max:HP(r,HP(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea;return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){VP(this.options.beforeUpdate,[this])}update(e,t,n){const{beginAtZero:r,grace:o,ticks:i}=this.options,a=i.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,n){const{min:r,max:o}=e,i=WP(t,(o-r)/2),a=(e,t)=>n&&0===e?0:e+t;return{min:a(r,-Math.abs(i)),max:a(o,i)}}(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const s=a=o||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const l=this._getLabelSizes(),u=l.widest.width,d=l.highest.height,f=_T(this.chart.width-u,0,this.maxWidth);i=e.offset?this.maxWidth/n:f/(n-1),u+6>i&&(i=f/(n-(e.offset?.5:1)),a=this.maxHeight-QR(e.grid)-t.padding-ZR(e.title,this.chart.options.font),s=Math.sqrt(u*u+d*d),c=yT(Math.min(Math.asin(_T((l.highest.height+6)/i,-1,1)),Math.asin(_T(a/s,-1,1))-Math.asin(_T(d/s,-1,1)))),c=Math.max(r,Math.min(o,c))),this.labelRotation=c}afterCalculateLabelRotation(){VP(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){VP(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:o}}=this,i=this._isVisible(),a=this.isHorizontal();if(i){const i=ZR(r,t.options.font);if(a?(e.width=this.maxWidth,e.height=QR(o)+i):(e.height=this.maxHeight,e.width=QR(o)+i),n.display&&this.ticks.length){const{first:t,last:r,widest:o,highest:i}=this._getLabelSizes(),s=2*n.padding,c=bT(this.labelRotation),l=Math.cos(c),u=Math.sin(c);if(a){const t=n.mirror?0:u*o.width+l*i.height;e.height=Math.min(this.maxHeight,e.height+t+s)}else{const t=n.mirror?0:l*o.width+u*i.height;e.width=Math.min(this.maxWidth,e.width+t+s)}this._calculatePadding(t,r,u,l)}}this._handleMargins(),a?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){const{ticks:{align:o,padding:i},position:a}=this.options,s=0!==this.labelRotation,c="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,d=0;s?c?(u=r*e.width,d=n*t.height):(u=n*e.height,d=r*t.width):"start"===o?d=t.width:"end"===o?u=e.width:"inner"!==o&&(u=e.width/2,d=t.width/2),this.paddingLeft=Math.max((u-a+i)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-l+i)*this.width/(this.width-l),0)}else{let n=t.height/2,r=e.height/2;"start"===o?(n=0,r=e.height):"end"===o&&(n=t.height,r=0),this.paddingTop=n+i,this.paddingBottom=r+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){VP(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,n=e.length;t{const n=e.gc,r=n.length/2;let o;if(r>t){for(o=0;o({width:i[e]||0,height:a[e]||0});return{first:k(0),last:k(t-1),widest:k(w),highest:k(S),widths:i,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return _T(this._alignToPixels?sN(this.chart,t,0):t,-32768,32767)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&ea*r?a/n:s/r:s*r0}_computeGridLineItems(e){const t=this.axis,n=this.chart,r=this.options,{grid:o,position:i,border:a}=r,s=o.offset,c=this.isHorizontal(),l=this.ticks.length+(s?1:0),u=QR(o),d=[],f=a.setContext(this.getContext()),h=f.display?f.width:0,p=h/2,m=function(e){return sN(n,e,h)};let g,v,b,y,x,w,S,k,C,E,_,O;if("top"===i)g=m(this.bottom),w=this.bottom-u,k=g-p,E=m(e.top)+p,O=e.bottom;else if("bottom"===i)g=m(this.top),E=e.top,O=m(e.bottom)-p,w=g+p,k=this.top+u;else if("left"===i)g=m(this.right),x=this.right-u,S=g-p,C=m(e.left)+p,_=e.right;else if("right"===i)g=m(this.left),C=e.left,_=m(e.right)-p,x=g+p,S=this.left+u;else if("x"===t){if("center"===i)g=m((e.top+e.bottom)/2+.5);else if(LP(i)){const e=Object.keys(i)[0],t=i[e];g=m(this.chart.scales[e].getPixelForValue(t))}E=e.top,O=e.bottom,w=g+p,k=w+u}else if("y"===t){if("center"===i)g=m((e.left+e.right)/2);else if(LP(i)){const e=Object.keys(i)[0],t=i[e];g=m(this.chart.scales[e].getPixelForValue(t))}x=g-p,S=x-u,C=e.left,_=e.right}const M=BP(r.ticks.maxTicksLimit,l),P=Math.max(1,Math.ceil(l/M));for(v=0;v0&&(i-=r/2)}d={left:i,top:o,width:r+t.width,height:n+t.height,color:e.backdropColor}}m.push({label:y,font:C,textOffset:O,options:{rotation:p,color:n,strokeColor:s,strokeWidth:l,textAlign:f,textBaseline:M,translation:[x,w],backdrop:d}})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-bT(this.labelRotation))return"top"===e?"left":"right";let n="center";return"start"===t.align?n="left":"end"===t.align?n="right":"inner"===t.align&&(n="inner"),n}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:n,mirror:r,padding:o}}=this.options,i=e+o,a=this._getLabelSizes().widest.width;let s,c;return"left"===t?r?(c=this.right+o,"near"===n?s="left":"center"===n?(s="center",c+=a/2):(s="right",c+=a)):(c=this.right-i,"near"===n?s="right":"center"===n?(s="center",c-=a/2):(s="left",c=this.left)):"right"===t?r?(c=this.left+o,"near"===n?s="right":"center"===n?(s="center",c-=a/2):(s="left",c-=a)):(c=this.left+i,"near"===n?s="left":"center"===n?(s="center",c+=a/2):(s="right",c=this.right)):s="right",{textAlign:s,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:n,top:r,width:o,height:i}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,o,i),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const n=this.ticks.findIndex((t=>t.value===e));if(n>=0){return t.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(e){const t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,i;const a=(e,t,r)=>{r.width&&r.color&&(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(o=0,i=r.length;o