Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer - Version 3.3.3

Version Description

Release date: December 2, 2022

Changelog: - Fix: Fixed an issue with analytics crashing dashboard

Changelog of our editor: - New create-button wizard - New create-widget wizard - Fix issue in WhatsApp Widget - Fix issue with phone number validator - Faster editor since we're using lazy loading - Lot's of bugs fixed

If you experience bugs, problems or you just have some feedback, let us know on our Buttonizer community!

Download this release

Release Info

Developer buttonizer
Plugin Icon wp plugin Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer
Version 3.3.3
Comparing to
See all releases

Code changes from version 3.3.2 to 3.3.3

assets/app/index.4ec2107c.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ var kt=Object.defineProperty,zt=Object.defineProperties;var xt=Object.getOwnPropertyDescriptors;var ce=Object.getOwnPropertySymbols;var qe=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable;var Ue=(t,i,r)=>i in t?kt(t,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[i]=r,z=(t,i)=>{for(var r in i||(i={}))qe.call(i,r)&&Ue(t,r,i[r]);if(ce)for(var r of ce(i))Ge.call(i,r)&&Ue(t,r,i[r]);return t},U=(t,i)=>zt(t,xt(i));var je=(t,i)=>{var r={};for(var o in t)qe.call(t,o)&&i.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&ce)for(var o of ce(t))i.indexOf(o)<0&&Ge.call(t,o)&&(r[o]=t[o]);return r};import{c as ot,a as Ye,b as Se,R as Te,u as oe,r as s,j as e,d as n,J as St,e as Be,F as v,L as Tt,C as Y,B as g,E as Bt,T as at,S as It,H as Lt,A as re,I as Ie,f as st,g as K,h,i as $t,k as Nt,l as I,m as At,n as Pt,P as Le,G as b,o as Rt,p as Mt,q as Dt,M as Et,s as de,t as ie,v as F,w as Ft,x as A,y as Wt,z as J,D as Ot,K as Ht,N as Ut,O as ne,Q as qt,U as Gt,V as jt,W as Yt,X as Vt,Y as pe,Z as me,_ as ge,$ as fe,a0 as X,a1 as ye,a2 as lt,a3 as $e,a4 as j,a5 as ct,a6 as dt,a7 as Ne,a8 as Ae,a9 as Pe,aa as Re,ab as Me,ac as De,ad as Ee,ae as Fe,af as We,ag as Jt,ah as Kt,ai as Xt,aj as Qt,ak as Zt,al as en,am as tn,an as nn,ao as rn,ap as ve,aq as on,ar as an,as as sn,at as ln,au as cn,av as dn,aw as un,ax as hn,ay as Ve,az as pn,aA as he,aB as mn,aC as gn,aD as fn,aE as yn,aF as bn,aG as vn,aH as _n,aI as _e,aJ as wn,aK as Cn,aL as kn,aM as zn,aN as xn,aO as Sn,aP as Tn,aQ as Bn,aR as In,aS as q,aT as Ln,aU as $n,aV as Nn,aW as An,aX as Pn}from"./vendor.7daddede.js";const Rn=function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function r(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerpolicy&&(l.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?l.credentials="include":a.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(a){if(a.ep)return;a.ep=!0;const l=r(a);fetch(a.href,l)}};Rn();let T=ot({palette:{primary:{main:"#2D7789",contrastText:"#FFFFFF"},secondary:{main:"#f08419",contrastText:"#FFFFFF"},white:{main:"#FFFFFF",contrastText:"#2D7789"},black:{main:"#111111",contrastText:"#2D7789"}},typography:{fontFamily:["BlinkMacSystemFont","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue","sans-serif"].join(",")},breakpoints:{values:{xs:0,sm:600,md:900,lg:1200,xl:1536,navigation:1090}}});T=ot(T,{components:{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:T.palette.secondary.main,backgroundColor:Ye(T.palette.secondary.main,.08),"&:hover":{backgroundColor:Ye(T.palette.secondary.main,.12)},"& .MuiListItemIcon-root":{color:T.palette.secondary.main}}}}},MuiLink:{styleOverrides:{root:{textDecoration:"none","&:hover":{textDecoration:"underline"}}}},MuiButton:{styleOverrides:{root:{borderRadius:50,padding:"8px 18px"}},variants:[{props:{type:"link"},style:({ownerState:t})=>z({},t.variant==="contained"?{color:T.palette[t.color].contrastText,"&:focus":{outline:"unset",boxShadow:"unset",color:T.palette[t.color].contrastText},"&:hover":{color:T.palette[t.color].contrastText}}:{color:T.palette[t.color].main,"&:focus":{outline:"unset",boxShadow:"unset",color:T.palette[t.color].main},"&:hover":{color:T.palette[t.color].main}})},{props:{type:"link-small"},style:{padding:"5px 5px",textTransform:"none",minWidth:35,color:T.palette.primary.main,"&:focus":{outline:"unset",boxShadow:"unset",color:T.palette.primary.main},"&:hover":{color:T.palette.primary.main}}}]},MuiPaper:{styleOverrides:{root:{borderRadius:10,position:"relative"}},variants:[{props:{type:"wrapper"},style:{padding:"15px 30px"}}]},MuiTypography:{variants:[{props:{type:"header"},style:{fontSize:"1rem",fontWeight:600}},{props:{type:"content"},style:{fontSize:"1em"}}]},MuiTab:{variants:[{props:{size:"small"},style:{textTransform:"unset",minHeight:42}}]},MuiList:{variants:[{props:{size:"large"},style:{"& .MuiListItem-root":{padding:"5px 16px"},"& .MuiAvatar-root":{width:30,height:30},"& .MuiTypography-root":{fontSize:"1.2rem"}}}]}}});var ut=T;function P(t,i={},r="POST"){let o=`${buttonizer_admin.api}buttonizer${t}?nonce=${buttonizer_admin.nonce}`;return buttonizer_admin.isPlain==!0&&(o=buttonizer_admin.api.slice(0,-1)+encodeURIComponent(`/buttonizer${t}`)+`&nonce=${buttonizer_admin.nonce}`),Se({url:o,method:r,data:i,headers:{"X-WP-Nonce":buttonizer_admin.nonce}})}const ht=Te.createContext(),Mn=t=>{const i=oe(),[r,o]=s.exports.useState("no-lock"),[a,l]=s.exports.useState(!1),[c,d]=s.exports.useState(!1),[m,u]=s.exports.useState(!1),[p,y]=s.exports.useState(!1),[_,R]=s.exports.useState({}),[x,L]=s.exports.useState({}),[B,k]=s.exports.useState({}),[Q,W]=s.exports.useState(!1);s.exports.useState(null);const[V,ae]=s.exports.useState(null),[D,M]=s.exports.useState(!1),[$,se]=s.exports.useState(null),[le,yt]=s.exports.useState("weekly"),Oe=f=>{R({name:f==null?void 0:f.name,id:f==null?void 0:f.uid}),L({id:f==null?void 0:f.site_id,timezone:f==null?void 0:f.site_timezone,isPremium:f==null?void 0:f.site_licensed}),k({name:f==null?void 0:f.plan_name,id:f==null?void 0:f.plan_id,hasPlan:(f==null?void 0:f.plan_id)!==null,cancelled:f==null?void 0:f.plan_cancelled})},bt=()=>{Q||(V!==null&&i("/editor"),W(!0),P("/editor_start_session").then(({data:f})=>{ae(f),i("/editor")}).catch(()=>{}).then(()=>W(!1)))},vt=()=>{$===null&&He()},He=(f=null)=>{f||(f=le),M(!0),P("/analytics/overview",{type:f}).then(({data:Ct})=>{se(Ct.data),yt(f)}).catch(()=>{}).then(()=>M(!1))};s.exports.useEffect(()=>{o(window.buttonizer_admin.actionLock),l(!!window.buttonizer_admin.hasMigrated),u(!!window.buttonizer_admin.requestReview),Oe(window.buttonizer_admin.account)},[]);const _t={actionLock:r,hasMigrated:a,legacyBackupDeleted:c,connectionSuccesfull:p,isPremium:x.isPremium,accountData:_,siteInfo:x,planInfo:B,sessionStarting:Q,cachedEditorSession:V,requestReview:m,isLoadingAnalytics:D,analyticsData:$,analyticsChosenRange:le},wt={setActionLock:o,setHasMigrated:l,setLegacyBackupDeleted:d,parseAccountData:Oe,setConnectionSuccessfull:y,setCachedEditorSession:ae,setRequestReview:u,startSession:bt,getAnalytics:vt,updateAnalyticsByTimeRange:He};return e(ht.Provider,z({value:z(z({},_t),wt)},t))},w=()=>{const t=Te.useContext(ht);if(t===void 0)throw new Error("useApp must be used within a AppProvider");return t},Dn="https://app.buttonizer.io",En="https://editor.buttonizer.io/site/";function N(t="/"){return Dn+t}function Fn(t){const i=`?language=${buttonizer_admin.locale}`;return`${En}${t.redirect_id}${i}#auth-token=${t.token}`}function be({text:t="Loading..."}){return n("div",{className:"buzzy-animation",children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/icon-animated.svg`})," ",e("span",{children:t})]})}const pt=new St;let we=null,E=null;function mt({buttonProps:t,buttonText:i="Connect",onConnect:r,onLoading:o=()=>{},reconnect:a=!1}){const{enqueueSnackbar:l,closeSnackbar:c}=Be(),[d,m]=s.exports.useState(!1),[u,p]=s.exports.useState(!1),[y,_]=s.exports.useState(!1),R=buttonizer_admin.site,x=()=>{if(d&&E){E.focus();return}m(!0),p(!1);const L=N(`/apps/onboard?app_origin=wordpress&site_name=${encodeURIComponent(R.name)}&domain=${encodeURIComponent(R.domain)}&email=${encodeURIComponent(R.user.email)}&first_name=${encodeURIComponent(R.user.firstName)}&last_name=${encodeURIComponent(R.user.lastName)}`);E=window.open(L,"connectPopup",`width=500,height=580,top=${window.innerHeight/2-580/2},left=${window.innerWidth/2-500/2},status=no,scrollbars=yes,resizable=no`);try{E.focus()}catch{l("Could not open authorization popup. Your browser might have blocked it. Please add this site to your exception list.",{anchorOrigin:{vertical:"bottom",horizontal:"center",autoHideDuration:1e4},action:k=>[e(g,{href:"https://community.buttonizer.pro/knowledgebase/1208",target:"_blank",color:"secondary",children:"More information"}),e(g,{onClick:()=>c(k),children:"Close"})]})}we=setInterval(()=>{if(!E){clearInterval(we);return}E.closed&&(clearInterval(we),E=null,m(!1))})};return s.exports.useEffect(()=>{const L=B=>{!B.isTrusted||B.origin!==N("")||B.data.messageType==="connect-info"&&(E&&E.close(),_(!0),o(!0),P("/connect",{siteId:B.data.id,authorization:B.data.authorization,reconnect:a}).then(({data:k})=>{pt.addConfetti(),r(k)}).catch(()=>{_(!1),o(!1),p(!0)}))};return window.addEventListener("message",L),function(){window.removeEventListener("message",L)}},[]),e(v,{children:e(Tt,U(z({onClick:x,loading:y,loadingIndicator:e(Y,{size:20,style:{color:"white"}})},t),{children:i}))})}function Wn({children:t}){const{parseAccountData:i,setConnectionSuccessfull:r}=w(),{enqueueSnackbar:o,closeSnackbar:a}=Be();return s.exports.useEffect(()=>{Se.interceptors.response.use(l=>l,l=>{let c=`Oops, something went wrong. Error status ${l.response.status} (${l.response.statusText}). Your webserver might be unable to handle this request, there's an issue with your WordPress instance or you have insufficient permissions to execute this request.`,d=!0,m=!1,u=1207,p=null;return l.response.data&&(l.response.data.code==="buttonizer_api_server_error"?u=1213:d=!1,l.response.data.code==="buttonizer_token_expired"&&(m=!0),l.response.data.data&&l.response.data.data.message&&l.response.data.data.message!==""&&(p=l.response.data.data.message),c=`${l.response.data.message} (Error code: ${l.response.data.code})`),o(c,{anchorOrigin:{vertical:"bottom",horizontal:"center"},autoHideDuration:null,action:y=>[d&&e(g,{href:`https://community.buttonizer.pro/knowledgebase/${u}`,target:"_blank",color:"secondary",children:"More information"}),m&&e(mt,{onConnect:_=>{a(y),i(_.data),r(!0)},reconnect:!0,buttonProps:{color:"secondary"},buttonText:"Reconnect"}),p!==null&&e(g,{color:"secondary",onClick:()=>alert(`The response message we received was:
2
+
3
+ ${p}`),children:"Debug"}),e(g,{onClick:()=>a(y),children:"Close"})]}),Promise.reject(l)})},[]),t}function On({children:t}){return e(Te.StrictMode,{children:e(Bt,{fallback:n("p",{children:["We're sorry! Our dashboard has crashed, we have been notified about the error. Please refresh the page"," ",e("a",{href:"./admin.php?page=Buttonizer",children:"or start from the beginning"}),"."]}),showDialog:!0,children:e(at,{theme:ut,children:e(It,{maxSnack:3,children:e(Lt,{children:e(Mn,{children:e(Wn,{children:t})})})})})})})}const Hn="_logoLink_1f0it_1",Un="_title_1f0it_7",qn="_logo_1f0it_1",Gn="_navLinks_1f0it_19",jn="_dropdownMenu_1f0it_23",Yn="_pluginMenuListIcon_1f0it_27",Vn="_divider_1f0it_31",Jn="_dropdownMenuItem_1f0it_36",Kn="_dropdownMenuItemSelected_1f0it_41",Xn="_externalIcon_1f0it_44";var C={logoLink:Hn,title:Un,logo:qn,navLinks:Gn,dropdownMenu:jn,pluginMenuListIcon:Yn,divider:Vn,dropdownMenuItem:Jn,dropdownMenuItemSelected:Kn,externalIcon:Xn};function Qn(){const{connectionSuccesfull:t,setConnectionSuccessfull:i,hasMigrated:r}=w(),o=()=>{i(!1)};return t?n(re,{severity:"success",variant:"outlined",action:e(Ie,{"aria-label":"close",color:"inherit",size:"small",onClick:o,children:e(st,{fontSize:"inherit"})}),style:{marginTop:15,background:"#edf7ed"},children:[!r&&n(v,{children:[e(K,{children:"Buttonizer has been set up. Happy conversion \u{1F680}"}),n(h,{variant:"body1",children:["Start building by clicking the '",e("b",{children:"Edit buttons"}),"' button in the section below."]})]}),r&&n(v,{children:[e(K,{children:"Your Buttonizer account has been connected. Happy conversion \u{1F680}"}),n(h,{variant:"body1",children:["Buttonizer should now be visible on your WordPress website. Manage your buttons by clicking the '",e("b",{children:"Edit buttons"}),"' button in the section below."]}),n(h,{variant:"body1",style:{marginTop:15},children:[e("b",{children:"Tip:"})," If you have a caching plugin active, we recommend to clear your site's cache."]})]})]}):null}function Je(t){return P("/settings",{data:t})}function Zn(){const{requestReview:t,setRequestReview:i}=w(),[r,o]=s.exports.useState(!1),[a,l]=s.exports.useState(!1),[c,d]=s.exports.useState(!1),m=()=>{i(!1)},u=()=>{c||(d(!0),Je({remindForReview:!0}).then(()=>m()).catch(()=>{}).then(()=>d(!1)))},p=()=>{c||(d(!0),Je({markAsReviewed:!0}).then(()=>m()).catch(()=>{}).then(()=>d(!1)))};return t?n(re,{severity:"info",variant:"outlined",style:{marginTop:15,background:"#e5f6fd"},children:[!r&&!a&&n(v,{children:[e(K,{children:"Are you enjoying Buttonizer? We really hope you do!"}),e(h,{variant:"body1",children:"Would you like to review us on WordPress and share your experience? This way you support us developing new features for Buttonizer and spread the love!"}),n("div",{style:{marginTop:15},children:[e(g,{variant:"outlined",href:"https://r.buttonizer.io/review/wordpress",target:"_blank",startIcon:e($t,{}),style:{marginRight:15},onClick:()=>o(!0),disabled:c,children:"Yes, I like Buttonizer"}),e(g,{startIcon:e(Nt,{}),style:{marginRight:15},href:"https://r.buttonizer.io/feedback",target:"_blank",disabled:c,onClick:()=>l(!0),children:"No, send feedback"}),e("div",{style:{float:"right"},children:e(g,{disabled:c,onClick:u,children:"Remind me later"})})]})]}),(r||a)&&n(v,{children:[e(K,{children:r?"We're really happy to hear that \u{1F389}":"We'll do better! We promise"}),r&&n(v,{children:[n(h,{variant:"body1",children:["If we can help you with anything, or you have cool idea's or great feedback,"," ",e(I,{href:"https://r.buttonizer.io/feedback",target:"_blank",color:"secondary",children:"just reach out to us"}),"! We always reply :)"]}),n(h,{variant:"body1",style:{marginTop:15},children:["If you have closed the window that just opened and you still like to review us,"," ",e(I,{href:"https://r.buttonizer.io/review/wordpress",target:"_blank",color:"secondary",children:"click this link"}),"!"]})]}),!r&&n(h,{variant:"body1",children:["If there's anything else what we can help you with,"," ",e(I,{href:"https://r.buttonizer.io/feedback",target:"_blank",color:"secondary",children:"just reach out to us"}),"! We always reply :)"]}),e("div",{style:{marginTop:15},children:e(g,{startIcon:e(At,{}),onClick:()=>{pt.addConfetti(),i(!1),p()},disabled:c,children:r?"Celebrate in silence":"Close with confetti"})})]})]}):null}function er(){const{siteInfo:t,startSession:i,sessionStarting:r}=w();let o=oe(),a=Pt();const[l,c]=s.exports.useState(!1),d=s.exports.useRef();return n("div",{style:{marginBottom:40},children:[e(Le,{type:"wrapper",children:n(b,{container:!0,alignItems:"center",children:[e(b,{item:!0,navigation:!0,children:n("div",{className:C.logoLink,onClick:()=>o("/overview"),children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/buttonizer-logo.png`,alt:"buttonizerlogo",className:C.logo,draggable:!1}),e(h,{className:C.title,color:"primary",children:"Buttonizer for WordPress"})]})}),n(b,{item:!0,container:!0,justifyContent:"space-between",navigation:"auto",className:C.navLinks,children:[e(g,{onClick:()=>{o("/overview")},color:a.pathname==="/overview"?"secondary":"primary",children:"Home"}),e(g,{onClick:()=>{o("/support")},color:a.pathname==="/support"?"secondary":"primary",children:"Support"}),e(g,{onClick:()=>{c(!0)},ref:d,endIcon:l?e(Rt,{}):e(Mt,{}),color:a.pathname==="/settings"?"secondary":"primary",children:"Settings"}),e(g,{variant:"contained",onClick:i,endIcon:r&&e(Y,{size:20,style:{marginLeft:8}}),disabled:r,children:"Edit buttons"})]})]})}),e(Qn,{}),e(Zn,{}),e(Dt,{open:l&&d.current,anchorEl:d.current,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:()=>{c(!1)},onClick:()=>c(!1),children:n(Et,{className:C.dropdownMenu,children:[n(de,{onClick:()=>{o("/settings")},selected:a.pathname==="/settings",className:ie(C.dropdownMenuItem,a.pathname==="/settings"&&C.dropdownMenuItemSelected),children:[e(F,{className:C.pluginMenuListIcon,children:e(Ft,{fontSize:"small"})}),e(A,{primary:"Plugin settings",secondary:"Preferences"})]}),n(de,{href:N(`/sites/${t.id}/settings`),target:"_blank",className:C.dropdownMenuItem,children:[e(F,{className:C.pluginMenuListIcon,children:e(Wt,{fontSize:"small"})}),e(A,{primary:n(v,{children:["Site Settings",e(J,{className:C.externalIcon})]}),secondary:"Update site settings"})]}),n(de,{href:N(`/sites/${t.id}/plan`),target:"_blank",className:C.dropdownMenuItem,children:[e(F,{className:C.pluginMenuListIcon,children:e(Ot,{fontSize:"small"})}),e(A,{primary:n(v,{children:["Site plan",e(J,{className:C.externalIcon})]}),secondary:"Manage subscription"})]}),e(Ht,{className:C.divider}),n(de,{href:N("/account"),target:"_blank",className:C.dropdownMenuItem,children:[e(F,{className:C.pluginMenuListIcon,children:e(Ut,{fontSize:"small"})}),e(A,{primary:n(v,{children:["Account Settings",e(J,{className:C.externalIcon})]}),secondary:"Account settings"})]})]})})]})}const tr="_footer_zmvmt_1",nr="_subfooter_zmvmt_7",rr="_dutchFlag_zmvmt_13",ir="_loveIcon_zmvmt_23",or="_coffeeIcon_zmvmt_24";var Z={footer:tr,subfooter:nr,dutchFlag:rr,loveIcon:ir,coffeeIcon:or};function gt(){return n("div",{className:Z.footer,children:["Need some assistance? Get free support via our"," ",e(I,{href:"https://r.buttonizer.io/support/community?utm_source=wp-plugin-footer",target:"_blank",color:"secondary",children:"Buttonizer Community"}),". Do you have feedback?"," ",e(I,{href:"https://r.buttonizer.io/feedback?utm_source=wp-plugin-footer",target:"_blank",color:"secondary",children:"Give feedback"}),".",n("div",{className:Z.subfooter,children:["Built with"," ",e(ne,{title:"much love",children:e(qt,{className:Z.loveIcon})})," ","and"," ",e(ne,{title:"lots and lots of coffee",children:e(Gt,{className:Z.coffeeIcon})})," ","in The Netherlands"," ",e(ne,{title:"Buttonizer HQ in Zoetermeer",children:e("img",{src:`${buttonizer_admin.assetsPath}/images/dutch-flag.svg`,className:Z.dutchFlag})})]})]})}function ar(){return n(jt,{style:{maxWidth:1100},children:[n("div",{style:{padding:"50px 0 0",height:"100%"},children:[e(er,{}),e(Yt,{})]}),e(gt,{})]})}const sr="_avatar_1ciu2_5",lr="_listItem_1ciu2_9",cr="_secondaryInfo_1ciu2_13",dr="_knowledgebase_1ciu2_17",ur="_knowledgebaseText_1ciu2_24";var ee={"migratePage-container":"_migratePage-container_1ciu2_1",avatar:sr,listItem:lr,secondaryInfo:cr,knowledgebase:dr,knowledgebaseText:ur};const hr="_buttonizerPaper_131bh_1";var pr={buttonizerPaper:hr};function ft({children:t,containerProps:i}){return e(v,{children:n(Vt,U(z({className:"migratePage-container",style:{marginTop:50,maxWidth:1130}},i),{children:[e("div",{style:{alignItems:"center",justifyContent:"center",display:"flex",marginBottom:30},children:e("img",{src:`${buttonizer_admin.assetsPath}/images/logo.png`,alt:"buttonizerlogo",style:{height:70}})}),e(Le,{className:pr.buttonizerPaper,sx:{"&::before":{background:`url(${buttonizer_admin.assetsPath}/images/waves.svg)`}},children:t})]}))})}const mr="_code_1iwn6_1";var gr={code:mr};const fr=s.exports.forwardRef(function(i,r){return e(pe,z({direction:"up",ref:r},i))});function yr({open:t,onClose:i=()=>{},onConfirm:r=()=>{}}){const o=s.exports.useRef(),a=()=>{o.current.focus(),o.current.select(),navigator.clipboard&&navigator.clipboard.writeText(o.current.value)};return n(me,{open:t,onClose:close,TransitionComponent:fr,"aria-labelledby":"migrate-title","aria-describedby":"migrate-description",children:[e(ge,{id:"migrate-title",children:"Before you migrate"}),n(fe,{children:[n(X,{id:"migrate-description",children:["It seems that you're currently using a deprecated custom JavaScript feature of Buttonizer which is not supported on Buttonizer 3.0 in favour of the advanced"," ",e(I,{href:"https://community.buttonizer.pro/knowledgebase/435",target:"_blank",color:"secondary",children:"Buttonizer JavaScript API"}),"."]}),n(X,{style:{margin:"15px 0"},children:["Please copy all the code from the block below and add it to a"," ",e(I,{href:"https://community.buttonizer.pro/knowledgebase/1011",target:"_blank",color:"secondary",children:"Headers Footers"})," ","plugin of your choice. Your click actions will stay working as they are now."]}),e("textarea",{className:gr.code,onClick:a,ref:o,readOnly:!0,children:buttonizer_admin.beforeMigrate})]}),n(ye,{children:[e(g,{onClick:i,children:"Cancel"}),e(g,{color:"secondary",onClick:()=>r(!0),autoFocus:!0,children:"I am ready"})]})]})}let Ce=null,O=null;function br(){const t=oe(),{enqueueSnackbar:i,closeSnackbar:r}=Be(),{setActionLock:o,parseAccountData:a,setConnectionSuccessfull:l,setHasMigrated:c}=w(),[d,m]=s.exports.useState(!1),[u,p]=s.exports.useState(!1),[y,_]=s.exports.useState(!1),[R,x]=s.exports.useState(!1),[L,B]=s.exports.useState(null),[k,Q]=s.exports.useState(!0),W=buttonizer_admin.site,V=(M=!1)=>{if((buttonizer_admin==null?void 0:buttonizer_admin.beforeMigrate)!==null&&M!==!0){p(!0);return}if(d&&O){O.focus();return}m(!0),x(!1);const $=N(`/apps/onboard?app_origin=wordpress&site_name=${encodeURIComponent(W.name)}&domain=${encodeURIComponent(W.domain)}&email=${encodeURIComponent(W.user.email)}&first_name=${encodeURIComponent(W.user.firstName)}&last_name=${encodeURIComponent(W.user.lastName)}`);O=window.open($,"connectPopup",`width=500,height=580,top=${window.innerHeight/2-580/2},left=${window.innerWidth/2-500/2},status=no,scrollbars=yes,resizable=no`),Ce=setInterval(()=>{if(!O){clearInterval(Ce);return}O.closed&&(clearInterval(Ce),O=null,m(!1))});try{O.focus()}catch{i("Could not open authorization popup. Your browser might have blocked it. Please add this site to your exception list.",{anchorOrigin:{vertical:"bottom",horizontal:"center",autoHideDuration:1e4},action:le=>[e(g,{href:"https://community.buttonizer.pro/knowledgebase/1208",target:"_blank",color:"secondary",children:"More information"}),e(g,{onClick:()=>r(le),children:"Close"})]})}},ae=()=>{y||(_(!0),B("skipping"),P("/migrate",{skip:!0}).then(({data:M})=>{document.location.href=`${buttonizer_admin.admin}?page=Buttonizer`}).catch(()=>{x(!0),_(!1)}))};if(s.exports.useEffect(()=>{const M=$=>{!$.isTrusted||$.origin!==N("")||$.data.messageType==="connect-info"&&(O.close(),B("connecting"),P("/migrate",{siteId:$.data.id,authorization:$.data.authorization,shouldMigrate:k}).then(({data:se})=>{o("no-lock"),a(se.data),l(!0),c(!0),t("/")}).catch(()=>{B(null),x(!0)}))};return window.addEventListener("message",M),function(){window.removeEventListener("message",M)}},[k]),L!==null)return e(be,{text:vr(L)});const D=(M,$)=>n(j,{className:ee.listItem,children:[e(ct,{children:e(dt,{className:ee.avatar,children:e(Ne,{})})}),e(A,{secondary:$,secondaryTypographyProps:{className:ee.secondaryInfo},primary:M})]});return n(ft,{children:[n(g,{href:"https://community.buttonizer.pro/knowledgebase/1122-standalone-vs-wordpress",target:"_blank",type:"link-small",className:ee.knowledgebase,children:[e(lt,{}),e("span",{className:ee.knowledgebaseText,children:"Learn more about Buttonizer Standalone"})]}),n(b,{container:!0,style:{height:"100%"},direction:"row",children:[e(b,{item:!0,container:!0,justifyContent:"center",direction:"column",alignContent:"center",md:6,sm:12,sx:{margin:"20px 0"},children:n("div",{children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/buttonizer-logo.png`,alt:"buttonizerlogo",style:{height:50}}),e(h,{style:{fontSize:27,fontWeight:600,marginTop:30},children:"Buttonizer just got an upgrade!"}),e(h,{style:{fontSize:"1.2rem",maxWidth:"fit-content",marginTop:10},component:"div",children:"Easier to manage, faster and more features."}),e("div",{style:{marginTop:30,maxWidth:300},children:n(g,{variant:"contained",onClick:()=>{Q(!0),V()},color:"secondary",size:"small",sx:{padding:"15px 30px"},children:["Start migrating",e(J,{style:{marginLeft:15}})]})}),e(h,{style:{marginTop:20,fontSize:"0.875rem",maxWidth:"fit-content"},component:"div",children:"Already using Buttonizer Standalone? Connect without migrating your buttons."}),n("div",{style:{marginTop:20,marginBottom:100,alignItems:"center",display:"flex"},children:[e(g,{variant:"outlined",size:"small",onClick:()=>{Q(!1),V()},color:"secondary",sx:{padding:"10px 20px",marginRight:"10px"},children:"Connect now"}),e(g,{size:"small",onClick:ae,disabled:d,children:"Stay in old version"})]})]})}),n(b,{item:!0,md:6,sm:12,container:!0,justifyContent:"center",alignContent:"center",direction:"column",sx:{margin:"20px 0"},children:[e(h,{style:{fontSize:27,fontWeight:600,paddingLeft:15},children:"New in 3.0"}),n($e,{size:"large",children:[D("More free styling options","Imagine what you can do now"),D("Conversion analytics","Privacy focused conversion analytics"),D("Now available on any platform","Try out on WordPress, Shopify, Wix and more"),D("Manage multiple sites with one account","Great for agencies & businesses with multiple sites"),D("Content Delivery Network (CDN)","Lightning fast around the world \u{1F680}"),D("GDPR-Compliant","Buttonizer is fully GDPR-compliant"),D("And much more!")]})]})]}),e(yr,{open:u,onClose:()=>p(!1),onConfirm:V})]})}function vr(t){switch(t){case"initializing":return"Initializing...";case"skipping":return"Skipping...";case"migrating":return"Migrating data..."}}function H(o){var a=o,{children:t,paperStyle:i}=a,r=je(a,["children","paperStyle"]);return e("div",{style:{margin:"20px 0"},children:e(Le,U(z({sx:z({"& > *":{marginTop:"20px !important",marginBottom:"20px !important"},"& > *:first-child":{marginTop:"10px !important",marginBottom:"20px !important"}},i),type:"wrapper"},r),{children:t}))})}const _r="_analyticsContainer_1q32b_1",wr="_analyticsLoading_1q32b_5",Cr="_tabsContainer_1q32b_10",kr="_tabs_1q32b_10",zr="_pieTitle_1q32b_17";var te={analyticsContainer:_r,analyticsLoading:wr,tabsContainer:Cr,tabs:kr,pieTitle:zr};function Ke(t){for(var i=0,r=0;r<t.length;r++)i=t.charCodeAt(r)+((i<<5)-i);for(var o="#",r=0;r<3;r++){var a=i>>r*8&255;const c="00"+a.toString(16);o+=c.substring(c.length-2,c.length)}return o}const xr="_legend_17qwt_1",Sr="_marginTop_17qwt_5",Tr="_legendItem_17qwt_10",Br="_legendColor_17qwt_15",Ir="_legendHidden_17qwt_19",Lr="_legendLabel_17qwt_37",$r="_loading_17qwt_41";var G={legend:xr,marginTop:Sr,legendItem:Tr,legendColor:Br,legendHidden:Ir,legendLabel:Lr,loading:$r};function Nr({chart:t=null,isLoading:i=!1,onForceUpdate:r,showClicks:o=!1,isPieChart:a=!1}){if(s.exports.useEffect(()=>{},[]),!t)return null;const l=t.options.plugins.legend.labels.generateLabels(t),c=d=>{var m=d.datasetIndex,u=t;if(a){const p=t.getDatasetMeta(0).data[d.index].hidden;t.getDatasetMeta(0).data[d.index].hidden=!p,t.update()}else u.setDatasetVisibility(m,!u.isDatasetVisible(m)),u.update();r()};return e("div",{className:ie(G.legend,G.marginTop,i&&G.loading),children:l.map((d,m)=>{const u=d.strokeStyle,p=d.hidden;return e(ne,{title:o?`Total clicks this period: ${t.data.datasets[m].totalClicks}`:"",children:n("span",{className:ie(G.legendItem,p&&G.legendHidden),onClick:()=>c(d),children:[e("span",{className:G.legendColor,style:{color:u}}),e("span",{className:G.legendLabel,children:d.text})]})},m)})})}const Ar="_lineChart_hik2f_1",Pr="_loading_hik2f_6";var Xe={lineChart:Ar,loading:Pr};Ae.register(Pe,Re,Me,De,Ee,Fe,We,Jt);const Qe=["#F08419","#2D95EC"];function Rr(t,i){return t<2?{borderColor:Qe[t],backgroundColor:Qe[t]}:{borderColor:Ke(i),backgroundColor:Ke(i)}}function Mr({data:t}){const{isLoadingAnalytics:i,analyticsChosenRange:r}=w(),[o,a]=s.exports.useState(!0),[l,c]=s.exports.useState(!1),d=s.exports.useRef(null),[,m]=s.exports.useState();return s.exports.useEffect(()=>{d.current&&(l||c(!0))},[o]),n(v,{children:[e("div",{className:ie(Xe.lineChart,i&&Xe.loading),children:e(Kt,{height:400,options:{maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{beginAtZero:!0,min:0,grid:{drawBorder:!1,drawOnChartArea:!0,borderColor:"#ECECEC"},title:{display:!0,text:"Clicks"},ticks:{padding:15,backdropPadding:0}},x:{grid:{drawBorder:!1,drawOnChartArea:!1,borderColor:"#ECECEC"},ticks:{padding:5}}},interaction:{intersect:!1}},ref:d,data:{labels:t.line.labels.map(u=>Xt.unix(u).format(["weekly","monthly"].indexOf(r)>=0?"MMMM Do":"H:mm")),datasets:t.line.datasets.filter(u=>!u.unknown||u.unknown&&!o).map((u,p)=>z({label:u.name,data:u.values,totalClicks:u.totalClicks,tension:.5,pointRadius:5,pointHoverRadius:8},Rr(p,u.id)))}})}),e(Nr,{chart:d.current,onForceUpdate:()=>m({}),isLoading:i,showClicks:!0}),e("div",{style:{paddingTop:15},children:e(Qt,{control:e(Zt,{checked:o,size:"small"}),label:"Hide unknown (or deleted) buttons",onChange:()=>{a(!o),setTimeout(()=>{m({})},1)}})})]})}const Dr="_controls_a553e_1";var Er={controls:Dr};function Fr(){const{analyticsChosenRange:t,updateAnalyticsByTimeRange:i,isLoadingAnalytics:r}=w(),[o,a]=s.exports.useState(t);return n("div",{className:Er.controls,children:["Time controls:",n(en,{size:"small",style:{verticalAlign:"middle",marginLeft:15},children:[e(tn,{id:"demo-multiple-name-label",children:"Time range"}),n(nn,{labelId:"demo-multiple-name-label",id:"demo-multiple-name",value:o,onChange:l=>{const{target:{value:c}}=l;a(c),i(c)},input:e(rn,{label:"Time range"}),disabled:r,children:[e(ve,{value:"today",children:"Today"},"today"),e(ve,{value:"yesterday",children:"Yesterday"},"yesterday"),e(ve,{value:"weekly",children:"This week (last 7 days)"},"weekly")]})]}),r&&e(Y,{size:25,style:{verticalAlign:"middle",marginLeft:15}})]})}const Wr="_title_zfqz7_1",Or="_cardContainer_zfqz7_5",Hr="_chartContainer_zfqz7_9",Ur="_percentageContainer_zfqz7_14",qr="_percentageColor_zfqz7_17",Gr="_percentage_zfqz7_14",jr="_percentageLabel_zfqz7_28";var S={title:Wr,cardContainer:Or,chartContainer:Hr,percentageContainer:Ur,percentageColor:qr,percentage:Gr,percentageLabel:jr};Ae.register(Pe,Re,Me,De,Ee,Fe,We);function Yr({data:t}){const{isLoadingAnalytics:i}=w(),[r,o]=s.exports.useState(!0),[a,l]=s.exports.useState(!1),c=s.exports.useRef(null);return s.exports.useState(),s.exports.useEffect(()=>{c.current&&(a||l(!0))},[r]),e(v,{children:n("div",{className:ie(S.cardContainer,i&&S.loading),children:[e(h,{variant:"body1",className:S.title,children:"Devices"}),e("div",{className:S.chartContainer,children:e(on,{options:{cutout:"70%",plugins:{legend:{display:!1}}},data:{labels:["Desktop","Phone","Tablet"],datasets:[{label:"# of clicks",data:[t.devices.desktop,t.devices.phone,t.devices.tablet],backgroundColor:["#F08419","#F4A557","#F7BF87"],borderColor:["#F08419","#F4A557","#F7BF87"],borderWidth:1}]}})}),n(b,{container:!0,style:{padding:"0 13px"},children:[n(b,{item:!0,xs:4,className:S.percentageContainer,children:[e("div",{className:S.percentageColor,style:{backgroundColor:"#f4a557"}}),n(h,{className:S.percentage,children:[Math.round(t.devices.phone/t.total*100),"%"]}),e(h,{className:S.percentageLabel,children:"Mobile"})]}),n(b,{item:!0,xs:4,className:S.percentageContainer,children:[e("div",{className:S.percentageColor,style:{backgroundColor:"#F08419"}}),n(h,{className:S.percentage,children:[Math.round(t.devices.desktop/t.total*100),"%"]}),e(h,{className:S.percentageLabel,children:"Desktop"})]}),n(b,{item:!0,xs:4,className:S.percentageContainer,children:[e("div",{className:S.percentageColor,style:{backgroundColor:"#F7BF87"}}),n(h,{className:S.percentage,children:[Math.round(t.devices.tablet/t.total*100),"%"]}),e(h,{className:S.percentageLabel,children:"Tablet"})]})]})]})})}const Vr="_title_va1ni_1",Jr="_gridHeight_va1ni_5",Kr="_barHeight_va1ni_12";var ke={title:Vr,gridHeight:Jr,barHeight:Kr};Ae.register(Pe,Re,Me,De,an,Ee,Fe,We);function Xr({data:t,siteInfo:i}){w();const[r,o]=s.exports.useState(!0),[a,l]=s.exports.useState(!1),c=s.exports.useRef(null);s.exports.useState(),s.exports.useEffect(()=>{c.current&&(a||l(!0))},[r]);const d=t&&t.countries.list.sort((u,p)=>{const y=t.countries.data[t.countries.list.indexOf(u)];return t.countries.data[t.countries.list.indexOf(p)]-y}).slice(0,5),m=t.countries.data.sort((u,p)=>p-u).slice(0,5);return n(v,{children:[n(b,{container:!0,children:[e(b,{item:!0,md:6,children:e(h,{variant:"body1",className:ke.title,children:"Countries"})}),e(b,{item:!0,md:6,style:{textAlign:"right"},children:e(g,{startIcon:e(sn,{}),href:N(`/analytics/${i.id}`),target:"_blank",children:"View worldmap"})})]}),e("div",{className:ke.gridHeight,children:e("div",{className:ke.barHeight,children:e(ln,{width:400,options:{maintainAspectRatio:!1,barThickness:22,indexAxis:"y",plugins:{legend:{display:!1}},scales:{y:{grid:{display:!1}},x:{ticks:{callback:function(u){return u+"%"}}}}},data:{labels:d.map(u=>{const p=cn(dn,u.toUpperCase(),null);return p?p.name:"Unknown"}),datasets:[{axis:"y",label:"% of total clicks",data:m.map(u=>Math.round(u/t.total*100)),backgroundColor:["#F08419"],borderColor:["#F08419"]}]}})})})]})}const Qr="_styledContainer_u39ug_1",Zr="_paragraph_u39ug_8",ei="_button_u39ug_14";var ze={styledContainer:Qr,paragraph:Zr,button:ei};function ti({siteInfo:t}){return n("div",{className:ze.styledContainer,children:[e(h,{variant:"body1",color:"primary",className:ze.paragraph,children:"Dive deeper into your Buttonizer Analytics"}),e(g,{variant:"contained",color:"primary",startIcon:e(un,{}),href:N(`/analytics/${t.id}`),target:"_blank",className:ze.button,children:"Open analytics dashboard"})]})}function ni(){const{siteInfo:t,getAnalytics:i,analyticsData:r,isLoadingAnalytics:o}=w();return s.exports.useEffect(()=>{i()},[]),n(H,{className:te.analytics,children:[n("div",{className:te.tabsContainer,children:[n(hn,{value:0,className:te.tabs,children:[e(Ve,{value:0,icon:e(pn,{}),iconPosition:"start",label:e(v,{children:"Button clicks"}),size:"small"}),e(Ve,{value:1,icon:e(he,{size:"small",label:"Coming soon"}),iconPosition:"end",label:"Conversions",size:"small",disabled:!0})]}),e(Fr,{}),e("div",{children:e(ne,{title:"How do analytics work",placement:"left",children:e(Ie,{href:"https://community.buttonizer.pro/knowledgebase/1280",target:"_blank",size:"small",children:e(lt,{})})})})]}),n("div",{className:r&&r.line.datasets.length>=1&&te.analyticsContainer,children:[o&&r===null&&e("div",{className:te.analyticsLoading,children:e(Y,{size:50})}),!o&&!r&&e(re,{severity:"warning",children:"Woops, something went wrong loading analytics of your site."}),r&&r.line.datasets.length>=1&&n(v,{children:[e(Mr,{data:r,loading:o}),n(b,{container:!0,spacing:3,style:{marginTop:0},children:[e(b,{item:!0,style:{maxWidth:365},children:e(Yr,{data:r,loading:o})}),e(b,{item:!0,md:!0,children:e(Xr,{data:r,siteInfo:t,loading:o})})]})]}),r&&r.line.datasets.length===0&&n(re,{severity:"info",icon:e(mn,{}),style:{marginTop:15},children:[e(K,{children:"Waiting for data..."}),n("div",{children:[e(h,{variant:"body1",fontSize:15,children:"Currently we don't have any click data to show you. As soon someone clicked one of your buttons, analytics will become visible here."}),e(h,{variant:"body1",fontSize:15,style:{marginTop:15},children:"Check back later \u{1F680}"})]})]})]}),e(ti,{siteInfo:t})]})}function ri(){const{siteInfo:t,startSession:i,sessionStarting:r}=w();return n(v,{children:[n(H,{children:[e(h,{type:"header",color:"primary",children:"Manage your Buttonizer instance"}),e(h,{type:"body1",color:"primary",children:"Welcome to your Buttonizer for WordPress dashboard. Here are a few quick-tools to manage your Buttonizer."}),e(g,{variant:"outlined",onClick:i,endIcon:r&&e(Y,{size:20,style:{marginLeft:8}}),disabled:r,children:"Edit buttons"})]}),e(ni,{})]})}const ii=s.exports.forwardRef(function(i,r){return e(pe,z({direction:"up",ref:r},i))});function oi({open:t,onClose:i=()=>{}}){var d;const{setActionLock:r}=w(),[o,a]=s.exports.useState(!1),l=()=>{o||i()},c=()=>{o||(a(!0),P("/disconnect").then(({data:m})=>{r("setup"),i()}).catch(()=>a(!1)))};return n(me,{open:t,onClose:l,TransitionComponent:ii,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[e(ge,{id:"alert-dialog-title",children:"Are you sure you want to disconnect?"}),n(fe,{children:[n(X,{id:"alert-dialog-description",children:["You will disconnect your Buttonizer instance from your site"," ",e("b",{children:(d=buttonizer_admin==null?void 0:buttonizer_admin.site)==null?void 0:d.domain}),". You will be able to sign in with another account."]}),e(X,{id:"alert-dialog-description-p2",style:{marginTop:15},children:"Are you sure you want to disconnect?"})]}),n(ye,{children:[e(g,{disabled:o,onClick:l,children:"Cancel"}),e(g,{disabled:o,color:"secondary",onClick:c,autoFocus:!0,children:"Disconnect"})]})]})}function ai(){const[t,i]=s.exports.useState(!1);return n(v,{children:[n(H,{children:[e(h,{type:"header",color:"primary",children:"Disconnect Buttonizer"}),e(h,{variant:"body1",color:"primary",children:"Did you create a new instance or do you want to sign in with a different account? Disconnect Buttonizer from your WordPress site."}),e(g,{variant:"outlined",onClick:()=>i(!0),children:"Disconnect"})]}),e(oi,{open:t,onClose:()=>i(!1)})]})}const si="_table_13k7q_1";var Ze={table:si};function li(){const{parseAccountData:t,isPremium:i,accountData:r,siteInfo:o,planInfo:a}=w(),[l,c]=s.exports.useState(!1),[d,m]=s.exports.useState(!1),u=()=>{l||(c(!0),P("/sync").then(({data:y})=>{t(y.data),m(!0),setTimeout(()=>{m(!1)},5e3)}).catch(()=>{}).then(()=>c(!1)))},p=()=>i?e(he,{label:"PRO",color:"secondary"}):e(he,{label:"FREE"});return n(H,{children:[n(b,{container:!0,children:[e(b,{item:!0,md:6,children:n("table",{className:Ze.table,children:[e("tr",{colspan:"2",children:e("th",{children:e(h,{variant:"body1",color:"primary",style:{fontWeight:600},children:"Site information:"})})}),n("tr",{children:[e("td",{children:e(h,{variant:"body2",color:"primary",children:"Account name:"})}),e("td",{children:e(h,{variant:"body2",color:"primary",children:r.name})})]}),n("tr",{children:[e("td",{children:e(h,{variant:"body2",color:"primary",children:"Site ID:"})}),e("td",{children:e(h,{variant:"body2",color:"primary",children:o.id})})]}),n("tr",{children:[e("td",{children:e(h,{variant:"body2",color:"primary",children:"Timezone:"})}),e("td",{children:n(h,{variant:"body2",color:"primary",children:[o.timezone," (",e(I,{href:N(`/sites/${o.id}/settings`),target:"_blank",color:"secondary",children:"Change"}),")"]})})]})]})}),e(b,{item:!0,md:6,children:n("table",{className:Ze.table,children:[e("tr",{colspan:"2",children:e("th",{children:e(h,{variant:"body1",color:"primary",style:{fontWeight:600},children:"License information:"})})}),n("tr",{children:[e("td",{children:e(h,{variant:"body2",color:"primary",children:"Plan:"})}),e("td",{children:n(h,{variant:"body2",color:"primary",children:[a.name," (",e(I,{href:N(`/sites/${o.id}/plan`),target:"_blank",color:"secondary",children:"Change"}),")"]})})]}),a.hasPlan&&n(v,{children:[n("tr",{children:[e("td",{children:e(h,{variant:"body2",color:"primary",children:"Subscription status:"})}),e("td",{children:e(h,{variant:"body2",color:"primary",children:a.cancelled?"Cancelled":"Active"})})]}),n("tr",{children:[e("td",{children:e(h,{variant:"body2",color:"primary",children:"License status:"})}),e("td",{children:p()})]})]})]})})]}),e(h,{variant:"body2",color:"primary",children:"Did you change a button or account information in the Buttonizer dashboard and do not see the changes in the Buttonizer for WordPress plugin?"}),e(h,{variant:"body2",color:"primary",children:"Click the sync button below to retrieve the data from the Buttonizer dashboard."}),n(b,{container:!0,justifyContent:"space-between",children:[e(g,{variant:"outlined",onClick:u,disabled:l||d,endIcon:l&&e(Y,{size:20,style:{marginLeft:8}})||d&&e(Ne,{}),children:"Sync with dashboard"}),e(g,{color:"secondary",endIcon:e(J,{}),href:N(`/sites/${o.id}`),target:"_blank",type:"link",children:"View more site info"})]})]})}const ci=s.exports.forwardRef(function(i,r){return e(pe,z({direction:"up",ref:r},i))});function di({open:t,onClose:i=()=>{}}){const{setHasMigrated:r,setLegacyBackupDeleted:o}=w(),[a,l]=s.exports.useState(!1),c=()=>{a||i()};return n(me,{open:t,onClose:c,TransitionComponent:ci,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[e(ge,{id:"alert-dialog-title",children:"Happy with the upgrade?"}),e(fe,{children:e(X,{id:"alert-dialog-description",children:"Are you satiesfied with the 3.0 update? If so then you can remove the old Buttonizer data to clean up unused data in your database."})}),n(ye,{children:[e(g,{disabled:a,onClick:c,children:"Cancel"}),e(g,{disabled:a,color:"secondary",onClick:()=>{a||(l(!0),P("/delete_legacy_backup").then(()=>{o(!0),r(!1),i()}).catch(()=>l(!1)))},autoFocus:!0,children:"Confirm"})]})]})}const ui=s.exports.forwardRef(function(i,r){return e(pe,z({direction:"up",ref:r},i))});function hi({open:t,onClose:i=()=>{}}){const[r,o]=s.exports.useState(!1),a=()=>{r||i()},l=()=>{r||(o(!0),P("/revert_legacy").then(()=>{document.location.href=`${buttonizer_admin.admin}?page=Buttonizer`}).catch(()=>o(!1)))};return r&&t?n(gn,{open:t,sx:{background:"#f0f0f1"},children:[e(fn,{styles:{body:{overflow:"hidden"}}}),e(be,{text:"Reverting..."})]}):n(me,{open:t,onClose:a,TransitionComponent:ui,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[e(ge,{id:"alert-dialog-title",children:"Go back Buttonizer version 2.x"}),e(fe,{children:n(X,{id:"alert-dialog-description",children:["Don't like the changes in the 3.0 update? Did you perhaps encounter any issues or have any feedback? Please let us know so that we may improve it in the future."," ",e(I,{color:"secondary",href:"mailto:contact@buttonizer.pro",children:"contact@buttonizer.pro"})]})}),n(ye,{children:[e(g,{disabled:r,onClick:a,children:"Cancel"}),e(g,{disabled:r,color:"secondary",onClick:l,autoFocus:!0,children:"I am sure"})]})]})}function pi(){const[t,i]=s.exports.useState(!1),[r,o]=s.exports.useState(!1);return n(v,{children:[n(H,{children:[e(h,{type:"header",color:"primary",children:"Remove unused 2.x data"}),e(h,{variant:"body1",color:"primary",children:"Remove the old Buttonizer data in your database."}),e(g,{variant:"outlined",onClick:()=>i(!0),children:"Remove 2.x data"}),e(h,{type:"header",color:"primary",children:"Go back to Buttonizer version 2.x"}),e(h,{variant:"body1",color:"primary",children:"Don't like the changes in the new version?"}),e(g,{variant:"outlined",onClick:()=>o(!0),children:"Return to 2.x"})]}),e(di,{open:t,onClose:()=>i(!1)}),e(hi,{open:r,onClose:()=>o(!1)})]})}const mi="_listItem_8c466_1",gi="_selectContainer_8c466_5";var et={listItem:mi,selectContainer:gi};function fi(t,i){const r=[];return t||(t=[]),i.forEach(o=>{(t.indexOf(o.id)!==-1||o.id==="administrator")&&r.push(o)}),r}function yi({additionalPermissions:t,setAdditionalPermissions:i,saving:r=!1}){const o=window.buttonizer_admin.available_roles,[a,l]=s.exports.useState(fi(t,o)),[c,d]=s.exports.useState(!1),m=u=>{const p=[];u.forEach(y=>{y.id!=="administrator"&&p.push(y.id)}),i(p)};return n(j,{disableGutters:!0,className:et.listItem,children:[e(F,{children:e(yn,{})}),e(A,{primary:"Permissions",secondary:"You can grant more roles to access the Buttonizer settings who are not an administrator."}),e("div",{className:et.selectContainer,children:e(bn,{multiple:!0,size:"small",disableCloseOnSelect:!0,disableClearable:!0,options:o.filter(u=>u.id!=="guest"),filterSelectedOptions:!0,getOptionLabel:u=>u.name,value:a,style:{marginTop:10},fullWidth:!0,onOpen:()=>d(!0),onClose:()=>{d(!1),m(a)},loading:r,onChange:(u,p)=>{p.length!=0&&(l(p),c||m(p))},renderTags:(u,p)=>u.map((y,_)=>e(he,U(z({label:y.name},p({index:_})),{disabled:y.id==="administrator"}))),noOptionsText:"Role not found",renderInput:u=>e(vn,U(z({},u),{variant:"outlined",label:"Select roles",placeholder:"Select one or more items",disabled:r,InputProps:U(z({},u.InputProps),{"data-testid":"pagerule:autocomplete-input"}),helperText:e(I,{href:"https://community.buttonizer.pro/knowledgebase/507",target:"_blank",children:"Need help? Learn how to use Permissions."})}))})})]})}function bi(){const[t,i]=s.exports.useState(window.buttonizer_admin.settings),[r,o]=s.exports.useState(!1),[a,l]=s.exports.useState(!1),[c,d]=s.exports.useState(window.buttonizer_admin.settings.adminTopBarButtonEnabled),[m,u]=s.exports.useState(window.buttonizer_admin.settings.canSendErrors),[p,y]=s.exports.useState(window.buttonizer_admin.settings.waitUntilConsent),[_,R]=s.exports.useState(window.buttonizer_admin.settings.accessRoles),[x,L]=s.exports.useState(window.buttonizer_admin.settings.googleAnalytics),B=()=>{a||(l(!0),P("/settings",{data:{admin_top_bar_show_button:c,can_send_errors:m,additional_permissions:_,google_analytics:x,wait_until_consent:p}}).then(()=>{}).catch(()=>{}).then(()=>{const k={adminTopBarButtonEnabled:c,canSendErrors:m,accessRoles:_,waitUntilConsent:p,googleAnalytics:x==="unset"?null:x};i(k),window.buttonizer_admin.settings=k,o(!1),l(!1)}))};return s.exports.useEffect(()=>{o(t.adminTopBarButtonEnabled!==c||t.canSendErrors!==m||t.waitUntilConsent!==p||t.accessRoles!==_||t.googleAnalytics!==x)},[c,m,p,_,x]),n(H,{children:[e(h,{type:"header",color:"primary",children:"Preferences"}),n($e,{disablePadding:!0,dense:!0,children:[n(j,{disableGutters:!0,children:[e(F,{children:e(_n,{})}),e(A,{primary:"Show admin top bar",secondary:"Hide Buttonizer in the admin top bar by disabling this setting.",onClick:()=>{a||d(!c)}}),e(_e,{edge:"end",color:"primary",checked:c,onChange:k=>d(k.target.checked),disabled:a})]}),n(j,{disableGutters:!0,children:[e(F,{children:e(wn,{})}),e(A,{primary:"Automatic error logging and crash reporting",secondary:"Enable automatic error logging and crash reporting in order to help us solve issues within Buttonizer! All data is anonymized automatically.",onClick:()=>{a||u(!m)}}),e(_e,{edge:"end",color:"primary",checked:m,onChange:k=>u(k.target.checked),disabled:a})]}),n(j,{disableGutters:!0,children:[e(F,{children:e(Cn,{})}),e(A,{primary:"GPDR: Wait on consent",secondary:n(v,{children:[e("div",{style:{marginBottom:5},children:"Buttonizer is fully GDPR-compliant. When you enable this setting, Buttonizer-scripts will not load until a JavaScript function is called."}),e(I,{href:"https://community.buttonizer.pro/knowledgebase/1426",target:"_blank",children:"Read how to setup"})," ","or"," ",e(I,{href:"https://buttonizer.pro/gdpr/",target:"_blank",children:"how we comply with GDPR-laws"}),"."]})}),e(_e,{edge:"end",color:"primary",checked:p,onChange:k=>y(k.target.checked),disabled:a})]}),e(yi,{saving:a,additionalPermissions:_,setAdditionalPermissions:R}),t.googleAnalytics&&n(j,{disableGutters:!0,children:[e(F,{children:e(kn,{})}),e(A,{primary:"Deprecated: Add Google Analytics tracking code",secondary:`Previously you were able to add Google Analytics tracking code via Buttonizer, ${t.googleAnalytics} is the current value. We will still add the shortcode until you found an alternative way.`,onClick:()=>{(!a||x!=="unset")&&L("unset")}}),e(g,{onClick:()=>L("unset"),disabled:a||x==="unset",style:{marginTop:15,minWidth:"fit-content"},children:"Remove Google Analytics"})]}),e(g,{variant:"contained",onClick:B,disabled:!r||a,endIcon:a&&e(Y,{size:20,style:{marginLeft:8}}),style:{marginTop:15},children:"Save changes"})]})]})}function vi(){const{setLegacyBackupDeleted:t}=w();return n(re,{severity:"success",variant:"outlined",action:e(Ie,{"aria-label":"close",color:"inherit",size:"small",onClick:()=>{t(!1)},children:e(st,{fontSize:"inherit"})}),style:{marginTop:15,background:"#edf7ed"},children:[e(K,{children:"You have deleted your old data."}),"Have fun with the new version of Buttonizer! :)"]})}function _i(){const{hasMigrated:t,legacyBackupDeleted:i}=w();return n(v,{children:[e(bi,{}),e(li,{}),e(ai,{}),t&&window.buttonizer_admin.isAdmin==="1"&&e(pi,{}),i&&e(vi,{})]})}const wi="_avatar_yq9q0_1",Ci="_listItem_yq9q0_5",ki="_secondaryInfo_yq9q0_9";var xe={avatar:wi,listItem:Ci,secondaryInfo:ki};function zi(){const t=oe(),{parseAccountData:i,setConnectionSuccessfull:r,setActionLock:o}=w(),[a,l]=s.exports.useState(!1);if(a)return e(be,{text:"Connecting..."});const c=(d,m)=>n(j,{className:xe.listItem,children:[e(ct,{children:e(dt,{className:xe.avatar,children:e(Ne,{})})}),e(A,{secondary:m,secondaryTypographyProps:{className:xe.secondaryInfo},primary:d})]});return n(v,{children:[e(ft,{children:n(b,{container:!0,style:{height:"100%"},direction:"row",children:[e(b,{item:!0,container:!0,justifyContent:"center",direction:"column",alignContent:"center",md:6,sm:12,sx:{margin:"20px 0"},children:n("div",{children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/buttonizer-logo.png`,alt:"buttonizerlogo",style:{height:50}}),e(h,{style:{fontSize:27,fontWeight:600,marginTop:30},children:"Buttonizer has been installed,"}),e(h,{style:{fontSize:25},children:"you are ready to make some buttons!"}),n("div",{style:{marginTop:30,maxWidth:300},children:[e(mt,{buttonProps:{variant:"contained",size:"large",color:"secondary",endIcon:e(J,{}),sx:{padding:"15px 30px"}},buttonText:"Start using Buttonizer",onConnect:d=>{l(!1),o("no-lock"),i(d.data),r(!0),t("/")},onLoading:d=>l(d)}),e(h,{style:{fontSize:15,marginTop:20,marginBottom:60},children:"Go to your dashboard to create, manage and edit your buttons."})]})]})}),n(b,{container:!0,justifyContent:"center",alignContent:"center",direction:"column",item:!0,md:6,sm:12,sx:{margin:"20px 0"},children:[e(h,{style:{fontSize:27,fontWeight:600},children:"This is Buttonizer"}),n($e,{size:"large",children:[c("Widgets","WhatsApp, Messenger and contact form"),c("Navigate with URL"),c("Open pop up"),c("Social media sharing"),c("Fully customizable","Style your floating content"),c("Over 40+ actions","And much more")]})]})]})}),e(gt,{})]})}const xi="_helpContainer_jsvok_1",Si="_cardButton_jsvok_5",Ti="_helpContainerText_jsvok_33";var ue={helpContainer:xi,cardButton:Si,helpContainerText:Ti};function Bi(){const t=({imgSrc:i,href:r,title:o,description:a,button:l="Learn more"})=>e(zn,{children:e(xn,{href:`${r}?utm_source=wp-plugin-support`,type:"link",target:"_blank",className:ue.cardButton,children:n(Sn,{className:ue.cardContent,children:[e("img",{src:i,alt:"Knowledge base",draggable:!1}),e(h,{variant:"h5",children:o}),e(h,{className:ue.helpContainerText,color:"textSecondary",component:"div",children:a}),e(g,{endIcon:e(Tn,{}),color:"secondary",children:l})]})})});return n("div",{children:[n(H,{children:[e(h,{color:"primary",type:"header",children:"Need some help?"}),e(h,{type:"content",color:"primary",children:"Do you need some help? We can help you with everything! Check out our Buttonizer Community, knowledge base or we can help you with our support."})]}),n("div",{className:ue.helpContainer,children:[e(t,{imgSrc:`${buttonizer_admin.assetsPath}/images/support/knowledge-base.svg`,title:"Knowledge base",description:"Learn how to use our application like a pro",href:"https://r.buttonizer.io/support/knowledgebase"}),e(t,{imgSrc:`${buttonizer_admin.assetsPath}/images/support/community.svg`,title:"Forums",description:"Give and Get help from your peers and our team",href:"https://r.buttonizer.io/support/community"}),e(t,{imgSrc:`${buttonizer_admin.assetsPath}/images/support/tickets.svg`,title:"Tickets",description:"Need support that requires privacy? Submit a private ticket",href:"https://r.buttonizer.io/support/tickets"})]})]})}function Ii(){return n(H,{children:[e(h,{type:"header",color:"primary",children:"Oh no! Page not found :("}),n(h,{type:"body1",color:"primary",children:["Sorry about that. If we linked to something wrong in our plugin, please let us know by giving us feedback"," ",e(I,{href:"https://community.buttonizer.pro/",target:"_blank",color:"secondary",children:"on our Buttonizer Community!"})]}),e(g,{component:Bn,to:"/",variant:"outlined",type:"link",children:"Back to overview"})]})}const tt={blogs:"wp/v2/posts",pages:"wp/v2/pages",categories:"wp/v2/categories"},nt={blogs:"_fields[]=title&_fields[]=id",pages:"_fields[]=title&_fields[]=id",categories:"_fields[]=name&_fields[]=id"};function Li(t,i){if(t==="roles"){i(window.buttonizer_admin.available_roles);return}let r=`${buttonizer_admin.api}${tt[t]}?${nt[t]}&per_page=100`;return buttonizer_admin.isPlain==!0&&(r=`${buttonizer_admin.api.slice(0,-1)}${encodeURIComponent("/"+tt[t])}&${nt[t]}&per_page=100`),Se({url:r,method:"GET",headers:{"X-WP-Nonce":buttonizer_admin.nonce}}).then(({data:o})=>{i(o.map(({id:a,title:l,name:c=null})=>{var d;return{id:a,name:(d=l==null?void 0:l.rendered)!=null?d:c}}))}).catch(()=>{})}const $i="_iframe_13azj_1";var Ni={iframe:$i};const rt=(t,i,r,o={})=>{t.contentWindow.postMessage({eventType:"buttonizer",messageType:r,message:o},i)};function it(){const t=oe(),i=s.exports.useRef(),{cachedEditorSession:r,setCachedEditorSession:o,sessionStarting:a,startSession:l}=w();return s.exports.useEffect(()=>{r===null&&!a&&l()},[r]),s.exports.useEffect(()=>{const c=({data:d,origin:m})=>{const{eventType:u,messageType:p,message:y}=d;u==="buttonizer"&&(p==="connection"&&y==="ready"&&rt(i.current,m,"platform","wordpress"),p==="close_editor"&&t("/"),p==="request_data"&&Li(y,_=>{rt(i.current,m,`reply_${y}`,_)}))};return window.addEventListener("message",c,!1),()=>{window.removeEventListener("message",c),o(null)}},[]),!r||a?e(be,{text:"Starting editor session..."}):e("iframe",{src:Fn(r),className:Ni.iframe,ref:i,referrerPolicy:"origin"})}function Ai(){const{actionLock:t}=w();return t==="editor"?e(it,{}):t==="migration"?e(br,{}):t==="setup"?e(zi,{}):e(In,{children:n(q,{path:"/",element:e(ar,{}),children:[e(q,{path:"/",element:e(Ln,{to:"/overview",replace:!0})}),e(q,{path:"/overview",element:e(ri,{})}),e(q,{path:"/settings",element:e(_i,{})}),e(q,{path:"/support",element:e(Bi,{})}),e(q,{path:"/editor",element:e(it,{})}),e(q,{path:"*",element:e(Ii,{})})]})})}const Pi="https://84c09e1dec414d9aa9a7663511fb3027@tracker.buttonizer.pro/7",Ri={}.VITE_APP_VERSION;$n({dsn:Pi,integrations:[new Nn],release:Ri,environment:"production",tracesSampleRate:1,beforeSend:t=>{var i;return(i=buttonizer_admin==null?void 0:buttonizer_admin.settings)!=null&&i.canSendErrors?t:null}});An.createRoot(document.getElementById("root")).render(e(Pn,{injectFirst:!0,children:e(at,{theme:ut,children:e(On,{children:e(Ai,{})})})}));
assets/app/index.fe8002a5.js DELETED
@@ -1,3 +0,0 @@
1
- var kt=Object.defineProperty,zt=Object.defineProperties;var xt=Object.getOwnPropertyDescriptors;var ce=Object.getOwnPropertySymbols;var qe=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable;var Ue=(t,i,r)=>i in t?kt(t,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[i]=r,z=(t,i)=>{for(var r in i||(i={}))qe.call(i,r)&&Ue(t,r,i[r]);if(ce)for(var r of ce(i))Ge.call(i,r)&&Ue(t,r,i[r]);return t},U=(t,i)=>zt(t,xt(i));var je=(t,i)=>{var r={};for(var o in t)qe.call(t,o)&&i.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&ce)for(var o of ce(t))i.indexOf(o)<0&&Ge.call(t,o)&&(r[o]=t[o]);return r};import{c as ot,a as Ye,b as Se,R as Te,u as oe,r as s,j as e,d as n,J as St,e as Be,F as v,L as Tt,C as Y,B as g,E as Bt,T as at,S as It,H as Lt,A as re,I as Ie,f as st,g as K,h,i as $t,k as Nt,l as I,m as At,n as Pt,P as Le,G as b,o as Rt,p as Mt,q as Dt,M as Et,s as de,t as ie,v as F,w as Ft,x as A,y as Wt,z as J,D as Ot,K as Ht,N as Ut,O as ne,Q as qt,U as Gt,V as jt,W as Yt,X as Vt,Y as pe,Z as me,_ as ge,$ as fe,a0 as Q,a1 as ye,a2 as lt,a3 as $e,a4 as j,a5 as ct,a6 as dt,a7 as Ne,a8 as Ae,a9 as Pe,aa as Re,ab as Me,ac as De,ad as Ee,ae as Fe,af as We,ag as Jt,ah as Kt,ai as Qt,aj as Xt,ak as Zt,al as en,am as tn,an as nn,ao as rn,ap as ve,aq as on,ar as an,as as sn,at as ln,au as cn,av as dn,aw as un,ax as Ve,ay as hn,az as he,aA as pn,aB as mn,aC as gn,aD as fn,aE as yn,aF as bn,aG as vn,aH as _e,aI as _n,aJ as wn,aK as Cn,aL as kn,aM as zn,aN as xn,aO as Sn,aP as Tn,aQ as Bn,aR as q,aS as In,aT as Ln,aU as $n,aV as Nn,aW as An}from"./vendor.9a5cb22f.js";const Pn=function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function r(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerpolicy&&(l.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?l.credentials="include":a.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(a){if(a.ep)return;a.ep=!0;const l=r(a);fetch(a.href,l)}};Pn();let T=ot({palette:{primary:{main:"#2D7789",contrastText:"#FFFFFF"},secondary:{main:"#f08419",contrastText:"#FFFFFF"},white:{main:"#FFFFFF",contrastText:"#2D7789"},black:{main:"#111111",contrastText:"#2D7789"}},typography:{fontFamily:["BlinkMacSystemFont","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue","sans-serif"].join(",")},breakpoints:{values:{xs:0,sm:600,md:900,lg:1200,xl:1536,navigation:1090}}});T=ot(T,{components:{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:T.palette.secondary.main,backgroundColor:Ye(T.palette.secondary.main,.08),"&:hover":{backgroundColor:Ye(T.palette.secondary.main,.12)},"& .MuiListItemIcon-root":{color:T.palette.secondary.main}}}}},MuiLink:{styleOverrides:{root:{textDecoration:"none","&:hover":{textDecoration:"underline"}}}},MuiButton:{styleOverrides:{root:{borderRadius:50,padding:"8px 18px"}},variants:[{props:{type:"link"},style:({ownerState:t})=>z({},t.variant==="contained"?{color:T.palette[t.color].contrastText,"&:focus":{outline:"unset",boxShadow:"unset",color:T.palette[t.color].contrastText},"&:hover":{color:T.palette[t.color].contrastText}}:{color:T.palette[t.color].main,"&:focus":{outline:"unset",boxShadow:"unset",color:T.palette[t.color].main},"&:hover":{color:T.palette[t.color].main}})},{props:{type:"link-small"},style:{padding:"5px 5px",textTransform:"none",minWidth:35,color:T.palette.primary.main,"&:focus":{outline:"unset",boxShadow:"unset",color:T.palette.primary.main},"&:hover":{color:T.palette.primary.main}}}]},MuiPaper:{styleOverrides:{root:{borderRadius:10,position:"relative"}},variants:[{props:{type:"wrapper"},style:{padding:"15px 30px"}}]},MuiTypography:{variants:[{props:{type:"header"},style:{fontSize:"1rem",fontWeight:600}},{props:{type:"content"},style:{fontSize:"1em"}}]},MuiTab:{variants:[{props:{size:"small"},style:{textTransform:"unset",minHeight:42}}]},MuiList:{variants:[{props:{size:"large"},style:{"& .MuiListItem-root":{padding:"5px 16px"},"& .MuiAvatar-root":{width:30,height:30},"& .MuiTypography-root":{fontSize:"1.2rem"}}}]}}});var ut=T;function P(t,i={},r="POST"){let o=`${buttonizer_admin.api}buttonizer${t}?nonce=${buttonizer_admin.nonce}`;return buttonizer_admin.isPlain==!0&&(o=buttonizer_admin.api.slice(0,-1)+encodeURIComponent(`/buttonizer${t}`)+`&nonce=${buttonizer_admin.nonce}`),Se({url:o,method:r,data:i,headers:{"X-WP-Nonce":buttonizer_admin.nonce}})}const ht=Te.createContext(),Rn=t=>{const i=oe(),[r,o]=s.exports.useState("no-lock"),[a,l]=s.exports.useState(!1),[c,d]=s.exports.useState(!1),[m,u]=s.exports.useState(!1),[p,y]=s.exports.useState(!1),[_,R]=s.exports.useState({}),[x,L]=s.exports.useState({}),[B,k]=s.exports.useState({}),[X,W]=s.exports.useState(!1);s.exports.useState(null);const[V,ae]=s.exports.useState(null),[D,M]=s.exports.useState(!1),[$,se]=s.exports.useState(null),[le,yt]=s.exports.useState("weekly"),Oe=f=>{R({name:f==null?void 0:f.name,id:f==null?void 0:f.uid}),L({id:f==null?void 0:f.site_id,timezone:f==null?void 0:f.site_timezone,isPremium:f==null?void 0:f.site_licensed}),k({name:f==null?void 0:f.plan_name,id:f==null?void 0:f.plan_id,hasPlan:(f==null?void 0:f.plan_id)!==null,cancelled:f==null?void 0:f.plan_cancelled})},bt=()=>{X||(V!==null&&i("/editor"),W(!0),P("/editor_start_session").then(({data:f})=>{ae(f),i("/editor")}).catch(()=>{}).then(()=>W(!1)))},vt=()=>{$===null&&He()},He=(f=null)=>{f||(f=le),M(!0),P("/analytics/overview",{type:f}).then(({data:Ct})=>{se(Ct.data),yt(f)}).catch(()=>{}).then(()=>M(!1))};s.exports.useEffect(()=>{o(window.buttonizer_admin.actionLock),l(!!window.buttonizer_admin.hasMigrated),u(!!window.buttonizer_admin.requestReview),Oe(window.buttonizer_admin.account)},[]);const _t={actionLock:r,hasMigrated:a,legacyBackupDeleted:c,connectionSuccesfull:p,isPremium:x.isPremium,accountData:_,siteInfo:x,planInfo:B,sessionStarting:X,cachedEditorSession:V,requestReview:m,isLoadingAnalytics:D,analyticsData:$,analyticsChosenRange:le},wt={setActionLock:o,setHasMigrated:l,setLegacyBackupDeleted:d,parseAccountData:Oe,setConnectionSuccessfull:y,setCachedEditorSession:ae,setRequestReview:u,startSession:bt,getAnalytics:vt,updateAnalyticsByTimeRange:He};return e(ht.Provider,z({value:z(z({},_t),wt)},t))},w=()=>{const t=Te.useContext(ht);if(t===void 0)throw new Error("useApp must be used within a AppProvider");return t},Mn="https://app.buttonizer.io",Dn="https://editor.buttonizer.io/site/";function N(t="/"){return Mn+t}function En(t){const i=`?language=${buttonizer_admin.locale}`;return`${Dn}${t.redirect_id}${i}#auth-token=${t.token}`}function be({text:t="Loading..."}){return n("div",{className:"buzzy-animation",children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/icon-animated.svg`})," ",e("span",{children:t})]})}const pt=new St;let we=null,E=null;function mt({buttonProps:t,buttonText:i="Connect",onConnect:r,onLoading:o=()=>{},reconnect:a=!1}){const{enqueueSnackbar:l,closeSnackbar:c}=Be(),[d,m]=s.exports.useState(!1),[u,p]=s.exports.useState(!1),[y,_]=s.exports.useState(!1),R=buttonizer_admin.site,x=()=>{if(d&&E){E.focus();return}m(!0),p(!1);const L=N(`/apps/onboard?app_origin=wordpress&site_name=${encodeURIComponent(R.name)}&domain=${encodeURIComponent(R.domain)}&email=${encodeURIComponent(R.user.email)}&first_name=${encodeURIComponent(R.user.firstName)}&last_name=${encodeURIComponent(R.user.lastName)}`);E=window.open(L,"connectPopup",`width=500,height=580,top=${window.innerHeight/2-580/2},left=${window.innerWidth/2-500/2},status=no,scrollbars=yes,resizable=no`);try{E.focus()}catch{l("Could not open authorization popup. Your browser might have blocked it. Please add this site to your exception list.",{anchorOrigin:{vertical:"bottom",horizontal:"center",autoHideDuration:1e4},action:k=>[e(g,{href:"https://community.buttonizer.pro/knowledgebase/1208",target:"_blank",color:"secondary",children:"More information"}),e(g,{onClick:()=>c(k),children:"Close"})]})}we=setInterval(()=>{if(!E){clearInterval(we);return}E.closed&&(clearInterval(we),E=null,m(!1))})};return s.exports.useEffect(()=>{const L=B=>{!B.isTrusted||B.origin!==N("")||B.data.messageType==="connect-info"&&(E&&E.close(),_(!0),o(!0),P("/connect",{siteId:B.data.id,authorization:B.data.authorization,reconnect:a}).then(({data:k})=>{pt.addConfetti(),r(k)}).catch(()=>{_(!1),o(!1),p(!0)}))};return window.addEventListener("message",L),function(){window.removeEventListener("message",L)}},[]),e(v,{children:e(Tt,U(z({onClick:x,loading:y,loadingIndicator:e(Y,{size:20,style:{color:"white"}})},t),{children:i}))})}function Fn({children:t}){const{parseAccountData:i,setConnectionSuccessfull:r}=w(),{enqueueSnackbar:o,closeSnackbar:a}=Be();return s.exports.useEffect(()=>{Se.interceptors.response.use(l=>l,l=>{let c=`Oops, something went wrong. Error status ${l.response.status} (${l.response.statusText}). Your webserver might be unable to handle this request, there's an issue with your WordPress instance or you have insufficient permissions to execute this request.`,d=!0,m=!1,u=1207,p=null;return l.response.data&&(l.response.data.code==="buttonizer_api_server_error"?u=1213:d=!1,l.response.data.code==="buttonizer_token_expired"&&(m=!0),l.response.data.data&&l.response.data.data.message&&l.response.data.data.message!==""&&(p=l.response.data.data.message),c=`${l.response.data.message} (Error code: ${l.response.data.code})`),o(c,{anchorOrigin:{vertical:"bottom",horizontal:"center"},autoHideDuration:null,action:y=>[d&&e(g,{href:`https://community.buttonizer.pro/knowledgebase/${u}`,target:"_blank",color:"secondary",children:"More information"}),m&&e(mt,{onConnect:_=>{a(y),i(_.data),r(!0)},reconnect:!0,buttonProps:{color:"secondary"},buttonText:"Reconnect"}),p!==null&&e(g,{color:"secondary",onClick:()=>alert(`The response message we received was:
2
-
3
- ${p}`),children:"Debug"}),e(g,{onClick:()=>a(y),children:"Close"})]}),Promise.reject(l)})},[]),t}function Wn({children:t}){return e(Te.StrictMode,{children:e(Bt,{fallback:n("p",{children:["We're sorry! Our dashboard has crashed, we have been notified about the error. Please refresh the page"," ",e("a",{href:"./admin.php?page=Buttonizer",children:"or start from the beginning"}),"."]}),showDialog:!0,children:e(at,{theme:ut,children:e(It,{maxSnack:3,children:e(Lt,{children:e(Rn,{children:e(Fn,{children:t})})})})})})})}const On="_logoLink_1f0it_1",Hn="_title_1f0it_7",Un="_logo_1f0it_1",qn="_navLinks_1f0it_19",Gn="_dropdownMenu_1f0it_23",jn="_pluginMenuListIcon_1f0it_27",Yn="_divider_1f0it_31",Vn="_dropdownMenuItem_1f0it_36",Jn="_dropdownMenuItemSelected_1f0it_41",Kn="_externalIcon_1f0it_44";var C={logoLink:On,title:Hn,logo:Un,navLinks:qn,dropdownMenu:Gn,pluginMenuListIcon:jn,divider:Yn,dropdownMenuItem:Vn,dropdownMenuItemSelected:Jn,externalIcon:Kn};function Qn(){const{connectionSuccesfull:t,setConnectionSuccessfull:i,hasMigrated:r}=w(),o=()=>{i(!1)};return t?n(re,{severity:"success",variant:"outlined",action:e(Ie,{"aria-label":"close",color:"inherit",size:"small",onClick:o,children:e(st,{fontSize:"inherit"})}),style:{marginTop:15,background:"#edf7ed"},children:[!r&&n(v,{children:[e(K,{children:"Buttonizer has been set up. Happy conversion \u{1F680}"}),n(h,{variant:"body1",children:["Start building by clicking the '",e("b",{children:"Edit buttons"}),"' button in the section below."]})]}),r&&n(v,{children:[e(K,{children:"Your Buttonizer account has been connected. Happy conversion \u{1F680}"}),n(h,{variant:"body1",children:["Buttonizer should now be visible on your WordPress website. Manage your buttons by clicking the '",e("b",{children:"Edit buttons"}),"' button in the section below."]}),n(h,{variant:"body1",style:{marginTop:15},children:[e("b",{children:"Tip:"})," If you have a caching plugin active, we recommend to clear your site's cache."]})]})]}):null}function Je(t){return P("/settings",{data:t})}function Xn(){const{requestReview:t,setRequestReview:i}=w(),[r,o]=s.exports.useState(!1),[a,l]=s.exports.useState(!1),[c,d]=s.exports.useState(!1),m=()=>{i(!1)},u=()=>{c||(d(!0),Je({remindForReview:!0}).then(()=>m()).catch(()=>{}).then(()=>d(!1)))},p=()=>{c||(d(!0),Je({markAsReviewed:!0}).then(()=>m()).catch(()=>{}).then(()=>d(!1)))};return t?n(re,{severity:"info",variant:"outlined",style:{marginTop:15,background:"#e5f6fd"},children:[!r&&!a&&n(v,{children:[e(K,{children:"Are you enjoying Buttonizer? We really hope you do!"}),e(h,{variant:"body1",children:"Would you like to review us on WordPress and share your experience? This way you support us developing new features for Buttonizer and spread the love!"}),n("div",{style:{marginTop:15},children:[e(g,{variant:"outlined",href:"https://r.buttonizer.io/review/wordpress",target:"_blank",startIcon:e($t,{}),style:{marginRight:15},onClick:()=>o(!0),disabled:c,children:"Yes, I like Buttonizer"}),e(g,{startIcon:e(Nt,{}),style:{marginRight:15},href:"https://r.buttonizer.io/feedback",target:"_blank",disabled:c,onClick:()=>l(!0),children:"No, send feedback"}),e("div",{style:{float:"right"},children:e(g,{disabled:c,onClick:u,children:"Remind me later"})})]})]}),(r||a)&&n(v,{children:[e(K,{children:r?"We're really happy to hear that \u{1F389}":"We'll do better! We promise"}),r&&n(v,{children:[n(h,{variant:"body1",children:["If we can help you with anything, or you have cool idea's or great feedback,"," ",e(I,{href:"https://r.buttonizer.io/feedback",target:"_blank",color:"secondary",children:"just reach out to us"}),"! We always reply :)"]}),n(h,{variant:"body1",style:{marginTop:15},children:["If you have closed the window that just opened and you still like to review us,"," ",e(I,{href:"https://r.buttonizer.io/review/wordpress",target:"_blank",color:"secondary",children:"click this link"}),"!"]})]}),!r&&n(h,{variant:"body1",children:["If there's anything else what we can help you with,"," ",e(I,{href:"https://r.buttonizer.io/feedback",target:"_blank",color:"secondary",children:"just reach out to us"}),"! We always reply :)"]}),e("div",{style:{marginTop:15},children:e(g,{startIcon:e(At,{}),onClick:()=>{pt.addConfetti(),i(!1),p()},disabled:c,children:r?"Celebrate in silence":"Close with confetti"})})]})]}):null}function Zn(){const{siteInfo:t,startSession:i,sessionStarting:r}=w();let o=oe(),a=Pt();const[l,c]=s.exports.useState(!1),d=s.exports.useRef();return n("div",{style:{marginBottom:40},children:[e(Le,{type:"wrapper",children:n(b,{container:!0,alignItems:"center",children:[e(b,{item:!0,navigation:!0,children:n("div",{className:C.logoLink,onClick:()=>o("/overview"),children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/buttonizer-logo.png`,alt:"buttonizerlogo",className:C.logo,draggable:!1}),e(h,{className:C.title,color:"primary",children:"Buttonizer for WordPress"})]})}),n(b,{item:!0,container:!0,justifyContent:"space-between",navigation:"auto",className:C.navLinks,children:[e(g,{onClick:()=>{o("/overview")},color:a.pathname==="/overview"?"secondary":"primary",children:"Home"}),e(g,{onClick:()=>{o("/support")},color:a.pathname==="/support"?"secondary":"primary",children:"Support"}),e(g,{onClick:()=>{c(!0)},ref:d,endIcon:l?e(Rt,{}):e(Mt,{}),color:a.pathname==="/settings"?"secondary":"primary",children:"Settings"}),e(g,{variant:"contained",onClick:i,endIcon:r&&e(Y,{size:20,style:{marginLeft:8}}),disabled:r,children:"Edit buttons"})]})]})}),e(Qn,{}),e(Xn,{}),e(Dt,{open:l&&d.current,anchorEl:d.current,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:()=>{c(!1)},onClick:()=>c(!1),children:n(Et,{className:C.dropdownMenu,children:[n(de,{onClick:()=>{o("/settings")},selected:a.pathname==="/settings",className:ie(C.dropdownMenuItem,a.pathname==="/settings"&&C.dropdownMenuItemSelected),children:[e(F,{className:C.pluginMenuListIcon,children:e(Ft,{fontSize:"small"})}),e(A,{primary:"Plugin settings",secondary:"Preferences"})]}),n(de,{href:N(`/sites/${t.id}/settings`),target:"_blank",className:C.dropdownMenuItem,children:[e(F,{className:C.pluginMenuListIcon,children:e(Wt,{fontSize:"small"})}),e(A,{primary:n(v,{children:["Site Settings",e(J,{className:C.externalIcon})]}),secondary:"Update site settings"})]}),n(de,{href:N(`/sites/${t.id}/plan`),target:"_blank",className:C.dropdownMenuItem,children:[e(F,{className:C.pluginMenuListIcon,children:e(Ot,{fontSize:"small"})}),e(A,{primary:n(v,{children:["Site plan",e(J,{className:C.externalIcon})]}),secondary:"Manage subscription"})]}),e(Ht,{className:C.divider}),n(de,{href:N("/account"),target:"_blank",className:C.dropdownMenuItem,children:[e(F,{className:C.pluginMenuListIcon,children:e(Ut,{fontSize:"small"})}),e(A,{primary:n(v,{children:["Account Settings",e(J,{className:C.externalIcon})]}),secondary:"Account settings"})]})]})})]})}const er="_footer_zmvmt_1",tr="_subfooter_zmvmt_7",nr="_dutchFlag_zmvmt_13",rr="_loveIcon_zmvmt_23",ir="_coffeeIcon_zmvmt_24";var Z={footer:er,subfooter:tr,dutchFlag:nr,loveIcon:rr,coffeeIcon:ir};function gt(){return n("div",{className:Z.footer,children:["Need some assistance? Get free support via our"," ",e(I,{href:"https://r.buttonizer.io/support/community?utm_source=wp-plugin-footer",target:"_blank",color:"secondary",children:"Buttonizer Community"}),". Do you have feedback?"," ",e(I,{href:"https://r.buttonizer.io/feedback?utm_source=wp-plugin-footer",target:"_blank",color:"secondary",children:"Give feedback"}),".",n("div",{className:Z.subfooter,children:["Built with"," ",e(ne,{title:"much love",children:e(qt,{className:Z.loveIcon})})," ","and"," ",e(ne,{title:"lots and lots of coffee",children:e(Gt,{className:Z.coffeeIcon})})," ","in The Netherlands"," ",e(ne,{title:"Buttonizer HQ in Zoetermeer",children:e("img",{src:`${buttonizer_admin.assetsPath}/images/dutch-flag.svg`,className:Z.dutchFlag})})]})]})}function or(){return n(jt,{style:{maxWidth:1100},children:[n("div",{style:{padding:"50px 0 0",height:"100%"},children:[e(Zn,{}),e(Yt,{})]}),e(gt,{})]})}const ar="_avatar_1ciu2_5",sr="_listItem_1ciu2_9",lr="_secondaryInfo_1ciu2_13",cr="_knowledgebase_1ciu2_17",dr="_knowledgebaseText_1ciu2_24";var ee={"migratePage-container":"_migratePage-container_1ciu2_1",avatar:ar,listItem:sr,secondaryInfo:lr,knowledgebase:cr,knowledgebaseText:dr};const ur="_buttonizerPaper_131bh_1";var hr={buttonizerPaper:ur};function ft({children:t,containerProps:i}){return e(v,{children:n(Vt,U(z({className:"migratePage-container",style:{marginTop:50,maxWidth:1130}},i),{children:[e("div",{style:{alignItems:"center",justifyContent:"center",display:"flex",marginBottom:30},children:e("img",{src:`${buttonizer_admin.assetsPath}/images/logo.png`,alt:"buttonizerlogo",style:{height:70}})}),e(Le,{className:hr.buttonizerPaper,sx:{"&::before":{background:`url(${buttonizer_admin.assetsPath}/images/waves.svg)`}},children:t})]}))})}const pr="_code_1iwn6_1";var mr={code:pr};const gr=s.exports.forwardRef(function(i,r){return e(pe,z({direction:"up",ref:r},i))});function fr({open:t,onClose:i=()=>{},onConfirm:r=()=>{}}){const o=s.exports.useRef(),a=()=>{o.current.focus(),o.current.select(),navigator.clipboard&&navigator.clipboard.writeText(o.current.value)};return n(me,{open:t,onClose:close,TransitionComponent:gr,"aria-labelledby":"migrate-title","aria-describedby":"migrate-description",children:[e(ge,{id:"migrate-title",children:"Before you migrate"}),n(fe,{children:[n(Q,{id:"migrate-description",children:["It seems that you're currently using a deprecated custom JavaScript feature of Buttonizer which is not supported on Buttonizer 3.0 in favour of the advanced"," ",e(I,{href:"https://community.buttonizer.pro/knowledgebase/435",target:"_blank",color:"secondary",children:"Buttonizer JavaScript API"}),"."]}),n(Q,{style:{margin:"15px 0"},children:["Please copy all the code from the block below and add it to a"," ",e(I,{href:"https://community.buttonizer.pro/knowledgebase/1011",target:"_blank",color:"secondary",children:"Headers Footers"})," ","plugin of your choice. Your click actions will stay working as they are now."]}),e("textarea",{className:mr.code,onClick:a,ref:o,readOnly:!0,children:buttonizer_admin.beforeMigrate})]}),n(ye,{children:[e(g,{onClick:i,children:"Cancel"}),e(g,{color:"secondary",onClick:()=>r(!0),autoFocus:!0,children:"I am ready"})]})]})}let Ce=null,O=null;function yr(){const t=oe(),{enqueueSnackbar:i,closeSnackbar:r}=Be(),{setActionLock:o,parseAccountData:a,setConnectionSuccessfull:l,setHasMigrated:c}=w(),[d,m]=s.exports.useState(!1),[u,p]=s.exports.useState(!1),[y,_]=s.exports.useState(!1),[R,x]=s.exports.useState(!1),[L,B]=s.exports.useState(null),[k,X]=s.exports.useState(!0),W=buttonizer_admin.site,V=(M=!1)=>{if((buttonizer_admin==null?void 0:buttonizer_admin.beforeMigrate)!==null&&M!==!0){p(!0);return}if(d&&O){O.focus();return}m(!0),x(!1);const $=N(`/apps/onboard?app_origin=wordpress&site_name=${encodeURIComponent(W.name)}&domain=${encodeURIComponent(W.domain)}&email=${encodeURIComponent(W.user.email)}&first_name=${encodeURIComponent(W.user.firstName)}&last_name=${encodeURIComponent(W.user.lastName)}`);O=window.open($,"connectPopup",`width=500,height=580,top=${window.innerHeight/2-580/2},left=${window.innerWidth/2-500/2},status=no,scrollbars=yes,resizable=no`),Ce=setInterval(()=>{if(!O){clearInterval(Ce);return}O.closed&&(clearInterval(Ce),O=null,m(!1))});try{O.focus()}catch{i("Could not open authorization popup. Your browser might have blocked it. Please add this site to your exception list.",{anchorOrigin:{vertical:"bottom",horizontal:"center",autoHideDuration:1e4},action:le=>[e(g,{href:"https://community.buttonizer.pro/knowledgebase/1208",target:"_blank",color:"secondary",children:"More information"}),e(g,{onClick:()=>r(le),children:"Close"})]})}},ae=()=>{y||(_(!0),B("skipping"),P("/migrate",{skip:!0}).then(({data:M})=>{document.location.href=`${buttonizer_admin.admin}?page=Buttonizer`}).catch(()=>{x(!0),_(!1)}))};if(s.exports.useEffect(()=>{const M=$=>{!$.isTrusted||$.origin!==N("")||$.data.messageType==="connect-info"&&(O.close(),B("connecting"),P("/migrate",{siteId:$.data.id,authorization:$.data.authorization,shouldMigrate:k}).then(({data:se})=>{o("no-lock"),a(se.data),l(!0),c(!0),t("/")}).catch(()=>{B(null),x(!0)}))};return window.addEventListener("message",M),function(){window.removeEventListener("message",M)}},[k]),L!==null)return e(be,{text:br(L)});const D=(M,$)=>n(j,{className:ee.listItem,children:[e(ct,{children:e(dt,{className:ee.avatar,children:e(Ne,{})})}),e(A,{secondary:$,secondaryTypographyProps:{className:ee.secondaryInfo},primary:M})]});return n(ft,{children:[n(g,{href:"https://community.buttonizer.pro/knowledgebase/1122-standalone-vs-wordpress",target:"_blank",type:"link-small",className:ee.knowledgebase,children:[e(lt,{}),e("span",{className:ee.knowledgebaseText,children:"Learn more about Buttonizer Standalone"})]}),n(b,{container:!0,style:{height:"100%"},direction:"row",children:[e(b,{item:!0,container:!0,justifyContent:"center",direction:"column",alignContent:"center",md:6,sm:12,sx:{margin:"20px 0"},children:n("div",{children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/buttonizer-logo.png`,alt:"buttonizerlogo",style:{height:50}}),e(h,{style:{fontSize:27,fontWeight:600,marginTop:30},children:"Buttonizer just got an upgrade!"}),e(h,{style:{fontSize:"1.2rem",maxWidth:"fit-content",marginTop:10},component:"div",children:"Easier to manage, faster and more features."}),e("div",{style:{marginTop:30,maxWidth:300},children:n(g,{variant:"contained",onClick:()=>{X(!0),V()},color:"secondary",size:"small",sx:{padding:"15px 30px"},children:["Start migrating",e(J,{style:{marginLeft:15}})]})}),e(h,{style:{marginTop:20,fontSize:"0.875rem",maxWidth:"fit-content"},component:"div",children:"Already using Buttonizer Standalone? Connect without migrating your buttons."}),n("div",{style:{marginTop:20,marginBottom:100,alignItems:"center",display:"flex"},children:[e(g,{variant:"outlined",size:"small",onClick:()=>{X(!1),V()},color:"secondary",sx:{padding:"10px 20px",marginRight:"10px"},children:"Connect now"}),e(g,{size:"small",onClick:ae,disabled:d,children:"Stay in old version"})]})]})}),n(b,{item:!0,md:6,sm:12,container:!0,justifyContent:"center",alignContent:"center",direction:"column",sx:{margin:"20px 0"},children:[e(h,{style:{fontSize:27,fontWeight:600,paddingLeft:15},children:"New in 3.0"}),n($e,{size:"large",children:[D("More free styling options","Imagine what you can do now"),D("Conversion analytics","Privacy focused conversion analytics"),D("Now available on any platform","Try out on WordPress, Shopify, Wix and more"),D("Manage multiple sites with one account","Great for agencies & businesses with multiple sites"),D("Content Delivery Network (CDN)","Lightning fast around the world \u{1F680}"),D("GDPR-Compliant","Buttonizer is fully GDPR-compliant"),D("And much more!")]})]})]}),e(fr,{open:u,onClose:()=>p(!1),onConfirm:V})]})}function br(t){switch(t){case"initializing":return"Initializing...";case"skipping":return"Skipping...";case"migrating":return"Migrating data..."}}function H(o){var a=o,{children:t,paperStyle:i}=a,r=je(a,["children","paperStyle"]);return e("div",{style:{margin:"20px 0"},children:e(Le,U(z({sx:z({"& > *":{marginTop:"20px !important",marginBottom:"20px !important"},"& > *:first-child":{marginTop:"10px !important",marginBottom:"20px !important"}},i),type:"wrapper"},r),{children:t}))})}const vr="_analyticsContainer_1q32b_1",_r="_analyticsLoading_1q32b_5",wr="_tabsContainer_1q32b_10",Cr="_tabs_1q32b_10",kr="_pieTitle_1q32b_17";var te={analyticsContainer:vr,analyticsLoading:_r,tabsContainer:wr,tabs:Cr,pieTitle:kr};function Ke(t){for(var i=0,r=0;r<t.length;r++)i=t.charCodeAt(r)+((i<<5)-i);for(var o="#",r=0;r<3;r++){var a=i>>r*8&255;const c="00"+a.toString(16);o+=c.substring(c.length-2,c.length)}return o}const zr="_legend_17qwt_1",xr="_marginTop_17qwt_5",Sr="_legendItem_17qwt_10",Tr="_legendColor_17qwt_15",Br="_legendHidden_17qwt_19",Ir="_legendLabel_17qwt_37",Lr="_loading_17qwt_41";var G={legend:zr,marginTop:xr,legendItem:Sr,legendColor:Tr,legendHidden:Br,legendLabel:Ir,loading:Lr};function $r({chart:t=null,isLoading:i=!1,onForceUpdate:r,showClicks:o=!1,isPieChart:a=!1}){if(s.exports.useEffect(()=>{},[]),!t)return null;const l=t.options.plugins.legend.labels.generateLabels(t),c=d=>{var m=d.datasetIndex,u=t;if(a){const p=t.getDatasetMeta(0).data[d.index].hidden;t.getDatasetMeta(0).data[d.index].hidden=!p,t.update()}else u.setDatasetVisibility(m,!u.isDatasetVisible(m)),u.update();r()};return e("div",{className:ie(G.legend,G.marginTop,i&&G.loading),children:l.map((d,m)=>{const u=d.strokeStyle,p=d.hidden;return e(ne,{title:o?`Total clicks this period: ${t.data.datasets[m].totalClicks}`:"",children:n("span",{className:ie(G.legendItem,p&&G.legendHidden),onClick:()=>c(d),children:[e("span",{className:G.legendColor,style:{color:u}}),e("span",{className:G.legendLabel,children:d.text})]})},m)})})}const Nr="_lineChart_hik2f_1",Ar="_loading_hik2f_6";var Qe={lineChart:Nr,loading:Ar};Ae.register(Pe,Re,Me,De,Ee,Fe,We,Jt);const Xe=["#F08419","#2D95EC"];function Pr(t,i){return t<2?{borderColor:Xe[t],backgroundColor:Xe[t]}:{borderColor:Ke(i),backgroundColor:Ke(i)}}function Rr({data:t}){const{isLoadingAnalytics:i,analyticsChosenRange:r}=w(),[o,a]=s.exports.useState(!0),[l,c]=s.exports.useState(!1),d=s.exports.useRef(null),[,m]=s.exports.useState();return s.exports.useEffect(()=>{d.current&&(l||c(!0))},[o]),n(v,{children:[e("div",{className:ie(Qe.lineChart,i&&Qe.loading),children:e(Kt,{height:400,options:{maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{beginAtZero:!0,min:0,grid:{drawBorder:!1,drawOnChartArea:!0,borderColor:"#ECECEC"},title:{display:!0,text:"Clicks"},ticks:{padding:15,backdropPadding:0}},x:{grid:{drawBorder:!1,drawOnChartArea:!1,borderColor:"#ECECEC"},ticks:{padding:5}}},interaction:{intersect:!1}},ref:d,data:{labels:t.line.labels.map(u=>Qt.unix(u).format(["weekly","monthly"].indexOf(r)>=0?"MMMM Do":"H:mm")),datasets:t.line.datasets.filter(u=>!u.unknown||u.unknown&&!o).map((u,p)=>z({label:u.name,data:u.values,totalClicks:u.totalClicks,tension:.5,pointRadius:5,pointHoverRadius:8},Pr(p,u.id)))}})}),e($r,{chart:d.current,onForceUpdate:()=>m({}),isLoading:i,showClicks:!0}),e("div",{style:{paddingTop:15},children:e(Xt,{control:e(Zt,{checked:o,size:"small"}),label:"Hide unknown (or deleted) buttons",onChange:()=>{a(!o),setTimeout(()=>{m({})},1)}})})]})}const Mr="_controls_a553e_1";var Dr={controls:Mr};function Er(){const{analyticsChosenRange:t,updateAnalyticsByTimeRange:i,isLoadingAnalytics:r}=w(),[o,a]=s.exports.useState(t);return n("div",{className:Dr.controls,children:["Time controls:",n(en,{size:"small",style:{verticalAlign:"middle",marginLeft:15},children:[e(tn,{id:"demo-multiple-name-label",children:"Time range"}),n(nn,{labelId:"demo-multiple-name-label",id:"demo-multiple-name",value:o,onChange:l=>{const{target:{value:c}}=l;a(c),i(c)},input:e(rn,{label:"Time range"}),disabled:r,children:[e(ve,{value:"today",children:"Today"},"today"),e(ve,{value:"yesterday",children:"Yesterday"},"yesterday"),e(ve,{value:"weekly",children:"This week (last 7 days)"},"weekly")]})]}),r&&e(Y,{size:25,style:{verticalAlign:"middle",marginLeft:15}})]})}const Fr="_title_zfqz7_1",Wr="_cardContainer_zfqz7_5",Or="_chartContainer_zfqz7_9",Hr="_percentageContainer_zfqz7_14",Ur="_percentageColor_zfqz7_17",qr="_percentage_zfqz7_14",Gr="_percentageLabel_zfqz7_28";var S={title:Fr,cardContainer:Wr,chartContainer:Or,percentageContainer:Hr,percentageColor:Ur,percentage:qr,percentageLabel:Gr};Ae.register(Pe,Re,Me,De,Ee,Fe,We);function jr({data:t}){const{isLoadingAnalytics:i}=w(),[r,o]=s.exports.useState(!0),[a,l]=s.exports.useState(!1),c=s.exports.useRef(null);return s.exports.useState(),s.exports.useEffect(()=>{c.current&&(a||l(!0))},[r]),e(v,{children:n("div",{className:ie(S.cardContainer,i&&S.loading),children:[e(h,{variant:"body1",className:S.title,children:"Devices"}),e("div",{className:S.chartContainer,children:e(on,{options:{cutout:"70%",plugins:{legend:{display:!1}}},data:{labels:["Desktop","Phone","Tablet"],datasets:[{label:"# of clicks",data:[t.devices.desktop,t.devices.phone,t.devices.tablet],backgroundColor:["#F08419","#F4A557","#F7BF87"],borderColor:["#F08419","#F4A557","#F7BF87"],borderWidth:1}]}})}),n(b,{container:!0,style:{padding:"0 13px"},children:[n(b,{item:!0,xs:4,className:S.percentageContainer,children:[e("div",{className:S.percentageColor,style:{backgroundColor:"#f4a557"}}),n(h,{className:S.percentage,children:[Math.round(t.devices.phone/t.total*100),"%"]}),e(h,{className:S.percentageLabel,children:"Mobile"})]}),n(b,{item:!0,xs:4,className:S.percentageContainer,children:[e("div",{className:S.percentageColor,style:{backgroundColor:"#F08419"}}),n(h,{className:S.percentage,children:[Math.round(t.devices.desktop/t.total*100),"%"]}),e(h,{className:S.percentageLabel,children:"Desktop"})]}),n(b,{item:!0,xs:4,className:S.percentageContainer,children:[e("div",{className:S.percentageColor,style:{backgroundColor:"#F7BF87"}}),n(h,{className:S.percentage,children:[Math.round(t.devices.tablet/t.total*100),"%"]}),e(h,{className:S.percentageLabel,children:"Tablet"})]})]})]})})}const Yr="_title_va1ni_1",Vr="_gridHeight_va1ni_5",Jr="_barHeight_va1ni_12";var ke={title:Yr,gridHeight:Vr,barHeight:Jr};Ae.register(Pe,Re,Me,De,an,Ee,Fe,We);function Kr({data:t,siteInfo:i}){w();const[r,o]=s.exports.useState(!0),[a,l]=s.exports.useState(!1),c=s.exports.useRef(null);s.exports.useState(),s.exports.useEffect(()=>{c.current&&(a||l(!0))},[r]);const d=t&&t.countries.list.sort((u,p)=>{const y=t.countries.data[t.countries.list.indexOf(u)];return t.countries.data[t.countries.list.indexOf(p)]-y}).slice(0,5),m=t.countries.data.sort((u,p)=>p-u).slice(0,5);return n(v,{children:[n(b,{container:!0,children:[e(b,{item:!0,md:6,children:e(h,{variant:"body1",className:ke.title,children:"Countries"})}),e(b,{item:!0,md:6,style:{textAlign:"right"},children:e(g,{startIcon:e(sn,{}),href:N(`/analytics/${i.id}`),target:"_blank",children:"View worldmap"})})]}),e("div",{className:ke.gridHeight,children:e("div",{className:ke.barHeight,children:e(ln,{width:400,options:{maintainAspectRatio:!1,barThickness:22,indexAxis:"y",plugins:{legend:{display:!1}},scales:{y:{grid:{display:!1}},x:{ticks:{callback:function(u){return u+"%"}}}}},data:{labels:d.map(u=>cn[u.toUpperCase()].name),datasets:[{axis:"y",label:"% of total clicks",data:m.map(u=>Math.round(u/t.total*100)),backgroundColor:["#F08419"],borderColor:["#F08419"]}]}})})})]})}const Qr="_styledContainer_u39ug_1",Xr="_paragraph_u39ug_8",Zr="_button_u39ug_14";var ze={styledContainer:Qr,paragraph:Xr,button:Zr};function ei({siteInfo:t}){return n("div",{className:ze.styledContainer,children:[e(h,{variant:"body1",color:"primary",className:ze.paragraph,children:"Dive deeper into your Buttonizer Analytics"}),e(g,{variant:"contained",color:"primary",startIcon:e(dn,{}),href:N(`/analytics/${t.id}`),target:"_blank",className:ze.button,children:"Open analytics dashboard"})]})}function ti(){const{siteInfo:t,getAnalytics:i,analyticsData:r,isLoadingAnalytics:o}=w();return s.exports.useEffect(()=>{i()},[]),n(H,{className:te.analytics,children:[n("div",{className:te.tabsContainer,children:[n(un,{value:0,className:te.tabs,children:[e(Ve,{value:0,icon:e(hn,{}),iconPosition:"start",label:e(v,{children:"Button clicks"}),size:"small"}),e(Ve,{value:1,icon:e(he,{size:"small",label:"Coming soon"}),iconPosition:"end",label:"Conversions",size:"small",disabled:!0})]}),e(Er,{}),e("div",{children:e(ne,{title:"How do analytics work",placement:"left",children:e(Ie,{href:"https://community.buttonizer.pro/knowledgebase/1280",target:"_blank",size:"small",children:e(lt,{})})})})]}),n("div",{className:r&&r.line.datasets.length>=1&&te.analyticsContainer,children:[o&&r===null&&e("div",{className:te.analyticsLoading,children:e(Y,{size:50})}),!o&&!r&&e(re,{severity:"warning",children:"Woops, something went wrong loading analytics of your site."}),r&&r.line.datasets.length>=1&&n(v,{children:[e(Rr,{data:r,loading:o}),n(b,{container:!0,spacing:3,style:{marginTop:0},children:[e(b,{item:!0,style:{maxWidth:365},children:e(jr,{data:r,loading:o})}),e(b,{item:!0,md:!0,children:e(Kr,{data:r,siteInfo:t,loading:o})})]})]}),r&&r.line.datasets.length===0&&n(re,{severity:"info",icon:e(pn,{}),style:{marginTop:15},children:[e(K,{children:"Waiting for data..."}),n("div",{children:[e(h,{variant:"body1",fontSize:15,children:"Currently we don't have any click data to show you. As soon someone clicked one of your buttons, analytics will become visible here."}),e(h,{variant:"body1",fontSize:15,style:{marginTop:15},children:"Check back later \u{1F680}"})]})]})]}),e(ei,{siteInfo:t})]})}function ni(){const{siteInfo:t,startSession:i,sessionStarting:r}=w();return n(v,{children:[n(H,{children:[e(h,{type:"header",color:"primary",children:"Manage your Buttonizer instance"}),e(h,{type:"body1",color:"primary",children:"Welcome to your Buttonizer for WordPress dashboard. Here are a few quick-tools to manage your Buttonizer."}),e(g,{variant:"outlined",onClick:i,endIcon:r&&e(Y,{size:20,style:{marginLeft:8}}),disabled:r,children:"Edit buttons"})]}),e(ti,{})]})}const ri=s.exports.forwardRef(function(i,r){return e(pe,z({direction:"up",ref:r},i))});function ii({open:t,onClose:i=()=>{}}){var d;const{setActionLock:r}=w(),[o,a]=s.exports.useState(!1),l=()=>{o||i()},c=()=>{o||(a(!0),P("/disconnect").then(({data:m})=>{r("setup"),i()}).catch(()=>a(!1)))};return n(me,{open:t,onClose:l,TransitionComponent:ri,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[e(ge,{id:"alert-dialog-title",children:"Are you sure you want to disconnect?"}),n(fe,{children:[n(Q,{id:"alert-dialog-description",children:["You will disconnect your Buttonizer instance from your site"," ",e("b",{children:(d=buttonizer_admin==null?void 0:buttonizer_admin.site)==null?void 0:d.domain}),". You will be able to sign in with another account."]}),e(Q,{id:"alert-dialog-description-p2",style:{marginTop:15},children:"Are you sure you want to disconnect?"})]}),n(ye,{children:[e(g,{disabled:o,onClick:l,children:"Cancel"}),e(g,{disabled:o,color:"secondary",onClick:c,autoFocus:!0,children:"Disconnect"})]})]})}function oi(){const[t,i]=s.exports.useState(!1);return n(v,{children:[n(H,{children:[e(h,{type:"header",color:"primary",children:"Disconnect Buttonizer"}),e(h,{variant:"body1",color:"primary",children:"Did you create a new instance or do you want to sign in with a different account? Disconnect Buttonizer from your WordPress site."}),e(g,{variant:"outlined",onClick:()=>i(!0),children:"Disconnect"})]}),e(ii,{open:t,onClose:()=>i(!1)})]})}const ai="_table_13k7q_1";var Ze={table:ai};function si(){const{parseAccountData:t,isPremium:i,accountData:r,siteInfo:o,planInfo:a}=w(),[l,c]=s.exports.useState(!1),[d,m]=s.exports.useState(!1),u=()=>{l||(c(!0),P("/sync").then(({data:y})=>{t(y.data),m(!0),setTimeout(()=>{m(!1)},5e3)}).catch(()=>{}).then(()=>c(!1)))},p=()=>i?e(he,{label:"PRO",color:"secondary"}):e(he,{label:"FREE"});return n(H,{children:[n(b,{container:!0,children:[e(b,{item:!0,md:6,children:n("table",{className:Ze.table,children:[e("tr",{colspan:"2",children:e("th",{children:e(h,{variant:"body1",color:"primary",style:{fontWeight:600},children:"Site information:"})})}),n("tr",{children:[e("td",{children:e(h,{variant:"body2",color:"primary",children:"Account name:"})}),e("td",{children:e(h,{variant:"body2",color:"primary",children:r.name})})]}),n("tr",{children:[e("td",{children:e(h,{variant:"body2",color:"primary",children:"Site ID:"})}),e("td",{children:e(h,{variant:"body2",color:"primary",children:o.id})})]}),n("tr",{children:[e("td",{children:e(h,{variant:"body2",color:"primary",children:"Timezone:"})}),e("td",{children:n(h,{variant:"body2",color:"primary",children:[o.timezone," (",e(I,{href:N(`/sites/${o.id}/settings`),target:"_blank",color:"secondary",children:"Change"}),")"]})})]})]})}),e(b,{item:!0,md:6,children:n("table",{className:Ze.table,children:[e("tr",{colspan:"2",children:e("th",{children:e(h,{variant:"body1",color:"primary",style:{fontWeight:600},children:"License information:"})})}),n("tr",{children:[e("td",{children:e(h,{variant:"body2",color:"primary",children:"Plan:"})}),e("td",{children:n(h,{variant:"body2",color:"primary",children:[a.name," (",e(I,{href:N(`/sites/${o.id}/plan`),target:"_blank",color:"secondary",children:"Change"}),")"]})})]}),a.hasPlan&&n(v,{children:[n("tr",{children:[e("td",{children:e(h,{variant:"body2",color:"primary",children:"Subscription status:"})}),e("td",{children:e(h,{variant:"body2",color:"primary",children:a.cancelled?"Cancelled":"Active"})})]}),n("tr",{children:[e("td",{children:e(h,{variant:"body2",color:"primary",children:"License status:"})}),e("td",{children:p()})]})]})]})})]}),e(h,{variant:"body2",color:"primary",children:"Did you change a button or account information in the Buttonizer dashboard and do not see the changes in the Buttonizer for WordPress plugin?"}),e(h,{variant:"body2",color:"primary",children:"Click the sync button below to retrieve the data from the Buttonizer dashboard."}),n(b,{container:!0,justifyContent:"space-between",children:[e(g,{variant:"outlined",onClick:u,disabled:l||d,endIcon:l&&e(Y,{size:20,style:{marginLeft:8}})||d&&e(Ne,{}),children:"Sync with dashboard"}),e(g,{color:"secondary",endIcon:e(J,{}),href:N(`/sites/${o.id}`),target:"_blank",type:"link",children:"View more site info"})]})]})}const li=s.exports.forwardRef(function(i,r){return e(pe,z({direction:"up",ref:r},i))});function ci({open:t,onClose:i=()=>{}}){const{setHasMigrated:r,setLegacyBackupDeleted:o}=w(),[a,l]=s.exports.useState(!1),c=()=>{a||i()};return n(me,{open:t,onClose:c,TransitionComponent:li,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[e(ge,{id:"alert-dialog-title",children:"Happy with the upgrade?"}),e(fe,{children:e(Q,{id:"alert-dialog-description",children:"Are you satiesfied with the 3.0 update? If so then you can remove the old Buttonizer data to clean up unused data in your database."})}),n(ye,{children:[e(g,{disabled:a,onClick:c,children:"Cancel"}),e(g,{disabled:a,color:"secondary",onClick:()=>{a||(l(!0),P("/delete_legacy_backup").then(()=>{o(!0),r(!1),i()}).catch(()=>l(!1)))},autoFocus:!0,children:"Confirm"})]})]})}const di=s.exports.forwardRef(function(i,r){return e(pe,z({direction:"up",ref:r},i))});function ui({open:t,onClose:i=()=>{}}){const[r,o]=s.exports.useState(!1),a=()=>{r||i()},l=()=>{r||(o(!0),P("/revert_legacy").then(()=>{document.location.href=`${buttonizer_admin.admin}?page=Buttonizer`}).catch(()=>o(!1)))};return r&&t?n(mn,{open:t,sx:{background:"#f0f0f1"},children:[e(gn,{styles:{body:{overflow:"hidden"}}}),e(be,{text:"Reverting..."})]}):n(me,{open:t,onClose:a,TransitionComponent:di,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[e(ge,{id:"alert-dialog-title",children:"Go back Buttonizer version 2.x"}),e(fe,{children:n(Q,{id:"alert-dialog-description",children:["Don't like the changes in the 3.0 update? Did you perhaps encounter any issues or have any feedback? Please let us know so that we may improve it in the future."," ",e(I,{color:"secondary",href:"mailto:contact@buttonizer.pro",children:"contact@buttonizer.pro"})]})}),n(ye,{children:[e(g,{disabled:r,onClick:a,children:"Cancel"}),e(g,{disabled:r,color:"secondary",onClick:l,autoFocus:!0,children:"I am sure"})]})]})}function hi(){const[t,i]=s.exports.useState(!1),[r,o]=s.exports.useState(!1);return n(v,{children:[n(H,{children:[e(h,{type:"header",color:"primary",children:"Remove unused 2.x data"}),e(h,{variant:"body1",color:"primary",children:"Remove the old Buttonizer data in your database."}),e(g,{variant:"outlined",onClick:()=>i(!0),children:"Remove 2.x data"}),e(h,{type:"header",color:"primary",children:"Go back to Buttonizer version 2.x"}),e(h,{variant:"body1",color:"primary",children:"Don't like the changes in the new version?"}),e(g,{variant:"outlined",onClick:()=>o(!0),children:"Return to 2.x"})]}),e(ci,{open:t,onClose:()=>i(!1)}),e(ui,{open:r,onClose:()=>o(!1)})]})}const pi="_listItem_8c466_1",mi="_selectContainer_8c466_5";var et={listItem:pi,selectContainer:mi};function gi(t,i){const r=[];return t||(t=[]),i.forEach(o=>{(t.indexOf(o.id)!==-1||o.id==="administrator")&&r.push(o)}),r}function fi({additionalPermissions:t,setAdditionalPermissions:i,saving:r=!1}){const o=window.buttonizer_admin.available_roles,[a,l]=s.exports.useState(gi(t,o)),[c,d]=s.exports.useState(!1),m=u=>{const p=[];u.forEach(y=>{y.id!=="administrator"&&p.push(y.id)}),i(p)};return n(j,{disableGutters:!0,className:et.listItem,children:[e(F,{children:e(fn,{})}),e(A,{primary:"Permissions",secondary:"You can grant more roles to access the Buttonizer settings who are not an administrator."}),e("div",{className:et.selectContainer,children:e(yn,{multiple:!0,size:"small",disableCloseOnSelect:!0,disableClearable:!0,options:o.filter(u=>u.id!=="guest"),filterSelectedOptions:!0,getOptionLabel:u=>u.name,value:a,style:{marginTop:10},fullWidth:!0,onOpen:()=>d(!0),onClose:()=>{d(!1),m(a)},loading:r,onChange:(u,p)=>{p.length!=0&&(l(p),c||m(p))},renderTags:(u,p)=>u.map((y,_)=>e(he,U(z({label:y.name},p({index:_})),{disabled:y.id==="administrator"}))),noOptionsText:"Role not found",renderInput:u=>e(bn,U(z({},u),{variant:"outlined",label:"Select roles",placeholder:"Select one or more items",disabled:r,InputProps:U(z({},u.InputProps),{"data-testid":"pagerule:autocomplete-input"}),helperText:e(I,{href:"https://community.buttonizer.pro/knowledgebase/507",target:"_blank",children:"Need help? Learn how to use Permissions."})}))})})]})}function yi(){const[t,i]=s.exports.useState(window.buttonizer_admin.settings),[r,o]=s.exports.useState(!1),[a,l]=s.exports.useState(!1),[c,d]=s.exports.useState(window.buttonizer_admin.settings.adminTopBarButtonEnabled),[m,u]=s.exports.useState(window.buttonizer_admin.settings.canSendErrors),[p,y]=s.exports.useState(window.buttonizer_admin.settings.waitUntilConsent),[_,R]=s.exports.useState(window.buttonizer_admin.settings.accessRoles),[x,L]=s.exports.useState(window.buttonizer_admin.settings.googleAnalytics),B=()=>{a||(l(!0),P("/settings",{data:{admin_top_bar_show_button:c,can_send_errors:m,additional_permissions:_,google_analytics:x,wait_until_consent:p}}).then(()=>{}).catch(()=>{}).then(()=>{const k={adminTopBarButtonEnabled:c,canSendErrors:m,accessRoles:_,waitUntilConsent:p,googleAnalytics:x==="unset"?null:x};i(k),window.buttonizer_admin.settings=k,o(!1),l(!1)}))};return s.exports.useEffect(()=>{o(t.adminTopBarButtonEnabled!==c||t.canSendErrors!==m||t.waitUntilConsent!==p||t.accessRoles!==_||t.googleAnalytics!==x)},[c,m,p,_,x]),n(H,{children:[e(h,{type:"header",color:"primary",children:"Preferences"}),n($e,{disablePadding:!0,dense:!0,children:[n(j,{disableGutters:!0,children:[e(F,{children:e(vn,{})}),e(A,{primary:"Show admin top bar",secondary:"Hide Buttonizer in the admin top bar by disabling this setting.",onClick:()=>{a||d(!c)}}),e(_e,{edge:"end",color:"primary",checked:c,onChange:k=>d(k.target.checked),disabled:a})]}),n(j,{disableGutters:!0,children:[e(F,{children:e(_n,{})}),e(A,{primary:"Automatic error logging and crash reporting",secondary:"Enable automatic error logging and crash reporting in order to help us solve issues within Buttonizer! All data is anonymized automatically.",onClick:()=>{a||u(!m)}}),e(_e,{edge:"end",color:"primary",checked:m,onChange:k=>u(k.target.checked),disabled:a})]}),n(j,{disableGutters:!0,children:[e(F,{children:e(wn,{})}),e(A,{primary:"GPDR: Wait on consent",secondary:n(v,{children:[e("div",{style:{marginBottom:5},children:"Buttonizer is fully GDPR-compliant. When you enable this setting, Buttonizer-scripts will not load until a JavaScript function is called."}),e(I,{href:"https://community.buttonizer.pro/knowledgebase/1426",target:"_blank",children:"Read how to setup"})," ","or"," ",e(I,{href:"https://buttonizer.pro/gdpr/",target:"_blank",children:"how we comply with GDPR-laws"}),"."]})}),e(_e,{edge:"end",color:"primary",checked:p,onChange:k=>y(k.target.checked),disabled:a})]}),e(fi,{saving:a,additionalPermissions:_,setAdditionalPermissions:R}),t.googleAnalytics&&n(j,{disableGutters:!0,children:[e(F,{children:e(Cn,{})}),e(A,{primary:"Deprecated: Add Google Analytics tracking code",secondary:`Previously you were able to add Google Analytics tracking code via Buttonizer, ${t.googleAnalytics} is the current value. We will still add the shortcode until you found an alternative way.`,onClick:()=>{(!a||x!=="unset")&&L("unset")}}),e(g,{onClick:()=>L("unset"),disabled:a||x==="unset",style:{marginTop:15,minWidth:"fit-content"},children:"Remove Google Analytics"})]}),e(g,{variant:"contained",onClick:B,disabled:!r||a,endIcon:a&&e(Y,{size:20,style:{marginLeft:8}}),style:{marginTop:15},children:"Save changes"})]})]})}function bi(){const{setLegacyBackupDeleted:t}=w();return n(re,{severity:"success",variant:"outlined",action:e(Ie,{"aria-label":"close",color:"inherit",size:"small",onClick:()=>{t(!1)},children:e(st,{fontSize:"inherit"})}),style:{marginTop:15,background:"#edf7ed"},children:[e(K,{children:"You have deleted your old data."}),"Have fun with the new version of Buttonizer! :)"]})}function vi(){const{hasMigrated:t,legacyBackupDeleted:i}=w();return n(v,{children:[e(yi,{}),e(si,{}),e(oi,{}),t&&window.buttonizer_admin.isAdmin==="1"&&e(hi,{}),i&&e(bi,{})]})}const _i="_avatar_yq9q0_1",wi="_listItem_yq9q0_5",Ci="_secondaryInfo_yq9q0_9";var xe={avatar:_i,listItem:wi,secondaryInfo:Ci};function ki(){const t=oe(),{parseAccountData:i,setConnectionSuccessfull:r,setActionLock:o}=w(),[a,l]=s.exports.useState(!1);if(a)return e(be,{text:"Connecting..."});const c=(d,m)=>n(j,{className:xe.listItem,children:[e(ct,{children:e(dt,{className:xe.avatar,children:e(Ne,{})})}),e(A,{secondary:m,secondaryTypographyProps:{className:xe.secondaryInfo},primary:d})]});return n(v,{children:[e(ft,{children:n(b,{container:!0,style:{height:"100%"},direction:"row",children:[e(b,{item:!0,container:!0,justifyContent:"center",direction:"column",alignContent:"center",md:6,sm:12,sx:{margin:"20px 0"},children:n("div",{children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/buttonizer-logo.png`,alt:"buttonizerlogo",style:{height:50}}),e(h,{style:{fontSize:27,fontWeight:600,marginTop:30},children:"Buttonizer has been installed,"}),e(h,{style:{fontSize:25},children:"you are ready to make some buttons!"}),n("div",{style:{marginTop:30,maxWidth:300},children:[e(mt,{buttonProps:{variant:"contained",size:"large",color:"secondary",endIcon:e(J,{}),sx:{padding:"15px 30px"}},buttonText:"Start using Buttonizer",onConnect:d=>{l(!1),o("no-lock"),i(d.data),r(!0),t("/")},onLoading:d=>l(d)}),e(h,{style:{fontSize:15,marginTop:20,marginBottom:60},children:"Go to your dashboard to create, manage and edit your buttons."})]})]})}),n(b,{container:!0,justifyContent:"center",alignContent:"center",direction:"column",item:!0,md:6,sm:12,sx:{margin:"20px 0"},children:[e(h,{style:{fontSize:27,fontWeight:600},children:"This is Buttonizer"}),n($e,{size:"large",children:[c("Widgets","WhatsApp, Messenger and contact form"),c("Navigate with URL"),c("Open pop up"),c("Social media sharing"),c("Fully customizable","Style your floating content"),c("Over 40+ actions","And much more")]})]})]})}),e(gt,{})]})}const zi="_helpContainer_jsvok_1",xi="_cardButton_jsvok_5",Si="_helpContainerText_jsvok_33";var ue={helpContainer:zi,cardButton:xi,helpContainerText:Si};function Ti(){const t=({imgSrc:i,href:r,title:o,description:a,button:l="Learn more"})=>e(kn,{children:e(zn,{href:`${r}?utm_source=wp-plugin-support`,type:"link",target:"_blank",className:ue.cardButton,children:n(xn,{className:ue.cardContent,children:[e("img",{src:i,alt:"Knowledge base",draggable:!1}),e(h,{variant:"h5",children:o}),e(h,{className:ue.helpContainerText,color:"textSecondary",component:"div",children:a}),e(g,{endIcon:e(Sn,{}),color:"secondary",children:l})]})})});return n("div",{children:[n(H,{children:[e(h,{color:"primary",type:"header",children:"Need some help?"}),e(h,{type:"content",color:"primary",children:"Do you need some help? We can help you with everything! Check out our Buttonizer Community, knowledge base or we can help you with our support."})]}),n("div",{className:ue.helpContainer,children:[e(t,{imgSrc:`${buttonizer_admin.assetsPath}/images/support/knowledge-base.svg`,title:"Knowledge base",description:"Learn how to use our application like a pro",href:"https://r.buttonizer.io/support/knowledgebase"}),e(t,{imgSrc:`${buttonizer_admin.assetsPath}/images/support/community.svg`,title:"Forums",description:"Give and Get help from your peers and our team",href:"https://r.buttonizer.io/support/community"}),e(t,{imgSrc:`${buttonizer_admin.assetsPath}/images/support/tickets.svg`,title:"Tickets",description:"Need support that requires privacy? Submit a private ticket",href:"https://r.buttonizer.io/support/tickets"})]})]})}function Bi(){return n(H,{children:[e(h,{type:"header",color:"primary",children:"Oh no! Page not found :("}),n(h,{type:"body1",color:"primary",children:["Sorry about that. If we linked to something wrong in our plugin, please let us know by giving us feedback"," ",e(I,{href:"https://community.buttonizer.pro/",target:"_blank",color:"secondary",children:"on our Buttonizer Community!"})]}),e(g,{component:Tn,to:"/",variant:"outlined",type:"link",children:"Back to overview"})]})}const tt={blogs:"wp/v2/posts",pages:"wp/v2/pages",categories:"wp/v2/categories"},nt={blogs:"_fields[]=title&_fields[]=id",pages:"_fields[]=title&_fields[]=id",categories:"_fields[]=name&_fields[]=id"};function Ii(t,i){if(t==="roles"){i(window.buttonizer_admin.available_roles);return}let r=`${buttonizer_admin.api}${tt[t]}?${nt[t]}&per_page=100`;return buttonizer_admin.isPlain==!0&&(r=`${buttonizer_admin.api.slice(0,-1)}${encodeURIComponent("/"+tt[t])}&${nt[t]}&per_page=100`),Se({url:r,method:"GET",headers:{"X-WP-Nonce":buttonizer_admin.nonce}}).then(({data:o})=>{i(o.map(({id:a,title:l,name:c=null})=>{var d;return{id:a,name:(d=l==null?void 0:l.rendered)!=null?d:c}}))}).catch(()=>{})}const Li="_iframe_13azj_1";var $i={iframe:Li};const rt=(t,i,r,o={})=>{t.contentWindow.postMessage({eventType:"buttonizer",messageType:r,message:o},i)};function it(){const t=oe(),i=s.exports.useRef(),{cachedEditorSession:r,setCachedEditorSession:o,sessionStarting:a,startSession:l}=w();return s.exports.useEffect(()=>{r===null&&!a&&l()},[r]),s.exports.useEffect(()=>{const c=({data:d,origin:m})=>{const{eventType:u,messageType:p,message:y}=d;u==="buttonizer"&&(p==="connection"&&y==="ready"&&rt(i.current,m,"platform","wordpress"),p==="close_editor"&&t("/"),p==="request_data"&&Ii(y,_=>{rt(i.current,m,`reply_${y}`,_)}))};return window.addEventListener("message",c,!1),()=>{window.removeEventListener("message",c),o(null)}},[]),!r||a?e(be,{text:"Starting editor session..."}):e("iframe",{src:En(r),className:$i.iframe,ref:i,referrerPolicy:"origin"})}function Ni(){const{actionLock:t}=w();return t==="editor"?e(it,{}):t==="migration"?e(yr,{}):t==="setup"?e(ki,{}):e(Bn,{children:n(q,{path:"/",element:e(or,{}),children:[e(q,{path:"/",element:e(In,{to:"/overview",replace:!0})}),e(q,{path:"/overview",element:e(ni,{})}),e(q,{path:"/settings",element:e(vi,{})}),e(q,{path:"/support",element:e(Ti,{})}),e(q,{path:"/editor",element:e(it,{})}),e(q,{path:"*",element:e(Bi,{})})]})})}const Ai="https://84c09e1dec414d9aa9a7663511fb3027@tracker.buttonizer.pro/7",Pi={}.VITE_APP_VERSION;Ln({dsn:Ai,integrations:[new $n],release:Pi,environment:"production",tracesSampleRate:1,beforeSend:t=>{var i;return(i=buttonizer_admin==null?void 0:buttonizer_admin.settings)!=null&&i.canSendErrors?t:null}});Nn.createRoot(document.getElementById("root")).render(e(An,{injectFirst:!0,children:e(at,{theme:ut,children:e(Wn,{children:e(Ni,{})})})}));
 
 
 
assets/app/index.html CHANGED
@@ -5,8 +5,8 @@
5
  <link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <title>Vite App</title>
8
- <script type="module" crossorigin src="/index.fe8002a5.js"></script>
9
- <link rel="modulepreload" href="/vendor.9a5cb22f.js">
10
  <link rel="stylesheet" href="/index.8d4900f2.css">
11
  </head>
12
  <body>
5
  <link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <title>Vite App</title>
8
+ <script type="module" crossorigin src="/index.4ec2107c.js"></script>
9
+ <link rel="modulepreload" href="/vendor.7daddede.js">
10
  <link rel="stylesheet" href="/index.8d4900f2.css">
11
  </head>
12
  <body>
assets/app/manifest.json CHANGED
@@ -1,16 +1,16 @@
1
  {
2
  "index.html": {
3
- "file": "index.fe8002a5.js",
4
  "src": "index.html",
5
  "isEntry": true,
6
  "imports": [
7
- "_vendor.9a5cb22f.js"
8
  ],
9
  "css": [
10
  "index.8d4900f2.css"
11
  ]
12
  },
13
- "_vendor.9a5cb22f.js": {
14
- "file": "vendor.9a5cb22f.js"
15
  }
16
  }
1
  {
2
  "index.html": {
3
+ "file": "index.4ec2107c.js",
4
  "src": "index.html",
5
  "isEntry": true,
6
  "imports": [
7
+ "_vendor.7daddede.js"
8
  ],
9
  "css": [
10
  "index.8d4900f2.css"
11
  ]
12
  },
13
+ "_vendor.7daddede.js": {
14
+ "file": "vendor.7daddede.js"
15
  }
16
  }
assets/app/{vendor.9a5cb22f.js → vendor.7daddede.js} RENAMED
@@ -206,7 +206,7 @@ Url: ${dp(e)}`),!0)}function hA(e,t){return!t||!t.length?!1:vA(e).some(n=>t.some
206
  * Released under the MIT License
207
  */class wX{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],s=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=O2.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);!n||(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Ni=new wX;const Lw="transparent",EX={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Cw(e||Lw),i=r.valid&&Cw(t||Lw);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class kX{constructor(t,n,r,i){const o=n[r];i=of([t.to,i,o,t.from]);const s=of([t.from,o,i]);this._active=!0,this._fn=t.fn||EX[t.type||typeof s],this._easing=zc[t.easing]||zc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=of([t.to,n,i,t.from]),this._from=of([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,a=this._to;let l;if(this._active=o!==a&&(s||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/r%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}const CX=["x","y","borderWidth","radius","tension"],RX=["color","borderColor","backgroundColor"];Fe.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const TX=Object.keys(Fe.animation);Fe.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"});Fe.set("animations",{colors:{type:"color",properties:RX},numbers:{type:"number",properties:CX}});Fe.describe("animations",{_fallback:"animation"});Fe.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=>e|0}}}});class nM{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Ye(t))return;const n=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const i=t[r];if(!Ye(i))return;const o={};for(const s of TX)o[s]=i[s];(vt(i.properties)&&i.properties||[r]).forEach(s=>{(s===r||!n.has(s))&&n.set(s,o)})})}_animateOptions(t,n){const r=n.options,i=PX(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&MX(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=d=new kX(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Ni.add(this._chart,r),!0}}function MX(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function PX(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Fw(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function OX(e,t,n){if(n===!1)return!1;const r=Fw(e,n),i=Fw(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function IX(e){let t,n,r,i;return Ye(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function rM(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function Bw(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let s,a,l,c;if(t!==null){for(s=0,a=i.length;s<a;++s){if(l=+i[s],l===n){if(r.all)continue;break}c=e.values[l],dn(c)&&(o||t===0||Ei(t)===Ei(c))&&(t+=c)}return t}}function DX(e){const t=Object.keys(e),n=new Array(t.length);let r,i,o;for(r=0,i=t.length;r<i;++r)o=t[r],n[r]={x:o,y:e[o]};return n}function zw(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function AX(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function $X(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function NX(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Uw(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function Ww(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,l=o.axis,c=s.axis,u=AX(o,s,r),d=t.length;let f;for(let p=0;p<d;++p){const h=t[p],{[l]:g,[c]:_}=h,m=h._stacks||(h._stacks={});f=m[c]=NX(i,u,g),f[a]=_,f._top=Uw(f,s,!0,r.type),f._bottom=Uw(f,s,!1,r.type)}}function mg(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function LX(e,t){return as(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function FX(e,t,n){return as(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ec(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(!!r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n]}}}const gg=e=>e==="reset"||e==="none",jw=(e,t)=>t?e:Object.assign({},e),BX=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:rM(n,!0),values:null};class Ri{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=zw(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ec(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,p,h)=>d==="x"?f:d==="r"?h:p,o=n.xAxisID=Pe(r.xAxisID,mg(t,"x")),s=n.yAxisID=Pe(r.yAxisID,mg(t,"y")),a=n.rAxisID=Pe(r.rAxisID,mg(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,s,a),u=n.vAxisID=i(l,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Tw(this._data,this),t._stacked&&ec(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Ye(n))this._data=DX(n);else if(r!==n){if(r){Tw(r,this);const i=this._cachedMeta;ec(i),i._parsed=[]}n&&Object.isExtensible(n)&&zq(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=zw(n.vScale,n),n.stack!==r.stack&&(i=!0,ec(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&Ww(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,a=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{vt(i[t])?f=this.parseArrayData(r,i,t,n):Ye(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const p=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);r._sorted=l}s&&Ww(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:s}=t,a=o.axis,l=s.axis,c=o.getLabels(),u=o===s,d=new Array(i);let f,p,h;for(f=0,p=i;f<p;++f)h=f+r,d[f]={[a]:u||o.parse(c[h],h),[l]:s.parse(n[h],h)};return d}parseArrayData(t,n,r,i){const{xScale:o,yScale:s}=t,a=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],a[l]={x:o.parse(d[0],u),y:s.parse(d[1],u)};return a}parseObjectData(t,n,r,i){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=n[f],c[u]={x:o.parse(Zo(p,a),f),y:s.parse(Zo(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,o=this._cachedMeta,s=n[t.axis],a={keys:rM(i,!0),values:n._stacks[t.axis]};return Bw(a,s,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let s=o===null?NaN:o;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,s=Bw(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&t===r.iScale,s=i.length,a=this._getOtherScale(t),l=BX(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=$X(a);let f,p;function h(){p=i[f];const g=p[a.axis];return!dn(p[t.axis])||u>g||d<g}for(f=0;f<s&&!(!h()&&(this.updateRangeFromParsed(c,t,p,l),o));++f);if(o){for(f=s-1;f>=0;--f)if(!h()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i<o;++i)s=n[i][t.axis],dn(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=IX(Pe(this.options.clip,OX(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,s=[],a=this._drawStart||0,l=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,o,a,l),u=a;u<a+l;++u){const d=i[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,o))}for(u=0;u<s.length;++u)s[u].draw(t,o)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];o=s.$context||(s.$context=FX(this.getContext(),t,s)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=LX(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",o=this._cachedDataOpts,s=t+"-"+n,a=o[s],l=this.enableOptionSharing&&Or(r);if(a)return jw(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Fe.elements[t]),h=()=>this.getContext(r,i),g=c.resolveNamedOptions(f,p,h,d);return g.$shared&&(g.$shared=l,o[s]=Object.freeze(jw(g,l))),g}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new nM(i,l&&l.animations);return l&&l._cacheable&&(o[s]=Object.freeze(c)),c}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||gg(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){gg(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!gg(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,s=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=s;a--)c[a]=c[a-n]};for(l(o),a=t;a<s;++a)o[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(o,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&ec(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Ri.defaults={};Ri.prototype.datasetElementType=null;Ri.prototype.dataElementType=null;function zX(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=Y2(r.sort((i,o)=>i-o))}return e._cache.$bar}function UX(e){const t=e.iScale,n=zX(t,e.type);let r=t._length,i,o,s,a;const l=()=>{s===32767||s===-32768||(Or(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(i=0,o=n.length;i<o;++i)s=t.getPixelForValue(n[i]),l();for(a=void 0,i=0,o=t.ticks.length;i<o;++i)s=t.getPixelForTick(i),l();return r}function WX(e,t,n,r){const i=n.barThickness;let o,s;return tt(i)?(o=t.min*n.categoryPercentage,s=n.barPercentage):(o=i*r,s=1),{chunk:o/r,ratio:s,start:t.pixels[e]-o/2}}function jX(e,t,n,r){const i=t.pixels,o=i[e];let s=e>0?i[e-1]:null,a=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;s===null&&(s=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-s);const c=o-(o-Math.min(s,a))/2*l;return{chunk:Math.abs(a-s)/2*l/r,ratio:n.barPercentage,start:c}}function HX(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),s=Math.min(i,o),a=Math.max(i,o);let l=s,c=a;Math.abs(s)>Math.abs(a)&&(l=a,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:s,max:a}}function iM(e,t,n,r){return vt(e)?HX(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Hw(e,t,n,r){const i=e.iScale,o=e.vScale,s=i.getLabels(),a=i===o,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=t[c],d={},d[i.axis]=a||i.parse(s[c],c),l.push(iM(f,d,o,c));return l}function vg(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function YX(e,t,n){return e!==0?Ei(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function VX(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function GX(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}const{start:s,end:a,reverse:l,top:c,bottom:u}=VX(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(o[Yw(u,s,a,l)]=!0,i=c)),o[Yw(i,s,a,l)]=!0,e.borderSkipped=o}function Yw(e,t,n,r){return r?(e=KX(e,t,n),e=Vw(e,n,t)):e=Vw(e,t,n),e}function KX(e,t,n){return e===t?n:e===n?t:e}function Vw(e,t,n){return e==="start"?t:e==="end"?n:e}function qX(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class jh extends Ri{parsePrimitiveData(t,n,r,i){return Hw(t,n,r,i)}parseArrayData(t,n,r,i){return Hw(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,u=s.axis==="x"?a:l,d=[];let f,p,h,g;for(f=r,p=r+i;f<p;++f)g=n[f],h={},h[o.axis]=o.parse(Zo(g,c),f),d.push(iM(Zo(g,u),h,s,f));return d}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),s=o._custom,a=vg(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const o=i==="reset",{index:s,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let p=n;p<n+r;p++){const h=this.getParsed(p),g=o||tt(h[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),_=this._calculateBarIndexPixels(p,u),m=(h._stacks||{})[a.axis],v={horizontal:c,base:g.base,enableBorderRadius:!m||vg(h._custom)||s===m._top||s===m._bottom,x:c?g.head:_.center,y:c?_.center:g.head,height:c?_.size:Math.abs(g.size),width:c?Math.abs(g.size):_.size};f&&(v.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const y=v.options||t[p].options;GX(v,y,m,s),qX(v,y,u.ratio),this.updateElement(t[p],p,v,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=r.options.stacked,s=[],a=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(tt(u)||isNaN(u))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((o===!1||s.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;o<s;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const a=t.barThickness;return{min:a||UX(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r},options:{base:i,minBarLength:o}}=this,s=i||0,a=this.getParsed(t),l=a._custom,c=vg(l);let u=a[n.axis],d=0,f=r?this.applyStack(n,a,r):u,p,h;f!==u&&(d=f-u,f=u),c&&(u=l.barStart,f=l.barEnd-l.barStart,u!==0&&Ei(u)!==Ei(l.barEnd)&&(d=0),d+=u);const g=!tt(i)&&!c?i:d;let _=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)?p=n.getPixelForValue(d+f):p=_,h=p-_,Math.abs(h)<o){h=YX(h,n,s)*o,u===s&&(_-=h/2);const m=n.getPixelForDecimal(0),v=n.getPixelForDecimal(1),y=Math.min(m,v),x=Math.max(m,v);_=Math.max(Math.min(_,x),y),p=_+h}if(_===n.getPixelForValue(s)){const m=Ei(h)*n.getLineWidthForValue(s)/2;_+=m,h-=m}return{size:h,base:_,head:p,center:p+h/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,s=Pe(i.maxBarThickness,1/0);let a,l;if(n.grouped){const c=o?this._getStackCount(t):n.stackCount,u=i.barThickness==="flex"?jX(t,n,i,c):WX(t,n,i,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);a=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else a=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(s,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&r[o].draw(this._ctx)}}jh.id="bar";jh.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};jh.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class H_ extends Ri{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,r,i){const o=super.parsePrimitiveData(t,n,r,i);for(let s=0;s<o.length;s++)o[s]._custom=this.resolveDataElementOptions(s+r).radius;return o}parseArrayData(t,n,r,i){const o=super.parseArrayData(t,n,r,i);for(let s=0;s<o.length;s++){const a=n[r+s];o[s]._custom=Pe(a[2],this.resolveDataElementOptions(s+r).radius)}return o}parseObjectData(t,n,r,i){const o=super.parseObjectData(t,n,r,i);for(let s=0;s<o.length;s++){const a=n[r+s];o[s]._custom=Pe(a&&a.r&&+a.r,this.resolveDataElementOptions(s+r).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let r=t.length-1;r>=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,{xScale:r,yScale:i}=n,o=this.getParsed(t),s=r.getLabelForValue(o.x),a=i.getLabelForValue(o.y),l=o._custom;return{label:n.label,value:"("+s+", "+a+(l?", "+l:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),u=s.axis,d=a.axis;for(let f=n;f<n+r;f++){const p=t[f],h=!o&&this.getParsed(f),g={},_=g[u]=o?s.getPixelForDecimal(.5):s.getPixelForValue(h[u]),m=g[d]=o?a.getBasePixel():a.getPixelForValue(h[d]);g.skip=isNaN(_)||isNaN(m),c&&(g.options=l||this.resolveDataElementOptions(f,p.active?"active":i),o&&(g.options.radius=0)),this.updateElement(p,f,g,i)}}resolveDataElementOptions(t,n){const r=this.getParsed(t);let i=super.resolveDataElementOptions(t,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const o=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Pe(r&&r._custom,o),i}}H_.id="bubble";H_.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};H_.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function XX(e,t,n){let r=1,i=1,o=0,s=0;if(t<lt){const a=e,l=a+t,c=Math.cos(a),u=Math.sin(a),d=Math.cos(l),f=Math.sin(l),p=(y,x,w)=>Cu(y,a,l,!0)?1:Math.max(x,x*n,w,w*n),h=(y,x,w)=>Cu(y,a,l,!0)?-1:Math.min(x,x*n,w,w*n),g=p(0,c,d),_=p(Lt,u,f),m=h(Mt,c,d),v=h(Mt+Lt,u,f);r=(g-m)/2,i=(_-v)/2,o=-(g+m)/2,s=-(_+v)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:s}}class od extends Ri{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(Ye(r[t])){const{key:l="value"}=this._parsing;o=c=>+Zo(r[c],l)}let s,a;for(s=t,a=t+n;s<a;++s)i._parsed[s]=o(s)}}_getRotation(){return Gr(this.options.rotation-90)}_getCircumference(){return Gr(this.options.circumference)}_getRotationExtents(){let t=lt,n=-lt;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)){const i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),s=i._getCircumference();t=Math.min(t,o),n=Math.max(n,o+s)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(r.width,r.height)-s)/2,0),l=Math.min(VK(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:h,offsetY:g}=XX(d,u,l),_=(r.width-s)/f,m=(r.height-s)/p,v=Math.max(Math.min(_,m)/2,0),y=D2(this.options.radius,v),x=Math.max(y*l,0),w=(y-x)/this._getVisibleDatasetWeightTotal();this.offsetX=h*y,this.offsetY=g*y,i.total=this.calculateTotal(),this.outerRadius=y-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/lt)}updateElements(t,n,r,i){const o=i==="reset",s=this.chart,a=s.chartArea,c=s.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=o&&c.animateScale,p=f?0:this.innerRadius,h=f?0:this.outerRadius,{sharedOptions:g,includeOptions:_}=this._getSharedOptions(n,i);let m=this._getRotation(),v;for(v=0;v<n;++v)m+=this._circumference(v,o);for(v=n;v<n+r;++v){const y=this._circumference(v,o),x=t[v],w={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+y,circumference:y,outerRadius:h,innerRadius:p};_&&(w.options=g||this.resolveDataElementOptions(v,x.active?"active":i)),m+=y,this.updateElement(x,v,w,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?lt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=id(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,s,a,l;if(!t){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){s=r.getDatasetMeta(i),t=s.data,a=s.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++i)l=a.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Pe(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}od.id="doughnut";od.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};od.descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"};od.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n}}=e.legend.options;return t.labels.map((r,i)=>{const s=e.getDatasetMeta(0).controller.getStyle(i);return{text:r,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}},tooltip:{callbacks:{title(){return""},label(e){let t=e.label;const n=": "+e.formattedValue;return vt(t)?(t=t.slice(),t[0]+=n):t+=n,t}}}}};class sd extends Ri{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:a,count:l}=ZX(n,i,s);this._drawStart=a,this._drawCount=l,JX(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=s.axis,p=a.axis,{spanGaps:h,segment:g}=this.options,_=ku(h)?h:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||o||i==="none";let v=n>0&&this.getParsed(n-1);for(let y=n;y<n+r;++y){const x=t[y],w=this.getParsed(y),k=m?x:{},E=tt(w[p]),R=k[f]=s.getPixelForValue(w[f],y),C=k[p]=o||E?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,w,l):w[p],y);k.skip=isNaN(R)||isNaN(C)||E,k.stop=y>0&&Math.abs(w[f]-v[f])>_,g&&(k.parsed=w,k.raw=c.data[y]),d&&(k.options=u||this.resolveDataElementOptions(y,x.active?"active":i)),m||this.updateElement(x,y,k,i),v=w}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}sd.id="line";sd.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};sd.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};function ZX(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,_parsed:a}=e,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:f}=s.getUserBounds();d&&(i=En(Math.min(Ts(a,s.axis,c).lo,n?r:Ts(t,l,s.getPixelForValue(c)).lo),0,r-1)),f?o=En(Math.max(Ts(a,s.axis,u).hi+1,n?0:Ts(t,l,s.getPixelForValue(u)).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function JX(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}class Y_ extends Ri{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=id(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return X2.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(o<n.min&&(n.min=o),o>n.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),a=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,r,i){const o=i==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*Mt;let p=f,h;const g=360/this.countVisibleElements();for(h=0;h<n;++h)p+=this._computeAngle(h,i,g);for(h=n;h<n+r;h++){const _=t[h];let m=p,v=p+this._computeAngle(h,i,g),y=s.getDataVisibility(h)?c.getDistanceFromCenterForValue(this.getParsed(h).r):0;p=v,o&&(l.animateScale&&(y=0),l.animateRotate&&(m=v=f));const x={x:u,y:d,innerRadius:0,outerRadius:y,startAngle:m,endAngle:v,options:this.resolveDataElementOptions(h,_.active?"active":i)};this.updateElement(_,h,x,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Gr(this.resolveDataElementOptions(t,n).angle||r):0}}Y_.id="polarArea";Y_.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Y_.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n}}=e.legend.options;return t.labels.map((r,i)=>{const s=e.getDatasetMeta(0).controller.getStyle(i);return{text:r,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}},tooltip:{callbacks:{title(){return""},label(e){return e.chart.data.labels[e.dataIndex]+": "+e.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class V_ extends od{}V_.id="pie";V_.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class G_ extends Ri{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return X2.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:s};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,s=i==="reset";for(let a=n;a<n+r;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":i),u=o.getPointPositionForValue(a,this.getParsed(a).r),d=s?o.xCenter:u.x,f=s?o.yCenter:u.y,p={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,a,p,i)}}}G_.id="radar";G_.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};G_.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class K_ extends sd{}K_.id="scatter";K_.defaults={showLine:!1,fill:!1};K_.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(e){return"("+e.label+", "+e.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function ps(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Kv{constructor(t){this.options=t||{}}formats(){return ps()}parse(t,n){return ps()}format(t,n){return ps()}add(t,n,r){return ps()}diff(t,n,r){return ps()}startOf(t,n,r){return ps()}endOf(t,n){return ps()}}Kv.override=function(e){Object.assign(Kv.prototype,e)};var QX={_date:Kv};function eZ(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const l=a._reversePixels?Fq:Ts;if(r){if(i._sharedOptions){const c=o[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(o,t,n-u),f=l(o,t,n+u);return{lo:d.lo,hi:f.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function ad(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:u}=o[a],{lo:d,hi:f}=eZ(o[a],t,s,i);for(let p=d;p<=f;++p){const h=u[p];h.skip||r(h,c,p)}}}function tZ(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,s=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function yg(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||ad(e,n,t,function(a,l,c){!i&&!Ru(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function nZ(e,t,n,r){let i=[];function o(s,a,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],r),{angle:d}=N2(s,{x:t.x,y:t.y});Cu(d,c,u)&&i.push({element:s,datasetIndex:a,index:l})}return ad(e,n,t,o),i}function rZ(e,t,n,r,i,o){let s=[];const a=tZ(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(r&&!p)return;const h=u.getCenterPoint(i);if(!(!!o||e.isPointInArea(h))&&!p)return;const _=a(t,h);_<l?(s=[{element:u,datasetIndex:d,index:f}],l=_):_===l&&s.push({element:u,datasetIndex:d,index:f})}return ad(e,n,t,c),s}function _g(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?nZ(e,t,n,i):rZ(e,t,n,r,i,o)}function Gw(e,t,n,r,i){const o=[],s=n==="x"?"inXRange":"inYRange";let a=!1;return ad(e,n,t,(l,c,u)=>{l[s](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:o}var iZ={evaluateInteractionItems:ad,modes:{index(e,t,n,r){const i=_s(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?yg(e,i,o,r,s):_g(e,i,o,!1,r,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=_s(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?yg(e,i,o,r,s):_g(e,i,o,!1,r,s);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,r){const i=_s(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return yg(e,i,o,r,s)},nearest(e,t,n,r){const i=_s(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return _g(e,i,o,n.intersect,r,s)},x(e,t,n,r){const i=_s(t,e);return Gw(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=_s(t,e);return Gw(e,i,"y",n.intersect,r)}}};const oM=["left","top","right","bottom"];function tc(e,t){return e.filter(n=>n.pos===t)}function Kw(e,t){return e.filter(n=>oM.indexOf(n.pos)===-1&&n.box.axis===t)}function nc(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function oZ(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:s,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&o+s,stackWeight:a});return t}function sZ(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!oM.includes(i))continue;const s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return t}function aZ(e,t){const n=sZ(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,s,a;for(o=0,s=e.length;o<s;++o){a=e[o];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*r:l&&t.availableWidth,a.height=i):(a.width=r,a.height=u?u*i:l&&t.availableHeight)}return n}function lZ(e){const t=oZ(e),n=nc(t.filter(c=>c.box.fullSize),!0),r=nc(tc(t,"left"),!0),i=nc(tc(t,"right")),o=nc(tc(t,"top"),!0),s=nc(tc(t,"bottom")),a=Kw(t,"x"),l=Kw(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(s).concat(a),chartArea:tc(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(s).concat(a)}}function qw(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function sM(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function cZ(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!Ye(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&sM(s,o.getPadding());const a=Math.max(0,t.outerWidth-qw(s,e,"left","right")),l=Math.max(0,t.outerHeight-qw(s,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function uZ(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function dZ(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function mc(e,t,n,r){const i=[];let o,s,a,l,c,u;for(o=0,s=e.length,c=0;o<s;++o){a=e[o],l=a.box,l.update(a.width||t.w,a.height||t.h,dZ(a.horizontal,t));const{same:d,other:f}=cZ(t,n,a,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(a)}return c&&mc(i,t,n,r)||u}function af(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function Xw(e,t,n,r){const i=n.padding;let{x:o,y:s}=t;for(const a of e){const l=a.box,c=r[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*u,f=c.size||l.height;Or(c.start)&&(s=c.start),l.fullSize?af(l,i.left,s,n.outerWidth-i.right-i.left,f):af(l,t.left+c.placed,s,d,f),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,f=c.size||l.width;Or(c.start)&&(o=c.start),l.fullSize?af(l,o,i.top,f,n.outerHeight-i.bottom-i.top):af(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=s}Fe.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var _r={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Rn(e.options.layout.padding),o=Math.max(t-i.width,0),s=Math.max(n-i.height,0),a=lZ(e.boxes),l=a.vertical,c=a.horizontal;et(e.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=l.reduce((g,_)=>_.box.options&&_.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/u,hBoxMaxHeight:s/2}),f=Object.assign({},i);sM(f,Rn(r));const p=Object.assign({maxPadding:f,w:o,h:s,x:i.left,y:i.top},i),h=aZ(l.concat(c),d);mc(a.fullSize,p,d,h),mc(l,p,d,h),mc(c,p,d,h)&&mc(l,p,d,h),uZ(p),Xw(a.leftAndTop,p,d,h),p.x+=p.w,p.y+=p.h,Xw(a.rightAndBottom,p,d,h),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},et(a.chartArea,g=>{const _=g.box;Object.assign(_,e.chartArea),_.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class aM{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class fZ extends aM{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Af="$chartjs",pZ={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Zw=e=>e===null||e==="";function hZ(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Af]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Zw(i)){const o=Iw(e,"width");o!==void 0&&(e.width=o)}if(Zw(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=Iw(e,"height");o!==void 0&&(e.height=o)}return e}const lM=cX?{passive:!0}:!1;function mZ(e,t,n){e.addEventListener(t,n,lM)}function gZ(e,t,n){e.canvas.removeEventListener(t,n,lM)}function vZ(e,t){const n=pZ[e.type]||e.type,{x:r,y:i}=_s(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Ep(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function yZ(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||Ep(a.addedNodes,r),s=s&&!Ep(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function _Z(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||Ep(a.removedNodes,r),s=s&&!Ep(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Mu=new Map;let Jw=0;function cM(){const e=window.devicePixelRatio;e!==Jw&&(Jw=e,Mu.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function bZ(e,t){Mu.size||window.addEventListener("resize",cM),Mu.set(e,t)}function xZ(e){Mu.delete(e),Mu.size||window.removeEventListener("resize",cM)}function SZ(e,t,n){const r=e.canvas,i=r&&j_(r);if(!i)return;const o=I2((a,l)=>{const c=i.clientWidth;n(a,l),c<i.clientWidth&&n()},window),s=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return s.observe(i),bZ(e,o),s}function bg(e,t,n){n&&n.disconnect(),t==="resize"&&xZ(e)}function wZ(e,t,n){const r=e.canvas,i=I2(o=>{e.ctx!==null&&n(vZ(o,e))},e,o=>{const s=o[0];return[s,s.offsetX,s.offsetY]});return mZ(r,t,i),i}class EZ extends aM{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(hZ(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Af])return!1;const r=n[Af].initial;["height","width"].forEach(o=>{const s=r[o];tt(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[Af],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:yZ,detach:_Z,resize:SZ}[n]||wZ;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:bg,detach:bg,resize:bg}[n]||gZ)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return lX(t,n,r,i)}isAttached(t){const n=j_(t);return!!(n&&n.isConnected)}}function kZ(e){return!J2()||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas?fZ:EZ}class oi{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return ku(this.x)&&ku(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}}oi.defaults={};oi.defaultRoutes=void 0;const uM={values(e){return vt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=CZ(e,n)}const s=gr(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),id(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=e/Math.pow(10,Math.floor(gr(e)));return r===1||r===2||r===5?uM.numeric.call(this,e,t,n):""}};function CZ(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Hh={formatters:uM};Fe.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth: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:Hh.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});Fe.route("scale.ticks","color","","color");Fe.route("scale.grid","color","","borderColor");Fe.route("scale.grid","borderColor","","borderColor");Fe.route("scale.title","color","","color");Fe.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"});Fe.describe("scales",{_fallback:"scale"});Fe.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"});function RZ(e,t){const n=e.options.ticks,r=n.maxTicksLimit||TZ(e),i=n.major.enabled?PZ(t):[],o=i.length,s=i[0],a=i[o-1],l=[];if(o>r)return OZ(t,l,i,o/r),l;const c=MZ(i,t,r);if(o>0){let u,d;const f=o>1?Math.round((a-s)/(o-1)):null;for(lf(t,l,c,tt(f)?0:s-f,s),u=0,d=o-1;u<d;u++)lf(t,l,c,i[u],i[u+1]);return lf(t,l,c,a,tt(f)?t.length:a+f),l}return lf(t,l,c),l}function TZ(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function MZ(e,t,n){const r=IZ(e),i=t.length/n;if(!r)return Math.max(i,1);const o=eq(r);for(let s=0,a=o.length-1;s<a;s++){const l=o[s];if(l>i)return l}return Math.max(i,1)}function PZ(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function OZ(e,t,n,r){let i=0,o=n[0],s;for(r=Math.ceil(r),s=0;s<e.length;s++)s===o&&(t.push(e[s]),i++,o=n[i*r])}function lf(e,t,n,r,i){const o=Pe(r,0),s=Math.min(Pe(i,e.length),e.length);let a=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=o;u<0;)a++,u=Math.round(o+a*n);for(c=Math.max(o,0);c<s;c++)c===u&&(t.push(e[c]),a++,u=Math.round(o+a*n))}function IZ(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const DZ=e=>e==="left"?"right":e==="right"?"left":e,Qw=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n;function eE(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function AZ(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,s=e._endPixel,a=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-o,s-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-a||l>s+a)))return l}function $Z(e,t){et(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function rc(e){return e.drawTicks?e.tickLength:0}function tE(e,t){if(!e.display)return 0;const n=qt(e.font,t),r=Rn(e.padding);return(vt(e.text)?e.text.length:1)*n.lineHeight+r.height}function NZ(e,t){return as(e,{scale:t,type:"scale"})}function LZ(e,t,n){return as(e,{tick:n,index:t,type:"tick"})}function FZ(e,t,n){let r=P_(e);return(n&&t!=="right"||!n&&t==="right")&&(r=DZ(r)),r}function BZ(e,t,n,r){const{top:i,left:o,bottom:s,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,p,h;const g=s-i,_=a-o;if(e.isHorizontal()){if(p=_n(r,o,a),Ye(n)){const m=Object.keys(n)[0],v=n[m];h=u[m].getPixelForValue(v)+g-t}else n==="center"?h=(c.bottom+c.top)/2+g-t:h=Qw(e,n,t);f=a-o}else{if(Ye(n)){const m=Object.keys(n)[0],v=n[m];p=u[m].getPixelForValue(v)-_+t}else n==="center"?p=(c.left+c.right)/2-_+t:p=Qw(e,n,t);h=_n(r,s,i),d=n==="left"?-Lt:Lt}return{titleX:p,titleY:h,maxWidth:f,rotation:d}}class ta extends oi{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.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(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=dr(t,Number.POSITIVE_INFINITY),n=dr(n,Number.NEGATIVE_INFINITY),r=dr(r,Number.POSITIVE_INFINITY),i=dr(i,Number.NEGATIVE_INFINITY),{min:dr(t,r),max:dr(n,i),minDefined:dn(t),maxDefined:dn(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),s;if(i&&o)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)s=a[l].controller.getMinMax(this,t),i||(n=Math.min(n,s.min)),o||(r=Math.max(r,s.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:dr(n,dr(r,n)),max:dr(r,dr(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 t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ct(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Lq(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?eE(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=RZ(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ct(this.options.afterUpdate,[this])}beforeSetDimensions(){ct(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){ct(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ct(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ct(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=ct(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){ct(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ct(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=this.ticks.length,i=n.minRotation||0,o=n.maxRotation;let s=i,a,l,c;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=En(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:p/(r-1),d+6>a&&(a=p/(r-(t.offset?.5:1)),l=this.maxHeight-rc(t.grid)-n.padding-tE(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),s=I_(Math.min(Math.asin(En((u.highest.height+6)/a,-1,1)),Math.asin(En(l/c,-1,1))-Math.asin(En(f/c,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){ct(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ct(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=tE(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=rc(o)+l):(t.height=this.maxHeight,t.width=rc(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,h=Gr(this.labelRotation),g=Math.cos(h),_=Math.sin(h);if(a){const m=r.mirror?0:_*d.width+g*f.height;t.height=Math.min(this.maxHeight,t.height+m+p)}else{const m=r.mirror?0:g*d.width+_*f.height;t.width=Math.min(this.maxWidth,t.width+m+p)}this._calculatePadding(c,u,_,g)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=r*n.height):(f=r*t.height,p=i*n.width):o==="start"?p=n.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+s)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_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(){ct(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)tt(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=eE(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length)}return t}_computeLabelSizes(t,n){const{ctx:r,_longestTextCache:i}=this,o=[],s=[];let a=0,l=0,c,u,d,f,p,h,g,_,m,v,y;for(c=0;c<n;++c){if(f=t[c].label,p=this._resolveTickFontOptions(c),r.font=h=p.string,g=i[h]=i[h]||{data:{},gc:[]},_=p.lineHeight,m=v=0,!tt(f)&&!vt(f))m=Sp(r,g.data,g.gc,m,f),v=_;else if(vt(f))for(u=0,d=f.length;u<d;++u)y=f[u],!tt(y)&&!vt(y)&&(m=Sp(r,g.data,g.gc,m,y),v+=_);o.push(m),s.push(v),a=Math.max(m,a),l=Math.max(v,l)}$Z(i,n);const x=o.indexOf(a),w=s.indexOf(l),k=E=>({width:o[E]||0,height:s[E]||0});return{first:k(0),last:k(n-1),widest:k(x),highest:k(w),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return rq(this._alignToPixels?fs(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=LZ(this.getContext(),t,r))}return this.$context||(this.$context=NZ(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Gr(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,a=o?o.widest.width+s:0,l=o?o.highest.height+s:0;return this.isHorizontal()?l*r>a*i?a/r:l/i:l*i<a*r?l/r:a/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s}=i,a=o.offset,l=this.isHorizontal(),u=this.ticks.length+(a?1:0),d=rc(o),f=[],p=o.setContext(this.getContext()),h=p.drawBorder?p.borderWidth:0,g=h/2,_=function(A){return fs(r,A,h)};let m,v,y,x,w,k,E,R,C,T,P,$;if(s==="top")m=_(this.bottom),k=this.bottom-d,R=m-g,T=_(t.top)+g,$=t.bottom;else if(s==="bottom")m=_(this.top),T=t.top,$=_(t.bottom)-g,k=m+g,R=this.top+d;else if(s==="left")m=_(this.right),w=this.right-d,E=m-g,C=_(t.left)+g,P=t.right;else if(s==="right")m=_(this.left),C=t.left,P=_(t.right)-g,w=m+g,E=this.left+d;else if(n==="x"){if(s==="center")m=_((t.top+t.bottom)/2+.5);else if(Ye(s)){const A=Object.keys(s)[0],I=s[A];m=_(this.chart.scales[A].getPixelForValue(I))}T=t.top,$=t.bottom,k=m+g,R=k+d}else if(n==="y"){if(s==="center")m=_((t.left+t.right)/2);else if(Ye(s)){const A=Object.keys(s)[0],I=s[A];m=_(this.chart.scales[A].getPixelForValue(I))}w=m-g,E=w-d,C=t.left,P=t.right}const N=Pe(i.ticks.maxTicksLimit,u),Y=Math.max(1,Math.ceil(u/N));for(v=0;v<u;v+=Y){const A=o.setContext(this.getContext(v)),I=A.lineWidth,B=A.color,O=o.borderDash||[],D=A.borderDashOffset,U=A.tickWidth,Z=A.tickColor,J=A.tickBorderDash||[],be=A.tickBorderDashOffset;y=AZ(this,v,a),y!==void 0&&(x=fs(r,y,I),l?w=E=C=P=x:k=R=T=$=x,f.push({tx1:w,ty1:k,tx2:E,ty2:R,x1:C,y1:T,x2:P,y2:$,width:I,color:B,borderDash:O,borderDashOffset:D,tickWidth:U,tickColor:Z,tickBorderDash:J,tickBorderDashOffset:be}))}return this._ticksLength=u,this._borderValue=m,f}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,s=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=rc(r.grid),p=f+u,h=d?-u:p,g=-Gr(this.labelRotation),_=[];let m,v,y,x,w,k,E,R,C,T,P,$,N="middle";if(i==="top")k=this.bottom-h,E=this._getXAxisLabelAlignment();else if(i==="bottom")k=this.top+h,E=this._getXAxisLabelAlignment();else if(i==="left"){const A=this._getYAxisLabelAlignment(f);E=A.textAlign,w=A.x}else if(i==="right"){const A=this._getYAxisLabelAlignment(f);E=A.textAlign,w=A.x}else if(n==="x"){if(i==="center")k=(t.top+t.bottom)/2+p;else if(Ye(i)){const A=Object.keys(i)[0],I=i[A];k=this.chart.scales[A].getPixelForValue(I)+p}E=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")w=(t.left+t.right)/2-p;else if(Ye(i)){const A=Object.keys(i)[0],I=i[A];w=this.chart.scales[A].getPixelForValue(I)}E=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const Y=this._getLabelSizes();for(m=0,v=a.length;m<v;++m){y=a[m],x=y.label;const A=o.setContext(this.getContext(m));R=this.getPixelForTick(m)+o.labelOffset,C=this._resolveTickFontOptions(m),T=C.lineHeight,P=vt(x)?x.length:1;const I=P/2,B=A.color,O=A.textStrokeColor,D=A.textStrokeWidth;let U=E;s?(w=R,E==="inner"&&(m===v-1?U=this.options.reverse?"left":"right":m===0?U=this.options.reverse?"right":"left":U="center"),i==="top"?c==="near"||g!==0?$=-P*T+T/2:c==="center"?$=-Y.highest.height/2-I*T+T:$=-Y.highest.height+T/2:c==="near"||g!==0?$=T/2:c==="center"?$=Y.highest.height/2-I*T:$=Y.highest.height-P*T,d&&($*=-1)):(k=R,$=(1-P)*T/2);let Z;if(A.showLabelBackdrop){const J=Rn(A.backdropPadding),be=Y.heights[m],re=Y.widths[m];let se=k+$-J.top,G=w-J.left;switch(N){case"middle":se-=be/2;break;case"bottom":se-=be;break}switch(E){case"center":G-=re/2;break;case"right":G-=re;break}Z={left:G,top:se,width:re+J.width,height:be+J.height,color:A.backdropColor}}_.push({rotation:g,label:x,font:C,color:B,strokeColor:O,strokeWidth:D,textOffset:$,textAlign:U,textBaseline:N,translation:[w,k],backdrop:Z})}return _}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Gr(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,s=this._getLabelSizes(),a=t+o,l=s.widest.width;let c,u;return n==="left"?i?(u=this.right+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o<s;++o){const l=i[o];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{grid:r}}=this,i=r.setContext(this.getContext()),o=r.drawBorder?i.borderWidth:0;if(!o)return;const s=r.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,c,u,d;this.isHorizontal()?(l=fs(t,this.left,o)-o/2,c=fs(t,this.right,s)+s/2,u=d=a):(u=fs(t,this.top,o)-o/2,d=fs(t,this.bottom,s)+s/2,l=c=a),n.save(),n.lineWidth=i.borderWidth,n.strokeStyle=i.borderColor,n.beginPath(),n.moveTo(l,u),n.lineTo(c,d),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&N_(r,i);const o=this._labelItems||(this._labelItems=this._computeLabelItems(t));let s,a;for(s=0,a=o.length;s<a;++s){const l=o[s],c=l.font,u=l.label;l.backdrop&&(r.fillStyle=l.backdrop.color,r.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height));let d=l.textOffset;Xs(r,u,0,d,c,l)}i&&L_(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=qt(r.font),s=Rn(r.padding),a=r.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||Ye(n)?(l+=s.bottom,vt(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=BZ(this,l,n,a);Xs(t,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:f,textAlign:FZ(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){!this._isVisible()||(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Pe(t.grid&&t.grid.z,-1);return!this._isVisible()||this.draw!==ta.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:r+1,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o<s;++o){const a=n[o];a[r]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return qt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class cf{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;WZ(n)&&(r=this.register(n));const i=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,zZ(t,s,r),this.override&&Fe.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in Fe[i]&&(delete Fe[i][r],this.override&&delete qs[r])}}function zZ(e,t,n){const r=Eu(Object.create(null),[n?Fe.get(n):{},Fe.get(t),e.defaults]);Fe.set(t,r),e.defaultRoutes&&UZ(t,e.defaultRoutes),e.descriptors&&Fe.describe(t,e.descriptors)}function UZ(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");Fe.route(o,i,l,a)})}function WZ(e){return"id"in e&&"defaults"in e}class jZ{constructor(){this.controllers=new cf(Ri,"datasets",!0),this.elements=new cf(oi,"elements"),this.plugins=new cf(Object,"plugins"),this.scales=new cf(ta,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):et(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=O_(t);ct(r["before"+i],[],r),n[t](r),ct(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Vi=new jZ;class HZ{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,n,r,i){i=i||{};for(const o of t){const s=o.plugin,a=s[r],l=[n,i,o.options];if(ct(a,l,s)===!1&&i.cancelable)return!1}return!0}invalidate(){tt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Pe(r.options&&r.options.plugins,{}),o=YZ(r);return i===!1&&!n?[]:GZ(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,s)=>o.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function YZ(e){const t={},n=[],r=Object.keys(Vi.plugins.items);for(let o=0;o<r.length;o++)n.push(Vi.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const s=i[o];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function VZ(e,t){return!t&&e===!1?null:e===!0?{}:e}function GZ(e,{plugins:t,localIds:n},r,i){const o=[],s=e.getContext();for(const a of t){const l=a.id,c=VZ(r[l],i);c!==null&&o.push({plugin:a,options:KZ(e.config,{plugin:a,local:n[l]},c,s)})}return o}function KZ(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),s=e.getOptionScopes(r,o);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function qv(e,t){const n=Fe.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function qZ(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function XZ(e,t){return e===t?"_index_":"_value_"}function ZZ(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Xv(e,t){return e==="x"||e==="y"?e:t.axis||ZZ(t.position)||e.charAt(0).toLowerCase()}function JZ(e,t){const n=qs[e.type]||{scales:{}},r=t.scales||{},i=qv(e.type,t),o=Object.create(null),s=Object.create(null);return Object.keys(r).forEach(a=>{const l=r[a];if(!Ye(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const c=Xv(a,l),u=XZ(c,i),d=n.scales||{};o[c]=o[c]||a,s[a]=Fc(Object.create(null),[{axis:c},l,d[c],d[u]])}),e.data.datasets.forEach(a=>{const l=a.type||e.type,c=a.indexAxis||qv(l,t),d=(qs[l]||{}).scales||{};Object.keys(d).forEach(f=>{const p=qZ(f,c),h=a[p+"AxisID"]||o[p]||p;s[h]=s[h]||Object.create(null),Fc(s[h],[{axis:p},r[h],d[f]])})}),Object.keys(s).forEach(a=>{const l=s[a];Fc(l,[Fe.scales[l.type],Fe.scale])}),s}function dM(e){const t=e.options||(e.options={});t.plugins=Pe(t.plugins,{}),t.scales=JZ(e,t)}function fM(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function QZ(e){return e=e||{},e.data=fM(e.data),dM(e),e}const nE=new Map,pM=new Set;function uf(e,t){let n=nE.get(e);return n||(n=t(),nE.set(e,n),pM.add(n)),n}const ic=(e,t,n)=>{const r=Zo(t,n);r!==void 0&&e.add(r)};class eJ{constructor(t){this._config=QZ(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=fM(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),dM(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return uf(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return uf(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return uf(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return uf(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>ic(l,t,d))),u.forEach(d=>ic(l,i,d)),u.forEach(d=>ic(l,qs[o]||{},d)),u.forEach(d=>ic(l,Fe,d)),u.forEach(d=>ic(l,Vv,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),pM.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,qs[n]||{},Fe.datasets[n]||{},{type:n},Fe,Vv]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=rE(this._resolverCache,t,i);let l=s;if(nJ(s,n)){o.$shared=!1,r=Jo(r)?r():r;const c=this.createResolver(t,r,a);l=xl(s,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=rE(this._resolverCache,t,r);return Ye(n)?xl(o,n,void 0,i):o}}function rE(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:z_(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const tJ=e=>Ye(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Jo(e[n]),!1);function nJ(e,t){const{isScriptable:n,isIndexable:r}=V2(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(Jo(a)||tJ(a))||s&&vt(a))return!0}return!1}var rJ="3.8.2";const iJ=["top","bottom","left","right","chartArea"];function iE(e,t){return e==="top"||e==="bottom"||iJ.indexOf(e)===-1&&t==="x"}function oE(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function sE(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),ct(n&&n.onComplete,[e],t)}function oJ(e){const t=e.chart,n=t.options.animation;ct(n&&n.onProgress,[e],t)}function hM(e){return J2()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const kp={},mM=e=>{const t=hM(e);return Object.values(kp).filter(n=>n.canvas===t).pop()};function sJ(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function aJ(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}class Yh{constructor(t,n){const r=this.config=new eJ(n),i=hM(t),o=mM(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||kZ(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=YK(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new HZ,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=jK(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],kp[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ni.listen(this,"complete",sE),Ni.listen(this,"progress",oJ),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return tt(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ow(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Rw(this.canvas,this.ctx),this}stop(){return Ni.stop(this),this}resize(t,n){Ni.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Ow(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),ct(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};et(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],l=Xv(s,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),et(o,s=>{const a=s.options,l=a.id,c=Xv(l,a),u=Pe(a.type,s.dtype);(a.position===void 0||iE(a.position,c)!==iE(s.dposition))&&(a.position=s.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=Vi.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),et(i,(s,a)=>{s||delete r[a]}),et(r,s=>{_r.configure(this,s,s.options),_r.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(oE("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const o=n[r];let s=this.getDatasetMeta(r);const a=o.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=a,s.indexAxis=o.indexAxis||qv(a,this.options),s.order=o.order||0,s.index=r,s.label=""+o.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{const l=Vi.getController(a),{datasetElementType:c,dataElementType:u}=Fe.datasets[a];Object.assign(l.prototype,{dataElementType:Vi.getElement(u),datasetElementType:c&&Vi.getElement(c)}),s.controller=new l(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){et(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),i||et(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(oE("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){et(this.scales,t=>{_r.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!gw(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;sJ(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!gw(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;_r.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],et(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Jo(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ni.has(this)?this.attached&&!Ni.running(this)&&Ni.start(this):(this.draw(),sE({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,o;for(i=0,o=n.length;i<o;++i){const s=n[i];(!t||s.visible)&&r.push(s)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&N_(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&L_(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Ru(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=iZ.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=as(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);Or(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Ni.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Rw(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete kp[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(o,s)=>{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};et(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){et(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},et(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){s=t[a];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:s})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!yp(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),l=ZK(t),c=aJ(t,this._lastEvent,r,l);r&&(this._lastEvent=null,ct(o.onHover,[t,a,this],this),l&&ct(o.onClick,[t,a,this],this));const u=!yp(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}}const aE=()=>et(Yh.instances,e=>e._plugins.invalidate()),fo=!0;Object.defineProperties(Yh,{defaults:{enumerable:fo,value:Fe},instances:{enumerable:fo,value:kp},overrides:{enumerable:fo,value:qs},registry:{enumerable:fo,value:Vi},version:{enumerable:fo,value:rJ},getChart:{enumerable:fo,value:mM},register:{enumerable:fo,value:(...e)=>{Vi.add(...e),aE()}},unregister:{enumerable:fo,value:(...e)=>{Vi.remove(...e),aE()}}});function gM(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:s,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(o,s,a,r-c,n+c),l>i?(c=i/l,e.arc(o,s,l,n+c,r-c,!0)):e.arc(o,s,i,n+Lt,r-Lt),e.closePath(),e.clip()}function lJ(e){return F_(e,["outerStart","outerEnd","innerStart","innerEnd"])}function cJ(e,t,n,r){const i=lJ(e.options.borderRadius),o=(n-t)/2,s=Math.min(o,r*t/2),a=l=>{const c=(n-Math.min(o,l))*r/2;return En(l,0,Math.min(o,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:En(i.innerStart,0,s),innerEnd:En(i.innerEnd,0,s)}}function ma(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Zv(e,t,n,r,i){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=t,u=Math.max(t.outerRadius+r+n-l,0),d=c>0?c+r+n+l:0;let f=0;const p=i-a;if(r){const I=c>0?c-r:0,B=u>0?u-r:0,O=(I+B)/2,D=O!==0?p*O/(O+r):p;f=(p-D)/2}const h=Math.max(.001,p*u-n/Mt)/u,g=(p-h)/2,_=a+g+f,m=i-g-f,{outerStart:v,outerEnd:y,innerStart:x,innerEnd:w}=cJ(t,d,u,m-_),k=u-v,E=u-y,R=_+v/k,C=m-y/E,T=d+x,P=d+w,$=_+x/T,N=m-w/P;if(e.beginPath(),e.arc(o,s,u,R,C),y>0){const I=ma(E,C,o,s);e.arc(I.x,I.y,y,C,m+Lt)}const Y=ma(P,m,o,s);if(e.lineTo(Y.x,Y.y),w>0){const I=ma(P,N,o,s);e.arc(I.x,I.y,w,m+Lt,N+Math.PI)}if(e.arc(o,s,d,m-w/d,_+x/d,!0),x>0){const I=ma(T,$,o,s);e.arc(I.x,I.y,x,$+Math.PI,_-Lt)}const A=ma(k,_,o,s);if(e.lineTo(A.x,A.y),v>0){const I=ma(k,R,o,s);e.arc(I.x,I.y,v,_-Lt,R)}e.closePath()}function uJ(e,t,n,r){const{fullCircles:i,startAngle:o,circumference:s}=t;let a=t.endAngle;if(i){Zv(e,t,n,r,o+lt);for(let l=0;l<i;++l)e.fill();isNaN(s)||(a=o+s%lt,s%lt===0&&(a+=lt))}return Zv(e,t,n,r,a),e.fill(),a}function dJ(e,t,n){const{x:r,y:i,startAngle:o,pixelMargin:s,fullCircles:a}=t,l=Math.max(t.outerRadius-s,0),c=t.innerRadius+s;let u;for(n&&gM(e,t,o+lt),e.beginPath(),e.arc(r,i,c,o+lt,o,!0),u=0;u<a;++u)e.stroke();for(e.beginPath(),e.arc(r,i,l,o,o+lt),u=0;u<a;++u)e.stroke()}function fJ(e,t,n,r,i){const{options:o}=t,{borderWidth:s,borderJoinStyle:a}=o,l=o.borderAlign==="inner";!s||(l?(e.lineWidth=s*2,e.lineJoin=a||"round"):(e.lineWidth=s,e.lineJoin=a||"bevel"),t.fullCircles&&dJ(e,t,l),l&&gM(e,t,i),Zv(e,t,n,r,i),e.stroke())}class q_ extends oi{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.getProps(["x","y"],r),{angle:o,distance:s}=N2(i,{x:t,y:n}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=this.options.spacing/2,h=Pe(d,l-a)>=lt||Cu(o,a,l),g=Ro(s,c+f,u+f);return h&&g}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,u=(i+o)/2,d=(s+a+c+l)/2;return{x:n+Math.cos(u)*d,y:r+Math.sin(u)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/2,o=(n.spacing||0)/2;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>lt?Math.floor(r/lt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let s=0;if(i){s=i/2;const l=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(l)*s,Math.sin(l)*s),this.circumference>=Mt&&(s=i)}t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor;const a=uJ(t,this,s,o);fJ(t,this,s,o,a),t.restore()}}q_.id="arc";q_.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0};q_.defaultRoutes={backgroundColor:"backgroundColor"};function vM(e,t,n=t){e.lineCap=Pe(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Pe(n.borderDash,t.borderDash)),e.lineDashOffset=Pe(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Pe(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Pe(n.borderWidth,t.borderWidth),e.strokeStyle=Pe(n.borderColor,t.borderColor)}function pJ(e,t,n){e.lineTo(n.x,n.y)}function hJ(e){return e.stepped?Mq:e.tension||e.cubicInterpolationMode==="monotone"?Pq:pJ}function yM(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,l=Math.max(i,s),c=Math.min(o,a),u=i<s&&o<s||i>a&&o>a;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function mJ(e,t,n,r){const{points:i,options:o}=t,{count:s,start:a,loop:l,ilen:c}=yM(i,n,r),u=hJ(o);let{move:d=!0,reverse:f}=r||{},p,h,g;for(p=0;p<=c;++p)h=i[(a+(f?c-p:p))%s],!h.skip&&(d?(e.moveTo(h.x,h.y),d=!1):u(e,g,h,f,o.stepped),g=h);return l&&(h=i[(a+(f?c:0))%s],u(e,g,h,f,o.stepped)),!!l}function gJ(e,t,n,r){const i=t.points,{count:o,start:s,ilen:a}=yM(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,h,g,_,m;const v=x=>(s+(c?a-x:x))%o,y=()=>{g!==_&&(e.lineTo(u,_),e.lineTo(u,g),e.lineTo(u,m))};for(l&&(p=i[v(0)],e.moveTo(p.x,p.y)),f=0;f<=a;++f){if(p=i[v(f)],p.skip)continue;const x=p.x,w=p.y,k=x|0;k===h?(w<g?g=w:w>_&&(_=w),u=(d*u+x)/++d):(y(),e.lineTo(x,w),h=k,d=0,g=_=w),m=w}y()}function Jv(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?gJ:mJ}function vJ(e){return e.stepped?uX:e.tension||e.cubicInterpolationMode==="monotone"?dX:bs}function yJ(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),vM(e,t.options),e.stroke(i)}function _J(e,t,n,r){const{segments:i,options:o}=t,s=Jv(t);for(const a of i)vM(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const bJ=typeof Path2D=="function";function xJ(e,t,n,r){bJ&&!t.options.segment?yJ(e,t,n,r):_J(e,t,n,r)}class Vh extends oi{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;nX(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=bX(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,s=vX(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],l=vJ(r);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:f}=s[c],p=o[d],h=o[f];if(p===h){a.push(p);continue}const g=Math.abs((i-p[n])/(h[n]-p[n])),_=l(p,h,g,r.stepped);_[n]=t[n],a.push(_)}return a.length===1?a[0]:a}pathSegment(t,n,r){return Jv(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=Jv(this);let s=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)s&=o(t,this,a,{start:n,end:n+r-1});return!!s}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),xJ(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Vh.id="line";Vh.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};Vh.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};Vh.descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};function lE(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class X_ extends oi{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.options,{x:o,y:s}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(n-s,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return lE(this,t,"x",n)}inYRange(t,n){return lE(this,t,"y",n)}getCenterPoint(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const r=n&&t.borderWidth||0;return(n+r)*2}draw(t,n){const r=this.options;this.skip||r.radius<.1||!Ru(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,Gv(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}X_.id="point";X_.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};X_.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function _M(e,t){const{x:n,y:r,base:i,width:o,height:s}=e.getProps(["x","y","base","width","height"],t);let a,l,c,u,d;return e.horizontal?(d=s/2,a=Math.min(n,i),l=Math.max(n,i),c=r-d,u=r+d):(d=o/2,a=n-d,l=n+d,c=Math.min(r,i),u=Math.max(r,i)),{left:a,top:c,right:l,bottom:u}}function Mo(e,t,n,r){return e?0:En(t,n,r)}function SJ(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=j2(r);return{t:Mo(i.top,o.top,0,n),r:Mo(i.right,o.right,0,t),b:Mo(i.bottom,o.bottom,0,n),l:Mo(i.left,o.left,0,t)}}function wJ(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=$s(i),s=Math.min(t,n),a=e.borderSkipped,l=r||Ye(i);return{topLeft:Mo(!l||a.top||a.left,o.topLeft,0,s),topRight:Mo(!l||a.top||a.right,o.topRight,0,s),bottomLeft:Mo(!l||a.bottom||a.left,o.bottomLeft,0,s),bottomRight:Mo(!l||a.bottom||a.right,o.bottomRight,0,s)}}function EJ(e){const t=_M(e),n=t.right-t.left,r=t.bottom-t.top,i=SJ(e,n/2,r/2),o=wJ(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function xg(e,t,n,r){const i=t===null,o=n===null,a=e&&!(i&&o)&&_M(e,r);return a&&(i||Ro(t,a.left,a.right))&&(o||Ro(n,a.top,a.bottom))}function kJ(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function CJ(e,t){e.rect(t.x,t.y,t.w,t.h)}function Sg(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-r,s=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+o,h:e.h+s,radius:e.radius}}class Z_ extends oi{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:s}=EJ(this),a=kJ(s.radius)?Tu:CJ;t.save(),(s.w!==o.w||s.h!==o.h)&&(t.beginPath(),a(t,Sg(s,n,o)),t.clip(),a(t,Sg(o,-n,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,Sg(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return xg(this,t,n,r)}inXRange(t,n){return xg(this,t,null,n)}inYRange(t,n){return xg(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}Z_.id="bar";Z_.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};Z_.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const cE=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},RJ=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class uE extends oi{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=ct(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=qt(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=cE(r,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(s,o,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((h,g)=>{const _=r+n/2+o.measureText(h.text).width;(g===0||c[c.length-1]+_+2*a>s)&&(d+=u,c[c.length-(g>0?0:1)]=0,p+=u,f++),l[g]={left:0,top:p,row:f,width:_,height:i},c[c.length-1]+=_+a}),d}_fitCols(t,n,r,i){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=a,f=0,p=0,h=0,g=0;return this.legendItems.forEach((_,m)=>{const v=r+n/2+o.measureText(_.text).width;m>0&&p+i+2*a>u&&(d+=f+a,c.push({width:f,height:p}),h+=f+a,g++,f=p=0),l[m]={left:h,top:p,col:g,width:v,height:i},f=Math.max(f,v),p+=i+a}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=qa(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=_n(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=_n(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+i}else{let a=0,l=_n(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=_n(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;N_(t,this),this._draw(),L_(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=t,a=Fe.color,l=qa(t.rtl,this.left,this.width),c=qt(s.font),{color:u,padding:d}=s,f=c.size,p=f/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:g,boxHeight:_,itemHeight:m}=cE(s,f),v=function(E,R,C){if(isNaN(g)||g<=0||isNaN(_)||_<0)return;i.save();const T=Pe(C.lineWidth,1);if(i.fillStyle=Pe(C.fillStyle,a),i.lineCap=Pe(C.lineCap,"butt"),i.lineDashOffset=Pe(C.lineDashOffset,0),i.lineJoin=Pe(C.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=Pe(C.strokeStyle,a),i.setLineDash(Pe(C.lineDash,[])),s.usePointStyle){const P={radius:_*Math.SQRT2/2,pointStyle:C.pointStyle,rotation:C.rotation,borderWidth:T},$=l.xPlus(E,g/2),N=R+p;W2(i,P,$,N,g)}else{const P=R+Math.max((f-_)/2,0),$=l.leftForLtr(E,g),N=$s(C.borderRadius);i.beginPath(),Object.values(N).some(Y=>Y!==0)?Tu(i,{x:$,y:P,w:g,h:_,radius:N}):i.rect($,P,g,_),i.fill(),T!==0&&i.stroke()}i.restore()},y=function(E,R,C){Xs(i,C.text,E,R+m/2,c,{strikethrough:C.hidden,textAlign:l.textAlign(C.textAlign)})},x=this.isHorizontal(),w=this._computeTitleHeight();x?h={x:_n(o,this.left+d,this.right-r[0]),y:this.top+d+w,line:0}:h={x:this.left+d,y:_n(o,this.top+w+d,this.bottom-n[0].height),line:0},Q2(this.ctx,t.textDirection);const k=m+d;this.legendItems.forEach((E,R)=>{i.strokeStyle=E.fontColor||u,i.fillStyle=E.fontColor||u;const C=i.measureText(E.text).width,T=l.textAlign(E.textAlign||(E.textAlign=s.textAlign)),P=g+p+C;let $=h.x,N=h.y;l.setWidth(this.width),x?R>0&&$+P+d>this.right&&(N=h.y+=k,h.line++,$=h.x=_n(o,this.left+d,this.right-r[h.line])):R>0&&N+k>this.bottom&&($=h.x=$+n[h.line].width+d,h.line++,N=h.y=_n(o,this.top+w+d,this.bottom-n[h.line].height));const Y=l.x($);v(Y,N,E),$=HK(T,$+g+p,x?$+P:this.right,t.rtl),y(l.x($),N,E),x?h.x+=P+d:h.y+=k}),eM(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=qt(n.font),i=Rn(n.padding);if(!n.display)return;const o=qa(t.rtl,this.left,this.width),s=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=_n(t.align,d,this.right-f);else{const h=this.columnSizes.reduce((g,_)=>Math.max(g,_.height),0);u=c+_n(t.align,this.top,this.bottom-h-t.labels.padding-this._computeTitleHeight())}const p=_n(a,d,d+f);s.textAlign=o.textAlign(P_(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,Xs(s,n.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,n=qt(t.font),r=Rn(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Ro(t,this.left,this.right)&&Ro(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],Ro(t,i.left,i.left+i.width)&&Ro(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!TJ(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=RJ(i,r);i&&!o&&ct(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&ct(n.onHover,[t,r,this],this)}else r&&ct(n.onClick,[t,r,this],this)}}function TJ(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var uce={id:"legend",_element:uE,start(e,t,n){const r=e.legend=new uE({ctx:e.ctx,options:n,chart:e});_r.configure(e,r,n),_r.addBox(e,r)},stop(e){_r.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;_r.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o}}=e.legend.options;return e._getSortedDatasetMetas().map(s=>{const a=s.controller.getStyle(n?0:void 0),l=Rn(a.borderWidth);return{text:t[s.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!s.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:a.borderColor,pointStyle:r||a.pointStyle,rotation:a.rotation,textAlign:i||a.textAlign,borderRadius:0,datasetIndex:s.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class bM extends oi{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,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.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=vt(r.text)?r.text.length:1;this._padding=Rn(r.padding);const o=i*qt(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:s}=this,a=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=_n(a,r,o),d=n+t,c=o-r):(s.position==="left"?(u=r+t,d=_n(a,i,n),l=Mt*-.5):(u=o-t,d=_n(a,n,i),l=Mt*.5),c=i-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=qt(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Xs(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:P_(n.align),textBaseline:"middle",translation:[s,a]})}}function MJ(e,t){const n=new bM({ctx:e.ctx,options:t,chart:e});_r.configure(e,n,t),_r.addBox(e,n),e.titleBlock=n}var dce={id:"title",_element:bM,start(e,t,n){MJ(e,n)},stop(e){const t=e.titleBlock;_r.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;_r.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Wc={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const a=s.tooltipPosition();r+=a.x,i+=a.y,++o}}return{x:r/o,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,s,a;for(o=0,s=e.length;o<s;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Hv(t,c);u<i&&(i=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function ci(e,t){return t&&(vt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Li(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
208
  `)>-1?e.split(`
209
- `):e}function PJ(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:s,value:a}=o.getLabelAndValue(i);return{chart:e,label:s,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function dE(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:s,boxHeight:a}=t,l=qt(t.bodyFont),c=qt(t.titleFont),u=qt(t.footerFont),d=o.length,f=i.length,p=r.length,h=Rn(t.padding);let g=h.height,_=0,m=r.reduce((x,w)=>x+w.before.length+w.lines.length+w.after.length,0);if(m+=e.beforeBody.length+e.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const x=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=p*x+(m-p)*l.lineHeight+(m-1)*t.bodySpacing}f&&(g+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0;const y=function(x){_=Math.max(_,n.measureText(x).width+v)};return n.save(),n.font=c.string,et(e.title,y),n.font=l.string,et(e.beforeBody.concat(e.afterBody),y),v=t.displayColors?s+2+t.boxPadding:0,et(r,x=>{et(x.before,y),et(x.lines,y),et(x.after,y)}),v=0,n.font=u.string,et(e.footer,y),n.restore(),_+=h.width,{width:_,height:g}}function OJ(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function IJ(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function DJ(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=s-o/2&&(c="right"),IJ(c,e,t,n)&&(c="center"),c}function fE(e,t,n){const r=n.yAlign||t.yAlign||OJ(e,n);return{xAlign:n.xAlign||t.xAlign||DJ(e,t,n,r),yAlign:r}}function AJ(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function $J(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function pE(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=$s(s);let h=AJ(t,a);const g=$J(t,l,c);return l==="center"?a==="left"?h+=c:a==="right"&&(h-=c):a==="left"?h-=Math.max(u,f)+i:a==="right"&&(h+=Math.max(d,p)+i),{x:En(h,0,r.width-t.width),y:En(g,0,r.height-t.height)}}function df(e,t,n){const r=Rn(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function hE(e){return ci([],Li(e))}function NJ(e,t,n){return as(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function mE(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}class Qv extends oi{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new nM(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=NJ(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=r.beforeTitle.apply(this,[t]),o=r.title.apply(this,[t]),s=r.afterTitle.apply(this,[t]);let a=[];return a=ci(a,Li(i)),a=ci(a,Li(o)),a=ci(a,Li(s)),a}getBeforeBody(t,n){return hE(n.callbacks.beforeBody.apply(this,[t]))}getBody(t,n){const{callbacks:r}=n,i=[];return et(t,o=>{const s={before:[],lines:[],after:[]},a=mE(r,o);ci(s.before,Li(a.beforeLabel.call(this,o))),ci(s.lines,a.label.call(this,o)),ci(s.after,Li(a.afterLabel.call(this,o))),i.push(s)}),i}getAfterBody(t,n){return hE(n.callbacks.afterBody.apply(this,[t]))}getFooter(t,n){const{callbacks:r}=n,i=r.beforeFooter.apply(this,[t]),o=r.footer.apply(this,[t]),s=r.afterFooter.apply(this,[t]);let a=[];return a=ci(a,Li(i)),a=ci(a,Li(o)),a=ci(a,Li(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(PJ(this.chart,n[l]));return t.filter&&(a=a.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(a=a.sort((u,d)=>t.itemSort(u,d,r))),et(a,u=>{const d=mE(t.callbacks,u);i.push(d.labelColor.call(this,u)),o.push(d.labelPointStyle.call(this,u)),s.push(d.labelTextColor.call(this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=Wc[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=dE(this,r),c=Object.assign({},a,l),u=fE(this.chart,r,c),d=pE(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=$s(a),{x:f,y:p}=t,{width:h,height:g}=n;let _,m,v,y,x,w;return o==="center"?(x=p+g/2,i==="left"?(_=f,m=_-s,y=x+s,w=x-s):(_=f+h,m=_+s,y=x-s,w=x+s),v=_):(i==="left"?m=f+Math.max(l,u)+s:i==="right"?m=f+h-Math.max(c,d)-s:m=this.caretX,o==="top"?(y=p,x=y-s,_=m-s,v=m+s):(y=p+g,x=y+s,_=m+s,v=m-s),w=y),{x1:_,x2:m,x3:v,y1:y,y2:x,y3:w}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,l;if(o){const c=qa(r.rtl,this.x,this.width);for(t.x=df(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",s=qt(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;l<o;++l)n.fillText(i[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,l+1===o&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,i,o){const s=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:c,boxPadding:u}=o,d=qt(o.bodyFont),f=df(this,"left",o),p=i.x(f),h=l<d.lineHeight?(d.lineHeight-l)/2:0,g=n.y+h;if(o.usePointStyle){const _={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=i.leftForLtr(p,c)+c/2,v=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Gv(t,_,m,v),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Gv(t,_,m,v)}else{t.lineWidth=Ye(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const _=i.leftForLtr(p,c-u),m=i.leftForLtr(i.xPlus(p,1),c-u-2),v=$s(s.borderRadius);Object.values(v).some(y=>y!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Tu(t,{x:_,y:g,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Tu(t,{x:m,y:g+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(_,g,c,l),t.strokeRect(_,g,c,l),t.fillStyle=s.backgroundColor,t.fillRect(m,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=qt(r.bodyFont);let f=d.lineHeight,p=0;const h=qa(r.rtl,this.x,this.width),g=function(R){n.fillText(R,h.x(t.x+p),t.y+f/2),t.y+=f+o},_=h.textAlign(s);let m,v,y,x,w,k,E;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=df(this,_,r),n.fillStyle=r.bodyColor,et(this.beforeBody,g),p=a&&_!=="right"?s==="center"?c/2+u:c+2+u:0,x=0,k=i.length;x<k;++x){for(m=i[x],v=this.labelTextColors[x],n.fillStyle=v,et(m.before,g),y=m.lines,a&&y.length&&(this._drawColorBox(n,t,x,h,r),f=Math.max(d.lineHeight,l)),w=0,E=y.length;w<E;++w)g(y[w]),f=d.lineHeight;et(m.after,g)}p=0,f=d.lineHeight,et(this.afterBody,g),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let s,a;if(o){const l=qa(r.rtl,this.x,this.width);for(t.x=df(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",s=qt(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,a=0;a<o;++a)n.fillText(i[a],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:s}=this,{x:a,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:h}=$s(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+d,l),s==="top"&&this.drawCaret(t,n,r,i),n.lineTo(a+c-f,l),n.quadraticCurveTo(a+c,l,a+c,l+f),s==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(a+c,l+u-h),n.quadraticCurveTo(a+c,l+u,a+c-h,l+u),s==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+p,l+u),n.quadraticCurveTo(a,l+u,a,l+u-p),s==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=Wc[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=dE(this,t),l=Object.assign({},s,this._size),c=fE(n,t,l),u=pE(t,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Rn(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),Q2(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),eM(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!yp(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),l=n||!yp(s,o)||a;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=Wc[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}}Qv.positioners=Wc;var fce={id:"tooltip",_element:Qv,positioners:Wc,afterInit(e,t,n){n&&(e.tooltip=new Qv({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",n)===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Ai,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Ai,beforeBody:Ai,beforeLabel:Ai,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return tt(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Ai,afterBody:Ai,beforeFooter:Ai,footer:Ai,afterFooter:Ai}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const LJ=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function FJ(e,t,n,r){const i=e.indexOf(t);if(i===-1)return LJ(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const BJ=(e,t)=>e===null?null:En(Math.round(e),0,t);class ey extends ta{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(tt(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:FJ(r,t,Pe(n,t),this._addedLabels),BJ(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=n;s++)i.push({value:s});return i}getLabelForValue(t){const n=this.getLabels();return t>=0&&t<n.length?n[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}ey.id="category";ey.defaults={ticks:{callback:ey.prototype.getLabelForValue}};function zJ(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=o||1,h=u-1,{min:g,max:_}=t,m=!tt(s),v=!tt(a),y=!tt(c),x=(_-g)/(d+1);let w=yw((_-g)/h/p)*p,k,E,R,C;if(w<1e-14&&!m&&!v)return[{value:g},{value:_}];C=Math.ceil(_/w)-Math.floor(g/w),C>h&&(w=yw(C*w/h/p)*p),tt(l)||(k=Math.pow(10,l),w=Math.ceil(w*k)/k),i==="ticks"?(E=Math.floor(g/w)*w,R=Math.ceil(_/w)*w):(E=g,R=_),m&&v&&o&&tq((a-s)/o,w/1e3)?(C=Math.round(Math.min((a-s)/w,u)),w=(a-s)/C,E=s,R=a):y?(E=m?s:E,R=v?a:R,C=c-1,w=(R-E)/C):(C=(R-E)/w,Bc(C,Math.round(C),w/1e3)?C=Math.round(C):C=Math.ceil(C));const T=Math.max(_w(w),_w(E));k=Math.pow(10,tt(l)?T:l),E=Math.round(E*k)/k,R=Math.round(R*k)/k;let P=0;for(m&&(f&&E!==s?(n.push({value:s}),E<s&&P++,Bc(Math.round((E+P*w)*k)/k,s,gE(s,x,e))&&P++):E<s&&P++);P<C;++P)n.push({value:Math.round((E+P*w)*k)/k});return v&&f&&R!==a?n.length&&Bc(n[n.length-1].value,a,gE(a,x,e))?n[n.length-1].value=a:n.push({value:a}):(!v||R===a)&&n.push({value:R}),n}function gE(e,t,{horizontal:n,minRotation:r}){const i=Gr(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/o,s)}class Cp extends ta{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return tt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const s=l=>i=n?i:l,a=l=>o=r?o:l;if(t){const l=Ei(i),c=Ei(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(i===o){let l=1;(o>=Number.MAX_SAFE_INTEGER||i<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(o*.05)),a(o+l),t||s(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=zJ(i,o);return t.bounds==="ticks"&&$2(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return id(t,this.chart.options.locale,this.options.ticks.format)}}class xM extends Cp{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=dn(t)?t:0,this.max=dn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Gr(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}xM.id="linear";xM.defaults={ticks:{callback:Hh.formatters.numeric}};function vE(e){return e/Math.pow(10,Math.floor(gr(e)))===1}function UJ(e,t){const n=Math.floor(gr(t.max)),r=Math.ceil(t.max/Math.pow(10,n)),i=[];let o=dr(e.min,Math.pow(10,Math.floor(gr(t.min)))),s=Math.floor(gr(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do i.push({value:o,major:vE(o)}),++a,a===10&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l;while(s<n||s===n&&a<r);const c=dr(e.max,o);return i.push({value:c,major:vE(o)}),i}class SM extends ta{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Cp.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return dn(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=dn(t)?Math.max(0,t):null,this.max=dn(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=l=>r=t?r:l,s=l=>i=n?i:l,a=(l,c)=>Math.pow(10,Math.floor(gr(l))+c);r===i&&(r<=0?(o(1),s(10)):(o(a(r,-1)),s(a(i,1)))),r<=0&&o(a(i,-1)),i<=0&&s(a(r,1)),this._zero&&this.min!==this._suggestedMin&&r===a(this.min,0)&&o(a(r,-1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=UJ(n,this);return t.bounds==="ticks"&&$2(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":id(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=gr(t),this._valueRange=gr(this.max)-gr(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(gr(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}SM.id="logarithmic";SM.defaults={ticks:{callback:Hh.formatters.logarithmic,major:{enabled:!0}}};function ty(e){const t=e.ticks;if(t.display&&e.display){const n=Rn(t.backdropPadding);return Pe(t.font&&t.font.size,Fe.font.size)+n.height}return 0}function WJ(e,t,n){return n=vt(n)?n:[n],{w:Tq(e,t.string,n),h:n.length*t.lineHeight}}function yE(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function jJ(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?Mt/o:0;for(let l=0;l<o;l++){const c=s.setContext(e.getPointLabelContext(l));i[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+i[l],a),d=qt(c.font),f=WJ(e.ctx,d,e._pointLabels[l]);r[l]=f;const p=jr(e.getIndexAngle(l)+a),h=Math.round(I_(p)),g=yE(h,u.x,f.w,0,180),_=yE(h,u.y,f.h,90,270);HJ(n,t,p,g,_)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=YJ(e,r,i)}function HJ(e,t,n,r,i){const o=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let a=0,l=0;r.start<t.l?(a=(t.l-r.start)/o,e.l=Math.min(e.l,t.l-a)):r.end>t.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(l=(t.t-i.start)/s,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function YJ(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,s=ty(o)/2,a=e.drawingArea,l=o.pointLabels.centerPointLabels?Mt/i:0;for(let c=0;c<i;c++){const u=e.getPointPosition(c,a+s+n[c],l),d=Math.round(I_(jr(u.angle+Lt))),f=t[c],p=KJ(u.y,f.h,d),h=VJ(d),g=GJ(u.x,f.w,h);r.push({x:u.x,y:p,textAlign:h,left:g,top:p,right:g+f.w,bottom:p+f.h})}return r}function VJ(e){return e===0||e===180?"center":e<180?"left":"right"}function GJ(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function KJ(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function qJ(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=r.setContext(e.getPointLabelContext(i)),s=qt(o.font),{x:a,y:l,textAlign:c,left:u,top:d,right:f,bottom:p}=e._pointLabelItems[i],{backdropColor:h}=o;if(!tt(h)){const g=$s(o.borderRadius),_=Rn(o.backdropPadding);n.fillStyle=h;const m=u-_.left,v=d-_.top,y=f-u+_.width,x=p-d+_.height;Object.values(g).some(w=>w!==0)?(n.beginPath(),Tu(n,{x:m,y:v,w:y,h:x,radius:g}),n.fill()):n.fillRect(m,v,y,x)}Xs(n,e._pointLabels[i],a,l+s.lineHeight/2,s,{color:o.color,textAlign:c,textBaseline:"middle"})}}function wM(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,lt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s<r;s++)o=e.getPointPosition(s,t),i.lineTo(o.x,o.y)}}function XJ(e,t,n,r){const i=e.ctx,o=t.circular,{color:s,lineWidth:a}=t;!o&&!r||!s||!a||n<0||(i.save(),i.strokeStyle=s,i.lineWidth=a,i.setLineDash(t.borderDash),i.lineDashOffset=t.borderDashOffset,i.beginPath(),wM(e,n,o,r),i.closePath(),i.stroke(),i.restore())}function ZJ(e,t,n){return as(e,{label:n,index:t,type:"pointLabel"})}class Gh extends Cp{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Rn(ty(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=dn(t)&&!isNaN(t)?t:0,this.max=dn(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ty(this.options))}generateTickLabels(t){Cp.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=ct(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?jJ(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=lt/(this._pointLabels.length||1),r=this.options.startAngle||0;return jr(t*n+Gr(r))}getDistanceFromCenterForValue(t){if(tt(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(tt(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return ZJ(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-Lt+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:o}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),wM(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i}=n,o=this._pointLabels.length;let s,a,l;if(n.pointLabels.display&&qJ(this,o),i.display&&this.ticks.forEach((c,u)=>{if(u!==0){a=this.getDistanceFromCenterForValue(c.value);const d=i.setContext(this.getContext(u-1));XJ(this,d,a,o)}}),r.display){for(t.save(),s=o-1;s>=0;s--){const c=r.setContext(this.getPointLabelContext(s)),{color:u,lineWidth:d}=c;!d||!u||(t.lineWidth=d,t.strokeStyle=u,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,a=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),l=this.getPointPosition(s,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),u=qt(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=Rn(c.backdropPadding);t.fillRect(-s/2-d.left,-o-u.size/2-d.top,s+d.width,u.size+d.height)}Xs(t,a.label,0,-o,u,{color:c.color})}),t.restore()}drawTitle(){}}Gh.id="radialLinear";Gh.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Hh.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}};Gh.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Gh.descriptors={angleLines:{_fallback:"grid"}};const Kh={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Wn=Object.keys(Kh);function JJ(e,t){return e-t}function _E(e,t){if(tt(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),dn(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(ku(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function bE(e,t,n,r){const i=Wn.length;for(let o=Wn.indexOf(e);o<i-1;++o){const s=Kh[Wn[o]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(a*s.size))<=r)return Wn[o]}return Wn[i-1]}function QJ(e,t,n,r,i){for(let o=Wn.length-1;o>=Wn.indexOf(n);o--){const s=Wn[o];if(Kh[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return Wn[n?Wn.indexOf(n):0]}function eQ(e){for(let t=Wn.indexOf(e)+1,n=Wn.length;t<n;++t)if(Kh[Wn[t]].common)return Wn[t]}function xE(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=B_(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function tQ(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,l;for(a=o;a<=s;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function SE(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s<o;++s)a=t[s],i[a]=s,r.push({value:a,major:!1});return o===0||!n?r:tQ(e,r,i,n)}class qh extends ta{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n){const r=t.time||(t.time={}),i=this._adapter=new QX._date(t.adapters.date);Fc(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:_E(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:s,maxDefined:a}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!s||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=dn(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=dn(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,s=this.max,a=Bq(i,o,s);return this._unit=n.unit||(r.autoSkip?bE(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):QJ(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:eQ(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),SE(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=En(n,0,s),r=En(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||bE(o.minUnit,n,r,this._getLabelCapacity(n)),a=Pe(o.stepSize,1),l=s==="week"?o.isoWeekday:!1,c=ku(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const h=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,a,s),p++)xE(u,f,h);return(f===r||i.bounds==="ticks"||p===1)&&xE(u,f,h),Object.keys(u).sort((g,_)=>g-_).map(g=>+g)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.time.displayFormats,a=this._unit,l=this._majorUnit,c=a&&s[a],u=l&&s[l],d=r[n],f=l&&u&&d&&d.major,p=this._adapter.format(t,i||(f?u:c)),h=o.ticks.callback;return h?ct(h,[p,n,r],this):p}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=Gr(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),s=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*o+a*s,h:r*s+a*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,SE(this,[t],this._majorUnit),i),s=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(_E(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Y2(t.sort(JJ))}}qh.id="time";qh.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function ff(e,t,n){let r=0,i=e.length-1,o,s,a,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Ts(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Ts(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:l}=e[i]);const c=s-o;return c?a+(l-a)*(t-o)/c:a}class EM extends qh{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=ff(n,this.min),this._tableRange=ff(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,l,c,u;for(s=0,a=t.length;s<a;++s)c=t[s],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;s<a;++s)u=i[s+1],l=i[s-1],c=i[s],Math.round((u+l)/2)!==c&&o.push({time:c,pos:s/(a-1)});return o}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(ff(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return ff(this._table,r*this._tableRange+this._minPos,!0)}}EM.id="timeseries";EM.defaults=qh.defaults;const kM="label";function wE(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function nQ(e,t){Object.assign(e.options,t)}function CM(e,t){e.labels=t}function RM(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:kM;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?L({},i):(r.push(o),Object.assign(o,i),o)})}function rQ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:kM;const n={labels:[],datasets:[]};return CM(n,e.labels),RM(n,e.datasets,t),n}function iQ(e,t){let m=e,{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:l,plugins:c=[],fallbackContent:u,updateMode:d}=m,f=dm(m,["height","width","redraw","datasetIdKey","type","data","options","plugins","fallbackContent","updateMode"]);const p=b.exports.useRef(null),h=b.exports.useRef(),g=()=>{!p.current||(h.current=new Yh(p.current,{type:s,data:rQ(a,o),options:l&&L({},l),plugins:c}),wE(t,h.current))},_=()=>{wE(t,null),h.current&&(h.current.destroy(),h.current=null)};return b.exports.useEffect(()=>{!i&&h.current&&l&&nQ(h.current,l)},[i,l]),b.exports.useEffect(()=>{!i&&h.current&&CM(h.current.config.data,a.labels)},[i,a.labels]),b.exports.useEffect(()=>{!i&&h.current&&a.datasets&&RM(h.current.config.data,a.datasets,o)},[i,a.datasets]),b.exports.useEffect(()=>{!h.current||(i?(_(),setTimeout(g)):h.current.update(d))},[i,l,a.labels,a.datasets,d]),b.exports.useEffect(()=>{!h.current||(_(),setTimeout(g))},[s]),b.exports.useEffect(()=>(g(),()=>_()),[]),M("canvas",Ee(L({},Object.assign({ref:p,role:"img",height:n,width:r},f)),{children:u}))}const oQ=b.exports.forwardRef(iQ);function J_(e,t){return Yh.register(t),b.exports.forwardRef((n,r)=>M(oQ,L({},Object.assign({},n,{ref:r,type:e}))))}const pce=J_("line",sd),hce=J_("bar",jh),mce=J_("pie",V_);//! moment.js
210
  //! version : 2.29.4
211
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
212
  //! license : MIT
@@ -215,4 +215,4 @@ var TM;function ne(){return TM.apply(null,arguments)}function sQ(e){TM=e}functio
215
  [`+o+"] ";for(s in arguments[0])qe(arguments[0],s)&&(i+=s+": "+arguments[0][s]+", ");i=i.slice(0,-2)}else i=arguments[o];r.push(i)}PM(e+`
216
  Arguments: `+Array.prototype.slice.call(r).join("")+`
217
  `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var kE={};function OM(e,t){ne.deprecationHandler!=null&&ne.deprecationHandler(e,t),kE[e]||(PM(t),kE[e]=!0)}ne.suppressDeprecationWarnings=!1;ne.deprecationHandler=null;function Mi(e){return typeof Function!="undefined"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function lQ(e){var t,n;for(n in e)qe(e,n)&&(t=e[n],Mi(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function ry(e,t){var n=Po({},e),r;for(r in t)qe(t,r)&&(Ls(e[r])&&Ls(t[r])?(n[r]={},Po(n[r],e[r]),Po(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)qe(e,r)&&!qe(t,r)&&Ls(e[r])&&(n[r]=Po({},n[r]));return n}function n1(e){e!=null&&this.set(e)}var iy;Object.keys?iy=Object.keys:iy=function(e){var t,n=[];for(t in e)qe(e,t)&&n.push(t);return n};var cQ={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function uQ(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Mi(r)?r.call(t,n):r}function Ci(e,t,n){var r=""+Math.abs(e),i=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var r1=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,pf=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Eg={},Xa={};function _e(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(Xa[e]=i),t&&(Xa[t[0]]=function(){return Ci(i.apply(this,arguments),t[1],t[2])}),n&&(Xa[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function dQ(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function fQ(e){var t=e.match(r1),n,r;for(n=0,r=t.length;n<r;n++)Xa[t[n]]?t[n]=Xa[t[n]]:t[n]=dQ(t[n]);return function(i){var o="",s;for(s=0;s<r;s++)o+=Mi(t[s])?t[s].call(i,e):t[s];return o}}function $f(e,t){return e.isValid()?(t=IM(t,e.localeData()),Eg[t]=Eg[t]||fQ(t),Eg[t](e)):e.localeData().invalidDate()}function IM(e,t){var n=5;function r(i){return t.longDateFormat(i)||i}for(pf.lastIndex=0;n>=0&&pf.test(e);)e=e.replace(pf,r),pf.lastIndex=0,n-=1;return e}var pQ={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function hQ(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(r1).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var mQ="Invalid date";function gQ(){return this._invalidDate}var vQ="%d",yQ=/\d{1,2}/;function _Q(e){return this._ordinal.replace("%d",e)}var bQ={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function xQ(e,t,n,r){var i=this._relativeTime[n];return Mi(i)?i(e,t,n,r):i.replace(/%d/i,e)}function SQ(e,t){var n=this._relativeTime[e>0?"future":"past"];return Mi(n)?n(t):n.replace(/%s/i,t)}var jc={};function Tn(e,t){var n=e.toLowerCase();jc[n]=jc[n+"s"]=jc[t]=e}function Dr(e){return typeof e=="string"?jc[e]||jc[e.toLowerCase()]:void 0}function i1(e){var t={},n,r;for(r in e)qe(e,r)&&(n=Dr(r),n&&(t[n]=e[r]));return t}var DM={};function Mn(e,t){DM[e]=t}function wQ(e){var t=[],n;for(n in e)qe(e,n)&&t.push({unit:n,priority:DM[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Zh(e){return e%4===0&&e%100!==0||e%400===0}function mr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ie(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=mr(t)),n}function Il(e,t){return function(n){return n!=null?(AM(this,e,n),ne.updateOffset(this,t),this):Rp(this,e)}}function Rp(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function AM(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Zh(e.year())&&e.month()===1&&e.date()===29?(n=Ie(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),rm(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function EQ(e){return e=Dr(e),Mi(this[e])?this[e]():this}function kQ(e,t){if(typeof e=="object"){e=i1(e);var n=wQ(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=Dr(e),Mi(this[e]))return this[e](t);return this}var $M=/\d/,cr=/\d\d/,NM=/\d{3}/,o1=/\d{4}/,Jh=/[+-]?\d{6}/,xt=/\d\d?/,LM=/\d\d\d\d?/,FM=/\d\d\d\d\d\d?/,Qh=/\d{1,3}/,s1=/\d{1,4}/,em=/[+-]?\d{1,6}/,Dl=/\d+/,tm=/[+-]?\d+/,CQ=/Z|[+-]\d\d:?\d\d/gi,nm=/Z|[+-]\d\d(?::?\d\d)?/gi,RQ=/[+-]?\d+(\.\d{1,3})?/,ud=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Tp;Tp={};function ie(e,t,n){Tp[e]=Mi(t)?t:function(r,i){return r&&n?n:t}}function TQ(e,t){return qe(Tp,e)?Tp[e](t._strict,t._locale):new RegExp(MQ(e))}function MQ(e){return er(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,o){return n||r||i||o}))}function er(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var oy={};function ot(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),to(t)&&(r=function(o,s){s[t]=Ie(o)}),i=e.length,n=0;n<i;n++)oy[e[n]]=r}function dd(e,t){ot(e,function(n,r,i,o){i._w=i._w||{},t(n,i._w,i,o)})}function PQ(e,t,n){t!=null&&qe(oy,e)&&oy[e](t,n._a,n,e)}var kn=0,Gi=1,vi=2,Xt=3,Kr=4,Ki=5,Ms=6,OQ=7,IQ=8;function DQ(e,t){return(e%t+t)%t}var Bt;Array.prototype.indexOf?Bt=Array.prototype.indexOf:Bt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function rm(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=DQ(t,12);return e+=(t-n)/12,n===1?Zh(e)?29:28:31-n%7%2}_e("M",["MM",2],"Mo",function(){return this.month()+1});_e("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});_e("MMMM",0,0,function(e){return this.localeData().months(this,e)});Tn("month","M");Mn("month",8);ie("M",xt);ie("MM",xt,cr);ie("MMM",function(e,t){return t.monthsShortRegex(e)});ie("MMMM",function(e,t){return t.monthsRegex(e)});ot(["M","MM"],function(e,t){t[Gi]=Ie(e)-1});ot(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i!=null?t[Gi]=i:ke(n).invalidMonth=e});var AQ="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),BM="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),zM=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,$Q=ud,NQ=ud;function LQ(e,t){return e?ei(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||zM).test(t)?"format":"standalone"][e.month()]:ei(this._months)?this._months:this._months.standalone}function FQ(e,t){return e?ei(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[zM.test(t)?"format":"standalone"][e.month()]:ei(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function BQ(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=Ti([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?t==="MMM"?(i=Bt.call(this._shortMonthsParse,s),i!==-1?i:null):(i=Bt.call(this._longMonthsParse,s),i!==-1?i:null):t==="MMM"?(i=Bt.call(this._shortMonthsParse,s),i!==-1?i:(i=Bt.call(this._longMonthsParse,s),i!==-1?i:null)):(i=Bt.call(this._longMonthsParse,s),i!==-1?i:(i=Bt.call(this._shortMonthsParse,s),i!==-1?i:null))}function zQ(e,t,n){var r,i,o;if(this._monthsParseExact)return BQ.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Ti([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function UM(e,t){var n;if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Ie(t);else if(t=e.localeData().monthsParse(t),!to(t))return e}return n=Math.min(e.date(),rm(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function WM(e){return e!=null?(UM(this,e),ne.updateOffset(this,!0),this):Rp(this,"Month")}function UQ(){return rm(this.year(),this.month())}function WQ(e){return this._monthsParseExact?(qe(this,"_monthsRegex")||jM.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(qe(this,"_monthsShortRegex")||(this._monthsShortRegex=$Q),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function jQ(e){return this._monthsParseExact?(qe(this,"_monthsRegex")||jM.call(this),e?this._monthsStrictRegex:this._monthsRegex):(qe(this,"_monthsRegex")||(this._monthsRegex=NQ),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function jM(){function e(s,a){return a.length-s.length}var t=[],n=[],r=[],i,o;for(i=0;i<12;i++)o=Ti([2e3,i]),t.push(this.monthsShort(o,"")),n.push(this.months(o,"")),r.push(this.months(o,"")),r.push(this.monthsShort(o,""));for(t.sort(e),n.sort(e),r.sort(e),i=0;i<12;i++)t[i]=er(t[i]),n[i]=er(n[i]);for(i=0;i<24;i++)r[i]=er(r[i]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}_e("Y",0,0,function(){var e=this.year();return e<=9999?Ci(e,4):"+"+e});_e(0,["YY",2],0,function(){return this.year()%100});_e(0,["YYYY",4],0,"year");_e(0,["YYYYY",5],0,"year");_e(0,["YYYYYY",6,!0],0,"year");Tn("year","y");Mn("year",1);ie("Y",tm);ie("YY",xt,cr);ie("YYYY",s1,o1);ie("YYYYY",em,Jh);ie("YYYYYY",em,Jh);ot(["YYYYY","YYYYYY"],kn);ot("YYYY",function(e,t){t[kn]=e.length===2?ne.parseTwoDigitYear(e):Ie(e)});ot("YY",function(e,t){t[kn]=ne.parseTwoDigitYear(e)});ot("Y",function(e,t){t[kn]=parseInt(e,10)});function Hc(e){return Zh(e)?366:365}ne.parseTwoDigitYear=function(e){return Ie(e)+(Ie(e)>68?1900:2e3)};var HM=Il("FullYear",!0);function HQ(){return Zh(this.year())}function YQ(e,t,n,r,i,o,s){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,i,o,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,i,o,s),a}function Pu(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Mp(e,t,n){var r=7+t-n,i=(7+Pu(e,0,r).getUTCDay()-t)%7;return-i+r-1}function YM(e,t,n,r,i){var o=(7+n-r)%7,s=Mp(e,r,i),a=1+7*(t-1)+o+s,l,c;return a<=0?(l=e-1,c=Hc(l)+a):a>Hc(e)?(l=e+1,c=a-Hc(e)):(l=e,c=a),{year:l,dayOfYear:c}}function Ou(e,t,n){var r=Mp(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,o,s;return i<1?(s=e.year()-1,o=i+Xi(s,t,n)):i>Xi(e.year(),t,n)?(o=i-Xi(e.year(),t,n),s=e.year()+1):(s=e.year(),o=i),{week:o,year:s}}function Xi(e,t,n){var r=Mp(e,t,n),i=Mp(e+1,t,n);return(Hc(e)-r+i)/7}_e("w",["ww",2],"wo","week");_e("W",["WW",2],"Wo","isoWeek");Tn("week","w");Tn("isoWeek","W");Mn("week",5);Mn("isoWeek",5);ie("w",xt);ie("ww",xt,cr);ie("W",xt);ie("WW",xt,cr);dd(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Ie(e)});function VQ(e){return Ou(e,this._week.dow,this._week.doy).week}var GQ={dow:0,doy:6};function KQ(){return this._week.dow}function qQ(){return this._week.doy}function XQ(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function ZQ(e){var t=Ou(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}_e("d",0,"do","day");_e("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});_e("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});_e("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});_e("e",0,0,"weekday");_e("E",0,0,"isoWeekday");Tn("day","d");Tn("weekday","e");Tn("isoWeekday","E");Mn("day",11);Mn("weekday",11);Mn("isoWeekday",11);ie("d",xt);ie("e",xt);ie("E",xt);ie("dd",function(e,t){return t.weekdaysMinRegex(e)});ie("ddd",function(e,t){return t.weekdaysShortRegex(e)});ie("dddd",function(e,t){return t.weekdaysRegex(e)});dd(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:ke(n).invalidWeekday=e});dd(["d","e","E"],function(e,t,n,r){t[r]=Ie(e)});function JQ(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function QQ(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function a1(e,t){return e.slice(t,7).concat(e.slice(0,t))}var eee="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),VM="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),tee="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),nee=ud,ree=ud,iee=ud;function oee(e,t){var n=ei(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?a1(n,this._week.dow):e?n[e.day()]:n}function see(e){return e===!0?a1(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function aee(e){return e===!0?a1(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function lee(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=Ti([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(i=Bt.call(this._weekdaysParse,s),i!==-1?i:null):t==="ddd"?(i=Bt.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=Bt.call(this._minWeekdaysParse,s),i!==-1?i:null):t==="dddd"?(i=Bt.call(this._weekdaysParse,s),i!==-1||(i=Bt.call(this._shortWeekdaysParse,s),i!==-1)?i:(i=Bt.call(this._minWeekdaysParse,s),i!==-1?i:null)):t==="ddd"?(i=Bt.call(this._shortWeekdaysParse,s),i!==-1||(i=Bt.call(this._weekdaysParse,s),i!==-1)?i:(i=Bt.call(this._minWeekdaysParse,s),i!==-1?i:null)):(i=Bt.call(this._minWeekdaysParse,s),i!==-1||(i=Bt.call(this._weekdaysParse,s),i!==-1)?i:(i=Bt.call(this._shortWeekdaysParse,s),i!==-1?i:null))}function cee(e,t,n){var r,i,o;if(this._weekdaysParseExact)return lee.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Ti([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function uee(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=JQ(e,this.localeData()),this.add(e-t,"d")):t}function dee(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function fee(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=QQ(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function pee(e){return this._weekdaysParseExact?(qe(this,"_weekdaysRegex")||l1.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(qe(this,"_weekdaysRegex")||(this._weekdaysRegex=nee),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function hee(e){return this._weekdaysParseExact?(qe(this,"_weekdaysRegex")||l1.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(qe(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ree),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function mee(e){return this._weekdaysParseExact?(qe(this,"_weekdaysRegex")||l1.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(qe(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=iee),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function l1(){function e(u,d){return d.length-u.length}var t=[],n=[],r=[],i=[],o,s,a,l,c;for(o=0;o<7;o++)s=Ti([2e3,1]).day(o),a=er(this.weekdaysMin(s,"")),l=er(this.weekdaysShort(s,"")),c=er(this.weekdays(s,"")),t.push(a),n.push(l),r.push(c),i.push(a),i.push(l),i.push(c);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function c1(){return this.hours()%12||12}function gee(){return this.hours()||24}_e("H",["HH",2],0,"hour");_e("h",["hh",2],0,c1);_e("k",["kk",2],0,gee);_e("hmm",0,0,function(){return""+c1.apply(this)+Ci(this.minutes(),2)});_e("hmmss",0,0,function(){return""+c1.apply(this)+Ci(this.minutes(),2)+Ci(this.seconds(),2)});_e("Hmm",0,0,function(){return""+this.hours()+Ci(this.minutes(),2)});_e("Hmmss",0,0,function(){return""+this.hours()+Ci(this.minutes(),2)+Ci(this.seconds(),2)});function GM(e,t){_e(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}GM("a",!0);GM("A",!1);Tn("hour","h");Mn("hour",13);function KM(e,t){return t._meridiemParse}ie("a",KM);ie("A",KM);ie("H",xt);ie("h",xt);ie("k",xt);ie("HH",xt,cr);ie("hh",xt,cr);ie("kk",xt,cr);ie("hmm",LM);ie("hmmss",FM);ie("Hmm",LM);ie("Hmmss",FM);ot(["H","HH"],Xt);ot(["k","kk"],function(e,t,n){var r=Ie(e);t[Xt]=r===24?0:r});ot(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ot(["h","hh"],function(e,t,n){t[Xt]=Ie(e),ke(n).bigHour=!0});ot("hmm",function(e,t,n){var r=e.length-2;t[Xt]=Ie(e.substr(0,r)),t[Kr]=Ie(e.substr(r)),ke(n).bigHour=!0});ot("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Xt]=Ie(e.substr(0,r)),t[Kr]=Ie(e.substr(r,2)),t[Ki]=Ie(e.substr(i)),ke(n).bigHour=!0});ot("Hmm",function(e,t,n){var r=e.length-2;t[Xt]=Ie(e.substr(0,r)),t[Kr]=Ie(e.substr(r))});ot("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Xt]=Ie(e.substr(0,r)),t[Kr]=Ie(e.substr(r,2)),t[Ki]=Ie(e.substr(i))});function vee(e){return(e+"").toLowerCase().charAt(0)==="p"}var yee=/[ap]\.?m?\.?/i,_ee=Il("Hours",!0);function bee(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var qM={calendar:cQ,longDateFormat:pQ,invalidDate:mQ,ordinal:vQ,dayOfMonthOrdinalParse:yQ,relativeTime:bQ,months:AQ,monthsShort:BM,week:GQ,weekdays:eee,weekdaysMin:tee,weekdaysShort:VM,meridiemParse:yee},Ct={},oc={},Iu;function xee(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function CE(e){return e&&e.toLowerCase().replace("_","-")}function See(e){for(var t=0,n,r,i,o;t<e.length;){for(o=CE(e[t]).split("-"),n=o.length,r=CE(e[t+1]),r=r?r.split("-"):null;n>0;){if(i=im(o.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&xee(o,r)>=n-1)break;n--}t++}return Iu}function wee(e){return e.match("^[^/\\\\]*$")!=null}function im(e){var t=null,n;if(Ct[e]===void 0&&typeof module!="undefined"&&module&&module.exports&&wee(e))try{t=Iu._abbr,n=require,n("./locale/"+e),Ho(t)}catch{Ct[e]=null}return Ct[e]}function Ho(e,t){var n;return e&&(Fn(t)?n=so(e):n=u1(e,t),n?Iu=n:typeof console!="undefined"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Iu._abbr}function u1(e,t){if(t!==null){var n,r=qM;if(t.abbr=e,Ct[e]!=null)OM("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Ct[e]._config;else if(t.parentLocale!=null)if(Ct[t.parentLocale]!=null)r=Ct[t.parentLocale]._config;else if(n=im(t.parentLocale),n!=null)r=n._config;else return oc[t.parentLocale]||(oc[t.parentLocale]=[]),oc[t.parentLocale].push({name:e,config:t}),null;return Ct[e]=new n1(ry(r,t)),oc[e]&&oc[e].forEach(function(i){u1(i.name,i.config)}),Ho(e),Ct[e]}else return delete Ct[e],null}function Eee(e,t){if(t!=null){var n,r,i=qM;Ct[e]!=null&&Ct[e].parentLocale!=null?Ct[e].set(ry(Ct[e]._config,t)):(r=im(e),r!=null&&(i=r._config),t=ry(i,t),r==null&&(t.abbr=e),n=new n1(t),n.parentLocale=Ct[e],Ct[e]=n),Ho(e)}else Ct[e]!=null&&(Ct[e].parentLocale!=null?(Ct[e]=Ct[e].parentLocale,e===Ho()&&Ho(e)):Ct[e]!=null&&delete Ct[e]);return Ct[e]}function so(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Iu;if(!ei(e)){if(t=im(e),t)return t;e=[e]}return See(e)}function kee(){return iy(Ct)}function d1(e){var t,n=e._a;return n&&ke(e).overflow===-2&&(t=n[Gi]<0||n[Gi]>11?Gi:n[vi]<1||n[vi]>rm(n[kn],n[Gi])?vi:n[Xt]<0||n[Xt]>24||n[Xt]===24&&(n[Kr]!==0||n[Ki]!==0||n[Ms]!==0)?Xt:n[Kr]<0||n[Kr]>59?Kr:n[Ki]<0||n[Ki]>59?Ki:n[Ms]<0||n[Ms]>999?Ms:-1,ke(e)._overflowDayOfYear&&(t<kn||t>vi)&&(t=vi),ke(e)._overflowWeeks&&t===-1&&(t=OQ),ke(e)._overflowWeekday&&t===-1&&(t=IQ),ke(e).overflow=t),e}var Cee=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ree=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Tee=/Z|[+-]\d\d(?::?\d\d)?/,hf=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kg=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mee=/^\/?Date\((-?\d+)/i,Pee=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Oee={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function XM(e){var t,n,r=e._i,i=Cee.exec(r)||Ree.exec(r),o,s,a,l,c=hf.length,u=kg.length;if(i){for(ke(e).iso=!0,t=0,n=c;t<n;t++)if(hf[t][1].exec(i[1])){s=hf[t][0],o=hf[t][2]!==!1;break}if(s==null){e._isValid=!1;return}if(i[3]){for(t=0,n=u;t<n;t++)if(kg[t][1].exec(i[3])){a=(i[2]||" ")+kg[t][0];break}if(a==null){e._isValid=!1;return}}if(!o&&a!=null){e._isValid=!1;return}if(i[4])if(Tee.exec(i[4]))l="Z";else{e._isValid=!1;return}e._f=s+(a||"")+(l||""),p1(e)}else e._isValid=!1}function Iee(e,t,n,r,i,o){var s=[Dee(e),BM.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&s.push(parseInt(o,10)),s}function Dee(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Aee(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function $ee(e,t,n){if(e){var r=VM.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return ke(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Nee(e,t,n){if(e)return Oee[e];if(t)return 0;var r=parseInt(n,10),i=r%100,o=(r-i)/100;return o*60+i}function ZM(e){var t=Pee.exec(Aee(e._i)),n;if(t){if(n=Iee(t[4],t[3],t[2],t[5],t[6],t[7]),!$ee(t[1],n,e))return;e._a=n,e._tzm=Nee(t[8],t[9],t[10]),e._d=Pu.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),ke(e).rfc2822=!0}else e._isValid=!1}function Lee(e){var t=Mee.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(XM(e),e._isValid===!1)delete e._isValid;else return;if(ZM(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ne.createFromInputFallback(e)}ne.createFromInputFallback=Ir("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function ba(e,t,n){return e!=null?e:t!=null?t:n}function Fee(e){var t=new Date(ne.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function f1(e){var t,n,r=[],i,o,s;if(!e._d){for(i=Fee(e),e._w&&e._a[vi]==null&&e._a[Gi]==null&&Bee(e),e._dayOfYear!=null&&(s=ba(e._a[kn],i[kn]),(e._dayOfYear>Hc(s)||e._dayOfYear===0)&&(ke(e)._overflowDayOfYear=!0),n=Pu(s,0,e._dayOfYear),e._a[Gi]=n.getUTCMonth(),e._a[vi]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Xt]===24&&e._a[Kr]===0&&e._a[Ki]===0&&e._a[Ms]===0&&(e._nextDay=!0,e._a[Xt]=0),e._d=(e._useUTC?Pu:YQ).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Xt]=24),e._w&&typeof e._w.d!="undefined"&&e._w.d!==o&&(ke(e).weekdayMismatch=!0)}}function Bee(e){var t,n,r,i,o,s,a,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,s=4,n=ba(t.GG,e._a[kn],Ou(_t(),1,4).year),r=ba(t.W,1),i=ba(t.E,1),(i<1||i>7)&&(l=!0)):(o=e._locale._week.dow,s=e._locale._week.doy,c=Ou(_t(),o,s),n=ba(t.gg,e._a[kn],c.year),r=ba(t.w,c.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>Xi(n,o,s)?ke(e)._overflowWeeks=!0:l!=null?ke(e)._overflowWeekday=!0:(a=YM(n,r,i,o,s),e._a[kn]=a.year,e._dayOfYear=a.dayOfYear)}ne.ISO_8601=function(){};ne.RFC_2822=function(){};function p1(e){if(e._f===ne.ISO_8601){XM(e);return}if(e._f===ne.RFC_2822){ZM(e);return}e._a=[],ke(e).empty=!0;var t=""+e._i,n,r,i,o,s,a=t.length,l=0,c,u;for(i=IM(e._f,e._locale).match(r1)||[],u=i.length,n=0;n<u;n++)o=i[n],r=(t.match(TQ(o,e))||[])[0],r&&(s=t.substr(0,t.indexOf(r)),s.length>0&&ke(e).unusedInput.push(s),t=t.slice(t.indexOf(r)+r.length),l+=r.length),Xa[o]?(r?ke(e).empty=!1:ke(e).unusedTokens.push(o),PQ(o,r,e)):e._strict&&!r&&ke(e).unusedTokens.push(o);ke(e).charsLeftOver=a-l,t.length>0&&ke(e).unusedInput.push(t),e._a[Xt]<=12&&ke(e).bigHour===!0&&e._a[Xt]>0&&(ke(e).bigHour=void 0),ke(e).parsedDateParts=e._a.slice(0),ke(e).meridiem=e._meridiem,e._a[Xt]=zee(e._locale,e._a[Xt],e._meridiem),c=ke(e).era,c!==null&&(e._a[kn]=e._locale.erasConvertYear(c,e._a[kn])),f1(e),d1(e)}function zee(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Uee(e){var t,n,r,i,o,s,a=!1,l=e._f.length;if(l===0){ke(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<l;i++)o=0,s=!1,t=t1({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],p1(t),e1(t)&&(s=!0),o+=ke(t).charsLeftOver,o+=ke(t).unusedTokens.length*10,ke(t).score=o,a?o<r&&(r=o,n=t):(r==null||o<r||s)&&(r=o,n=t,s&&(a=!0));Po(e,n||t)}function Wee(e){if(!e._d){var t=i1(e._i),n=t.day===void 0?t.date:t.day;e._a=MM([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),f1(e)}}function jee(e){var t=new cd(d1(JM(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function JM(e){var t=e._i,n=e._f;return e._locale=e._locale||so(e._l),t===null||n===void 0&&t===""?Xh({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),ti(t)?new cd(d1(t)):(ld(t)?e._d=t:ei(n)?Uee(e):n?p1(e):Hee(e),e1(e)||(e._d=null),e))}function Hee(e){var t=e._i;Fn(t)?e._d=new Date(ne.now()):ld(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Lee(e):ei(t)?(e._a=MM(t.slice(0),function(n){return parseInt(n,10)}),f1(e)):Ls(t)?Wee(e):to(t)?e._d=new Date(t):ne.createFromInputFallback(e)}function QM(e,t,n,r,i){var o={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Ls(e)&&Q_(e)||ei(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=i,o._l=n,o._i=e,o._f=t,o._strict=r,jee(o)}function _t(e,t,n,r){return QM(e,t,n,r,!1)}var Yee=Ir("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=_t.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Xh()}),Vee=Ir("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=_t.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Xh()});function eP(e,t){var n,r;if(t.length===1&&ei(t[0])&&(t=t[0]),!t.length)return _t();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function Gee(){var e=[].slice.call(arguments,0);return eP("isBefore",e)}function Kee(){var e=[].slice.call(arguments,0);return eP("isAfter",e)}var qee=function(){return Date.now?Date.now():+new Date},sc=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Xee(e){var t,n=!1,r,i=sc.length;for(t in e)if(qe(e,t)&&!(Bt.call(sc,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[sc[r]]){if(n)return!1;parseFloat(e[sc[r]])!==Ie(e[sc[r]])&&(n=!0)}return!0}function Zee(){return this._isValid}function Jee(){return si(NaN)}function om(e){var t=i1(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,s=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=Xee(t),this._milliseconds=+u+c*1e3+l*6e4+a*1e3*60*60,this._days=+s+o*7,this._months=+i+r*3+n*12,this._data={},this._locale=so(),this._bubble()}function Nf(e){return e instanceof om}function sy(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Qee(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),o=0,s;for(s=0;s<r;s++)(n&&e[s]!==t[s]||!n&&Ie(e[s])!==Ie(t[s]))&&o++;return o+i}function tP(e,t){_e(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Ci(~~(n/60),2)+t+Ci(~~n%60,2)})}tP("Z",":");tP("ZZ","");ie("Z",nm);ie("ZZ",nm);ot(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=h1(nm,e)});var ete=/([\+\-]|\d\d)/gi;function h1(e,t){var n=(t||"").match(e),r,i,o;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(ete)||["-",0,0],o=+(i[1]*60)+Ie(i[2]),o===0?0:i[0]==="+"?o:-o)}function m1(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(ti(e)||ld(e)?e.valueOf():_t(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),ne.updateOffset(n,!1),n):_t(e).local()}function ay(e){return-Math.round(e._d.getTimezoneOffset())}ne.updateOffset=function(){};function tte(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=h1(nm,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(i=ay(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?iP(this,si(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ne.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:ay(this)}function nte(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function rte(e){return this.utcOffset(0,e)}function ite(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(ay(this),"m")),this}function ote(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=h1(CQ,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function ste(e){return this.isValid()?(e=e?_t(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function ate(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function lte(){if(!Fn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return t1(e,this),e=JM(e),e._a?(t=e._isUTC?Ti(e._a):_t(e._a),this._isDSTShifted=this.isValid()&&Qee(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function cte(){return this.isValid()?!this._isUTC:!1}function ute(){return this.isValid()?this._isUTC:!1}function nP(){return this.isValid()?this._isUTC&&this._offset===0:!1}var dte=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,fte=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function si(e,t){var n=e,r=null,i,o,s;return Nf(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:to(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=dte.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:Ie(r[vi])*i,h:Ie(r[Xt])*i,m:Ie(r[Kr])*i,s:Ie(r[Ki])*i,ms:Ie(sy(r[Ms]*1e3))*i}):(r=fte.exec(e))?(i=r[1]==="-"?-1:1,n={y:hs(r[2],i),M:hs(r[3],i),w:hs(r[4],i),d:hs(r[5],i),h:hs(r[6],i),m:hs(r[7],i),s:hs(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(s=pte(_t(n.from),_t(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),o=new om(n),Nf(e)&&qe(e,"_locale")&&(o._locale=e._locale),Nf(e)&&qe(e,"_isValid")&&(o._isValid=e._isValid),o}si.fn=om.prototype;si.invalid=Jee;function hs(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function RE(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function pte(e,t){var n;return e.isValid()&&t.isValid()?(t=m1(t,e),e.isBefore(t)?n=RE(e,t):(n=RE(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function rP(e,t){return function(n,r){var i,o;return r!==null&&!isNaN(+r)&&(OM(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),i=si(n,r),iP(this,i,e),this}}function iP(e,t,n,r){var i=t._milliseconds,o=sy(t._days),s=sy(t._months);!e.isValid()||(r=r==null?!0:r,s&&UM(e,Rp(e,"Month")+s*n),o&&AM(e,"Date",Rp(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&ne.updateOffset(e,o||s))}var hte=rP(1,"add"),mte=rP(-1,"subtract");function oP(e){return typeof e=="string"||e instanceof String}function gte(e){return ti(e)||ld(e)||oP(e)||to(e)||yte(e)||vte(e)||e===null||e===void 0}function vte(e){var t=Ls(e)&&!Q_(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,o,s=r.length;for(i=0;i<s;i+=1)o=r[i],n=n||qe(e,o);return t&&n}function yte(e){var t=ei(e),n=!1;return t&&(n=e.filter(function(r){return!to(r)&&oP(e)}).length===0),t&&n}function _te(e){var t=Ls(e)&&!Q_(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,o;for(i=0;i<r.length;i+=1)o=r[i],n=n||qe(e,o);return t&&n}function bte(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function xte(e,t){arguments.length===1&&(arguments[0]?gte(arguments[0])?(e=arguments[0],t=void 0):_te(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||_t(),r=m1(n,this).startOf("day"),i=ne.calendarFormat(this,r)||"sameElse",o=t&&(Mi(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,_t(n)))}function Ste(){return new cd(this)}function wte(e,t){var n=ti(e)?e:_t(e);return this.isValid()&&n.isValid()?(t=Dr(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function Ete(e,t){var n=ti(e)?e:_t(e);return this.isValid()&&n.isValid()?(t=Dr(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function kte(e,t,n,r){var i=ti(e)?e:_t(e),o=ti(t)?t:_t(t);return this.isValid()&&i.isValid()&&o.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(o,n):!this.isAfter(o,n))):!1}function Cte(e,t){var n=ti(e)?e:_t(e),r;return this.isValid()&&n.isValid()?(t=Dr(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Rte(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Tte(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Mte(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(r=m1(e,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=Dr(t),t){case"year":o=Lf(this,r)/12;break;case"month":o=Lf(this,r);break;case"quarter":o=Lf(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:mr(o)}function Lf(e,t){if(e.date()<t.date())return-Lf(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),i,o;return t-r<0?(i=e.clone().add(n-1,"months"),o=(t-r)/(r-i)):(i=e.clone().add(n+1,"months"),o=(t-r)/(i-r)),-(n+o)||0}ne.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";ne.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Pte(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ote(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?$f(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Mi(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",$f(n,"Z")):$f(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ite(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+i+o)}function Dte(e){e||(e=this.isUtc()?ne.defaultFormatUtc:ne.defaultFormat);var t=$f(this,e);return this.localeData().postformat(t)}function Ate(e,t){return this.isValid()&&(ti(e)&&e.isValid()||_t(e).isValid())?si({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function $te(e){return this.from(_t(),e)}function Nte(e,t){return this.isValid()&&(ti(e)&&e.isValid()||_t(e).isValid())?si({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Lte(e){return this.to(_t(),e)}function sP(e){var t;return e===void 0?this._locale._abbr:(t=so(e),t!=null&&(this._locale=t),this)}var aP=Ir("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function lP(){return this._locale}var Pp=1e3,Za=60*Pp,Op=60*Za,cP=(365*400+97)*24*Op;function Ja(e,t){return(e%t+t)%t}function uP(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-cP:new Date(e,t,n).valueOf()}function dP(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-cP:Date.UTC(e,t,n)}function Fte(e){var t,n;if(e=Dr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?dP:uP,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ja(t+(this._isUTC?0:this.utcOffset()*Za),Op);break;case"minute":t=this._d.valueOf(),t-=Ja(t,Za);break;case"second":t=this._d.valueOf(),t-=Ja(t,Pp);break}return this._d.setTime(t),ne.updateOffset(this,!0),this}function Bte(e){var t,n;if(e=Dr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?dP:uP,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Op-Ja(t+(this._isUTC?0:this.utcOffset()*Za),Op)-1;break;case"minute":t=this._d.valueOf(),t+=Za-Ja(t,Za)-1;break;case"second":t=this._d.valueOf(),t+=Pp-Ja(t,Pp)-1;break}return this._d.setTime(t),ne.updateOffset(this,!0),this}function zte(){return this._d.valueOf()-(this._offset||0)*6e4}function Ute(){return Math.floor(this.valueOf()/1e3)}function Wte(){return new Date(this.valueOf())}function jte(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Hte(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Yte(){return this.isValid()?this.toISOString():null}function Vte(){return e1(this)}function Gte(){return Po({},ke(this))}function Kte(){return ke(this).overflow}function qte(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}_e("N",0,0,"eraAbbr");_e("NN",0,0,"eraAbbr");_e("NNN",0,0,"eraAbbr");_e("NNNN",0,0,"eraName");_e("NNNNN",0,0,"eraNarrow");_e("y",["y",1],"yo","eraYear");_e("y",["yy",2],0,"eraYear");_e("y",["yyy",3],0,"eraYear");_e("y",["yyyy",4],0,"eraYear");ie("N",g1);ie("NN",g1);ie("NNN",g1);ie("NNNN",sne);ie("NNNNN",ane);ot(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?ke(n).era=i:ke(n).invalidEra=e});ie("y",Dl);ie("yy",Dl);ie("yyy",Dl);ie("yyyy",Dl);ie("yo",lne);ot(["y","yy","yyy","yyyy"],kn);ot(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[kn]=n._locale.eraYearOrdinalParse(e,i):t[kn]=parseInt(e,10)});function Xte(e,t){var n,r,i,o=this._eras||so("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":i=ne(o[n].since).startOf("day"),o[n].since=i.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":i=ne(o[n].until).startOf("day").valueOf(),o[n].until=i.valueOf();break}}return o}function Zte(e,t,n){var r,i,o=this.eras(),s,a,l;for(e=e.toUpperCase(),r=0,i=o.length;r<i;++r)if(s=o[r].name.toUpperCase(),a=o[r].abbr.toUpperCase(),l=o[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return o[r];break;case"NNNN":if(s===e)return o[r];break;case"NNNNN":if(l===e)return o[r];break}else if([s,a,l].indexOf(e)>=0)return o[r]}function Jte(e,t){var n=e.since<=e.until?1:-1;return t===void 0?ne(e.since).year():ne(e.since).year()+(t-e.offset)*n}function Qte(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function ene(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function tne(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function nne(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-ne(i[e].since).year())*n+i[e].offset;return this.year()}function rne(e){return qe(this,"_erasNameRegex")||v1.call(this),e?this._erasNameRegex:this._erasRegex}function ine(e){return qe(this,"_erasAbbrRegex")||v1.call(this),e?this._erasAbbrRegex:this._erasRegex}function one(e){return qe(this,"_erasNarrowRegex")||v1.call(this),e?this._erasNarrowRegex:this._erasRegex}function g1(e,t){return t.erasAbbrRegex(e)}function sne(e,t){return t.erasNameRegex(e)}function ane(e,t){return t.erasNarrowRegex(e)}function lne(e,t){return t._eraYearOrdinalRegex||Dl}function v1(){var e=[],t=[],n=[],r=[],i,o,s=this.eras();for(i=0,o=s.length;i<o;++i)t.push(er(s[i].name)),e.push(er(s[i].abbr)),n.push(er(s[i].narrow)),r.push(er(s[i].name)),r.push(er(s[i].abbr)),r.push(er(s[i].narrow));this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}_e(0,["gg",2],0,function(){return this.weekYear()%100});_e(0,["GG",2],0,function(){return this.isoWeekYear()%100});function sm(e,t){_e(0,[e,e.length],0,t)}sm("gggg","weekYear");sm("ggggg","weekYear");sm("GGGG","isoWeekYear");sm("GGGGG","isoWeekYear");Tn("weekYear","gg");Tn("isoWeekYear","GG");Mn("weekYear",1);Mn("isoWeekYear",1);ie("G",tm);ie("g",tm);ie("GG",xt,cr);ie("gg",xt,cr);ie("GGGG",s1,o1);ie("gggg",s1,o1);ie("GGGGG",em,Jh);ie("ggggg",em,Jh);dd(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=Ie(e)});dd(["gg","GG"],function(e,t,n,r){t[r]=ne.parseTwoDigitYear(e)});function cne(e){return fP.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function une(e){return fP.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function dne(){return Xi(this.year(),1,4)}function fne(){return Xi(this.isoWeekYear(),1,4)}function pne(){var e=this.localeData()._week;return Xi(this.year(),e.dow,e.doy)}function hne(){var e=this.localeData()._week;return Xi(this.weekYear(),e.dow,e.doy)}function fP(e,t,n,r,i){var o;return e==null?Ou(this,r,i).year:(o=Xi(e,r,i),t>o&&(t=o),mne.call(this,e,t,n,r,i))}function mne(e,t,n,r,i){var o=YM(e,t,n,r,i),s=Pu(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}_e("Q",0,"Qo","quarter");Tn("quarter","Q");Mn("quarter",7);ie("Q",$M);ot("Q",function(e,t){t[Gi]=(Ie(e)-1)*3});function gne(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}_e("D",["DD",2],"Do","date");Tn("date","D");Mn("date",9);ie("D",xt);ie("DD",xt,cr);ie("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ot(["D","DD"],vi);ot("Do",function(e,t){t[vi]=Ie(e.match(xt)[0])});var pP=Il("Date",!0);_e("DDD",["DDDD",3],"DDDo","dayOfYear");Tn("dayOfYear","DDD");Mn("dayOfYear",4);ie("DDD",Qh);ie("DDDD",NM);ot(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Ie(e)});function vne(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}_e("m",["mm",2],0,"minute");Tn("minute","m");Mn("minute",14);ie("m",xt);ie("mm",xt,cr);ot(["m","mm"],Kr);var yne=Il("Minutes",!1);_e("s",["ss",2],0,"second");Tn("second","s");Mn("second",15);ie("s",xt);ie("ss",xt,cr);ot(["s","ss"],Ki);var _ne=Il("Seconds",!1);_e("S",0,0,function(){return~~(this.millisecond()/100)});_e(0,["SS",2],0,function(){return~~(this.millisecond()/10)});_e(0,["SSS",3],0,"millisecond");_e(0,["SSSS",4],0,function(){return this.millisecond()*10});_e(0,["SSSSS",5],0,function(){return this.millisecond()*100});_e(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});_e(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});_e(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});_e(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Tn("millisecond","ms");Mn("millisecond",16);ie("S",Qh,$M);ie("SS",Qh,cr);ie("SSS",Qh,NM);var Oo,hP;for(Oo="SSSS";Oo.length<=9;Oo+="S")ie(Oo,Dl);function bne(e,t){t[Ms]=Ie(("0."+e)*1e3)}for(Oo="S";Oo.length<=9;Oo+="S")ot(Oo,bne);hP=Il("Milliseconds",!1);_e("z",0,0,"zoneAbbr");_e("zz",0,0,"zoneName");function xne(){return this._isUTC?"UTC":""}function Sne(){return this._isUTC?"Coordinated Universal Time":""}var X=cd.prototype;X.add=hte;X.calendar=xte;X.clone=Ste;X.diff=Mte;X.endOf=Bte;X.format=Dte;X.from=Ate;X.fromNow=$te;X.to=Nte;X.toNow=Lte;X.get=EQ;X.invalidAt=Kte;X.isAfter=wte;X.isBefore=Ete;X.isBetween=kte;X.isSame=Cte;X.isSameOrAfter=Rte;X.isSameOrBefore=Tte;X.isValid=Vte;X.lang=aP;X.locale=sP;X.localeData=lP;X.max=Vee;X.min=Yee;X.parsingFlags=Gte;X.set=kQ;X.startOf=Fte;X.subtract=mte;X.toArray=jte;X.toObject=Hte;X.toDate=Wte;X.toISOString=Ote;X.inspect=Ite;typeof Symbol!="undefined"&&Symbol.for!=null&&(X[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});X.toJSON=Yte;X.toString=Pte;X.unix=Ute;X.valueOf=zte;X.creationData=qte;X.eraName=Qte;X.eraNarrow=ene;X.eraAbbr=tne;X.eraYear=nne;X.year=HM;X.isLeapYear=HQ;X.weekYear=cne;X.isoWeekYear=une;X.quarter=X.quarters=gne;X.month=WM;X.daysInMonth=UQ;X.week=X.weeks=XQ;X.isoWeek=X.isoWeeks=ZQ;X.weeksInYear=pne;X.weeksInWeekYear=hne;X.isoWeeksInYear=dne;X.isoWeeksInISOWeekYear=fne;X.date=pP;X.day=X.days=uee;X.weekday=dee;X.isoWeekday=fee;X.dayOfYear=vne;X.hour=X.hours=_ee;X.minute=X.minutes=yne;X.second=X.seconds=_ne;X.millisecond=X.milliseconds=hP;X.utcOffset=tte;X.utc=rte;X.local=ite;X.parseZone=ote;X.hasAlignedHourOffset=ste;X.isDST=ate;X.isLocal=cte;X.isUtcOffset=ute;X.isUtc=nP;X.isUTC=nP;X.zoneAbbr=xne;X.zoneName=Sne;X.dates=Ir("dates accessor is deprecated. Use date instead.",pP);X.months=Ir("months accessor is deprecated. Use month instead",WM);X.years=Ir("years accessor is deprecated. Use year instead",HM);X.zone=Ir("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",nte);X.isDSTShifted=Ir("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",lte);function wne(e){return _t(e*1e3)}function Ene(){return _t.apply(null,arguments).parseZone()}function mP(e){return e}var Xe=n1.prototype;Xe.calendar=uQ;Xe.longDateFormat=hQ;Xe.invalidDate=gQ;Xe.ordinal=_Q;Xe.preparse=mP;Xe.postformat=mP;Xe.relativeTime=xQ;Xe.pastFuture=SQ;Xe.set=lQ;Xe.eras=Xte;Xe.erasParse=Zte;Xe.erasConvertYear=Jte;Xe.erasAbbrRegex=ine;Xe.erasNameRegex=rne;Xe.erasNarrowRegex=one;Xe.months=LQ;Xe.monthsShort=FQ;Xe.monthsParse=zQ;Xe.monthsRegex=jQ;Xe.monthsShortRegex=WQ;Xe.week=VQ;Xe.firstDayOfYear=qQ;Xe.firstDayOfWeek=KQ;Xe.weekdays=oee;Xe.weekdaysMin=aee;Xe.weekdaysShort=see;Xe.weekdaysParse=cee;Xe.weekdaysRegex=pee;Xe.weekdaysShortRegex=hee;Xe.weekdaysMinRegex=mee;Xe.isPM=vee;Xe.meridiem=bee;function Ip(e,t,n,r){var i=so(),o=Ti().set(r,t);return i[n](o,e)}function gP(e,t,n){if(to(e)&&(t=e,e=void 0),e=e||"",t!=null)return Ip(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Ip(e,r,n,"month");return i}function y1(e,t,n,r){typeof e=="boolean"?(to(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,to(t)&&(n=t,t=void 0),t=t||"");var i=so(),o=e?i._week.dow:0,s,a=[];if(n!=null)return Ip(t,(n+o)%7,r,"day");for(s=0;s<7;s++)a[s]=Ip(t,(s+o)%7,r,"day");return a}function kne(e,t){return gP(e,t,"months")}function Cne(e,t){return gP(e,t,"monthsShort")}function Rne(e,t,n){return y1(e,t,n,"weekdays")}function Tne(e,t,n){return y1(e,t,n,"weekdaysShort")}function Mne(e,t,n){return y1(e,t,n,"weekdaysMin")}Ho("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Ie(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});ne.lang=Ir("moment.lang is deprecated. Use moment.locale instead.",Ho);ne.langData=Ir("moment.langData is deprecated. Use moment.localeData instead.",so);var $i=Math.abs;function Pne(){var e=this._data;return this._milliseconds=$i(this._milliseconds),this._days=$i(this._days),this._months=$i(this._months),e.milliseconds=$i(e.milliseconds),e.seconds=$i(e.seconds),e.minutes=$i(e.minutes),e.hours=$i(e.hours),e.months=$i(e.months),e.years=$i(e.years),this}function vP(e,t,n,r){var i=si(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function One(e,t){return vP(this,e,t,1)}function Ine(e,t){return vP(this,e,t,-1)}function TE(e){return e<0?Math.floor(e):Math.ceil(e)}function Dne(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,o,s,a,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=TE(ly(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=mr(e/1e3),r.seconds=i%60,o=mr(i/60),r.minutes=o%60,s=mr(o/60),r.hours=s%24,t+=mr(s/24),l=mr(yP(t)),n+=l,t-=TE(ly(l)),a=mr(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function yP(e){return e*4800/146097}function ly(e){return e*146097/4800}function Ane(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Dr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+yP(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(ly(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function $ne(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Ie(this._months/12)*31536e6:NaN}function ao(e){return function(){return this.as(e)}}var Nne=ao("ms"),Lne=ao("s"),Fne=ao("m"),Bne=ao("h"),zne=ao("d"),Une=ao("w"),Wne=ao("M"),jne=ao("Q"),Hne=ao("y");function Yne(){return si(this)}function Vne(e){return e=Dr(e),this.isValid()?this[e+"s"]():NaN}function na(e){return function(){return this.isValid()?this._data[e]:NaN}}var Gne=na("milliseconds"),Kne=na("seconds"),qne=na("minutes"),Xne=na("hours"),Zne=na("days"),Jne=na("months"),Qne=na("years");function ere(){return mr(this.days()/7)}var zi=Math.round,Na={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function tre(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function nre(e,t,n,r){var i=si(e).abs(),o=zi(i.as("s")),s=zi(i.as("m")),a=zi(i.as("h")),l=zi(i.as("d")),c=zi(i.as("M")),u=zi(i.as("w")),d=zi(i.as("y")),f=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(f=f||u<=1&&["w"]||u<n.w&&["ww",u]),f=f||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d],f[2]=t,f[3]=+e>0,f[4]=r,tre.apply(null,f)}function rre(e){return e===void 0?zi:typeof e=="function"?(zi=e,!0):!1}function ire(e,t){return Na[e]===void 0?!1:t===void 0?Na[e]:(Na[e]=t,e==="s"&&(Na.ss=t-1),!0)}function ore(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Na,i,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Na,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),o=nre(this,!n,r,i),n&&(o=i.pastFuture(+this,o)),i.postformat(o)}var Cg=Math.abs;function ga(e){return(e>0)-(e<0)||+e}function am(){if(!this.isValid())return this.localeData().invalidDate();var e=Cg(this._milliseconds)/1e3,t=Cg(this._days),n=Cg(this._months),r,i,o,s,a=this.asSeconds(),l,c,u,d;return a?(r=mr(e/60),i=mr(r/60),e%=60,r%=60,o=mr(n/12),n%=12,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",c=ga(this._months)!==ga(a)?"-":"",u=ga(this._days)!==ga(a)?"-":"",d=ga(this._milliseconds)!==ga(a)?"-":"",l+"P"+(o?c+o+"Y":"")+(n?c+n+"M":"")+(t?u+t+"D":"")+(i||r||e?"T":"")+(i?d+i+"H":"")+(r?d+r+"M":"")+(e?d+s+"S":"")):"P0D"}var Ue=om.prototype;Ue.isValid=Zee;Ue.abs=Pne;Ue.add=One;Ue.subtract=Ine;Ue.as=Ane;Ue.asMilliseconds=Nne;Ue.asSeconds=Lne;Ue.asMinutes=Fne;Ue.asHours=Bne;Ue.asDays=zne;Ue.asWeeks=Une;Ue.asMonths=Wne;Ue.asQuarters=jne;Ue.asYears=Hne;Ue.valueOf=$ne;Ue._bubble=Dne;Ue.clone=Yne;Ue.get=Vne;Ue.milliseconds=Gne;Ue.seconds=Kne;Ue.minutes=qne;Ue.hours=Xne;Ue.days=Zne;Ue.weeks=ere;Ue.months=Jne;Ue.years=Qne;Ue.humanize=ore;Ue.toISOString=am;Ue.toString=am;Ue.toJSON=am;Ue.locale=sP;Ue.localeData=lP;Ue.toIsoString=Ir("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",am);Ue.lang=aP;_e("X",0,0,"unix");_e("x",0,0,"valueOf");ie("x",tm);ie("X",RQ);ot("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ot("x",function(e,t,n){n._d=new Date(Ie(e))});//! moment.js
218
- ne.version="2.29.4";sQ(_t);ne.fn=X;ne.min=Gee;ne.max=Kee;ne.now=qee;ne.utc=Ti;ne.unix=wne;ne.months=kne;ne.isDate=ld;ne.locale=Ho;ne.invalid=Xh;ne.duration=si;ne.isMoment=ti;ne.weekdays=Rne;ne.parseZone=Ene;ne.localeData=so;ne.isDuration=Nf;ne.monthsShort=Cne;ne.weekdaysMin=Mne;ne.defineLocale=u1;ne.updateLocale=Eee;ne.locales=kee;ne.weekdaysShort=Tne;ne.normalizeUnits=Dr;ne.relativeTimeRounding=rre;ne.relativeTimeThreshold=ire;ne.calendarFormat=bte;ne.prototype=X;ne.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const sre={name:"Andorra",native:"Andorra",phone:"376",continent:"EU",capital:"Andorra la Vella",currency:"EUR",languages:["ca"]},are={name:"United Arab Emirates",native:"\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629",phone:"971",continent:"AS",capital:"Abu Dhabi",currency:"AED",languages:["ar"]},lre={name:"Afghanistan",native:"\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646",phone:"93",continent:"AS",capital:"Kabul",currency:"AFN",languages:["ps","uz","tk"]},cre={name:"Antigua and Barbuda",native:"Antigua and Barbuda",phone:"1268",continent:"NA",capital:"Saint John's",currency:"XCD",languages:["en"]},ure={name:"Anguilla",native:"Anguilla",phone:"1264",continent:"NA",capital:"The Valley",currency:"XCD",languages:["en"]},dre={name:"Albania",native:"Shqip\xEBria",phone:"355",continent:"EU",capital:"Tirana",currency:"ALL",languages:["sq"]},fre={name:"Armenia",native:"\u0540\u0561\u0575\u0561\u057D\u057F\u0561\u0576",phone:"374",continent:"AS",capital:"Yerevan",currency:"AMD",languages:["hy","ru"]},pre={name:"Angola",native:"Angola",phone:"244",continent:"AF",capital:"Luanda",currency:"AOA",languages:["pt"]},hre={name:"Antarctica",native:"Antarctica",phone:"672",continent:"AN",capital:"",currency:"",languages:[]},mre={name:"Argentina",native:"Argentina",phone:"54",continent:"SA",capital:"Buenos Aires",currency:"ARS",languages:["es","gn"]},gre={name:"American Samoa",native:"American Samoa",phone:"1684",continent:"OC",capital:"Pago Pago",currency:"USD",languages:["en","sm"]},vre={name:"Austria",native:"\xD6sterreich",phone:"43",continent:"EU",capital:"Vienna",currency:"EUR",languages:["de"]},yre={name:"Australia",native:"Australia",phone:"61",continent:"OC",capital:"Canberra",currency:"AUD",languages:["en"]},_re={name:"Aruba",native:"Aruba",phone:"297",continent:"NA",capital:"Oranjestad",currency:"AWG",languages:["nl","pa"]},bre={name:"\xC5land",native:"\xC5land",phone:"358",continent:"EU",capital:"Mariehamn",currency:"EUR",languages:["sv"]},xre={name:"Azerbaijan",native:"Az\u0259rbaycan",phone:"994",continent:"AS",capital:"Baku",currency:"AZN",languages:["az"]},Sre={name:"Bosnia and Herzegovina",native:"Bosna i Hercegovina",phone:"387",continent:"EU",capital:"Sarajevo",currency:"BAM",languages:["bs","hr","sr"]},wre={name:"Barbados",native:"Barbados",phone:"1246",continent:"NA",capital:"Bridgetown",currency:"BBD",languages:["en"]},Ere={name:"Bangladesh",native:"Bangladesh",phone:"880",continent:"AS",capital:"Dhaka",currency:"BDT",languages:["bn"]},kre={name:"Belgium",native:"Belgi\xEB",phone:"32",continent:"EU",capital:"Brussels",currency:"EUR",languages:["nl","fr","de"]},Cre={name:"Burkina Faso",native:"Burkina Faso",phone:"226",continent:"AF",capital:"Ouagadougou",currency:"XOF",languages:["fr","ff"]},Rre={name:"Bulgaria",native:"\u0411\u044A\u043B\u0433\u0430\u0440\u0438\u044F",phone:"359",continent:"EU",capital:"Sofia",currency:"BGN",languages:["bg"]},Tre={name:"Bahrain",native:"\u200F\u0627\u0644\u0628\u062D\u0631\u064A\u0646",phone:"973",continent:"AS",capital:"Manama",currency:"BHD",languages:["ar"]},Mre={name:"Burundi",native:"Burundi",phone:"257",continent:"AF",capital:"Bujumbura",currency:"BIF",languages:["fr","rn"]},Pre={name:"Benin",native:"B\xE9nin",phone:"229",continent:"AF",capital:"Porto-Novo",currency:"XOF",languages:["fr"]},Ore={name:"Saint Barth\xE9lemy",native:"Saint-Barth\xE9lemy",phone:"590",continent:"NA",capital:"Gustavia",currency:"EUR",languages:["fr"]},Ire={name:"Bermuda",native:"Bermuda",phone:"1441",continent:"NA",capital:"Hamilton",currency:"BMD",languages:["en"]},Dre={name:"Brunei",native:"Negara Brunei Darussalam",phone:"673",continent:"AS",capital:"Bandar Seri Begawan",currency:"BND",languages:["ms"]},Are={name:"Bolivia",native:"Bolivia",phone:"591",continent:"SA",capital:"Sucre",currency:"BOB,BOV",languages:["es","ay","qu"]},$re={name:"Bonaire",native:"Bonaire",phone:"5997",continent:"NA",capital:"Kralendijk",currency:"USD",languages:["nl"]},Nre={name:"Brazil",native:"Brasil",phone:"55",continent:"SA",capital:"Bras\xEDlia",currency:"BRL",languages:["pt"]},Lre={name:"Bahamas",native:"Bahamas",phone:"1242",continent:"NA",capital:"Nassau",currency:"BSD",languages:["en"]},Fre={name:"Bhutan",native:"\u02BCbrug-yul",phone:"975",continent:"AS",capital:"Thimphu",currency:"BTN,INR",languages:["dz"]},Bre={name:"Bouvet Island",native:"Bouvet\xF8ya",phone:"47",continent:"AN",capital:"",currency:"NOK",languages:["no","nb","nn"]},zre={name:"Botswana",native:"Botswana",phone:"267",continent:"AF",capital:"Gaborone",currency:"BWP",languages:["en","tn"]},Ure={name:"Belarus",native:"\u0411\u0435\u043B\u0430\u0440\u0443\u0301\u0441\u044C",phone:"375",continent:"EU",capital:"Minsk",currency:"BYN",languages:["be","ru"]},Wre={name:"Belize",native:"Belize",phone:"501",continent:"NA",capital:"Belmopan",currency:"BZD",languages:["en","es"]},jre={name:"Canada",native:"Canada",phone:"1",continent:"NA",capital:"Ottawa",currency:"CAD",languages:["en","fr"]},Hre={name:"Cocos [Keeling] Islands",native:"Cocos (Keeling) Islands",phone:"61",continent:"AS",capital:"West Island",currency:"AUD",languages:["en"]},Yre={name:"Democratic Republic of the Congo",native:"R\xE9publique d\xE9mocratique du Congo",phone:"243",continent:"AF",capital:"Kinshasa",currency:"CDF",languages:["fr","ln","kg","sw","lu"]},Vre={name:"Central African Republic",native:"K\xF6d\xF6r\xF6s\xEAse t\xEE B\xEAafr\xEEka",phone:"236",continent:"AF",capital:"Bangui",currency:"XAF",languages:["fr","sg"]},Gre={name:"Republic of the Congo",native:"R\xE9publique du Congo",phone:"242",continent:"AF",capital:"Brazzaville",currency:"XAF",languages:["fr","ln"]},Kre={name:"Switzerland",native:"Schweiz",phone:"41",continent:"EU",capital:"Bern",currency:"CHE,CHF,CHW",languages:["de","fr","it"]},qre={name:"Ivory Coast",native:"C\xF4te d'Ivoire",phone:"225",continent:"AF",capital:"Yamoussoukro",currency:"XOF",languages:["fr"]},Xre={name:"Cook Islands",native:"Cook Islands",phone:"682",continent:"OC",capital:"Avarua",currency:"NZD",languages:["en"]},Zre={name:"Chile",native:"Chile",phone:"56",continent:"SA",capital:"Santiago",currency:"CLF,CLP",languages:["es"]},Jre={name:"Cameroon",native:"Cameroon",phone:"237",continent:"AF",capital:"Yaound\xE9",currency:"XAF",languages:["en","fr"]},Qre={name:"China",native:"\u4E2D\u56FD",phone:"86",continent:"AS",capital:"Beijing",currency:"CNY",languages:["zh"]},eie={name:"Colombia",native:"Colombia",phone:"57",continent:"SA",capital:"Bogot\xE1",currency:"COP",languages:["es"]},tie={name:"Costa Rica",native:"Costa Rica",phone:"506",continent:"NA",capital:"San Jos\xE9",currency:"CRC",languages:["es"]},nie={name:"Cuba",native:"Cuba",phone:"53",continent:"NA",capital:"Havana",currency:"CUC,CUP",languages:["es"]},rie={name:"Cape Verde",native:"Cabo Verde",phone:"238",continent:"AF",capital:"Praia",currency:"CVE",languages:["pt"]},iie={name:"Curacao",native:"Cura\xE7ao",phone:"5999",continent:"NA",capital:"Willemstad",currency:"ANG",languages:["nl","pa","en"]},oie={name:"Christmas Island",native:"Christmas Island",phone:"61",continent:"AS",capital:"Flying Fish Cove",currency:"AUD",languages:["en"]},sie={name:"Cyprus",native:"\u039A\u03CD\u03C0\u03C1\u03BF\u03C2",phone:"357",continent:"EU",capital:"Nicosia",currency:"EUR",languages:["el","tr","hy"]},aie={name:"Czech Republic",native:"\u010Cesk\xE1 republika",phone:"420",continent:"EU",capital:"Prague",currency:"CZK",languages:["cs","sk"]},lie={name:"Germany",native:"Deutschland",phone:"49",continent:"EU",capital:"Berlin",currency:"EUR",languages:["de"]},cie={name:"Djibouti",native:"Djibouti",phone:"253",continent:"AF",capital:"Djibouti",currency:"DJF",languages:["fr","ar"]},uie={name:"Denmark",native:"Danmark",phone:"45",continent:"EU",capital:"Copenhagen",currency:"DKK",languages:["da"]},die={name:"Dominica",native:"Dominica",phone:"1767",continent:"NA",capital:"Roseau",currency:"XCD",languages:["en"]},fie={name:"Dominican Republic",native:"Rep\xFAblica Dominicana",phone:"1809,1829,1849",continent:"NA",capital:"Santo Domingo",currency:"DOP",languages:["es"]},pie={name:"Algeria",native:"\u0627\u0644\u062C\u0632\u0627\u0626\u0631",phone:"213",continent:"AF",capital:"Algiers",currency:"DZD",languages:["ar"]},hie={name:"Ecuador",native:"Ecuador",phone:"593",continent:"SA",capital:"Quito",currency:"USD",languages:["es"]},mie={name:"Estonia",native:"Eesti",phone:"372",continent:"EU",capital:"Tallinn",currency:"EUR",languages:["et"]},gie={name:"Egypt",native:"\u0645\u0635\u0631\u200E",phone:"20",continent:"AF",capital:"Cairo",currency:"EGP",languages:["ar"]},vie={name:"Western Sahara",native:"\u0627\u0644\u0635\u062D\u0631\u0627\u0621 \u0627\u0644\u063A\u0631\u0628\u064A\u0629",phone:"212",continent:"AF",capital:"El Aai\xFAn",currency:"MAD,DZD,MRU",languages:["es"]},yie={name:"Eritrea",native:"\u12A4\u122D\u1275\u122B",phone:"291",continent:"AF",capital:"Asmara",currency:"ERN",languages:["ti","ar","en"]},_ie={name:"Spain",native:"Espa\xF1a",phone:"34",continent:"EU",capital:"Madrid",currency:"EUR",languages:["es","eu","ca","gl","oc"]},bie={name:"Ethiopia",native:"\u12A2\u1275\u12EE\u1335\u12EB",phone:"251",continent:"AF",capital:"Addis Ababa",currency:"ETB",languages:["am"]},xie={name:"Finland",native:"Suomi",phone:"358",continent:"EU",capital:"Helsinki",currency:"EUR",languages:["fi","sv"]},Sie={name:"Fiji",native:"Fiji",phone:"679",continent:"OC",capital:"Suva",currency:"FJD",languages:["en","fj","hi","ur"]},wie={name:"Falkland Islands",native:"Falkland Islands",phone:"500",continent:"SA",capital:"Stanley",currency:"FKP",languages:["en"]},Eie={name:"Micronesia",native:"Micronesia",phone:"691",continent:"OC",capital:"Palikir",currency:"USD",languages:["en"]},kie={name:"Faroe Islands",native:"F\xF8royar",phone:"298",continent:"EU",capital:"T\xF3rshavn",currency:"DKK",languages:["fo"]},Cie={name:"France",native:"France",phone:"33",continent:"EU",capital:"Paris",currency:"EUR",languages:["fr"]},Rie={name:"Gabon",native:"Gabon",phone:"241",continent:"AF",capital:"Libreville",currency:"XAF",languages:["fr"]},Tie={name:"United Kingdom",native:"United Kingdom",phone:"44",continent:"EU",capital:"London",currency:"GBP",languages:["en"]},Mie={name:"Grenada",native:"Grenada",phone:"1473",continent:"NA",capital:"St. George's",currency:"XCD",languages:["en"]},Pie={name:"Georgia",native:"\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD",phone:"995",continent:"AS",capital:"Tbilisi",currency:"GEL",languages:["ka"]},Oie={name:"French Guiana",native:"Guyane fran\xE7aise",phone:"594",continent:"SA",capital:"Cayenne",currency:"EUR",languages:["fr"]},Iie={name:"Guernsey",native:"Guernsey",phone:"44",continent:"EU",capital:"St. Peter Port",currency:"GBP",languages:["en","fr"]},Die={name:"Ghana",native:"Ghana",phone:"233",continent:"AF",capital:"Accra",currency:"GHS",languages:["en"]},Aie={name:"Gibraltar",native:"Gibraltar",phone:"350",continent:"EU",capital:"Gibraltar",currency:"GIP",languages:["en"]},$ie={name:"Greenland",native:"Kalaallit Nunaat",phone:"299",continent:"NA",capital:"Nuuk",currency:"DKK",languages:["kl"]},Nie={name:"Gambia",native:"Gambia",phone:"220",continent:"AF",capital:"Banjul",currency:"GMD",languages:["en"]},Lie={name:"Guinea",native:"Guin\xE9e",phone:"224",continent:"AF",capital:"Conakry",currency:"GNF",languages:["fr","ff"]},Fie={name:"Guadeloupe",native:"Guadeloupe",phone:"590",continent:"NA",capital:"Basse-Terre",currency:"EUR",languages:["fr"]},Bie={name:"Equatorial Guinea",native:"Guinea Ecuatorial",phone:"240",continent:"AF",capital:"Malabo",currency:"XAF",languages:["es","fr"]},zie={name:"Greece",native:"\u0395\u03BB\u03BB\u03AC\u03B4\u03B1",phone:"30",continent:"EU",capital:"Athens",currency:"EUR",languages:["el"]},Uie={name:"South Georgia and the South Sandwich Islands",native:"South Georgia",phone:"500",continent:"AN",capital:"King Edward Point",currency:"GBP",languages:["en"]},Wie={name:"Guatemala",native:"Guatemala",phone:"502",continent:"NA",capital:"Guatemala City",currency:"GTQ",languages:["es"]},jie={name:"Guam",native:"Guam",phone:"1671",continent:"OC",capital:"Hag\xE5t\xF1a",currency:"USD",languages:["en","ch","es"]},Hie={name:"Guinea-Bissau",native:"Guin\xE9-Bissau",phone:"245",continent:"AF",capital:"Bissau",currency:"XOF",languages:["pt"]},Yie={name:"Guyana",native:"Guyana",phone:"592",continent:"SA",capital:"Georgetown",currency:"GYD",languages:["en"]},Vie={name:"Hong Kong",native:"\u9999\u6E2F",phone:"852",continent:"AS",capital:"City of Victoria",currency:"HKD",languages:["zh","en"]},Gie={name:"Heard Island and McDonald Islands",native:"Heard Island and McDonald Islands",phone:"61",continent:"AN",capital:"",currency:"AUD",languages:["en"]},Kie={name:"Honduras",native:"Honduras",phone:"504",continent:"NA",capital:"Tegucigalpa",currency:"HNL",languages:["es"]},qie={name:"Croatia",native:"Hrvatska",phone:"385",continent:"EU",capital:"Zagreb",currency:"HRK",languages:["hr"]},Xie={name:"Haiti",native:"Ha\xEFti",phone:"509",continent:"NA",capital:"Port-au-Prince",currency:"HTG,USD",languages:["fr","ht"]},Zie={name:"Hungary",native:"Magyarorsz\xE1g",phone:"36",continent:"EU",capital:"Budapest",currency:"HUF",languages:["hu"]},Jie={name:"Indonesia",native:"Indonesia",phone:"62",continent:"AS",capital:"Jakarta",currency:"IDR",languages:["id"]},Qie={name:"Ireland",native:"\xC9ire",phone:"353",continent:"EU",capital:"Dublin",currency:"EUR",languages:["ga","en"]},eoe={name:"Israel",native:"\u05D9\u05B4\u05E9\u05B0\u05C2\u05E8\u05B8\u05D0\u05B5\u05DC",phone:"972",continent:"AS",capital:"Jerusalem",currency:"ILS",languages:["he","ar"]},toe={name:"Isle of Man",native:"Isle of Man",phone:"44",continent:"EU",capital:"Douglas",currency:"GBP",languages:["en","gv"]},noe={name:"India",native:"\u092D\u093E\u0930\u0924",phone:"91",continent:"AS",capital:"New Delhi",currency:"INR",languages:["hi","en"]},roe={name:"British Indian Ocean Territory",native:"British Indian Ocean Territory",phone:"246",continent:"AS",capital:"Diego Garcia",currency:"USD",languages:["en"]},ioe={name:"Iraq",native:"\u0627\u0644\u0639\u0631\u0627\u0642",phone:"964",continent:"AS",capital:"Baghdad",currency:"IQD",languages:["ar","ku"]},ooe={name:"Iran",native:"\u0627\u06CC\u0631\u0627\u0646",phone:"98",continent:"AS",capital:"Tehran",currency:"IRR",languages:["fa"]},soe={name:"Iceland",native:"\xCDsland",phone:"354",continent:"EU",capital:"Reykjavik",currency:"ISK",languages:["is"]},aoe={name:"Italy",native:"Italia",phone:"39",continent:"EU",capital:"Rome",currency:"EUR",languages:["it"]},loe={name:"Jersey",native:"Jersey",phone:"44",continent:"EU",capital:"Saint Helier",currency:"GBP",languages:["en","fr"]},coe={name:"Jamaica",native:"Jamaica",phone:"1876",continent:"NA",capital:"Kingston",currency:"JMD",languages:["en"]},uoe={name:"Jordan",native:"\u0627\u0644\u0623\u0631\u062F\u0646",phone:"962",continent:"AS",capital:"Amman",currency:"JOD",languages:["ar"]},doe={name:"Japan",native:"\u65E5\u672C",phone:"81",continent:"AS",capital:"Tokyo",currency:"JPY",languages:["ja"]},foe={name:"Kenya",native:"Kenya",phone:"254",continent:"AF",capital:"Nairobi",currency:"KES",languages:["en","sw"]},poe={name:"Kyrgyzstan",native:"\u041A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D",phone:"996",continent:"AS",capital:"Bishkek",currency:"KGS",languages:["ky","ru"]},hoe={name:"Cambodia",native:"K\xE2mp\u016Dch\xE9a",phone:"855",continent:"AS",capital:"Phnom Penh",currency:"KHR",languages:["km"]},moe={name:"Kiribati",native:"Kiribati",phone:"686",continent:"OC",capital:"South Tarawa",currency:"AUD",languages:["en"]},goe={name:"Comoros",native:"Komori",phone:"269",continent:"AF",capital:"Moroni",currency:"KMF",languages:["ar","fr"]},voe={name:"Saint Kitts and Nevis",native:"Saint Kitts and Nevis",phone:"1869",continent:"NA",capital:"Basseterre",currency:"XCD",languages:["en"]},yoe={name:"North Korea",native:"\uBD81\uD55C",phone:"850",continent:"AS",capital:"Pyongyang",currency:"KPW",languages:["ko"]},_oe={name:"South Korea",native:"\uB300\uD55C\uBBFC\uAD6D",phone:"82",continent:"AS",capital:"Seoul",currency:"KRW",languages:["ko"]},boe={name:"Kuwait",native:"\u0627\u0644\u0643\u0648\u064A\u062A",phone:"965",continent:"AS",capital:"Kuwait City",currency:"KWD",languages:["ar"]},xoe={name:"Cayman Islands",native:"Cayman Islands",phone:"1345",continent:"NA",capital:"George Town",currency:"KYD",languages:["en"]},Soe={name:"Kazakhstan",native:"\u049A\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D",phone:"76,77",continent:"AS",capital:"Astana",currency:"KZT",languages:["kk","ru"]},woe={name:"Laos",native:"\u0EAA\u0E9B\u0E9B\u0EA5\u0EB2\u0EA7",phone:"856",continent:"AS",capital:"Vientiane",currency:"LAK",languages:["lo"]},Eoe={name:"Lebanon",native:"\u0644\u0628\u0646\u0627\u0646",phone:"961",continent:"AS",capital:"Beirut",currency:"LBP",languages:["ar","fr"]},koe={name:"Saint Lucia",native:"Saint Lucia",phone:"1758",continent:"NA",capital:"Castries",currency:"XCD",languages:["en"]},Coe={name:"Liechtenstein",native:"Liechtenstein",phone:"423",continent:"EU",capital:"Vaduz",currency:"CHF",languages:["de"]},Roe={name:"Sri Lanka",native:"\u015Br\u012B la\u1E43k\u0101va",phone:"94",continent:"AS",capital:"Colombo",currency:"LKR",languages:["si","ta"]},Toe={name:"Liberia",native:"Liberia",phone:"231",continent:"AF",capital:"Monrovia",currency:"LRD",languages:["en"]},Moe={name:"Lesotho",native:"Lesotho",phone:"266",continent:"AF",capital:"Maseru",currency:"LSL,ZAR",languages:["en","st"]},Poe={name:"Lithuania",native:"Lietuva",phone:"370",continent:"EU",capital:"Vilnius",currency:"EUR",languages:["lt"]},Ooe={name:"Luxembourg",native:"Luxembourg",phone:"352",continent:"EU",capital:"Luxembourg",currency:"EUR",languages:["fr","de","lb"]},Ioe={name:"Latvia",native:"Latvija",phone:"371",continent:"EU",capital:"Riga",currency:"EUR",languages:["lv"]},Doe={name:"Libya",native:"\u200F\u0644\u064A\u0628\u064A\u0627",phone:"218",continent:"AF",capital:"Tripoli",currency:"LYD",languages:["ar"]},Aoe={name:"Morocco",native:"\u0627\u0644\u0645\u063A\u0631\u0628",phone:"212",continent:"AF",capital:"Rabat",currency:"MAD",languages:["ar"]},$oe={name:"Monaco",native:"Monaco",phone:"377",continent:"EU",capital:"Monaco",currency:"EUR",languages:["fr"]},Noe={name:"Moldova",native:"Moldova",phone:"373",continent:"EU",capital:"Chi\u0219in\u0103u",currency:"MDL",languages:["ro"]},Loe={name:"Montenegro",native:"\u0426\u0440\u043D\u0430 \u0413\u043E\u0440\u0430",phone:"382",continent:"EU",capital:"Podgorica",currency:"EUR",languages:["sr","bs","sq","hr"]},Foe={name:"Saint Martin",native:"Saint-Martin",phone:"590",continent:"NA",capital:"Marigot",currency:"EUR",languages:["en","fr","nl"]},Boe={name:"Madagascar",native:"Madagasikara",phone:"261",continent:"AF",capital:"Antananarivo",currency:"MGA",languages:["fr","mg"]},zoe={name:"Marshall Islands",native:"M\u0327aje\u013C",phone:"692",continent:"OC",capital:"Majuro",currency:"USD",languages:["en","mh"]},Uoe={name:"North Macedonia",native:"\u0421\u0435\u0432\u0435\u0440\u043D\u0430 \u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430",phone:"389",continent:"EU",capital:"Skopje",currency:"MKD",languages:["mk"]},Woe={name:"Mali",native:"Mali",phone:"223",continent:"AF",capital:"Bamako",currency:"XOF",languages:["fr"]},joe={name:"Myanmar [Burma]",native:"\u1019\u103C\u1014\u103A\u1019\u102C",phone:"95",continent:"AS",capital:"Naypyidaw",currency:"MMK",languages:["my"]},Hoe={name:"Mongolia",native:"\u041C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441",phone:"976",continent:"AS",capital:"Ulan Bator",currency:"MNT",languages:["mn"]},Yoe={name:"Macao",native:"\u6FB3\u9580",phone:"853",continent:"AS",capital:"",currency:"MOP",languages:["zh","pt"]},Voe={name:"Northern Mariana Islands",native:"Northern Mariana Islands",phone:"1670",continent:"OC",capital:"Saipan",currency:"USD",languages:["en","ch"]},Goe={name:"Martinique",native:"Martinique",phone:"596",continent:"NA",capital:"Fort-de-France",currency:"EUR",languages:["fr"]},Koe={name:"Mauritania",native:"\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627",phone:"222",continent:"AF",capital:"Nouakchott",currency:"MRU",languages:["ar"]},qoe={name:"Montserrat",native:"Montserrat",phone:"1664",continent:"NA",capital:"Plymouth",currency:"XCD",languages:["en"]},Xoe={name:"Malta",native:"Malta",phone:"356",continent:"EU",capital:"Valletta",currency:"EUR",languages:["mt","en"]},Zoe={name:"Mauritius",native:"Maurice",phone:"230",continent:"AF",capital:"Port Louis",currency:"MUR",languages:["en"]},Joe={name:"Maldives",native:"Maldives",phone:"960",continent:"AS",capital:"Mal\xE9",currency:"MVR",languages:["dv"]},Qoe={name:"Malawi",native:"Malawi",phone:"265",continent:"AF",capital:"Lilongwe",currency:"MWK",languages:["en","ny"]},ese={name:"Mexico",native:"M\xE9xico",phone:"52",continent:"NA",capital:"Mexico City",currency:"MXN",languages:["es"]},tse={name:"Malaysia",native:"Malaysia",phone:"60",continent:"AS",capital:"Kuala Lumpur",currency:"MYR",languages:["ms"]},nse={name:"Mozambique",native:"Mo\xE7ambique",phone:"258",continent:"AF",capital:"Maputo",currency:"MZN",languages:["pt"]},rse={name:"Namibia",native:"Namibia",phone:"264",continent:"AF",capital:"Windhoek",currency:"NAD,ZAR",languages:["en","af"]},ise={name:"New Caledonia",native:"Nouvelle-Cal\xE9donie",phone:"687",continent:"OC",capital:"Noum\xE9a",currency:"XPF",languages:["fr"]},ose={name:"Niger",native:"Niger",phone:"227",continent:"AF",capital:"Niamey",currency:"XOF",languages:["fr"]},sse={name:"Norfolk Island",native:"Norfolk Island",phone:"672",continent:"OC",capital:"Kingston",currency:"AUD",languages:["en"]},ase={name:"Nigeria",native:"Nigeria",phone:"234",continent:"AF",capital:"Abuja",currency:"NGN",languages:["en"]},lse={name:"Nicaragua",native:"Nicaragua",phone:"505",continent:"NA",capital:"Managua",currency:"NIO",languages:["es"]},cse={name:"Netherlands",native:"Nederland",phone:"31",continent:"EU",capital:"Amsterdam",currency:"EUR",languages:["nl"]},use={name:"Norway",native:"Norge",phone:"47",continent:"EU",capital:"Oslo",currency:"NOK",languages:["no","nb","nn"]},dse={name:"Nepal",native:"\u0928\u092A\u0932",phone:"977",continent:"AS",capital:"Kathmandu",currency:"NPR",languages:["ne"]},fse={name:"Nauru",native:"Nauru",phone:"674",continent:"OC",capital:"Yaren",currency:"AUD",languages:["en","na"]},pse={name:"Niue",native:"Niu\u0113",phone:"683",continent:"OC",capital:"Alofi",currency:"NZD",languages:["en"]},hse={name:"New Zealand",native:"New Zealand",phone:"64",continent:"OC",capital:"Wellington",currency:"NZD",languages:["en","mi"]},mse={name:"Oman",native:"\u0639\u0645\u0627\u0646",phone:"968",continent:"AS",capital:"Muscat",currency:"OMR",languages:["ar"]},gse={name:"Panama",native:"Panam\xE1",phone:"507",continent:"NA",capital:"Panama City",currency:"PAB,USD",languages:["es"]},vse={name:"Peru",native:"Per\xFA",phone:"51",continent:"SA",capital:"Lima",currency:"PEN",languages:["es"]},yse={name:"French Polynesia",native:"Polyn\xE9sie fran\xE7aise",phone:"689",continent:"OC",capital:"Papeet\u0113",currency:"XPF",languages:["fr"]},_se={name:"Papua New Guinea",native:"Papua Niugini",phone:"675",continent:"OC",capital:"Port Moresby",currency:"PGK",languages:["en"]},bse={name:"Philippines",native:"Pilipinas",phone:"63",continent:"AS",capital:"Manila",currency:"PHP",languages:["en"]},xse={name:"Pakistan",native:"Pakistan",phone:"92",continent:"AS",capital:"Islamabad",currency:"PKR",languages:["en","ur"]},Sse={name:"Poland",native:"Polska",phone:"48",continent:"EU",capital:"Warsaw",currency:"PLN",languages:["pl"]},wse={name:"Saint Pierre and Miquelon",native:"Saint-Pierre-et-Miquelon",phone:"508",continent:"NA",capital:"Saint-Pierre",currency:"EUR",languages:["fr"]},Ese={name:"Pitcairn Islands",native:"Pitcairn Islands",phone:"64",continent:"OC",capital:"Adamstown",currency:"NZD",languages:["en"]},kse={name:"Puerto Rico",native:"Puerto Rico",phone:"1787,1939",continent:"NA",capital:"San Juan",currency:"USD",languages:["es","en"]},Cse={name:"Palestine",native:"\u0641\u0644\u0633\u0637\u064A\u0646",phone:"970",continent:"AS",capital:"Ramallah",currency:"ILS",languages:["ar"]},Rse={name:"Portugal",native:"Portugal",phone:"351",continent:"EU",capital:"Lisbon",currency:"EUR",languages:["pt"]},Tse={name:"Palau",native:"Palau",phone:"680",continent:"OC",capital:"Ngerulmud",currency:"USD",languages:["en"]},Mse={name:"Paraguay",native:"Paraguay",phone:"595",continent:"SA",capital:"Asunci\xF3n",currency:"PYG",languages:["es","gn"]},Pse={name:"Qatar",native:"\u0642\u0637\u0631",phone:"974",continent:"AS",capital:"Doha",currency:"QAR",languages:["ar"]},Ose={name:"R\xE9union",native:"La R\xE9union",phone:"262",continent:"AF",capital:"Saint-Denis",currency:"EUR",languages:["fr"]},Ise={name:"Romania",native:"Rom\xE2nia",phone:"40",continent:"EU",capital:"Bucharest",currency:"RON",languages:["ro"]},Dse={name:"Serbia",native:"\u0421\u0440\u0431\u0438\u0458\u0430",phone:"381",continent:"EU",capital:"Belgrade",currency:"RSD",languages:["sr"]},Ase={name:"Russia",native:"\u0420\u043E\u0441\u0441\u0438\u044F",phone:"7",continent:"EU",capital:"Moscow",currency:"RUB",languages:["ru"]},$se={name:"Rwanda",native:"Rwanda",phone:"250",continent:"AF",capital:"Kigali",currency:"RWF",languages:["rw","en","fr"]},Nse={name:"Saudi Arabia",native:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629",phone:"966",continent:"AS",capital:"Riyadh",currency:"SAR",languages:["ar"]},Lse={name:"Solomon Islands",native:"Solomon Islands",phone:"677",continent:"OC",capital:"Honiara",currency:"SBD",languages:["en"]},Fse={name:"Seychelles",native:"Seychelles",phone:"248",continent:"AF",capital:"Victoria",currency:"SCR",languages:["fr","en"]},Bse={name:"Sudan",native:"\u0627\u0644\u0633\u0648\u062F\u0627\u0646",phone:"249",continent:"AF",capital:"Khartoum",currency:"SDG",languages:["ar","en"]},zse={name:"Sweden",native:"Sverige",phone:"46",continent:"EU",capital:"Stockholm",currency:"SEK",languages:["sv"]},Use={name:"Singapore",native:"Singapore",phone:"65",continent:"AS",capital:"Singapore",currency:"SGD",languages:["en","ms","ta","zh"]},Wse={name:"Saint Helena",native:"Saint Helena",phone:"290",continent:"AF",capital:"Jamestown",currency:"SHP",languages:["en"]},jse={name:"Slovenia",native:"Slovenija",phone:"386",continent:"EU",capital:"Ljubljana",currency:"EUR",languages:["sl"]},Hse={name:"Svalbard and Jan Mayen",native:"Svalbard og Jan Mayen",phone:"4779",continent:"EU",capital:"Longyearbyen",currency:"NOK",languages:["no"]},Yse={name:"Slovakia",native:"Slovensko",phone:"421",continent:"EU",capital:"Bratislava",currency:"EUR",languages:["sk"]},Vse={name:"Sierra Leone",native:"Sierra Leone",phone:"232",continent:"AF",capital:"Freetown",currency:"SLL",languages:["en"]},Gse={name:"San Marino",native:"San Marino",phone:"378",continent:"EU",capital:"City of San Marino",currency:"EUR",languages:["it"]},Kse={name:"Senegal",native:"S\xE9n\xE9gal",phone:"221",continent:"AF",capital:"Dakar",currency:"XOF",languages:["fr"]},qse={name:"Somalia",native:"Soomaaliya",phone:"252",continent:"AF",capital:"Mogadishu",currency:"SOS",languages:["so","ar"]},Xse={name:"Suriname",native:"Suriname",phone:"597",continent:"SA",capital:"Paramaribo",currency:"SRD",languages:["nl"]},Zse={name:"South Sudan",native:"South Sudan",phone:"211",continent:"AF",capital:"Juba",currency:"SSP",languages:["en"]},Jse={name:"S\xE3o Tom\xE9 and Pr\xEDncipe",native:"S\xE3o Tom\xE9 e Pr\xEDncipe",phone:"239",continent:"AF",capital:"S\xE3o Tom\xE9",currency:"STN",languages:["pt"]},Qse={name:"El Salvador",native:"El Salvador",phone:"503",continent:"NA",capital:"San Salvador",currency:"SVC,USD",languages:["es"]},eae={name:"Sint Maarten",native:"Sint Maarten",phone:"1721",continent:"NA",capital:"Philipsburg",currency:"ANG",languages:["nl","en"]},tae={name:"Syria",native:"\u0633\u0648\u0631\u064A\u0627",phone:"963",continent:"AS",capital:"Damascus",currency:"SYP",languages:["ar"]},nae={name:"Swaziland",native:"Swaziland",phone:"268",continent:"AF",capital:"Lobamba",currency:"SZL",languages:["en","ss"]},rae={name:"Turks and Caicos Islands",native:"Turks and Caicos Islands",phone:"1649",continent:"NA",capital:"Cockburn Town",currency:"USD",languages:["en"]},iae={name:"Chad",native:"Tchad",phone:"235",continent:"AF",capital:"N'Djamena",currency:"XAF",languages:["fr","ar"]},oae={name:"French Southern Territories",native:"Territoire des Terres australes et antarctiques fr",phone:"262",continent:"AN",capital:"Port-aux-Fran\xE7ais",currency:"EUR",languages:["fr"]},sae={name:"Togo",native:"Togo",phone:"228",continent:"AF",capital:"Lom\xE9",currency:"XOF",languages:["fr"]},aae={name:"Thailand",native:"\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22",phone:"66",continent:"AS",capital:"Bangkok",currency:"THB",languages:["th"]},lae={name:"Tajikistan",native:"\u0422\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D",phone:"992",continent:"AS",capital:"Dushanbe",currency:"TJS",languages:["tg","ru"]},cae={name:"Tokelau",native:"Tokelau",phone:"690",continent:"OC",capital:"Fakaofo",currency:"NZD",languages:["en"]},uae={name:"East Timor",native:"Timor-Leste",phone:"670",continent:"OC",capital:"Dili",currency:"USD",languages:["pt"]},dae={name:"Turkmenistan",native:"T\xFCrkmenistan",phone:"993",continent:"AS",capital:"Ashgabat",currency:"TMT",languages:["tk","ru"]},fae={name:"Tunisia",native:"\u062A\u0648\u0646\u0633",phone:"216",continent:"AF",capital:"Tunis",currency:"TND",languages:["ar"]},pae={name:"Tonga",native:"Tonga",phone:"676",continent:"OC",capital:"Nuku'alofa",currency:"TOP",languages:["en","to"]},hae={name:"Turkey",native:"T\xFCrkiye",phone:"90",continent:"AS",capital:"Ankara",currency:"TRY",languages:["tr"]},mae={name:"Trinidad and Tobago",native:"Trinidad and Tobago",phone:"1868",continent:"NA",capital:"Port of Spain",currency:"TTD",languages:["en"]},gae={name:"Tuvalu",native:"Tuvalu",phone:"688",continent:"OC",capital:"Funafuti",currency:"AUD",languages:["en"]},vae={name:"Taiwan",native:"\u81FA\u7063",phone:"886",continent:"AS",capital:"Taipei",currency:"TWD",languages:["zh"]},yae={name:"Tanzania",native:"Tanzania",phone:"255",continent:"AF",capital:"Dodoma",currency:"TZS",languages:["sw","en"]},_ae={name:"Ukraine",native:"\u0423\u043A\u0440\u0430\u0457\u043D\u0430",phone:"380",continent:"EU",capital:"Kyiv",currency:"UAH",languages:["uk"]},bae={name:"Uganda",native:"Uganda",phone:"256",continent:"AF",capital:"Kampala",currency:"UGX",languages:["en","sw"]},xae={name:"U.S. Minor Outlying Islands",native:"United States Minor Outlying Islands",phone:"1",continent:"OC",capital:"",currency:"USD",languages:["en"]},Sae={name:"United States",native:"United States",phone:"1",continent:"NA",capital:"Washington D.C.",currency:"USD,USN,USS",languages:["en"]},wae={name:"Uruguay",native:"Uruguay",phone:"598",continent:"SA",capital:"Montevideo",currency:"UYI,UYU",languages:["es"]},Eae={name:"Uzbekistan",native:"O\u2018zbekiston",phone:"998",continent:"AS",capital:"Tashkent",currency:"UZS",languages:["uz","ru"]},kae={name:"Vatican City",native:"Vaticano",phone:"379",continent:"EU",capital:"Vatican City",currency:"EUR",languages:["it","la"]},Cae={name:"Saint Vincent and the Grenadines",native:"Saint Vincent and the Grenadines",phone:"1784",continent:"NA",capital:"Kingstown",currency:"XCD",languages:["en"]},Rae={name:"Venezuela",native:"Venezuela",phone:"58",continent:"SA",capital:"Caracas",currency:"VES",languages:["es"]},Tae={name:"British Virgin Islands",native:"British Virgin Islands",phone:"1284",continent:"NA",capital:"Road Town",currency:"USD",languages:["en"]},Mae={name:"U.S. Virgin Islands",native:"United States Virgin Islands",phone:"1340",continent:"NA",capital:"Charlotte Amalie",currency:"USD",languages:["en"]},Pae={name:"Vietnam",native:"Vi\u1EC7t Nam",phone:"84",continent:"AS",capital:"Hanoi",currency:"VND",languages:["vi"]},Oae={name:"Vanuatu",native:"Vanuatu",phone:"678",continent:"OC",capital:"Port Vila",currency:"VUV",languages:["bi","en","fr"]},Iae={name:"Wallis and Futuna",native:"Wallis et Futuna",phone:"681",continent:"OC",capital:"Mata-Utu",currency:"XPF",languages:["fr"]},Dae={name:"Samoa",native:"Samoa",phone:"685",continent:"OC",capital:"Apia",currency:"WST",languages:["sm","en"]},Aae={name:"Kosovo",native:"Republika e Kosov\xEBs",phone:"377,381,383,386",continent:"EU",capital:"Pristina",currency:"EUR",languages:["sq","sr"]},$ae={name:"Yemen",native:"\u0627\u0644\u064A\u064E\u0645\u064E\u0646",phone:"967",continent:"AS",capital:"Sana'a",currency:"YER",languages:["ar"]},Nae={name:"Mayotte",native:"Mayotte",phone:"262",continent:"AF",capital:"Mamoudzou",currency:"EUR",languages:["fr"]},Lae={name:"South Africa",native:"South Africa",phone:"27",continent:"AF",capital:"Pretoria",currency:"ZAR",languages:["af","en","nr","st","ss","tn","ts","ve","xh","zu"]},Fae={name:"Zambia",native:"Zambia",phone:"260",continent:"AF",capital:"Lusaka",currency:"ZMW",languages:["en"]},Bae={name:"Zimbabwe",native:"Zimbabwe",phone:"263",continent:"AF",capital:"Harare",currency:"USD,ZAR,BWP,GBP,AUD,CNY,INR,JPY",languages:["en","sn","nd"]};var gce={AD:sre,AE:are,AF:lre,AG:cre,AI:ure,AL:dre,AM:fre,AO:pre,AQ:hre,AR:mre,AS:gre,AT:vre,AU:yre,AW:_re,AX:bre,AZ:xre,BA:Sre,BB:wre,BD:Ere,BE:kre,BF:Cre,BG:Rre,BH:Tre,BI:Mre,BJ:Pre,BL:Ore,BM:Ire,BN:Dre,BO:Are,BQ:$re,BR:Nre,BS:Lre,BT:Fre,BV:Bre,BW:zre,BY:Ure,BZ:Wre,CA:jre,CC:Hre,CD:Yre,CF:Vre,CG:Gre,CH:Kre,CI:qre,CK:Xre,CL:Zre,CM:Jre,CN:Qre,CO:eie,CR:tie,CU:nie,CV:rie,CW:iie,CX:oie,CY:sie,CZ:aie,DE:lie,DJ:cie,DK:uie,DM:die,DO:fie,DZ:pie,EC:hie,EE:mie,EG:gie,EH:vie,ER:yie,ES:_ie,ET:bie,FI:xie,FJ:Sie,FK:wie,FM:Eie,FO:kie,FR:Cie,GA:Rie,GB:Tie,GD:Mie,GE:Pie,GF:Oie,GG:Iie,GH:Die,GI:Aie,GL:$ie,GM:Nie,GN:Lie,GP:Fie,GQ:Bie,GR:zie,GS:Uie,GT:Wie,GU:jie,GW:Hie,GY:Yie,HK:Vie,HM:Gie,HN:Kie,HR:qie,HT:Xie,HU:Zie,ID:Jie,IE:Qie,IL:eoe,IM:toe,IN:noe,IO:roe,IQ:ioe,IR:ooe,IS:soe,IT:aoe,JE:loe,JM:coe,JO:uoe,JP:doe,KE:foe,KG:poe,KH:hoe,KI:moe,KM:goe,KN:voe,KP:yoe,KR:_oe,KW:boe,KY:xoe,KZ:Soe,LA:woe,LB:Eoe,LC:koe,LI:Coe,LK:Roe,LR:Toe,LS:Moe,LT:Poe,LU:Ooe,LV:Ioe,LY:Doe,MA:Aoe,MC:$oe,MD:Noe,ME:Loe,MF:Foe,MG:Boe,MH:zoe,MK:Uoe,ML:Woe,MM:joe,MN:Hoe,MO:Yoe,MP:Voe,MQ:Goe,MR:Koe,MS:qoe,MT:Xoe,MU:Zoe,MV:Joe,MW:Qoe,MX:ese,MY:tse,MZ:nse,NA:rse,NC:ise,NE:ose,NF:sse,NG:ase,NI:lse,NL:cse,NO:use,NP:dse,NR:fse,NU:pse,NZ:hse,OM:mse,PA:gse,PE:vse,PF:yse,PG:_se,PH:bse,PK:xse,PL:Sse,PM:wse,PN:Ese,PR:kse,PS:Cse,PT:Rse,PW:Tse,PY:Mse,QA:Pse,RE:Ose,RO:Ise,RS:Dse,RU:Ase,RW:$se,SA:Nse,SB:Lse,SC:Fse,SD:Bse,SE:zse,SG:Use,SH:Wse,SI:jse,SJ:Hse,SK:Yse,SL:Vse,SM:Gse,SN:Kse,SO:qse,SR:Xse,SS:Zse,ST:Jse,SV:Qse,SX:eae,SY:tae,SZ:nae,TC:rae,TD:iae,TF:oae,TG:sae,TH:aae,TJ:lae,TK:cae,TL:uae,TM:dae,TN:fae,TO:pae,TR:hae,TT:mae,TV:gae,TW:vae,TZ:yae,UA:_ae,UG:bae,UM:xae,US:Sae,UY:wae,UZ:Eae,VA:kae,VC:Cae,VE:Rae,VG:Tae,VI:Mae,VN:Pae,VU:Oae,WF:Iae,WS:Dae,XK:Aae,YE:$ae,YT:Nae,ZA:Lae,ZM:Fae,ZW:Bae},_1={},zae=ft.exports;Object.defineProperty(_1,"__esModule",{value:!0});var Uae=_1.default=void 0,Wae=zae(pt),jae=bt,Hae=(0,Wae.default)((0,jae.jsx)("path",{d:"m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"}),"Map");Uae=_1.default=Hae;var b1={},Yae=ft.exports;Object.defineProperty(b1,"__esModule",{value:!0});var Vae=b1.default=void 0,Gae=Yae(pt),Kae=bt,qae=(0,Gae.default)((0,Kae.jsx)("path",{d:"M16.5 12c1.38 0 2.49-1.12 2.49-2.5S17.88 7 16.5 7C15.12 7 14 8.12 14 9.5s1.12 2.5 2.5 2.5zM9 11c1.66 0 2.99-1.34 2.99-3S10.66 5 9 5C7.34 5 6 6.34 6 8s1.34 3 3 3zm7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75zM9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"}),"SupervisorAccount");Vae=b1.default=qae;var x1={},Xae=ft.exports;Object.defineProperty(x1,"__esModule",{value:!0});var Zae=x1.default=void 0,Jae=Xae(pt),Qae=bt,ele=(0,Jae.default)((0,Qae.jsx)("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"}),"VerifiedUser");Zae=x1.default=ele;var S1={},tle=ft.exports;Object.defineProperty(S1,"__esModule",{value:!0});var nle=S1.default=void 0,rle=tle(pt),ile=bt,ole=(0,rle.default)((0,ile.jsx)("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"}),"BugReport");nle=S1.default=ole;var w1={},sle=ft.exports;Object.defineProperty(w1,"__esModule",{value:!0});var ale=w1.default=void 0,lle=sle(pt),ME=bt,cle=(0,lle.default)([(0,ME.jsx)("path",{d:"M17 11c.34 0 .67.04 1 .09V6.27L10.5 3 3 6.27v4.91c0 4.54 3.2 8.79 7.5 9.82.55-.13 1.08-.32 1.6-.55-.69-.98-1.1-2.17-1.1-3.45 0-3.31 2.69-6 6-6z"},"0"),(0,ME.jsx)("path",{d:"M17 13c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 1.38c.62 0 1.12.51 1.12 1.12s-.51 1.12-1.12 1.12-1.12-.51-1.12-1.12.5-1.12 1.12-1.12zm0 5.37c-.93 0-1.74-.46-2.24-1.17.05-.72 1.51-1.08 2.24-1.08s2.19.36 2.24 1.08c-.5.71-1.31 1.17-2.24 1.17z"},"1")],"AdminPanelSettings");ale=w1.default=cle;var E1={},ule=ft.exports;Object.defineProperty(E1,"__esModule",{value:!0});var dle=E1.default=void 0,fle=ule(pt),ple=bt,hle=(0,fle.default)((0,ple.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-5h2v5zm4 0h-2v-3h2v3zm0-5h-2v-2h2v2zm4 5h-2V7h2v10z"}),"Analytics");dle=E1.default=hle;var k1={},mle=ft.exports;Object.defineProperty(k1,"__esModule",{value:!0});var gle=k1.default=void 0,vle=mle(pt),yle=bt,_le=(0,vle.default)((0,yle.jsx)("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos");gle=k1.default=_le;export{jle as $,Ile as A,xW as B,f9 as C,AG as D,Cv as E,cL as F,Kle as G,Ple as H,q0 as I,lce as J,Vle as K,cce as L,aH as M,_G as N,nce as O,os as P,uK as Q,vr as R,kle as S,wle as T,mK as U,Ele as V,Tle as W,zle as X,q3 as Y,Ule as Z,Yle as _,Me as a,Hle as a0,Wle as a1,kK as a2,bj as a3,Zle as a4,Jle as a5,$le as a6,bK as a7,Yh as a8,q_ as a9,$K as aA,qT as aB,yU as aC,ale as aD,Ale as aE,sce as aF,Vae as aG,rce as aH,nle as aI,Zae as aJ,dle as aK,Nle as aL,Lle as aM,Fle as aN,gle as aO,Ole as aP,Mle as aQ,Qz as aR,Rle as aS,xle as aT,OR as aU,D1 as aV,Sle as aW,fce as aa,uce as ab,dce as ac,ey as ad,xM as ae,X_ as af,Vh as ag,pce as ah,ne as ai,Gle as aj,Ble as ak,p8 as al,oj as am,fY as an,f2 as ao,tce as ap,mce as aq,Z_ as ar,Uae as as,hce as at,gce as au,PK as av,oce as aw,ice as ax,zK as ay,gU as az,ace as b,w3 as c,Ce as d,Cle as e,HG as f,Dle as g,yi as h,qG as i,M as j,oK as k,qle as l,eK as m,Ph as n,hG as o,cG as p,mH as q,b as r,Xle as s,K as t,HT as u,Qle as v,EG as w,ece as x,MG as y,BG as z};
206
  * Released under the MIT License
207
  */class wX{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],s=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=O2.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);!n||(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Ni=new wX;const Lw="transparent",EX={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Cw(e||Lw),i=r.valid&&Cw(t||Lw);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class kX{constructor(t,n,r,i){const o=n[r];i=of([t.to,i,o,t.from]);const s=of([t.from,o,i]);this._active=!0,this._fn=t.fn||EX[t.type||typeof s],this._easing=zc[t.easing]||zc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=of([t.to,n,i,t.from]),this._from=of([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,a=this._to;let l;if(this._active=o!==a&&(s||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/r%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}const CX=["x","y","borderWidth","radius","tension"],RX=["color","borderColor","backgroundColor"];Fe.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const TX=Object.keys(Fe.animation);Fe.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"});Fe.set("animations",{colors:{type:"color",properties:RX},numbers:{type:"number",properties:CX}});Fe.describe("animations",{_fallback:"animation"});Fe.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=>e|0}}}});class nM{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Ye(t))return;const n=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const i=t[r];if(!Ye(i))return;const o={};for(const s of TX)o[s]=i[s];(vt(i.properties)&&i.properties||[r]).forEach(s=>{(s===r||!n.has(s))&&n.set(s,o)})})}_animateOptions(t,n){const r=n.options,i=PX(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&MX(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=d=new kX(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Ni.add(this._chart,r),!0}}function MX(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function PX(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Fw(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function OX(e,t,n){if(n===!1)return!1;const r=Fw(e,n),i=Fw(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function IX(e){let t,n,r,i;return Ye(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function rM(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function Bw(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let s,a,l,c;if(t!==null){for(s=0,a=i.length;s<a;++s){if(l=+i[s],l===n){if(r.all)continue;break}c=e.values[l],dn(c)&&(o||t===0||Ei(t)===Ei(c))&&(t+=c)}return t}}function DX(e){const t=Object.keys(e),n=new Array(t.length);let r,i,o;for(r=0,i=t.length;r<i;++r)o=t[r],n[r]={x:o,y:e[o]};return n}function zw(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function AX(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function $X(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function NX(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Uw(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function Ww(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,l=o.axis,c=s.axis,u=AX(o,s,r),d=t.length;let f;for(let p=0;p<d;++p){const h=t[p],{[l]:g,[c]:_}=h,m=h._stacks||(h._stacks={});f=m[c]=NX(i,u,g),f[a]=_,f._top=Uw(f,s,!0,r.type),f._bottom=Uw(f,s,!1,r.type)}}function mg(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function LX(e,t){return as(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function FX(e,t,n){return as(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ec(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(!!r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n]}}}const gg=e=>e==="reset"||e==="none",jw=(e,t)=>t?e:Object.assign({},e),BX=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:rM(n,!0),values:null};class Ri{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=zw(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ec(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,p,h)=>d==="x"?f:d==="r"?h:p,o=n.xAxisID=Pe(r.xAxisID,mg(t,"x")),s=n.yAxisID=Pe(r.yAxisID,mg(t,"y")),a=n.rAxisID=Pe(r.rAxisID,mg(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,s,a),u=n.vAxisID=i(l,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Tw(this._data,this),t._stacked&&ec(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Ye(n))this._data=DX(n);else if(r!==n){if(r){Tw(r,this);const i=this._cachedMeta;ec(i),i._parsed=[]}n&&Object.isExtensible(n)&&zq(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=zw(n.vScale,n),n.stack!==r.stack&&(i=!0,ec(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&Ww(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,a=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{vt(i[t])?f=this.parseArrayData(r,i,t,n):Ye(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const p=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);r._sorted=l}s&&Ww(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:s}=t,a=o.axis,l=s.axis,c=o.getLabels(),u=o===s,d=new Array(i);let f,p,h;for(f=0,p=i;f<p;++f)h=f+r,d[f]={[a]:u||o.parse(c[h],h),[l]:s.parse(n[h],h)};return d}parseArrayData(t,n,r,i){const{xScale:o,yScale:s}=t,a=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],a[l]={x:o.parse(d[0],u),y:s.parse(d[1],u)};return a}parseObjectData(t,n,r,i){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=n[f],c[u]={x:o.parse(Zo(p,a),f),y:s.parse(Zo(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,o=this._cachedMeta,s=n[t.axis],a={keys:rM(i,!0),values:n._stacks[t.axis]};return Bw(a,s,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let s=o===null?NaN:o;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,s=Bw(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&t===r.iScale,s=i.length,a=this._getOtherScale(t),l=BX(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=$X(a);let f,p;function h(){p=i[f];const g=p[a.axis];return!dn(p[t.axis])||u>g||d<g}for(f=0;f<s&&!(!h()&&(this.updateRangeFromParsed(c,t,p,l),o));++f);if(o){for(f=s-1;f>=0;--f)if(!h()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i<o;++i)s=n[i][t.axis],dn(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=IX(Pe(this.options.clip,OX(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,s=[],a=this._drawStart||0,l=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,o,a,l),u=a;u<a+l;++u){const d=i[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,o))}for(u=0;u<s.length;++u)s[u].draw(t,o)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];o=s.$context||(s.$context=FX(this.getContext(),t,s)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=LX(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",o=this._cachedDataOpts,s=t+"-"+n,a=o[s],l=this.enableOptionSharing&&Or(r);if(a)return jw(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Fe.elements[t]),h=()=>this.getContext(r,i),g=c.resolveNamedOptions(f,p,h,d);return g.$shared&&(g.$shared=l,o[s]=Object.freeze(jw(g,l))),g}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new nM(i,l&&l.animations);return l&&l._cacheable&&(o[s]=Object.freeze(c)),c}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||gg(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){gg(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!gg(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,s=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=s;a--)c[a]=c[a-n]};for(l(o),a=t;a<s;++a)o[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(o,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&ec(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Ri.defaults={};Ri.prototype.datasetElementType=null;Ri.prototype.dataElementType=null;function zX(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=Y2(r.sort((i,o)=>i-o))}return e._cache.$bar}function UX(e){const t=e.iScale,n=zX(t,e.type);let r=t._length,i,o,s,a;const l=()=>{s===32767||s===-32768||(Or(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(i=0,o=n.length;i<o;++i)s=t.getPixelForValue(n[i]),l();for(a=void 0,i=0,o=t.ticks.length;i<o;++i)s=t.getPixelForTick(i),l();return r}function WX(e,t,n,r){const i=n.barThickness;let o,s;return tt(i)?(o=t.min*n.categoryPercentage,s=n.barPercentage):(o=i*r,s=1),{chunk:o/r,ratio:s,start:t.pixels[e]-o/2}}function jX(e,t,n,r){const i=t.pixels,o=i[e];let s=e>0?i[e-1]:null,a=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;s===null&&(s=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-s);const c=o-(o-Math.min(s,a))/2*l;return{chunk:Math.abs(a-s)/2*l/r,ratio:n.barPercentage,start:c}}function HX(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),s=Math.min(i,o),a=Math.max(i,o);let l=s,c=a;Math.abs(s)>Math.abs(a)&&(l=a,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:s,max:a}}function iM(e,t,n,r){return vt(e)?HX(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Hw(e,t,n,r){const i=e.iScale,o=e.vScale,s=i.getLabels(),a=i===o,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=t[c],d={},d[i.axis]=a||i.parse(s[c],c),l.push(iM(f,d,o,c));return l}function vg(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function YX(e,t,n){return e!==0?Ei(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function VX(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function GX(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}const{start:s,end:a,reverse:l,top:c,bottom:u}=VX(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(o[Yw(u,s,a,l)]=!0,i=c)),o[Yw(i,s,a,l)]=!0,e.borderSkipped=o}function Yw(e,t,n,r){return r?(e=KX(e,t,n),e=Vw(e,n,t)):e=Vw(e,t,n),e}function KX(e,t,n){return e===t?n:e===n?t:e}function Vw(e,t,n){return e==="start"?t:e==="end"?n:e}function qX(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class jh extends Ri{parsePrimitiveData(t,n,r,i){return Hw(t,n,r,i)}parseArrayData(t,n,r,i){return Hw(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,u=s.axis==="x"?a:l,d=[];let f,p,h,g;for(f=r,p=r+i;f<p;++f)g=n[f],h={},h[o.axis]=o.parse(Zo(g,c),f),d.push(iM(Zo(g,u),h,s,f));return d}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),s=o._custom,a=vg(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const o=i==="reset",{index:s,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let p=n;p<n+r;p++){const h=this.getParsed(p),g=o||tt(h[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),_=this._calculateBarIndexPixels(p,u),m=(h._stacks||{})[a.axis],v={horizontal:c,base:g.base,enableBorderRadius:!m||vg(h._custom)||s===m._top||s===m._bottom,x:c?g.head:_.center,y:c?_.center:g.head,height:c?_.size:Math.abs(g.size),width:c?Math.abs(g.size):_.size};f&&(v.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const y=v.options||t[p].options;GX(v,y,m,s),qX(v,y,u.ratio),this.updateElement(t[p],p,v,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=r.options.stacked,s=[],a=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(tt(u)||isNaN(u))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((o===!1||s.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;o<s;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const a=t.barThickness;return{min:a||UX(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r},options:{base:i,minBarLength:o}}=this,s=i||0,a=this.getParsed(t),l=a._custom,c=vg(l);let u=a[n.axis],d=0,f=r?this.applyStack(n,a,r):u,p,h;f!==u&&(d=f-u,f=u),c&&(u=l.barStart,f=l.barEnd-l.barStart,u!==0&&Ei(u)!==Ei(l.barEnd)&&(d=0),d+=u);const g=!tt(i)&&!c?i:d;let _=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)?p=n.getPixelForValue(d+f):p=_,h=p-_,Math.abs(h)<o){h=YX(h,n,s)*o,u===s&&(_-=h/2);const m=n.getPixelForDecimal(0),v=n.getPixelForDecimal(1),y=Math.min(m,v),x=Math.max(m,v);_=Math.max(Math.min(_,x),y),p=_+h}if(_===n.getPixelForValue(s)){const m=Ei(h)*n.getLineWidthForValue(s)/2;_+=m,h-=m}return{size:h,base:_,head:p,center:p+h/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,s=Pe(i.maxBarThickness,1/0);let a,l;if(n.grouped){const c=o?this._getStackCount(t):n.stackCount,u=i.barThickness==="flex"?jX(t,n,i,c):WX(t,n,i,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);a=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else a=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(s,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&r[o].draw(this._ctx)}}jh.id="bar";jh.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};jh.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class H_ extends Ri{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,r,i){const o=super.parsePrimitiveData(t,n,r,i);for(let s=0;s<o.length;s++)o[s]._custom=this.resolveDataElementOptions(s+r).radius;return o}parseArrayData(t,n,r,i){const o=super.parseArrayData(t,n,r,i);for(let s=0;s<o.length;s++){const a=n[r+s];o[s]._custom=Pe(a[2],this.resolveDataElementOptions(s+r).radius)}return o}parseObjectData(t,n,r,i){const o=super.parseObjectData(t,n,r,i);for(let s=0;s<o.length;s++){const a=n[r+s];o[s]._custom=Pe(a&&a.r&&+a.r,this.resolveDataElementOptions(s+r).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let r=t.length-1;r>=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,{xScale:r,yScale:i}=n,o=this.getParsed(t),s=r.getLabelForValue(o.x),a=i.getLabelForValue(o.y),l=o._custom;return{label:n.label,value:"("+s+", "+a+(l?", "+l:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),u=s.axis,d=a.axis;for(let f=n;f<n+r;f++){const p=t[f],h=!o&&this.getParsed(f),g={},_=g[u]=o?s.getPixelForDecimal(.5):s.getPixelForValue(h[u]),m=g[d]=o?a.getBasePixel():a.getPixelForValue(h[d]);g.skip=isNaN(_)||isNaN(m),c&&(g.options=l||this.resolveDataElementOptions(f,p.active?"active":i),o&&(g.options.radius=0)),this.updateElement(p,f,g,i)}}resolveDataElementOptions(t,n){const r=this.getParsed(t);let i=super.resolveDataElementOptions(t,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const o=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Pe(r&&r._custom,o),i}}H_.id="bubble";H_.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};H_.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function XX(e,t,n){let r=1,i=1,o=0,s=0;if(t<lt){const a=e,l=a+t,c=Math.cos(a),u=Math.sin(a),d=Math.cos(l),f=Math.sin(l),p=(y,x,w)=>Cu(y,a,l,!0)?1:Math.max(x,x*n,w,w*n),h=(y,x,w)=>Cu(y,a,l,!0)?-1:Math.min(x,x*n,w,w*n),g=p(0,c,d),_=p(Lt,u,f),m=h(Mt,c,d),v=h(Mt+Lt,u,f);r=(g-m)/2,i=(_-v)/2,o=-(g+m)/2,s=-(_+v)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:s}}class od extends Ri{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(Ye(r[t])){const{key:l="value"}=this._parsing;o=c=>+Zo(r[c],l)}let s,a;for(s=t,a=t+n;s<a;++s)i._parsed[s]=o(s)}}_getRotation(){return Gr(this.options.rotation-90)}_getCircumference(){return Gr(this.options.circumference)}_getRotationExtents(){let t=lt,n=-lt;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)){const i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),s=i._getCircumference();t=Math.min(t,o),n=Math.max(n,o+s)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(r.width,r.height)-s)/2,0),l=Math.min(VK(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:h,offsetY:g}=XX(d,u,l),_=(r.width-s)/f,m=(r.height-s)/p,v=Math.max(Math.min(_,m)/2,0),y=D2(this.options.radius,v),x=Math.max(y*l,0),w=(y-x)/this._getVisibleDatasetWeightTotal();this.offsetX=h*y,this.offsetY=g*y,i.total=this.calculateTotal(),this.outerRadius=y-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/lt)}updateElements(t,n,r,i){const o=i==="reset",s=this.chart,a=s.chartArea,c=s.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=o&&c.animateScale,p=f?0:this.innerRadius,h=f?0:this.outerRadius,{sharedOptions:g,includeOptions:_}=this._getSharedOptions(n,i);let m=this._getRotation(),v;for(v=0;v<n;++v)m+=this._circumference(v,o);for(v=n;v<n+r;++v){const y=this._circumference(v,o),x=t[v],w={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+y,circumference:y,outerRadius:h,innerRadius:p};_&&(w.options=g||this.resolveDataElementOptions(v,x.active?"active":i)),m+=y,this.updateElement(x,v,w,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?lt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=id(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,s,a,l;if(!t){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){s=r.getDatasetMeta(i),t=s.data,a=s.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++i)l=a.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Pe(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}od.id="doughnut";od.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};od.descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"};od.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n}}=e.legend.options;return t.labels.map((r,i)=>{const s=e.getDatasetMeta(0).controller.getStyle(i);return{text:r,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}},tooltip:{callbacks:{title(){return""},label(e){let t=e.label;const n=": "+e.formattedValue;return vt(t)?(t=t.slice(),t[0]+=n):t+=n,t}}}}};class sd extends Ri{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:a,count:l}=ZX(n,i,s);this._drawStart=a,this._drawCount=l,JX(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=s.axis,p=a.axis,{spanGaps:h,segment:g}=this.options,_=ku(h)?h:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||o||i==="none";let v=n>0&&this.getParsed(n-1);for(let y=n;y<n+r;++y){const x=t[y],w=this.getParsed(y),k=m?x:{},E=tt(w[p]),R=k[f]=s.getPixelForValue(w[f],y),C=k[p]=o||E?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,w,l):w[p],y);k.skip=isNaN(R)||isNaN(C)||E,k.stop=y>0&&Math.abs(w[f]-v[f])>_,g&&(k.parsed=w,k.raw=c.data[y]),d&&(k.options=u||this.resolveDataElementOptions(y,x.active?"active":i)),m||this.updateElement(x,y,k,i),v=w}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}sd.id="line";sd.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};sd.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};function ZX(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,_parsed:a}=e,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:f}=s.getUserBounds();d&&(i=En(Math.min(Ts(a,s.axis,c).lo,n?r:Ts(t,l,s.getPixelForValue(c)).lo),0,r-1)),f?o=En(Math.max(Ts(a,s.axis,u).hi+1,n?0:Ts(t,l,s.getPixelForValue(u)).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function JX(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}class Y_ extends Ri{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=id(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return X2.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(o<n.min&&(n.min=o),o>n.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),a=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,r,i){const o=i==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*Mt;let p=f,h;const g=360/this.countVisibleElements();for(h=0;h<n;++h)p+=this._computeAngle(h,i,g);for(h=n;h<n+r;h++){const _=t[h];let m=p,v=p+this._computeAngle(h,i,g),y=s.getDataVisibility(h)?c.getDistanceFromCenterForValue(this.getParsed(h).r):0;p=v,o&&(l.animateScale&&(y=0),l.animateRotate&&(m=v=f));const x={x:u,y:d,innerRadius:0,outerRadius:y,startAngle:m,endAngle:v,options:this.resolveDataElementOptions(h,_.active?"active":i)};this.updateElement(_,h,x,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Gr(this.resolveDataElementOptions(t,n).angle||r):0}}Y_.id="polarArea";Y_.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Y_.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n}}=e.legend.options;return t.labels.map((r,i)=>{const s=e.getDatasetMeta(0).controller.getStyle(i);return{text:r,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}},tooltip:{callbacks:{title(){return""},label(e){return e.chart.data.labels[e.dataIndex]+": "+e.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class V_ extends od{}V_.id="pie";V_.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class G_ extends Ri{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return X2.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:s};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,s=i==="reset";for(let a=n;a<n+r;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":i),u=o.getPointPositionForValue(a,this.getParsed(a).r),d=s?o.xCenter:u.x,f=s?o.yCenter:u.y,p={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,a,p,i)}}}G_.id="radar";G_.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};G_.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class K_ extends sd{}K_.id="scatter";K_.defaults={showLine:!1,fill:!1};K_.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(e){return"("+e.label+", "+e.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function ps(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Kv{constructor(t){this.options=t||{}}formats(){return ps()}parse(t,n){return ps()}format(t,n){return ps()}add(t,n,r){return ps()}diff(t,n,r){return ps()}startOf(t,n,r){return ps()}endOf(t,n){return ps()}}Kv.override=function(e){Object.assign(Kv.prototype,e)};var QX={_date:Kv};function eZ(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const l=a._reversePixels?Fq:Ts;if(r){if(i._sharedOptions){const c=o[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(o,t,n-u),f=l(o,t,n+u);return{lo:d.lo,hi:f.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function ad(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:u}=o[a],{lo:d,hi:f}=eZ(o[a],t,s,i);for(let p=d;p<=f;++p){const h=u[p];h.skip||r(h,c,p)}}}function tZ(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,s=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function yg(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||ad(e,n,t,function(a,l,c){!i&&!Ru(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function nZ(e,t,n,r){let i=[];function o(s,a,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],r),{angle:d}=N2(s,{x:t.x,y:t.y});Cu(d,c,u)&&i.push({element:s,datasetIndex:a,index:l})}return ad(e,n,t,o),i}function rZ(e,t,n,r,i,o){let s=[];const a=tZ(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(r&&!p)return;const h=u.getCenterPoint(i);if(!(!!o||e.isPointInArea(h))&&!p)return;const _=a(t,h);_<l?(s=[{element:u,datasetIndex:d,index:f}],l=_):_===l&&s.push({element:u,datasetIndex:d,index:f})}return ad(e,n,t,c),s}function _g(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?nZ(e,t,n,i):rZ(e,t,n,r,i,o)}function Gw(e,t,n,r,i){const o=[],s=n==="x"?"inXRange":"inYRange";let a=!1;return ad(e,n,t,(l,c,u)=>{l[s](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:o}var iZ={evaluateInteractionItems:ad,modes:{index(e,t,n,r){const i=_s(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?yg(e,i,o,r,s):_g(e,i,o,!1,r,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=_s(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?yg(e,i,o,r,s):_g(e,i,o,!1,r,s);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,r){const i=_s(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return yg(e,i,o,r,s)},nearest(e,t,n,r){const i=_s(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return _g(e,i,o,n.intersect,r,s)},x(e,t,n,r){const i=_s(t,e);return Gw(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=_s(t,e);return Gw(e,i,"y",n.intersect,r)}}};const oM=["left","top","right","bottom"];function tc(e,t){return e.filter(n=>n.pos===t)}function Kw(e,t){return e.filter(n=>oM.indexOf(n.pos)===-1&&n.box.axis===t)}function nc(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function oZ(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:s,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&o+s,stackWeight:a});return t}function sZ(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!oM.includes(i))continue;const s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return t}function aZ(e,t){const n=sZ(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,s,a;for(o=0,s=e.length;o<s;++o){a=e[o];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*r:l&&t.availableWidth,a.height=i):(a.width=r,a.height=u?u*i:l&&t.availableHeight)}return n}function lZ(e){const t=oZ(e),n=nc(t.filter(c=>c.box.fullSize),!0),r=nc(tc(t,"left"),!0),i=nc(tc(t,"right")),o=nc(tc(t,"top"),!0),s=nc(tc(t,"bottom")),a=Kw(t,"x"),l=Kw(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(s).concat(a),chartArea:tc(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(s).concat(a)}}function qw(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function sM(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function cZ(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!Ye(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&sM(s,o.getPadding());const a=Math.max(0,t.outerWidth-qw(s,e,"left","right")),l=Math.max(0,t.outerHeight-qw(s,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function uZ(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function dZ(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function mc(e,t,n,r){const i=[];let o,s,a,l,c,u;for(o=0,s=e.length,c=0;o<s;++o){a=e[o],l=a.box,l.update(a.width||t.w,a.height||t.h,dZ(a.horizontal,t));const{same:d,other:f}=cZ(t,n,a,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(a)}return c&&mc(i,t,n,r)||u}function af(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function Xw(e,t,n,r){const i=n.padding;let{x:o,y:s}=t;for(const a of e){const l=a.box,c=r[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*u,f=c.size||l.height;Or(c.start)&&(s=c.start),l.fullSize?af(l,i.left,s,n.outerWidth-i.right-i.left,f):af(l,t.left+c.placed,s,d,f),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,f=c.size||l.width;Or(c.start)&&(o=c.start),l.fullSize?af(l,o,i.top,f,n.outerHeight-i.bottom-i.top):af(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=s}Fe.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var _r={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Rn(e.options.layout.padding),o=Math.max(t-i.width,0),s=Math.max(n-i.height,0),a=lZ(e.boxes),l=a.vertical,c=a.horizontal;et(e.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=l.reduce((g,_)=>_.box.options&&_.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/u,hBoxMaxHeight:s/2}),f=Object.assign({},i);sM(f,Rn(r));const p=Object.assign({maxPadding:f,w:o,h:s,x:i.left,y:i.top},i),h=aZ(l.concat(c),d);mc(a.fullSize,p,d,h),mc(l,p,d,h),mc(c,p,d,h)&&mc(l,p,d,h),uZ(p),Xw(a.leftAndTop,p,d,h),p.x+=p.w,p.y+=p.h,Xw(a.rightAndBottom,p,d,h),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},et(a.chartArea,g=>{const _=g.box;Object.assign(_,e.chartArea),_.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class aM{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class fZ extends aM{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Af="$chartjs",pZ={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Zw=e=>e===null||e==="";function hZ(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Af]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Zw(i)){const o=Iw(e,"width");o!==void 0&&(e.width=o)}if(Zw(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=Iw(e,"height");o!==void 0&&(e.height=o)}return e}const lM=cX?{passive:!0}:!1;function mZ(e,t,n){e.addEventListener(t,n,lM)}function gZ(e,t,n){e.canvas.removeEventListener(t,n,lM)}function vZ(e,t){const n=pZ[e.type]||e.type,{x:r,y:i}=_s(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Ep(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function yZ(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||Ep(a.addedNodes,r),s=s&&!Ep(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function _Z(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||Ep(a.removedNodes,r),s=s&&!Ep(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Mu=new Map;let Jw=0;function cM(){const e=window.devicePixelRatio;e!==Jw&&(Jw=e,Mu.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function bZ(e,t){Mu.size||window.addEventListener("resize",cM),Mu.set(e,t)}function xZ(e){Mu.delete(e),Mu.size||window.removeEventListener("resize",cM)}function SZ(e,t,n){const r=e.canvas,i=r&&j_(r);if(!i)return;const o=I2((a,l)=>{const c=i.clientWidth;n(a,l),c<i.clientWidth&&n()},window),s=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return s.observe(i),bZ(e,o),s}function bg(e,t,n){n&&n.disconnect(),t==="resize"&&xZ(e)}function wZ(e,t,n){const r=e.canvas,i=I2(o=>{e.ctx!==null&&n(vZ(o,e))},e,o=>{const s=o[0];return[s,s.offsetX,s.offsetY]});return mZ(r,t,i),i}class EZ extends aM{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(hZ(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Af])return!1;const r=n[Af].initial;["height","width"].forEach(o=>{const s=r[o];tt(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[Af],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:yZ,detach:_Z,resize:SZ}[n]||wZ;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:bg,detach:bg,resize:bg}[n]||gZ)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return lX(t,n,r,i)}isAttached(t){const n=j_(t);return!!(n&&n.isConnected)}}function kZ(e){return!J2()||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas?fZ:EZ}class oi{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return ku(this.x)&&ku(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}}oi.defaults={};oi.defaultRoutes=void 0;const uM={values(e){return vt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=CZ(e,n)}const s=gr(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),id(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=e/Math.pow(10,Math.floor(gr(e)));return r===1||r===2||r===5?uM.numeric.call(this,e,t,n):""}};function CZ(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Hh={formatters:uM};Fe.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth: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:Hh.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});Fe.route("scale.ticks","color","","color");Fe.route("scale.grid","color","","borderColor");Fe.route("scale.grid","borderColor","","borderColor");Fe.route("scale.title","color","","color");Fe.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"});Fe.describe("scales",{_fallback:"scale"});Fe.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"});function RZ(e,t){const n=e.options.ticks,r=n.maxTicksLimit||TZ(e),i=n.major.enabled?PZ(t):[],o=i.length,s=i[0],a=i[o-1],l=[];if(o>r)return OZ(t,l,i,o/r),l;const c=MZ(i,t,r);if(o>0){let u,d;const f=o>1?Math.round((a-s)/(o-1)):null;for(lf(t,l,c,tt(f)?0:s-f,s),u=0,d=o-1;u<d;u++)lf(t,l,c,i[u],i[u+1]);return lf(t,l,c,a,tt(f)?t.length:a+f),l}return lf(t,l,c),l}function TZ(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function MZ(e,t,n){const r=IZ(e),i=t.length/n;if(!r)return Math.max(i,1);const o=eq(r);for(let s=0,a=o.length-1;s<a;s++){const l=o[s];if(l>i)return l}return Math.max(i,1)}function PZ(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function OZ(e,t,n,r){let i=0,o=n[0],s;for(r=Math.ceil(r),s=0;s<e.length;s++)s===o&&(t.push(e[s]),i++,o=n[i*r])}function lf(e,t,n,r,i){const o=Pe(r,0),s=Math.min(Pe(i,e.length),e.length);let a=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=o;u<0;)a++,u=Math.round(o+a*n);for(c=Math.max(o,0);c<s;c++)c===u&&(t.push(e[c]),a++,u=Math.round(o+a*n))}function IZ(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const DZ=e=>e==="left"?"right":e==="right"?"left":e,Qw=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n;function eE(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function AZ(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,s=e._endPixel,a=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-o,s-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-a||l>s+a)))return l}function $Z(e,t){et(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function rc(e){return e.drawTicks?e.tickLength:0}function tE(e,t){if(!e.display)return 0;const n=qt(e.font,t),r=Rn(e.padding);return(vt(e.text)?e.text.length:1)*n.lineHeight+r.height}function NZ(e,t){return as(e,{scale:t,type:"scale"})}function LZ(e,t,n){return as(e,{tick:n,index:t,type:"tick"})}function FZ(e,t,n){let r=P_(e);return(n&&t!=="right"||!n&&t==="right")&&(r=DZ(r)),r}function BZ(e,t,n,r){const{top:i,left:o,bottom:s,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,p,h;const g=s-i,_=a-o;if(e.isHorizontal()){if(p=_n(r,o,a),Ye(n)){const m=Object.keys(n)[0],v=n[m];h=u[m].getPixelForValue(v)+g-t}else n==="center"?h=(c.bottom+c.top)/2+g-t:h=Qw(e,n,t);f=a-o}else{if(Ye(n)){const m=Object.keys(n)[0],v=n[m];p=u[m].getPixelForValue(v)-_+t}else n==="center"?p=(c.left+c.right)/2-_+t:p=Qw(e,n,t);h=_n(r,s,i),d=n==="left"?-Lt:Lt}return{titleX:p,titleY:h,maxWidth:f,rotation:d}}class ta extends oi{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.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(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=dr(t,Number.POSITIVE_INFINITY),n=dr(n,Number.NEGATIVE_INFINITY),r=dr(r,Number.POSITIVE_INFINITY),i=dr(i,Number.NEGATIVE_INFINITY),{min:dr(t,r),max:dr(n,i),minDefined:dn(t),maxDefined:dn(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),s;if(i&&o)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)s=a[l].controller.getMinMax(this,t),i||(n=Math.min(n,s.min)),o||(r=Math.max(r,s.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:dr(n,dr(r,n)),max:dr(r,dr(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 t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ct(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Lq(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?eE(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=RZ(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ct(this.options.afterUpdate,[this])}beforeSetDimensions(){ct(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){ct(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ct(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ct(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=ct(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){ct(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ct(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=this.ticks.length,i=n.minRotation||0,o=n.maxRotation;let s=i,a,l,c;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=En(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:p/(r-1),d+6>a&&(a=p/(r-(t.offset?.5:1)),l=this.maxHeight-rc(t.grid)-n.padding-tE(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),s=I_(Math.min(Math.asin(En((u.highest.height+6)/a,-1,1)),Math.asin(En(l/c,-1,1))-Math.asin(En(f/c,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){ct(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ct(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=tE(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=rc(o)+l):(t.height=this.maxHeight,t.width=rc(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,h=Gr(this.labelRotation),g=Math.cos(h),_=Math.sin(h);if(a){const m=r.mirror?0:_*d.width+g*f.height;t.height=Math.min(this.maxHeight,t.height+m+p)}else{const m=r.mirror?0:g*d.width+_*f.height;t.width=Math.min(this.maxWidth,t.width+m+p)}this._calculatePadding(c,u,_,g)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=r*n.height):(f=r*t.height,p=i*n.width):o==="start"?p=n.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+s)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_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(){ct(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)tt(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=eE(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length)}return t}_computeLabelSizes(t,n){const{ctx:r,_longestTextCache:i}=this,o=[],s=[];let a=0,l=0,c,u,d,f,p,h,g,_,m,v,y;for(c=0;c<n;++c){if(f=t[c].label,p=this._resolveTickFontOptions(c),r.font=h=p.string,g=i[h]=i[h]||{data:{},gc:[]},_=p.lineHeight,m=v=0,!tt(f)&&!vt(f))m=Sp(r,g.data,g.gc,m,f),v=_;else if(vt(f))for(u=0,d=f.length;u<d;++u)y=f[u],!tt(y)&&!vt(y)&&(m=Sp(r,g.data,g.gc,m,y),v+=_);o.push(m),s.push(v),a=Math.max(m,a),l=Math.max(v,l)}$Z(i,n);const x=o.indexOf(a),w=s.indexOf(l),k=E=>({width:o[E]||0,height:s[E]||0});return{first:k(0),last:k(n-1),widest:k(x),highest:k(w),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return rq(this._alignToPixels?fs(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=LZ(this.getContext(),t,r))}return this.$context||(this.$context=NZ(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Gr(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,a=o?o.widest.width+s:0,l=o?o.highest.height+s:0;return this.isHorizontal()?l*r>a*i?a/r:l/i:l*i<a*r?l/r:a/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s}=i,a=o.offset,l=this.isHorizontal(),u=this.ticks.length+(a?1:0),d=rc(o),f=[],p=o.setContext(this.getContext()),h=p.drawBorder?p.borderWidth:0,g=h/2,_=function(A){return fs(r,A,h)};let m,v,y,x,w,k,E,R,C,T,P,$;if(s==="top")m=_(this.bottom),k=this.bottom-d,R=m-g,T=_(t.top)+g,$=t.bottom;else if(s==="bottom")m=_(this.top),T=t.top,$=_(t.bottom)-g,k=m+g,R=this.top+d;else if(s==="left")m=_(this.right),w=this.right-d,E=m-g,C=_(t.left)+g,P=t.right;else if(s==="right")m=_(this.left),C=t.left,P=_(t.right)-g,w=m+g,E=this.left+d;else if(n==="x"){if(s==="center")m=_((t.top+t.bottom)/2+.5);else if(Ye(s)){const A=Object.keys(s)[0],I=s[A];m=_(this.chart.scales[A].getPixelForValue(I))}T=t.top,$=t.bottom,k=m+g,R=k+d}else if(n==="y"){if(s==="center")m=_((t.left+t.right)/2);else if(Ye(s)){const A=Object.keys(s)[0],I=s[A];m=_(this.chart.scales[A].getPixelForValue(I))}w=m-g,E=w-d,C=t.left,P=t.right}const N=Pe(i.ticks.maxTicksLimit,u),Y=Math.max(1,Math.ceil(u/N));for(v=0;v<u;v+=Y){const A=o.setContext(this.getContext(v)),I=A.lineWidth,B=A.color,O=o.borderDash||[],D=A.borderDashOffset,U=A.tickWidth,Z=A.tickColor,J=A.tickBorderDash||[],be=A.tickBorderDashOffset;y=AZ(this,v,a),y!==void 0&&(x=fs(r,y,I),l?w=E=C=P=x:k=R=T=$=x,f.push({tx1:w,ty1:k,tx2:E,ty2:R,x1:C,y1:T,x2:P,y2:$,width:I,color:B,borderDash:O,borderDashOffset:D,tickWidth:U,tickColor:Z,tickBorderDash:J,tickBorderDashOffset:be}))}return this._ticksLength=u,this._borderValue=m,f}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,s=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=rc(r.grid),p=f+u,h=d?-u:p,g=-Gr(this.labelRotation),_=[];let m,v,y,x,w,k,E,R,C,T,P,$,N="middle";if(i==="top")k=this.bottom-h,E=this._getXAxisLabelAlignment();else if(i==="bottom")k=this.top+h,E=this._getXAxisLabelAlignment();else if(i==="left"){const A=this._getYAxisLabelAlignment(f);E=A.textAlign,w=A.x}else if(i==="right"){const A=this._getYAxisLabelAlignment(f);E=A.textAlign,w=A.x}else if(n==="x"){if(i==="center")k=(t.top+t.bottom)/2+p;else if(Ye(i)){const A=Object.keys(i)[0],I=i[A];k=this.chart.scales[A].getPixelForValue(I)+p}E=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")w=(t.left+t.right)/2-p;else if(Ye(i)){const A=Object.keys(i)[0],I=i[A];w=this.chart.scales[A].getPixelForValue(I)}E=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const Y=this._getLabelSizes();for(m=0,v=a.length;m<v;++m){y=a[m],x=y.label;const A=o.setContext(this.getContext(m));R=this.getPixelForTick(m)+o.labelOffset,C=this._resolveTickFontOptions(m),T=C.lineHeight,P=vt(x)?x.length:1;const I=P/2,B=A.color,O=A.textStrokeColor,D=A.textStrokeWidth;let U=E;s?(w=R,E==="inner"&&(m===v-1?U=this.options.reverse?"left":"right":m===0?U=this.options.reverse?"right":"left":U="center"),i==="top"?c==="near"||g!==0?$=-P*T+T/2:c==="center"?$=-Y.highest.height/2-I*T+T:$=-Y.highest.height+T/2:c==="near"||g!==0?$=T/2:c==="center"?$=Y.highest.height/2-I*T:$=Y.highest.height-P*T,d&&($*=-1)):(k=R,$=(1-P)*T/2);let Z;if(A.showLabelBackdrop){const J=Rn(A.backdropPadding),be=Y.heights[m],re=Y.widths[m];let se=k+$-J.top,G=w-J.left;switch(N){case"middle":se-=be/2;break;case"bottom":se-=be;break}switch(E){case"center":G-=re/2;break;case"right":G-=re;break}Z={left:G,top:se,width:re+J.width,height:be+J.height,color:A.backdropColor}}_.push({rotation:g,label:x,font:C,color:B,strokeColor:O,strokeWidth:D,textOffset:$,textAlign:U,textBaseline:N,translation:[w,k],backdrop:Z})}return _}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Gr(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,s=this._getLabelSizes(),a=t+o,l=s.widest.width;let c,u;return n==="left"?i?(u=this.right+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o<s;++o){const l=i[o];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{grid:r}}=this,i=r.setContext(this.getContext()),o=r.drawBorder?i.borderWidth:0;if(!o)return;const s=r.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,c,u,d;this.isHorizontal()?(l=fs(t,this.left,o)-o/2,c=fs(t,this.right,s)+s/2,u=d=a):(u=fs(t,this.top,o)-o/2,d=fs(t,this.bottom,s)+s/2,l=c=a),n.save(),n.lineWidth=i.borderWidth,n.strokeStyle=i.borderColor,n.beginPath(),n.moveTo(l,u),n.lineTo(c,d),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&N_(r,i);const o=this._labelItems||(this._labelItems=this._computeLabelItems(t));let s,a;for(s=0,a=o.length;s<a;++s){const l=o[s],c=l.font,u=l.label;l.backdrop&&(r.fillStyle=l.backdrop.color,r.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height));let d=l.textOffset;Xs(r,u,0,d,c,l)}i&&L_(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=qt(r.font),s=Rn(r.padding),a=r.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||Ye(n)?(l+=s.bottom,vt(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=BZ(this,l,n,a);Xs(t,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:f,textAlign:FZ(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){!this._isVisible()||(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Pe(t.grid&&t.grid.z,-1);return!this._isVisible()||this.draw!==ta.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:r+1,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o<s;++o){const a=n[o];a[r]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return qt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class cf{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;WZ(n)&&(r=this.register(n));const i=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,zZ(t,s,r),this.override&&Fe.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in Fe[i]&&(delete Fe[i][r],this.override&&delete qs[r])}}function zZ(e,t,n){const r=Eu(Object.create(null),[n?Fe.get(n):{},Fe.get(t),e.defaults]);Fe.set(t,r),e.defaultRoutes&&UZ(t,e.defaultRoutes),e.descriptors&&Fe.describe(t,e.descriptors)}function UZ(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");Fe.route(o,i,l,a)})}function WZ(e){return"id"in e&&"defaults"in e}class jZ{constructor(){this.controllers=new cf(Ri,"datasets",!0),this.elements=new cf(oi,"elements"),this.plugins=new cf(Object,"plugins"),this.scales=new cf(ta,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):et(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=O_(t);ct(r["before"+i],[],r),n[t](r),ct(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Vi=new jZ;class HZ{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,n,r,i){i=i||{};for(const o of t){const s=o.plugin,a=s[r],l=[n,i,o.options];if(ct(a,l,s)===!1&&i.cancelable)return!1}return!0}invalidate(){tt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Pe(r.options&&r.options.plugins,{}),o=YZ(r);return i===!1&&!n?[]:GZ(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,s)=>o.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function YZ(e){const t={},n=[],r=Object.keys(Vi.plugins.items);for(let o=0;o<r.length;o++)n.push(Vi.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const s=i[o];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function VZ(e,t){return!t&&e===!1?null:e===!0?{}:e}function GZ(e,{plugins:t,localIds:n},r,i){const o=[],s=e.getContext();for(const a of t){const l=a.id,c=VZ(r[l],i);c!==null&&o.push({plugin:a,options:KZ(e.config,{plugin:a,local:n[l]},c,s)})}return o}function KZ(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),s=e.getOptionScopes(r,o);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function qv(e,t){const n=Fe.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function qZ(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function XZ(e,t){return e===t?"_index_":"_value_"}function ZZ(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Xv(e,t){return e==="x"||e==="y"?e:t.axis||ZZ(t.position)||e.charAt(0).toLowerCase()}function JZ(e,t){const n=qs[e.type]||{scales:{}},r=t.scales||{},i=qv(e.type,t),o=Object.create(null),s=Object.create(null);return Object.keys(r).forEach(a=>{const l=r[a];if(!Ye(l))return console.error(`Invalid scale configuration for scale: ${a}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const c=Xv(a,l),u=XZ(c,i),d=n.scales||{};o[c]=o[c]||a,s[a]=Fc(Object.create(null),[{axis:c},l,d[c],d[u]])}),e.data.datasets.forEach(a=>{const l=a.type||e.type,c=a.indexAxis||qv(l,t),d=(qs[l]||{}).scales||{};Object.keys(d).forEach(f=>{const p=qZ(f,c),h=a[p+"AxisID"]||o[p]||p;s[h]=s[h]||Object.create(null),Fc(s[h],[{axis:p},r[h],d[f]])})}),Object.keys(s).forEach(a=>{const l=s[a];Fc(l,[Fe.scales[l.type],Fe.scale])}),s}function dM(e){const t=e.options||(e.options={});t.plugins=Pe(t.plugins,{}),t.scales=JZ(e,t)}function fM(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function QZ(e){return e=e||{},e.data=fM(e.data),dM(e),e}const nE=new Map,pM=new Set;function uf(e,t){let n=nE.get(e);return n||(n=t(),nE.set(e,n),pM.add(n)),n}const ic=(e,t,n)=>{const r=Zo(t,n);r!==void 0&&e.add(r)};class eJ{constructor(t){this._config=QZ(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=fM(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),dM(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return uf(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return uf(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return uf(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return uf(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>ic(l,t,d))),u.forEach(d=>ic(l,i,d)),u.forEach(d=>ic(l,qs[o]||{},d)),u.forEach(d=>ic(l,Fe,d)),u.forEach(d=>ic(l,Vv,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),pM.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,qs[n]||{},Fe.datasets[n]||{},{type:n},Fe,Vv]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=rE(this._resolverCache,t,i);let l=s;if(nJ(s,n)){o.$shared=!1,r=Jo(r)?r():r;const c=this.createResolver(t,r,a);l=xl(s,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=rE(this._resolverCache,t,r);return Ye(n)?xl(o,n,void 0,i):o}}function rE(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:z_(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const tJ=e=>Ye(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Jo(e[n]),!1);function nJ(e,t){const{isScriptable:n,isIndexable:r}=V2(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(Jo(a)||tJ(a))||s&&vt(a))return!0}return!1}var rJ="3.8.2";const iJ=["top","bottom","left","right","chartArea"];function iE(e,t){return e==="top"||e==="bottom"||iJ.indexOf(e)===-1&&t==="x"}function oE(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function sE(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),ct(n&&n.onComplete,[e],t)}function oJ(e){const t=e.chart,n=t.options.animation;ct(n&&n.onProgress,[e],t)}function hM(e){return J2()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const kp={},mM=e=>{const t=hM(e);return Object.values(kp).filter(n=>n.canvas===t).pop()};function sJ(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function aJ(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}class Yh{constructor(t,n){const r=this.config=new eJ(n),i=hM(t),o=mM(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||kZ(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=YK(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new HZ,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=jK(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],kp[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ni.listen(this,"complete",sE),Ni.listen(this,"progress",oJ),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return tt(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ow(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Rw(this.canvas,this.ctx),this}stop(){return Ni.stop(this),this}resize(t,n){Ni.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Ow(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),ct(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};et(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],l=Xv(s,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),et(o,s=>{const a=s.options,l=a.id,c=Xv(l,a),u=Pe(a.type,s.dtype);(a.position===void 0||iE(a.position,c)!==iE(s.dposition))&&(a.position=s.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=Vi.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),et(i,(s,a)=>{s||delete r[a]}),et(r,s=>{_r.configure(this,s,s.options),_r.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(oE("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const o=n[r];let s=this.getDatasetMeta(r);const a=o.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=a,s.indexAxis=o.indexAxis||qv(a,this.options),s.order=o.order||0,s.index=r,s.label=""+o.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{const l=Vi.getController(a),{datasetElementType:c,dataElementType:u}=Fe.datasets[a];Object.assign(l.prototype,{dataElementType:Vi.getElement(u),datasetElementType:c&&Vi.getElement(c)}),s.controller=new l(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){et(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),i||et(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(oE("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){et(this.scales,t=>{_r.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!gw(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;sJ(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!gw(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;_r.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],et(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Jo(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ni.has(this)?this.attached&&!Ni.running(this)&&Ni.start(this):(this.draw(),sE({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,o;for(i=0,o=n.length;i<o;++i){const s=n[i];(!t||s.visible)&&r.push(s)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&N_(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&L_(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Ru(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=iZ.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=as(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);Or(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Ni.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Rw(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete kp[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(o,s)=>{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};et(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){et(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},et(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){s=t[a];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:s})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!yp(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),l=ZK(t),c=aJ(t,this._lastEvent,r,l);r&&(this._lastEvent=null,ct(o.onHover,[t,a,this],this),l&&ct(o.onClick,[t,a,this],this));const u=!yp(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}}const aE=()=>et(Yh.instances,e=>e._plugins.invalidate()),fo=!0;Object.defineProperties(Yh,{defaults:{enumerable:fo,value:Fe},instances:{enumerable:fo,value:kp},overrides:{enumerable:fo,value:qs},registry:{enumerable:fo,value:Vi},version:{enumerable:fo,value:rJ},getChart:{enumerable:fo,value:mM},register:{enumerable:fo,value:(...e)=>{Vi.add(...e),aE()}},unregister:{enumerable:fo,value:(...e)=>{Vi.remove(...e),aE()}}});function gM(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:s,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(o,s,a,r-c,n+c),l>i?(c=i/l,e.arc(o,s,l,n+c,r-c,!0)):e.arc(o,s,i,n+Lt,r-Lt),e.closePath(),e.clip()}function lJ(e){return F_(e,["outerStart","outerEnd","innerStart","innerEnd"])}function cJ(e,t,n,r){const i=lJ(e.options.borderRadius),o=(n-t)/2,s=Math.min(o,r*t/2),a=l=>{const c=(n-Math.min(o,l))*r/2;return En(l,0,Math.min(o,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:En(i.innerStart,0,s),innerEnd:En(i.innerEnd,0,s)}}function ma(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Zv(e,t,n,r,i){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=t,u=Math.max(t.outerRadius+r+n-l,0),d=c>0?c+r+n+l:0;let f=0;const p=i-a;if(r){const I=c>0?c-r:0,B=u>0?u-r:0,O=(I+B)/2,D=O!==0?p*O/(O+r):p;f=(p-D)/2}const h=Math.max(.001,p*u-n/Mt)/u,g=(p-h)/2,_=a+g+f,m=i-g-f,{outerStart:v,outerEnd:y,innerStart:x,innerEnd:w}=cJ(t,d,u,m-_),k=u-v,E=u-y,R=_+v/k,C=m-y/E,T=d+x,P=d+w,$=_+x/T,N=m-w/P;if(e.beginPath(),e.arc(o,s,u,R,C),y>0){const I=ma(E,C,o,s);e.arc(I.x,I.y,y,C,m+Lt)}const Y=ma(P,m,o,s);if(e.lineTo(Y.x,Y.y),w>0){const I=ma(P,N,o,s);e.arc(I.x,I.y,w,m+Lt,N+Math.PI)}if(e.arc(o,s,d,m-w/d,_+x/d,!0),x>0){const I=ma(T,$,o,s);e.arc(I.x,I.y,x,$+Math.PI,_-Lt)}const A=ma(k,_,o,s);if(e.lineTo(A.x,A.y),v>0){const I=ma(k,R,o,s);e.arc(I.x,I.y,v,_-Lt,R)}e.closePath()}function uJ(e,t,n,r){const{fullCircles:i,startAngle:o,circumference:s}=t;let a=t.endAngle;if(i){Zv(e,t,n,r,o+lt);for(let l=0;l<i;++l)e.fill();isNaN(s)||(a=o+s%lt,s%lt===0&&(a+=lt))}return Zv(e,t,n,r,a),e.fill(),a}function dJ(e,t,n){const{x:r,y:i,startAngle:o,pixelMargin:s,fullCircles:a}=t,l=Math.max(t.outerRadius-s,0),c=t.innerRadius+s;let u;for(n&&gM(e,t,o+lt),e.beginPath(),e.arc(r,i,c,o+lt,o,!0),u=0;u<a;++u)e.stroke();for(e.beginPath(),e.arc(r,i,l,o,o+lt),u=0;u<a;++u)e.stroke()}function fJ(e,t,n,r,i){const{options:o}=t,{borderWidth:s,borderJoinStyle:a}=o,l=o.borderAlign==="inner";!s||(l?(e.lineWidth=s*2,e.lineJoin=a||"round"):(e.lineWidth=s,e.lineJoin=a||"bevel"),t.fullCircles&&dJ(e,t,l),l&&gM(e,t,i),Zv(e,t,n,r,i),e.stroke())}class q_ extends oi{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.getProps(["x","y"],r),{angle:o,distance:s}=N2(i,{x:t,y:n}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=this.options.spacing/2,h=Pe(d,l-a)>=lt||Cu(o,a,l),g=Ro(s,c+f,u+f);return h&&g}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,u=(i+o)/2,d=(s+a+c+l)/2;return{x:n+Math.cos(u)*d,y:r+Math.sin(u)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/2,o=(n.spacing||0)/2;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>lt?Math.floor(r/lt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let s=0;if(i){s=i/2;const l=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(l)*s,Math.sin(l)*s),this.circumference>=Mt&&(s=i)}t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor;const a=uJ(t,this,s,o);fJ(t,this,s,o,a),t.restore()}}q_.id="arc";q_.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0};q_.defaultRoutes={backgroundColor:"backgroundColor"};function vM(e,t,n=t){e.lineCap=Pe(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Pe(n.borderDash,t.borderDash)),e.lineDashOffset=Pe(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Pe(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Pe(n.borderWidth,t.borderWidth),e.strokeStyle=Pe(n.borderColor,t.borderColor)}function pJ(e,t,n){e.lineTo(n.x,n.y)}function hJ(e){return e.stepped?Mq:e.tension||e.cubicInterpolationMode==="monotone"?Pq:pJ}function yM(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,l=Math.max(i,s),c=Math.min(o,a),u=i<s&&o<s||i>a&&o>a;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function mJ(e,t,n,r){const{points:i,options:o}=t,{count:s,start:a,loop:l,ilen:c}=yM(i,n,r),u=hJ(o);let{move:d=!0,reverse:f}=r||{},p,h,g;for(p=0;p<=c;++p)h=i[(a+(f?c-p:p))%s],!h.skip&&(d?(e.moveTo(h.x,h.y),d=!1):u(e,g,h,f,o.stepped),g=h);return l&&(h=i[(a+(f?c:0))%s],u(e,g,h,f,o.stepped)),!!l}function gJ(e,t,n,r){const i=t.points,{count:o,start:s,ilen:a}=yM(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,h,g,_,m;const v=x=>(s+(c?a-x:x))%o,y=()=>{g!==_&&(e.lineTo(u,_),e.lineTo(u,g),e.lineTo(u,m))};for(l&&(p=i[v(0)],e.moveTo(p.x,p.y)),f=0;f<=a;++f){if(p=i[v(f)],p.skip)continue;const x=p.x,w=p.y,k=x|0;k===h?(w<g?g=w:w>_&&(_=w),u=(d*u+x)/++d):(y(),e.lineTo(x,w),h=k,d=0,g=_=w),m=w}y()}function Jv(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?gJ:mJ}function vJ(e){return e.stepped?uX:e.tension||e.cubicInterpolationMode==="monotone"?dX:bs}function yJ(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),vM(e,t.options),e.stroke(i)}function _J(e,t,n,r){const{segments:i,options:o}=t,s=Jv(t);for(const a of i)vM(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const bJ=typeof Path2D=="function";function xJ(e,t,n,r){bJ&&!t.options.segment?yJ(e,t,n,r):_J(e,t,n,r)}class Vh extends oi{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;nX(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=bX(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,s=vX(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],l=vJ(r);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:f}=s[c],p=o[d],h=o[f];if(p===h){a.push(p);continue}const g=Math.abs((i-p[n])/(h[n]-p[n])),_=l(p,h,g,r.stepped);_[n]=t[n],a.push(_)}return a.length===1?a[0]:a}pathSegment(t,n,r){return Jv(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=Jv(this);let s=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)s&=o(t,this,a,{start:n,end:n+r-1});return!!s}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),xJ(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Vh.id="line";Vh.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};Vh.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};Vh.descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};function lE(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class X_ extends oi{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.options,{x:o,y:s}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(n-s,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return lE(this,t,"x",n)}inYRange(t,n){return lE(this,t,"y",n)}getCenterPoint(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const r=n&&t.borderWidth||0;return(n+r)*2}draw(t,n){const r=this.options;this.skip||r.radius<.1||!Ru(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,Gv(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}X_.id="point";X_.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};X_.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function _M(e,t){const{x:n,y:r,base:i,width:o,height:s}=e.getProps(["x","y","base","width","height"],t);let a,l,c,u,d;return e.horizontal?(d=s/2,a=Math.min(n,i),l=Math.max(n,i),c=r-d,u=r+d):(d=o/2,a=n-d,l=n+d,c=Math.min(r,i),u=Math.max(r,i)),{left:a,top:c,right:l,bottom:u}}function Mo(e,t,n,r){return e?0:En(t,n,r)}function SJ(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=j2(r);return{t:Mo(i.top,o.top,0,n),r:Mo(i.right,o.right,0,t),b:Mo(i.bottom,o.bottom,0,n),l:Mo(i.left,o.left,0,t)}}function wJ(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=$s(i),s=Math.min(t,n),a=e.borderSkipped,l=r||Ye(i);return{topLeft:Mo(!l||a.top||a.left,o.topLeft,0,s),topRight:Mo(!l||a.top||a.right,o.topRight,0,s),bottomLeft:Mo(!l||a.bottom||a.left,o.bottomLeft,0,s),bottomRight:Mo(!l||a.bottom||a.right,o.bottomRight,0,s)}}function EJ(e){const t=_M(e),n=t.right-t.left,r=t.bottom-t.top,i=SJ(e,n/2,r/2),o=wJ(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function xg(e,t,n,r){const i=t===null,o=n===null,a=e&&!(i&&o)&&_M(e,r);return a&&(i||Ro(t,a.left,a.right))&&(o||Ro(n,a.top,a.bottom))}function kJ(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function CJ(e,t){e.rect(t.x,t.y,t.w,t.h)}function Sg(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-r,s=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+o,h:e.h+s,radius:e.radius}}class Z_ extends oi{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:s}=EJ(this),a=kJ(s.radius)?Tu:CJ;t.save(),(s.w!==o.w||s.h!==o.h)&&(t.beginPath(),a(t,Sg(s,n,o)),t.clip(),a(t,Sg(o,-n,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,Sg(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return xg(this,t,n,r)}inXRange(t,n){return xg(this,t,null,n)}inYRange(t,n){return xg(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}Z_.id="bar";Z_.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};Z_.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const cE=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},RJ=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class uE extends oi{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=ct(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=qt(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=cE(r,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(s,o,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((h,g)=>{const _=r+n/2+o.measureText(h.text).width;(g===0||c[c.length-1]+_+2*a>s)&&(d+=u,c[c.length-(g>0?0:1)]=0,p+=u,f++),l[g]={left:0,top:p,row:f,width:_,height:i},c[c.length-1]+=_+a}),d}_fitCols(t,n,r,i){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=a,f=0,p=0,h=0,g=0;return this.legendItems.forEach((_,m)=>{const v=r+n/2+o.measureText(_.text).width;m>0&&p+i+2*a>u&&(d+=f+a,c.push({width:f,height:p}),h+=f+a,g++,f=p=0),l[m]={left:h,top:p,col:g,width:v,height:i},f=Math.max(f,v),p+=i+a}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=qa(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=_n(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=_n(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+i}else{let a=0,l=_n(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=_n(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;N_(t,this),this._draw(),L_(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=t,a=Fe.color,l=qa(t.rtl,this.left,this.width),c=qt(s.font),{color:u,padding:d}=s,f=c.size,p=f/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:g,boxHeight:_,itemHeight:m}=cE(s,f),v=function(E,R,C){if(isNaN(g)||g<=0||isNaN(_)||_<0)return;i.save();const T=Pe(C.lineWidth,1);if(i.fillStyle=Pe(C.fillStyle,a),i.lineCap=Pe(C.lineCap,"butt"),i.lineDashOffset=Pe(C.lineDashOffset,0),i.lineJoin=Pe(C.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=Pe(C.strokeStyle,a),i.setLineDash(Pe(C.lineDash,[])),s.usePointStyle){const P={radius:_*Math.SQRT2/2,pointStyle:C.pointStyle,rotation:C.rotation,borderWidth:T},$=l.xPlus(E,g/2),N=R+p;W2(i,P,$,N,g)}else{const P=R+Math.max((f-_)/2,0),$=l.leftForLtr(E,g),N=$s(C.borderRadius);i.beginPath(),Object.values(N).some(Y=>Y!==0)?Tu(i,{x:$,y:P,w:g,h:_,radius:N}):i.rect($,P,g,_),i.fill(),T!==0&&i.stroke()}i.restore()},y=function(E,R,C){Xs(i,C.text,E,R+m/2,c,{strikethrough:C.hidden,textAlign:l.textAlign(C.textAlign)})},x=this.isHorizontal(),w=this._computeTitleHeight();x?h={x:_n(o,this.left+d,this.right-r[0]),y:this.top+d+w,line:0}:h={x:this.left+d,y:_n(o,this.top+w+d,this.bottom-n[0].height),line:0},Q2(this.ctx,t.textDirection);const k=m+d;this.legendItems.forEach((E,R)=>{i.strokeStyle=E.fontColor||u,i.fillStyle=E.fontColor||u;const C=i.measureText(E.text).width,T=l.textAlign(E.textAlign||(E.textAlign=s.textAlign)),P=g+p+C;let $=h.x,N=h.y;l.setWidth(this.width),x?R>0&&$+P+d>this.right&&(N=h.y+=k,h.line++,$=h.x=_n(o,this.left+d,this.right-r[h.line])):R>0&&N+k>this.bottom&&($=h.x=$+n[h.line].width+d,h.line++,N=h.y=_n(o,this.top+w+d,this.bottom-n[h.line].height));const Y=l.x($);v(Y,N,E),$=HK(T,$+g+p,x?$+P:this.right,t.rtl),y(l.x($),N,E),x?h.x+=P+d:h.y+=k}),eM(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=qt(n.font),i=Rn(n.padding);if(!n.display)return;const o=qa(t.rtl,this.left,this.width),s=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=_n(t.align,d,this.right-f);else{const h=this.columnSizes.reduce((g,_)=>Math.max(g,_.height),0);u=c+_n(t.align,this.top,this.bottom-h-t.labels.padding-this._computeTitleHeight())}const p=_n(a,d,d+f);s.textAlign=o.textAlign(P_(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,Xs(s,n.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,n=qt(t.font),r=Rn(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Ro(t,this.left,this.right)&&Ro(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],Ro(t,i.left,i.left+i.width)&&Ro(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!TJ(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=RJ(i,r);i&&!o&&ct(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&ct(n.onHover,[t,r,this],this)}else r&&ct(n.onClick,[t,r,this],this)}}function TJ(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var uce={id:"legend",_element:uE,start(e,t,n){const r=e.legend=new uE({ctx:e.ctx,options:n,chart:e});_r.configure(e,r,n),_r.addBox(e,r)},stop(e){_r.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;_r.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o}}=e.legend.options;return e._getSortedDatasetMetas().map(s=>{const a=s.controller.getStyle(n?0:void 0),l=Rn(a.borderWidth);return{text:t[s.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!s.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:a.borderColor,pointStyle:r||a.pointStyle,rotation:a.rotation,textAlign:i||a.textAlign,borderRadius:0,datasetIndex:s.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class bM extends oi{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,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.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=vt(r.text)?r.text.length:1;this._padding=Rn(r.padding);const o=i*qt(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:s}=this,a=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=_n(a,r,o),d=n+t,c=o-r):(s.position==="left"?(u=r+t,d=_n(a,i,n),l=Mt*-.5):(u=o-t,d=_n(a,n,i),l=Mt*.5),c=i-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=qt(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Xs(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:P_(n.align),textBaseline:"middle",translation:[s,a]})}}function MJ(e,t){const n=new bM({ctx:e.ctx,options:t,chart:e});_r.configure(e,n,t),_r.addBox(e,n),e.titleBlock=n}var dce={id:"title",_element:bM,start(e,t,n){MJ(e,n)},stop(e){const t=e.titleBlock;_r.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;_r.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Wc={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const a=s.tooltipPosition();r+=a.x,i+=a.y,++o}}return{x:r/o,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,s,a;for(o=0,s=e.length;o<s;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Hv(t,c);u<i&&(i=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function ci(e,t){return t&&(vt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Li(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
208
  `)>-1?e.split(`
209
+ `):e}function PJ(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:s,value:a}=o.getLabelAndValue(i);return{chart:e,label:s,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function dE(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:s,boxHeight:a}=t,l=qt(t.bodyFont),c=qt(t.titleFont),u=qt(t.footerFont),d=o.length,f=i.length,p=r.length,h=Rn(t.padding);let g=h.height,_=0,m=r.reduce((x,w)=>x+w.before.length+w.lines.length+w.after.length,0);if(m+=e.beforeBody.length+e.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const x=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=p*x+(m-p)*l.lineHeight+(m-1)*t.bodySpacing}f&&(g+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0;const y=function(x){_=Math.max(_,n.measureText(x).width+v)};return n.save(),n.font=c.string,et(e.title,y),n.font=l.string,et(e.beforeBody.concat(e.afterBody),y),v=t.displayColors?s+2+t.boxPadding:0,et(r,x=>{et(x.before,y),et(x.lines,y),et(x.after,y)}),v=0,n.font=u.string,et(e.footer,y),n.restore(),_+=h.width,{width:_,height:g}}function OJ(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function IJ(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function DJ(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=s-o/2&&(c="right"),IJ(c,e,t,n)&&(c="center"),c}function fE(e,t,n){const r=n.yAlign||t.yAlign||OJ(e,n);return{xAlign:n.xAlign||t.xAlign||DJ(e,t,n,r),yAlign:r}}function AJ(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function $J(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function pE(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=$s(s);let h=AJ(t,a);const g=$J(t,l,c);return l==="center"?a==="left"?h+=c:a==="right"&&(h-=c):a==="left"?h-=Math.max(u,f)+i:a==="right"&&(h+=Math.max(d,p)+i),{x:En(h,0,r.width-t.width),y:En(g,0,r.height-t.height)}}function df(e,t,n){const r=Rn(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function hE(e){return ci([],Li(e))}function NJ(e,t,n){return as(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function mE(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}class Qv extends oi{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new nM(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=NJ(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=r.beforeTitle.apply(this,[t]),o=r.title.apply(this,[t]),s=r.afterTitle.apply(this,[t]);let a=[];return a=ci(a,Li(i)),a=ci(a,Li(o)),a=ci(a,Li(s)),a}getBeforeBody(t,n){return hE(n.callbacks.beforeBody.apply(this,[t]))}getBody(t,n){const{callbacks:r}=n,i=[];return et(t,o=>{const s={before:[],lines:[],after:[]},a=mE(r,o);ci(s.before,Li(a.beforeLabel.call(this,o))),ci(s.lines,a.label.call(this,o)),ci(s.after,Li(a.afterLabel.call(this,o))),i.push(s)}),i}getAfterBody(t,n){return hE(n.callbacks.afterBody.apply(this,[t]))}getFooter(t,n){const{callbacks:r}=n,i=r.beforeFooter.apply(this,[t]),o=r.footer.apply(this,[t]),s=r.afterFooter.apply(this,[t]);let a=[];return a=ci(a,Li(i)),a=ci(a,Li(o)),a=ci(a,Li(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(PJ(this.chart,n[l]));return t.filter&&(a=a.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(a=a.sort((u,d)=>t.itemSort(u,d,r))),et(a,u=>{const d=mE(t.callbacks,u);i.push(d.labelColor.call(this,u)),o.push(d.labelPointStyle.call(this,u)),s.push(d.labelTextColor.call(this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=Wc[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=dE(this,r),c=Object.assign({},a,l),u=fE(this.chart,r,c),d=pE(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=$s(a),{x:f,y:p}=t,{width:h,height:g}=n;let _,m,v,y,x,w;return o==="center"?(x=p+g/2,i==="left"?(_=f,m=_-s,y=x+s,w=x-s):(_=f+h,m=_+s,y=x-s,w=x+s),v=_):(i==="left"?m=f+Math.max(l,u)+s:i==="right"?m=f+h-Math.max(c,d)-s:m=this.caretX,o==="top"?(y=p,x=y-s,_=m-s,v=m+s):(y=p+g,x=y+s,_=m+s,v=m-s),w=y),{x1:_,x2:m,x3:v,y1:y,y2:x,y3:w}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,l;if(o){const c=qa(r.rtl,this.x,this.width);for(t.x=df(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",s=qt(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;l<o;++l)n.fillText(i[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,l+1===o&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,i,o){const s=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:c,boxPadding:u}=o,d=qt(o.bodyFont),f=df(this,"left",o),p=i.x(f),h=l<d.lineHeight?(d.lineHeight-l)/2:0,g=n.y+h;if(o.usePointStyle){const _={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=i.leftForLtr(p,c)+c/2,v=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Gv(t,_,m,v),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Gv(t,_,m,v)}else{t.lineWidth=Ye(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const _=i.leftForLtr(p,c-u),m=i.leftForLtr(i.xPlus(p,1),c-u-2),v=$s(s.borderRadius);Object.values(v).some(y=>y!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Tu(t,{x:_,y:g,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Tu(t,{x:m,y:g+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(_,g,c,l),t.strokeRect(_,g,c,l),t.fillStyle=s.backgroundColor,t.fillRect(m,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=qt(r.bodyFont);let f=d.lineHeight,p=0;const h=qa(r.rtl,this.x,this.width),g=function(R){n.fillText(R,h.x(t.x+p),t.y+f/2),t.y+=f+o},_=h.textAlign(s);let m,v,y,x,w,k,E;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=df(this,_,r),n.fillStyle=r.bodyColor,et(this.beforeBody,g),p=a&&_!=="right"?s==="center"?c/2+u:c+2+u:0,x=0,k=i.length;x<k;++x){for(m=i[x],v=this.labelTextColors[x],n.fillStyle=v,et(m.before,g),y=m.lines,a&&y.length&&(this._drawColorBox(n,t,x,h,r),f=Math.max(d.lineHeight,l)),w=0,E=y.length;w<E;++w)g(y[w]),f=d.lineHeight;et(m.after,g)}p=0,f=d.lineHeight,et(this.afterBody,g),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let s,a;if(o){const l=qa(r.rtl,this.x,this.width);for(t.x=df(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",s=qt(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,a=0;a<o;++a)n.fillText(i[a],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:s}=this,{x:a,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:h}=$s(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+d,l),s==="top"&&this.drawCaret(t,n,r,i),n.lineTo(a+c-f,l),n.quadraticCurveTo(a+c,l,a+c,l+f),s==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(a+c,l+u-h),n.quadraticCurveTo(a+c,l+u,a+c-h,l+u),s==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+p,l+u),n.quadraticCurveTo(a,l+u,a,l+u-p),s==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=Wc[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=dE(this,t),l=Object.assign({},s,this._size),c=fE(n,t,l),u=pE(t,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Rn(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),Q2(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),eM(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!yp(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),l=n||!yp(s,o)||a;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=Wc[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}}Qv.positioners=Wc;var fce={id:"tooltip",_element:Qv,positioners:Wc,afterInit(e,t,n){n&&(e.tooltip=new Qv({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",n)===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Ai,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Ai,beforeBody:Ai,beforeLabel:Ai,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return tt(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Ai,afterBody:Ai,beforeFooter:Ai,footer:Ai,afterFooter:Ai}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const LJ=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function FJ(e,t,n,r){const i=e.indexOf(t);if(i===-1)return LJ(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const BJ=(e,t)=>e===null?null:En(Math.round(e),0,t);class ey extends ta{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(tt(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:FJ(r,t,Pe(n,t),this._addedLabels),BJ(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=n;s++)i.push({value:s});return i}getLabelForValue(t){const n=this.getLabels();return t>=0&&t<n.length?n[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}ey.id="category";ey.defaults={ticks:{callback:ey.prototype.getLabelForValue}};function zJ(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=o||1,h=u-1,{min:g,max:_}=t,m=!tt(s),v=!tt(a),y=!tt(c),x=(_-g)/(d+1);let w=yw((_-g)/h/p)*p,k,E,R,C;if(w<1e-14&&!m&&!v)return[{value:g},{value:_}];C=Math.ceil(_/w)-Math.floor(g/w),C>h&&(w=yw(C*w/h/p)*p),tt(l)||(k=Math.pow(10,l),w=Math.ceil(w*k)/k),i==="ticks"?(E=Math.floor(g/w)*w,R=Math.ceil(_/w)*w):(E=g,R=_),m&&v&&o&&tq((a-s)/o,w/1e3)?(C=Math.round(Math.min((a-s)/w,u)),w=(a-s)/C,E=s,R=a):y?(E=m?s:E,R=v?a:R,C=c-1,w=(R-E)/C):(C=(R-E)/w,Bc(C,Math.round(C),w/1e3)?C=Math.round(C):C=Math.ceil(C));const T=Math.max(_w(w),_w(E));k=Math.pow(10,tt(l)?T:l),E=Math.round(E*k)/k,R=Math.round(R*k)/k;let P=0;for(m&&(f&&E!==s?(n.push({value:s}),E<s&&P++,Bc(Math.round((E+P*w)*k)/k,s,gE(s,x,e))&&P++):E<s&&P++);P<C;++P)n.push({value:Math.round((E+P*w)*k)/k});return v&&f&&R!==a?n.length&&Bc(n[n.length-1].value,a,gE(a,x,e))?n[n.length-1].value=a:n.push({value:a}):(!v||R===a)&&n.push({value:R}),n}function gE(e,t,{horizontal:n,minRotation:r}){const i=Gr(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/o,s)}class Cp extends ta{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return tt(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const s=l=>i=n?i:l,a=l=>o=r?o:l;if(t){const l=Ei(i),c=Ei(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(i===o){let l=1;(o>=Number.MAX_SAFE_INTEGER||i<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(o*.05)),a(o+l),t||s(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=zJ(i,o);return t.bounds==="ticks"&&$2(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return id(t,this.chart.options.locale,this.options.ticks.format)}}class xM extends Cp{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=dn(t)?t:0,this.max=dn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Gr(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}xM.id="linear";xM.defaults={ticks:{callback:Hh.formatters.numeric}};function vE(e){return e/Math.pow(10,Math.floor(gr(e)))===1}function UJ(e,t){const n=Math.floor(gr(t.max)),r=Math.ceil(t.max/Math.pow(10,n)),i=[];let o=dr(e.min,Math.pow(10,Math.floor(gr(t.min)))),s=Math.floor(gr(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do i.push({value:o,major:vE(o)}),++a,a===10&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l;while(s<n||s===n&&a<r);const c=dr(e.max,o);return i.push({value:c,major:vE(o)}),i}class SM extends ta{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Cp.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return dn(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=dn(t)?Math.max(0,t):null,this.max=dn(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=l=>r=t?r:l,s=l=>i=n?i:l,a=(l,c)=>Math.pow(10,Math.floor(gr(l))+c);r===i&&(r<=0?(o(1),s(10)):(o(a(r,-1)),s(a(i,1)))),r<=0&&o(a(i,-1)),i<=0&&s(a(r,1)),this._zero&&this.min!==this._suggestedMin&&r===a(this.min,0)&&o(a(r,-1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=UJ(n,this);return t.bounds==="ticks"&&$2(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":id(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=gr(t),this._valueRange=gr(this.max)-gr(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(gr(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}SM.id="logarithmic";SM.defaults={ticks:{callback:Hh.formatters.logarithmic,major:{enabled:!0}}};function ty(e){const t=e.ticks;if(t.display&&e.display){const n=Rn(t.backdropPadding);return Pe(t.font&&t.font.size,Fe.font.size)+n.height}return 0}function WJ(e,t,n){return n=vt(n)?n:[n],{w:Tq(e,t.string,n),h:n.length*t.lineHeight}}function yE(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function jJ(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?Mt/o:0;for(let l=0;l<o;l++){const c=s.setContext(e.getPointLabelContext(l));i[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+i[l],a),d=qt(c.font),f=WJ(e.ctx,d,e._pointLabels[l]);r[l]=f;const p=jr(e.getIndexAngle(l)+a),h=Math.round(I_(p)),g=yE(h,u.x,f.w,0,180),_=yE(h,u.y,f.h,90,270);HJ(n,t,p,g,_)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=YJ(e,r,i)}function HJ(e,t,n,r,i){const o=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let a=0,l=0;r.start<t.l?(a=(t.l-r.start)/o,e.l=Math.min(e.l,t.l-a)):r.end>t.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(l=(t.t-i.start)/s,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function YJ(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,s=ty(o)/2,a=e.drawingArea,l=o.pointLabels.centerPointLabels?Mt/i:0;for(let c=0;c<i;c++){const u=e.getPointPosition(c,a+s+n[c],l),d=Math.round(I_(jr(u.angle+Lt))),f=t[c],p=KJ(u.y,f.h,d),h=VJ(d),g=GJ(u.x,f.w,h);r.push({x:u.x,y:p,textAlign:h,left:g,top:p,right:g+f.w,bottom:p+f.h})}return r}function VJ(e){return e===0||e===180?"center":e<180?"left":"right"}function GJ(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function KJ(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function qJ(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=r.setContext(e.getPointLabelContext(i)),s=qt(o.font),{x:a,y:l,textAlign:c,left:u,top:d,right:f,bottom:p}=e._pointLabelItems[i],{backdropColor:h}=o;if(!tt(h)){const g=$s(o.borderRadius),_=Rn(o.backdropPadding);n.fillStyle=h;const m=u-_.left,v=d-_.top,y=f-u+_.width,x=p-d+_.height;Object.values(g).some(w=>w!==0)?(n.beginPath(),Tu(n,{x:m,y:v,w:y,h:x,radius:g}),n.fill()):n.fillRect(m,v,y,x)}Xs(n,e._pointLabels[i],a,l+s.lineHeight/2,s,{color:o.color,textAlign:c,textBaseline:"middle"})}}function wM(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,lt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s<r;s++)o=e.getPointPosition(s,t),i.lineTo(o.x,o.y)}}function XJ(e,t,n,r){const i=e.ctx,o=t.circular,{color:s,lineWidth:a}=t;!o&&!r||!s||!a||n<0||(i.save(),i.strokeStyle=s,i.lineWidth=a,i.setLineDash(t.borderDash),i.lineDashOffset=t.borderDashOffset,i.beginPath(),wM(e,n,o,r),i.closePath(),i.stroke(),i.restore())}function ZJ(e,t,n){return as(e,{label:n,index:t,type:"pointLabel"})}class Gh extends Cp{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Rn(ty(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=dn(t)&&!isNaN(t)?t:0,this.max=dn(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ty(this.options))}generateTickLabels(t){Cp.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=ct(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?jJ(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=lt/(this._pointLabels.length||1),r=this.options.startAngle||0;return jr(t*n+Gr(r))}getDistanceFromCenterForValue(t){if(tt(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(tt(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return ZJ(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-Lt+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:o}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),wM(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i}=n,o=this._pointLabels.length;let s,a,l;if(n.pointLabels.display&&qJ(this,o),i.display&&this.ticks.forEach((c,u)=>{if(u!==0){a=this.getDistanceFromCenterForValue(c.value);const d=i.setContext(this.getContext(u-1));XJ(this,d,a,o)}}),r.display){for(t.save(),s=o-1;s>=0;s--){const c=r.setContext(this.getPointLabelContext(s)),{color:u,lineWidth:d}=c;!d||!u||(t.lineWidth=d,t.strokeStyle=u,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,a=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),l=this.getPointPosition(s,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),u=qt(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=Rn(c.backdropPadding);t.fillRect(-s/2-d.left,-o-u.size/2-d.top,s+d.width,u.size+d.height)}Xs(t,a.label,0,-o,u,{color:c.color})}),t.restore()}drawTitle(){}}Gh.id="radialLinear";Gh.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Hh.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}};Gh.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Gh.descriptors={angleLines:{_fallback:"grid"}};const Kh={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Wn=Object.keys(Kh);function JJ(e,t){return e-t}function _E(e,t){if(tt(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),dn(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(ku(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function bE(e,t,n,r){const i=Wn.length;for(let o=Wn.indexOf(e);o<i-1;++o){const s=Kh[Wn[o]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(a*s.size))<=r)return Wn[o]}return Wn[i-1]}function QJ(e,t,n,r,i){for(let o=Wn.length-1;o>=Wn.indexOf(n);o--){const s=Wn[o];if(Kh[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return Wn[n?Wn.indexOf(n):0]}function eQ(e){for(let t=Wn.indexOf(e)+1,n=Wn.length;t<n;++t)if(Kh[Wn[t]].common)return Wn[t]}function xE(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=B_(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function tQ(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,l;for(a=o;a<=s;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function SE(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s<o;++s)a=t[s],i[a]=s,r.push({value:a,major:!1});return o===0||!n?r:tQ(e,r,i,n)}class qh extends ta{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n){const r=t.time||(t.time={}),i=this._adapter=new QX._date(t.adapters.date);Fc(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:_E(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:s,maxDefined:a}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!s||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=dn(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=dn(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,s=this.max,a=Bq(i,o,s);return this._unit=n.unit||(r.autoSkip?bE(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):QJ(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:eQ(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),SE(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=En(n,0,s),r=En(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||bE(o.minUnit,n,r,this._getLabelCapacity(n)),a=Pe(o.stepSize,1),l=s==="week"?o.isoWeekday:!1,c=ku(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const h=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,a,s),p++)xE(u,f,h);return(f===r||i.bounds==="ticks"||p===1)&&xE(u,f,h),Object.keys(u).sort((g,_)=>g-_).map(g=>+g)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.time.displayFormats,a=this._unit,l=this._majorUnit,c=a&&s[a],u=l&&s[l],d=r[n],f=l&&u&&d&&d.major,p=this._adapter.format(t,i||(f?u:c)),h=o.ticks.callback;return h?ct(h,[p,n,r],this):p}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=Gr(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),s=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*o+a*s,h:r*s+a*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,SE(this,[t],this._majorUnit),i),s=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(_E(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Y2(t.sort(JJ))}}qh.id="time";qh.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function ff(e,t,n){let r=0,i=e.length-1,o,s,a,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Ts(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Ts(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:l}=e[i]);const c=s-o;return c?a+(l-a)*(t-o)/c:a}class EM extends qh{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=ff(n,this.min),this._tableRange=ff(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,l,c,u;for(s=0,a=t.length;s<a;++s)c=t[s],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;s<a;++s)u=i[s+1],l=i[s-1],c=i[s],Math.round((u+l)/2)!==c&&o.push({time:c,pos:s/(a-1)});return o}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(ff(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return ff(this._table,r*this._tableRange+this._minPos,!0)}}EM.id="timeseries";EM.defaults=qh.defaults;const kM="label";function wE(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function nQ(e,t){Object.assign(e.options,t)}function CM(e,t){e.labels=t}function RM(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:kM;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?L({},i):(r.push(o),Object.assign(o,i),o)})}function rQ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:kM;const n={labels:[],datasets:[]};return CM(n,e.labels),RM(n,e.datasets,t),n}function iQ(e,t){let m=e,{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:l,plugins:c=[],fallbackContent:u,updateMode:d}=m,f=dm(m,["height","width","redraw","datasetIdKey","type","data","options","plugins","fallbackContent","updateMode"]);const p=b.exports.useRef(null),h=b.exports.useRef(),g=()=>{!p.current||(h.current=new Yh(p.current,{type:s,data:rQ(a,o),options:l&&L({},l),plugins:c}),wE(t,h.current))},_=()=>{wE(t,null),h.current&&(h.current.destroy(),h.current=null)};return b.exports.useEffect(()=>{!i&&h.current&&l&&nQ(h.current,l)},[i,l]),b.exports.useEffect(()=>{!i&&h.current&&CM(h.current.config.data,a.labels)},[i,a.labels]),b.exports.useEffect(()=>{!i&&h.current&&a.datasets&&RM(h.current.config.data,a.datasets,o)},[i,a.datasets]),b.exports.useEffect(()=>{!h.current||(i?(_(),setTimeout(g)):h.current.update(d))},[i,l,a.labels,a.datasets,d]),b.exports.useEffect(()=>{!h.current||(_(),setTimeout(g))},[s]),b.exports.useEffect(()=>(g(),()=>_()),[]),M("canvas",Ee(L({},Object.assign({ref:p,role:"img",height:n,width:r},f)),{children:u}))}const oQ=b.exports.forwardRef(iQ);function J_(e,t){return Yh.register(t),b.exports.forwardRef((n,r)=>M(oQ,L({},Object.assign({},n,{ref:r,type:e}))))}const pce=J_("line",sd),hce=J_("bar",jh),mce=J_("pie",V_);function gce(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}//! moment.js
210
  //! version : 2.29.4
211
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
212
  //! license : MIT
215
  [`+o+"] ";for(s in arguments[0])qe(arguments[0],s)&&(i+=s+": "+arguments[0][s]+", ");i=i.slice(0,-2)}else i=arguments[o];r.push(i)}PM(e+`
216
  Arguments: `+Array.prototype.slice.call(r).join("")+`
217
  `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var kE={};function OM(e,t){ne.deprecationHandler!=null&&ne.deprecationHandler(e,t),kE[e]||(PM(t),kE[e]=!0)}ne.suppressDeprecationWarnings=!1;ne.deprecationHandler=null;function Mi(e){return typeof Function!="undefined"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function lQ(e){var t,n;for(n in e)qe(e,n)&&(t=e[n],Mi(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function ry(e,t){var n=Po({},e),r;for(r in t)qe(t,r)&&(Ls(e[r])&&Ls(t[r])?(n[r]={},Po(n[r],e[r]),Po(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)qe(e,r)&&!qe(t,r)&&Ls(e[r])&&(n[r]=Po({},n[r]));return n}function n1(e){e!=null&&this.set(e)}var iy;Object.keys?iy=Object.keys:iy=function(e){var t,n=[];for(t in e)qe(e,t)&&n.push(t);return n};var cQ={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function uQ(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Mi(r)?r.call(t,n):r}function Ci(e,t,n){var r=""+Math.abs(e),i=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var r1=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,pf=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Eg={},Xa={};function _e(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(Xa[e]=i),t&&(Xa[t[0]]=function(){return Ci(i.apply(this,arguments),t[1],t[2])}),n&&(Xa[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function dQ(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function fQ(e){var t=e.match(r1),n,r;for(n=0,r=t.length;n<r;n++)Xa[t[n]]?t[n]=Xa[t[n]]:t[n]=dQ(t[n]);return function(i){var o="",s;for(s=0;s<r;s++)o+=Mi(t[s])?t[s].call(i,e):t[s];return o}}function $f(e,t){return e.isValid()?(t=IM(t,e.localeData()),Eg[t]=Eg[t]||fQ(t),Eg[t](e)):e.localeData().invalidDate()}function IM(e,t){var n=5;function r(i){return t.longDateFormat(i)||i}for(pf.lastIndex=0;n>=0&&pf.test(e);)e=e.replace(pf,r),pf.lastIndex=0,n-=1;return e}var pQ={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function hQ(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(r1).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var mQ="Invalid date";function gQ(){return this._invalidDate}var vQ="%d",yQ=/\d{1,2}/;function _Q(e){return this._ordinal.replace("%d",e)}var bQ={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function xQ(e,t,n,r){var i=this._relativeTime[n];return Mi(i)?i(e,t,n,r):i.replace(/%d/i,e)}function SQ(e,t){var n=this._relativeTime[e>0?"future":"past"];return Mi(n)?n(t):n.replace(/%s/i,t)}var jc={};function Tn(e,t){var n=e.toLowerCase();jc[n]=jc[n+"s"]=jc[t]=e}function Dr(e){return typeof e=="string"?jc[e]||jc[e.toLowerCase()]:void 0}function i1(e){var t={},n,r;for(r in e)qe(e,r)&&(n=Dr(r),n&&(t[n]=e[r]));return t}var DM={};function Mn(e,t){DM[e]=t}function wQ(e){var t=[],n;for(n in e)qe(e,n)&&t.push({unit:n,priority:DM[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Zh(e){return e%4===0&&e%100!==0||e%400===0}function mr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ie(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=mr(t)),n}function Il(e,t){return function(n){return n!=null?(AM(this,e,n),ne.updateOffset(this,t),this):Rp(this,e)}}function Rp(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function AM(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Zh(e.year())&&e.month()===1&&e.date()===29?(n=Ie(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),rm(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function EQ(e){return e=Dr(e),Mi(this[e])?this[e]():this}function kQ(e,t){if(typeof e=="object"){e=i1(e);var n=wQ(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=Dr(e),Mi(this[e]))return this[e](t);return this}var $M=/\d/,cr=/\d\d/,NM=/\d{3}/,o1=/\d{4}/,Jh=/[+-]?\d{6}/,xt=/\d\d?/,LM=/\d\d\d\d?/,FM=/\d\d\d\d\d\d?/,Qh=/\d{1,3}/,s1=/\d{1,4}/,em=/[+-]?\d{1,6}/,Dl=/\d+/,tm=/[+-]?\d+/,CQ=/Z|[+-]\d\d:?\d\d/gi,nm=/Z|[+-]\d\d(?::?\d\d)?/gi,RQ=/[+-]?\d+(\.\d{1,3})?/,ud=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Tp;Tp={};function ie(e,t,n){Tp[e]=Mi(t)?t:function(r,i){return r&&n?n:t}}function TQ(e,t){return qe(Tp,e)?Tp[e](t._strict,t._locale):new RegExp(MQ(e))}function MQ(e){return er(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,o){return n||r||i||o}))}function er(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var oy={};function ot(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),to(t)&&(r=function(o,s){s[t]=Ie(o)}),i=e.length,n=0;n<i;n++)oy[e[n]]=r}function dd(e,t){ot(e,function(n,r,i,o){i._w=i._w||{},t(n,i._w,i,o)})}function PQ(e,t,n){t!=null&&qe(oy,e)&&oy[e](t,n._a,n,e)}var kn=0,Gi=1,vi=2,Xt=3,Kr=4,Ki=5,Ms=6,OQ=7,IQ=8;function DQ(e,t){return(e%t+t)%t}var Bt;Array.prototype.indexOf?Bt=Array.prototype.indexOf:Bt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function rm(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=DQ(t,12);return e+=(t-n)/12,n===1?Zh(e)?29:28:31-n%7%2}_e("M",["MM",2],"Mo",function(){return this.month()+1});_e("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});_e("MMMM",0,0,function(e){return this.localeData().months(this,e)});Tn("month","M");Mn("month",8);ie("M",xt);ie("MM",xt,cr);ie("MMM",function(e,t){return t.monthsShortRegex(e)});ie("MMMM",function(e,t){return t.monthsRegex(e)});ot(["M","MM"],function(e,t){t[Gi]=Ie(e)-1});ot(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i!=null?t[Gi]=i:ke(n).invalidMonth=e});var AQ="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),BM="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),zM=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,$Q=ud,NQ=ud;function LQ(e,t){return e?ei(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||zM).test(t)?"format":"standalone"][e.month()]:ei(this._months)?this._months:this._months.standalone}function FQ(e,t){return e?ei(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[zM.test(t)?"format":"standalone"][e.month()]:ei(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function BQ(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=Ti([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?t==="MMM"?(i=Bt.call(this._shortMonthsParse,s),i!==-1?i:null):(i=Bt.call(this._longMonthsParse,s),i!==-1?i:null):t==="MMM"?(i=Bt.call(this._shortMonthsParse,s),i!==-1?i:(i=Bt.call(this._longMonthsParse,s),i!==-1?i:null)):(i=Bt.call(this._longMonthsParse,s),i!==-1?i:(i=Bt.call(this._shortMonthsParse,s),i!==-1?i:null))}function zQ(e,t,n){var r,i,o;if(this._monthsParseExact)return BQ.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Ti([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function UM(e,t){var n;if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Ie(t);else if(t=e.localeData().monthsParse(t),!to(t))return e}return n=Math.min(e.date(),rm(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function WM(e){return e!=null?(UM(this,e),ne.updateOffset(this,!0),this):Rp(this,"Month")}function UQ(){return rm(this.year(),this.month())}function WQ(e){return this._monthsParseExact?(qe(this,"_monthsRegex")||jM.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(qe(this,"_monthsShortRegex")||(this._monthsShortRegex=$Q),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function jQ(e){return this._monthsParseExact?(qe(this,"_monthsRegex")||jM.call(this),e?this._monthsStrictRegex:this._monthsRegex):(qe(this,"_monthsRegex")||(this._monthsRegex=NQ),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function jM(){function e(s,a){return a.length-s.length}var t=[],n=[],r=[],i,o;for(i=0;i<12;i++)o=Ti([2e3,i]),t.push(this.monthsShort(o,"")),n.push(this.months(o,"")),r.push(this.months(o,"")),r.push(this.monthsShort(o,""));for(t.sort(e),n.sort(e),r.sort(e),i=0;i<12;i++)t[i]=er(t[i]),n[i]=er(n[i]);for(i=0;i<24;i++)r[i]=er(r[i]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}_e("Y",0,0,function(){var e=this.year();return e<=9999?Ci(e,4):"+"+e});_e(0,["YY",2],0,function(){return this.year()%100});_e(0,["YYYY",4],0,"year");_e(0,["YYYYY",5],0,"year");_e(0,["YYYYYY",6,!0],0,"year");Tn("year","y");Mn("year",1);ie("Y",tm);ie("YY",xt,cr);ie("YYYY",s1,o1);ie("YYYYY",em,Jh);ie("YYYYYY",em,Jh);ot(["YYYYY","YYYYYY"],kn);ot("YYYY",function(e,t){t[kn]=e.length===2?ne.parseTwoDigitYear(e):Ie(e)});ot("YY",function(e,t){t[kn]=ne.parseTwoDigitYear(e)});ot("Y",function(e,t){t[kn]=parseInt(e,10)});function Hc(e){return Zh(e)?366:365}ne.parseTwoDigitYear=function(e){return Ie(e)+(Ie(e)>68?1900:2e3)};var HM=Il("FullYear",!0);function HQ(){return Zh(this.year())}function YQ(e,t,n,r,i,o,s){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,i,o,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,i,o,s),a}function Pu(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Mp(e,t,n){var r=7+t-n,i=(7+Pu(e,0,r).getUTCDay()-t)%7;return-i+r-1}function YM(e,t,n,r,i){var o=(7+n-r)%7,s=Mp(e,r,i),a=1+7*(t-1)+o+s,l,c;return a<=0?(l=e-1,c=Hc(l)+a):a>Hc(e)?(l=e+1,c=a-Hc(e)):(l=e,c=a),{year:l,dayOfYear:c}}function Ou(e,t,n){var r=Mp(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,o,s;return i<1?(s=e.year()-1,o=i+Xi(s,t,n)):i>Xi(e.year(),t,n)?(o=i-Xi(e.year(),t,n),s=e.year()+1):(s=e.year(),o=i),{week:o,year:s}}function Xi(e,t,n){var r=Mp(e,t,n),i=Mp(e+1,t,n);return(Hc(e)-r+i)/7}_e("w",["ww",2],"wo","week");_e("W",["WW",2],"Wo","isoWeek");Tn("week","w");Tn("isoWeek","W");Mn("week",5);Mn("isoWeek",5);ie("w",xt);ie("ww",xt,cr);ie("W",xt);ie("WW",xt,cr);dd(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Ie(e)});function VQ(e){return Ou(e,this._week.dow,this._week.doy).week}var GQ={dow:0,doy:6};function KQ(){return this._week.dow}function qQ(){return this._week.doy}function XQ(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function ZQ(e){var t=Ou(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}_e("d",0,"do","day");_e("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});_e("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});_e("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});_e("e",0,0,"weekday");_e("E",0,0,"isoWeekday");Tn("day","d");Tn("weekday","e");Tn("isoWeekday","E");Mn("day",11);Mn("weekday",11);Mn("isoWeekday",11);ie("d",xt);ie("e",xt);ie("E",xt);ie("dd",function(e,t){return t.weekdaysMinRegex(e)});ie("ddd",function(e,t){return t.weekdaysShortRegex(e)});ie("dddd",function(e,t){return t.weekdaysRegex(e)});dd(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:ke(n).invalidWeekday=e});dd(["d","e","E"],function(e,t,n,r){t[r]=Ie(e)});function JQ(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function QQ(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function a1(e,t){return e.slice(t,7).concat(e.slice(0,t))}var eee="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),VM="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),tee="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),nee=ud,ree=ud,iee=ud;function oee(e,t){var n=ei(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?a1(n,this._week.dow):e?n[e.day()]:n}function see(e){return e===!0?a1(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function aee(e){return e===!0?a1(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function lee(e,t,n){var r,i,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=Ti([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(i=Bt.call(this._weekdaysParse,s),i!==-1?i:null):t==="ddd"?(i=Bt.call(this._shortWeekdaysParse,s),i!==-1?i:null):(i=Bt.call(this._minWeekdaysParse,s),i!==-1?i:null):t==="dddd"?(i=Bt.call(this._weekdaysParse,s),i!==-1||(i=Bt.call(this._shortWeekdaysParse,s),i!==-1)?i:(i=Bt.call(this._minWeekdaysParse,s),i!==-1?i:null)):t==="ddd"?(i=Bt.call(this._shortWeekdaysParse,s),i!==-1||(i=Bt.call(this._weekdaysParse,s),i!==-1)?i:(i=Bt.call(this._minWeekdaysParse,s),i!==-1?i:null)):(i=Bt.call(this._minWeekdaysParse,s),i!==-1||(i=Bt.call(this._weekdaysParse,s),i!==-1)?i:(i=Bt.call(this._shortWeekdaysParse,s),i!==-1?i:null))}function cee(e,t,n){var r,i,o;if(this._weekdaysParseExact)return lee.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Ti([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function uee(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=JQ(e,this.localeData()),this.add(e-t,"d")):t}function dee(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function fee(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=QQ(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function pee(e){return this._weekdaysParseExact?(qe(this,"_weekdaysRegex")||l1.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(qe(this,"_weekdaysRegex")||(this._weekdaysRegex=nee),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function hee(e){return this._weekdaysParseExact?(qe(this,"_weekdaysRegex")||l1.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(qe(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ree),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function mee(e){return this._weekdaysParseExact?(qe(this,"_weekdaysRegex")||l1.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(qe(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=iee),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function l1(){function e(u,d){return d.length-u.length}var t=[],n=[],r=[],i=[],o,s,a,l,c;for(o=0;o<7;o++)s=Ti([2e3,1]).day(o),a=er(this.weekdaysMin(s,"")),l=er(this.weekdaysShort(s,"")),c=er(this.weekdays(s,"")),t.push(a),n.push(l),r.push(c),i.push(a),i.push(l),i.push(c);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function c1(){return this.hours()%12||12}function gee(){return this.hours()||24}_e("H",["HH",2],0,"hour");_e("h",["hh",2],0,c1);_e("k",["kk",2],0,gee);_e("hmm",0,0,function(){return""+c1.apply(this)+Ci(this.minutes(),2)});_e("hmmss",0,0,function(){return""+c1.apply(this)+Ci(this.minutes(),2)+Ci(this.seconds(),2)});_e("Hmm",0,0,function(){return""+this.hours()+Ci(this.minutes(),2)});_e("Hmmss",0,0,function(){return""+this.hours()+Ci(this.minutes(),2)+Ci(this.seconds(),2)});function GM(e,t){_e(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}GM("a",!0);GM("A",!1);Tn("hour","h");Mn("hour",13);function KM(e,t){return t._meridiemParse}ie("a",KM);ie("A",KM);ie("H",xt);ie("h",xt);ie("k",xt);ie("HH",xt,cr);ie("hh",xt,cr);ie("kk",xt,cr);ie("hmm",LM);ie("hmmss",FM);ie("Hmm",LM);ie("Hmmss",FM);ot(["H","HH"],Xt);ot(["k","kk"],function(e,t,n){var r=Ie(e);t[Xt]=r===24?0:r});ot(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});ot(["h","hh"],function(e,t,n){t[Xt]=Ie(e),ke(n).bigHour=!0});ot("hmm",function(e,t,n){var r=e.length-2;t[Xt]=Ie(e.substr(0,r)),t[Kr]=Ie(e.substr(r)),ke(n).bigHour=!0});ot("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Xt]=Ie(e.substr(0,r)),t[Kr]=Ie(e.substr(r,2)),t[Ki]=Ie(e.substr(i)),ke(n).bigHour=!0});ot("Hmm",function(e,t,n){var r=e.length-2;t[Xt]=Ie(e.substr(0,r)),t[Kr]=Ie(e.substr(r))});ot("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[Xt]=Ie(e.substr(0,r)),t[Kr]=Ie(e.substr(r,2)),t[Ki]=Ie(e.substr(i))});function vee(e){return(e+"").toLowerCase().charAt(0)==="p"}var yee=/[ap]\.?m?\.?/i,_ee=Il("Hours",!0);function bee(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var qM={calendar:cQ,longDateFormat:pQ,invalidDate:mQ,ordinal:vQ,dayOfMonthOrdinalParse:yQ,relativeTime:bQ,months:AQ,monthsShort:BM,week:GQ,weekdays:eee,weekdaysMin:tee,weekdaysShort:VM,meridiemParse:yee},Ct={},oc={},Iu;function xee(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function CE(e){return e&&e.toLowerCase().replace("_","-")}function See(e){for(var t=0,n,r,i,o;t<e.length;){for(o=CE(e[t]).split("-"),n=o.length,r=CE(e[t+1]),r=r?r.split("-"):null;n>0;){if(i=im(o.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&xee(o,r)>=n-1)break;n--}t++}return Iu}function wee(e){return e.match("^[^/\\\\]*$")!=null}function im(e){var t=null,n;if(Ct[e]===void 0&&typeof module!="undefined"&&module&&module.exports&&wee(e))try{t=Iu._abbr,n=require,n("./locale/"+e),Ho(t)}catch{Ct[e]=null}return Ct[e]}function Ho(e,t){var n;return e&&(Fn(t)?n=so(e):n=u1(e,t),n?Iu=n:typeof console!="undefined"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Iu._abbr}function u1(e,t){if(t!==null){var n,r=qM;if(t.abbr=e,Ct[e]!=null)OM("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Ct[e]._config;else if(t.parentLocale!=null)if(Ct[t.parentLocale]!=null)r=Ct[t.parentLocale]._config;else if(n=im(t.parentLocale),n!=null)r=n._config;else return oc[t.parentLocale]||(oc[t.parentLocale]=[]),oc[t.parentLocale].push({name:e,config:t}),null;return Ct[e]=new n1(ry(r,t)),oc[e]&&oc[e].forEach(function(i){u1(i.name,i.config)}),Ho(e),Ct[e]}else return delete Ct[e],null}function Eee(e,t){if(t!=null){var n,r,i=qM;Ct[e]!=null&&Ct[e].parentLocale!=null?Ct[e].set(ry(Ct[e]._config,t)):(r=im(e),r!=null&&(i=r._config),t=ry(i,t),r==null&&(t.abbr=e),n=new n1(t),n.parentLocale=Ct[e],Ct[e]=n),Ho(e)}else Ct[e]!=null&&(Ct[e].parentLocale!=null?(Ct[e]=Ct[e].parentLocale,e===Ho()&&Ho(e)):Ct[e]!=null&&delete Ct[e]);return Ct[e]}function so(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Iu;if(!ei(e)){if(t=im(e),t)return t;e=[e]}return See(e)}function kee(){return iy(Ct)}function d1(e){var t,n=e._a;return n&&ke(e).overflow===-2&&(t=n[Gi]<0||n[Gi]>11?Gi:n[vi]<1||n[vi]>rm(n[kn],n[Gi])?vi:n[Xt]<0||n[Xt]>24||n[Xt]===24&&(n[Kr]!==0||n[Ki]!==0||n[Ms]!==0)?Xt:n[Kr]<0||n[Kr]>59?Kr:n[Ki]<0||n[Ki]>59?Ki:n[Ms]<0||n[Ms]>999?Ms:-1,ke(e)._overflowDayOfYear&&(t<kn||t>vi)&&(t=vi),ke(e)._overflowWeeks&&t===-1&&(t=OQ),ke(e)._overflowWeekday&&t===-1&&(t=IQ),ke(e).overflow=t),e}var Cee=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ree=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Tee=/Z|[+-]\d\d(?::?\d\d)?/,hf=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kg=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mee=/^\/?Date\((-?\d+)/i,Pee=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Oee={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function XM(e){var t,n,r=e._i,i=Cee.exec(r)||Ree.exec(r),o,s,a,l,c=hf.length,u=kg.length;if(i){for(ke(e).iso=!0,t=0,n=c;t<n;t++)if(hf[t][1].exec(i[1])){s=hf[t][0],o=hf[t][2]!==!1;break}if(s==null){e._isValid=!1;return}if(i[3]){for(t=0,n=u;t<n;t++)if(kg[t][1].exec(i[3])){a=(i[2]||" ")+kg[t][0];break}if(a==null){e._isValid=!1;return}}if(!o&&a!=null){e._isValid=!1;return}if(i[4])if(Tee.exec(i[4]))l="Z";else{e._isValid=!1;return}e._f=s+(a||"")+(l||""),p1(e)}else e._isValid=!1}function Iee(e,t,n,r,i,o){var s=[Dee(e),BM.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&s.push(parseInt(o,10)),s}function Dee(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Aee(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function $ee(e,t,n){if(e){var r=VM.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return ke(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Nee(e,t,n){if(e)return Oee[e];if(t)return 0;var r=parseInt(n,10),i=r%100,o=(r-i)/100;return o*60+i}function ZM(e){var t=Pee.exec(Aee(e._i)),n;if(t){if(n=Iee(t[4],t[3],t[2],t[5],t[6],t[7]),!$ee(t[1],n,e))return;e._a=n,e._tzm=Nee(t[8],t[9],t[10]),e._d=Pu.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),ke(e).rfc2822=!0}else e._isValid=!1}function Lee(e){var t=Mee.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(XM(e),e._isValid===!1)delete e._isValid;else return;if(ZM(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ne.createFromInputFallback(e)}ne.createFromInputFallback=Ir("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function ba(e,t,n){return e!=null?e:t!=null?t:n}function Fee(e){var t=new Date(ne.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function f1(e){var t,n,r=[],i,o,s;if(!e._d){for(i=Fee(e),e._w&&e._a[vi]==null&&e._a[Gi]==null&&Bee(e),e._dayOfYear!=null&&(s=ba(e._a[kn],i[kn]),(e._dayOfYear>Hc(s)||e._dayOfYear===0)&&(ke(e)._overflowDayOfYear=!0),n=Pu(s,0,e._dayOfYear),e._a[Gi]=n.getUTCMonth(),e._a[vi]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Xt]===24&&e._a[Kr]===0&&e._a[Ki]===0&&e._a[Ms]===0&&(e._nextDay=!0,e._a[Xt]=0),e._d=(e._useUTC?Pu:YQ).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Xt]=24),e._w&&typeof e._w.d!="undefined"&&e._w.d!==o&&(ke(e).weekdayMismatch=!0)}}function Bee(e){var t,n,r,i,o,s,a,l,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,s=4,n=ba(t.GG,e._a[kn],Ou(_t(),1,4).year),r=ba(t.W,1),i=ba(t.E,1),(i<1||i>7)&&(l=!0)):(o=e._locale._week.dow,s=e._locale._week.doy,c=Ou(_t(),o,s),n=ba(t.gg,e._a[kn],c.year),r=ba(t.w,c.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>Xi(n,o,s)?ke(e)._overflowWeeks=!0:l!=null?ke(e)._overflowWeekday=!0:(a=YM(n,r,i,o,s),e._a[kn]=a.year,e._dayOfYear=a.dayOfYear)}ne.ISO_8601=function(){};ne.RFC_2822=function(){};function p1(e){if(e._f===ne.ISO_8601){XM(e);return}if(e._f===ne.RFC_2822){ZM(e);return}e._a=[],ke(e).empty=!0;var t=""+e._i,n,r,i,o,s,a=t.length,l=0,c,u;for(i=IM(e._f,e._locale).match(r1)||[],u=i.length,n=0;n<u;n++)o=i[n],r=(t.match(TQ(o,e))||[])[0],r&&(s=t.substr(0,t.indexOf(r)),s.length>0&&ke(e).unusedInput.push(s),t=t.slice(t.indexOf(r)+r.length),l+=r.length),Xa[o]?(r?ke(e).empty=!1:ke(e).unusedTokens.push(o),PQ(o,r,e)):e._strict&&!r&&ke(e).unusedTokens.push(o);ke(e).charsLeftOver=a-l,t.length>0&&ke(e).unusedInput.push(t),e._a[Xt]<=12&&ke(e).bigHour===!0&&e._a[Xt]>0&&(ke(e).bigHour=void 0),ke(e).parsedDateParts=e._a.slice(0),ke(e).meridiem=e._meridiem,e._a[Xt]=zee(e._locale,e._a[Xt],e._meridiem),c=ke(e).era,c!==null&&(e._a[kn]=e._locale.erasConvertYear(c,e._a[kn])),f1(e),d1(e)}function zee(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Uee(e){var t,n,r,i,o,s,a=!1,l=e._f.length;if(l===0){ke(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<l;i++)o=0,s=!1,t=t1({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],p1(t),e1(t)&&(s=!0),o+=ke(t).charsLeftOver,o+=ke(t).unusedTokens.length*10,ke(t).score=o,a?o<r&&(r=o,n=t):(r==null||o<r||s)&&(r=o,n=t,s&&(a=!0));Po(e,n||t)}function Wee(e){if(!e._d){var t=i1(e._i),n=t.day===void 0?t.date:t.day;e._a=MM([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),f1(e)}}function jee(e){var t=new cd(d1(JM(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function JM(e){var t=e._i,n=e._f;return e._locale=e._locale||so(e._l),t===null||n===void 0&&t===""?Xh({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),ti(t)?new cd(d1(t)):(ld(t)?e._d=t:ei(n)?Uee(e):n?p1(e):Hee(e),e1(e)||(e._d=null),e))}function Hee(e){var t=e._i;Fn(t)?e._d=new Date(ne.now()):ld(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Lee(e):ei(t)?(e._a=MM(t.slice(0),function(n){return parseInt(n,10)}),f1(e)):Ls(t)?Wee(e):to(t)?e._d=new Date(t):ne.createFromInputFallback(e)}function QM(e,t,n,r,i){var o={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Ls(e)&&Q_(e)||ei(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=i,o._l=n,o._i=e,o._f=t,o._strict=r,jee(o)}function _t(e,t,n,r){return QM(e,t,n,r,!1)}var Yee=Ir("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=_t.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Xh()}),Vee=Ir("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=_t.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Xh()});function eP(e,t){var n,r;if(t.length===1&&ei(t[0])&&(t=t[0]),!t.length)return _t();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function Gee(){var e=[].slice.call(arguments,0);return eP("isBefore",e)}function Kee(){var e=[].slice.call(arguments,0);return eP("isAfter",e)}var qee=function(){return Date.now?Date.now():+new Date},sc=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Xee(e){var t,n=!1,r,i=sc.length;for(t in e)if(qe(e,t)&&!(Bt.call(sc,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[sc[r]]){if(n)return!1;parseFloat(e[sc[r]])!==Ie(e[sc[r]])&&(n=!0)}return!0}function Zee(){return this._isValid}function Jee(){return si(NaN)}function om(e){var t=i1(e),n=t.year||0,r=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,s=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=Xee(t),this._milliseconds=+u+c*1e3+l*6e4+a*1e3*60*60,this._days=+s+o*7,this._months=+i+r*3+n*12,this._data={},this._locale=so(),this._bubble()}function Nf(e){return e instanceof om}function sy(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Qee(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),o=0,s;for(s=0;s<r;s++)(n&&e[s]!==t[s]||!n&&Ie(e[s])!==Ie(t[s]))&&o++;return o+i}function tP(e,t){_e(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Ci(~~(n/60),2)+t+Ci(~~n%60,2)})}tP("Z",":");tP("ZZ","");ie("Z",nm);ie("ZZ",nm);ot(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=h1(nm,e)});var ete=/([\+\-]|\d\d)/gi;function h1(e,t){var n=(t||"").match(e),r,i,o;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(ete)||["-",0,0],o=+(i[1]*60)+Ie(i[2]),o===0?0:i[0]==="+"?o:-o)}function m1(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(ti(e)||ld(e)?e.valueOf():_t(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),ne.updateOffset(n,!1),n):_t(e).local()}function ay(e){return-Math.round(e._d.getTimezoneOffset())}ne.updateOffset=function(){};function tte(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=h1(nm,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(i=ay(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?iP(this,si(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ne.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:ay(this)}function nte(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function rte(e){return this.utcOffset(0,e)}function ite(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(ay(this),"m")),this}function ote(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=h1(CQ,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function ste(e){return this.isValid()?(e=e?_t(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function ate(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function lte(){if(!Fn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return t1(e,this),e=JM(e),e._a?(t=e._isUTC?Ti(e._a):_t(e._a),this._isDSTShifted=this.isValid()&&Qee(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function cte(){return this.isValid()?!this._isUTC:!1}function ute(){return this.isValid()?this._isUTC:!1}function nP(){return this.isValid()?this._isUTC&&this._offset===0:!1}var dte=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,fte=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function si(e,t){var n=e,r=null,i,o,s;return Nf(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:to(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=dte.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:Ie(r[vi])*i,h:Ie(r[Xt])*i,m:Ie(r[Kr])*i,s:Ie(r[Ki])*i,ms:Ie(sy(r[Ms]*1e3))*i}):(r=fte.exec(e))?(i=r[1]==="-"?-1:1,n={y:hs(r[2],i),M:hs(r[3],i),w:hs(r[4],i),d:hs(r[5],i),h:hs(r[6],i),m:hs(r[7],i),s:hs(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(s=pte(_t(n.from),_t(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),o=new om(n),Nf(e)&&qe(e,"_locale")&&(o._locale=e._locale),Nf(e)&&qe(e,"_isValid")&&(o._isValid=e._isValid),o}si.fn=om.prototype;si.invalid=Jee;function hs(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function RE(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function pte(e,t){var n;return e.isValid()&&t.isValid()?(t=m1(t,e),e.isBefore(t)?n=RE(e,t):(n=RE(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function rP(e,t){return function(n,r){var i,o;return r!==null&&!isNaN(+r)&&(OM(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),i=si(n,r),iP(this,i,e),this}}function iP(e,t,n,r){var i=t._milliseconds,o=sy(t._days),s=sy(t._months);!e.isValid()||(r=r==null?!0:r,s&&UM(e,Rp(e,"Month")+s*n),o&&AM(e,"Date",Rp(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&ne.updateOffset(e,o||s))}var hte=rP(1,"add"),mte=rP(-1,"subtract");function oP(e){return typeof e=="string"||e instanceof String}function gte(e){return ti(e)||ld(e)||oP(e)||to(e)||yte(e)||vte(e)||e===null||e===void 0}function vte(e){var t=Ls(e)&&!Q_(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,o,s=r.length;for(i=0;i<s;i+=1)o=r[i],n=n||qe(e,o);return t&&n}function yte(e){var t=ei(e),n=!1;return t&&(n=e.filter(function(r){return!to(r)&&oP(e)}).length===0),t&&n}function _te(e){var t=Ls(e)&&!Q_(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,o;for(i=0;i<r.length;i+=1)o=r[i],n=n||qe(e,o);return t&&n}function bte(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function xte(e,t){arguments.length===1&&(arguments[0]?gte(arguments[0])?(e=arguments[0],t=void 0):_te(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||_t(),r=m1(n,this).startOf("day"),i=ne.calendarFormat(this,r)||"sameElse",o=t&&(Mi(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,_t(n)))}function Ste(){return new cd(this)}function wte(e,t){var n=ti(e)?e:_t(e);return this.isValid()&&n.isValid()?(t=Dr(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function Ete(e,t){var n=ti(e)?e:_t(e);return this.isValid()&&n.isValid()?(t=Dr(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function kte(e,t,n,r){var i=ti(e)?e:_t(e),o=ti(t)?t:_t(t);return this.isValid()&&i.isValid()&&o.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(o,n):!this.isAfter(o,n))):!1}function Cte(e,t){var n=ti(e)?e:_t(e),r;return this.isValid()&&n.isValid()?(t=Dr(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Rte(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Tte(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Mte(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(r=m1(e,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=Dr(t),t){case"year":o=Lf(this,r)/12;break;case"month":o=Lf(this,r);break;case"quarter":o=Lf(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:mr(o)}function Lf(e,t){if(e.date()<t.date())return-Lf(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),i,o;return t-r<0?(i=e.clone().add(n-1,"months"),o=(t-r)/(r-i)):(i=e.clone().add(n+1,"months"),o=(t-r)/(i-r)),-(n+o)||0}ne.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";ne.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Pte(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ote(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?$f(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Mi(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",$f(n,"Z")):$f(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ite(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+i+o)}function Dte(e){e||(e=this.isUtc()?ne.defaultFormatUtc:ne.defaultFormat);var t=$f(this,e);return this.localeData().postformat(t)}function Ate(e,t){return this.isValid()&&(ti(e)&&e.isValid()||_t(e).isValid())?si({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function $te(e){return this.from(_t(),e)}function Nte(e,t){return this.isValid()&&(ti(e)&&e.isValid()||_t(e).isValid())?si({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Lte(e){return this.to(_t(),e)}function sP(e){var t;return e===void 0?this._locale._abbr:(t=so(e),t!=null&&(this._locale=t),this)}var aP=Ir("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function lP(){return this._locale}var Pp=1e3,Za=60*Pp,Op=60*Za,cP=(365*400+97)*24*Op;function Ja(e,t){return(e%t+t)%t}function uP(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-cP:new Date(e,t,n).valueOf()}function dP(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-cP:Date.UTC(e,t,n)}function Fte(e){var t,n;if(e=Dr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?dP:uP,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ja(t+(this._isUTC?0:this.utcOffset()*Za),Op);break;case"minute":t=this._d.valueOf(),t-=Ja(t,Za);break;case"second":t=this._d.valueOf(),t-=Ja(t,Pp);break}return this._d.setTime(t),ne.updateOffset(this,!0),this}function Bte(e){var t,n;if(e=Dr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?dP:uP,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Op-Ja(t+(this._isUTC?0:this.utcOffset()*Za),Op)-1;break;case"minute":t=this._d.valueOf(),t+=Za-Ja(t,Za)-1;break;case"second":t=this._d.valueOf(),t+=Pp-Ja(t,Pp)-1;break}return this._d.setTime(t),ne.updateOffset(this,!0),this}function zte(){return this._d.valueOf()-(this._offset||0)*6e4}function Ute(){return Math.floor(this.valueOf()/1e3)}function Wte(){return new Date(this.valueOf())}function jte(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Hte(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Yte(){return this.isValid()?this.toISOString():null}function Vte(){return e1(this)}function Gte(){return Po({},ke(this))}function Kte(){return ke(this).overflow}function qte(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}_e("N",0,0,"eraAbbr");_e("NN",0,0,"eraAbbr");_e("NNN",0,0,"eraAbbr");_e("NNNN",0,0,"eraName");_e("NNNNN",0,0,"eraNarrow");_e("y",["y",1],"yo","eraYear");_e("y",["yy",2],0,"eraYear");_e("y",["yyy",3],0,"eraYear");_e("y",["yyyy",4],0,"eraYear");ie("N",g1);ie("NN",g1);ie("NNN",g1);ie("NNNN",sne);ie("NNNNN",ane);ot(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?ke(n).era=i:ke(n).invalidEra=e});ie("y",Dl);ie("yy",Dl);ie("yyy",Dl);ie("yyyy",Dl);ie("yo",lne);ot(["y","yy","yyy","yyyy"],kn);ot(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[kn]=n._locale.eraYearOrdinalParse(e,i):t[kn]=parseInt(e,10)});function Xte(e,t){var n,r,i,o=this._eras||so("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":i=ne(o[n].since).startOf("day"),o[n].since=i.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":i=ne(o[n].until).startOf("day").valueOf(),o[n].until=i.valueOf();break}}return o}function Zte(e,t,n){var r,i,o=this.eras(),s,a,l;for(e=e.toUpperCase(),r=0,i=o.length;r<i;++r)if(s=o[r].name.toUpperCase(),a=o[r].abbr.toUpperCase(),l=o[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return o[r];break;case"NNNN":if(s===e)return o[r];break;case"NNNNN":if(l===e)return o[r];break}else if([s,a,l].indexOf(e)>=0)return o[r]}function Jte(e,t){var n=e.since<=e.until?1:-1;return t===void 0?ne(e.since).year():ne(e.since).year()+(t-e.offset)*n}function Qte(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function ene(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function tne(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function nne(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-ne(i[e].since).year())*n+i[e].offset;return this.year()}function rne(e){return qe(this,"_erasNameRegex")||v1.call(this),e?this._erasNameRegex:this._erasRegex}function ine(e){return qe(this,"_erasAbbrRegex")||v1.call(this),e?this._erasAbbrRegex:this._erasRegex}function one(e){return qe(this,"_erasNarrowRegex")||v1.call(this),e?this._erasNarrowRegex:this._erasRegex}function g1(e,t){return t.erasAbbrRegex(e)}function sne(e,t){return t.erasNameRegex(e)}function ane(e,t){return t.erasNarrowRegex(e)}function lne(e,t){return t._eraYearOrdinalRegex||Dl}function v1(){var e=[],t=[],n=[],r=[],i,o,s=this.eras();for(i=0,o=s.length;i<o;++i)t.push(er(s[i].name)),e.push(er(s[i].abbr)),n.push(er(s[i].narrow)),r.push(er(s[i].name)),r.push(er(s[i].abbr)),r.push(er(s[i].narrow));this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}_e(0,["gg",2],0,function(){return this.weekYear()%100});_e(0,["GG",2],0,function(){return this.isoWeekYear()%100});function sm(e,t){_e(0,[e,e.length],0,t)}sm("gggg","weekYear");sm("ggggg","weekYear");sm("GGGG","isoWeekYear");sm("GGGGG","isoWeekYear");Tn("weekYear","gg");Tn("isoWeekYear","GG");Mn("weekYear",1);Mn("isoWeekYear",1);ie("G",tm);ie("g",tm);ie("GG",xt,cr);ie("gg",xt,cr);ie("GGGG",s1,o1);ie("gggg",s1,o1);ie("GGGGG",em,Jh);ie("ggggg",em,Jh);dd(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=Ie(e)});dd(["gg","GG"],function(e,t,n,r){t[r]=ne.parseTwoDigitYear(e)});function cne(e){return fP.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function une(e){return fP.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function dne(){return Xi(this.year(),1,4)}function fne(){return Xi(this.isoWeekYear(),1,4)}function pne(){var e=this.localeData()._week;return Xi(this.year(),e.dow,e.doy)}function hne(){var e=this.localeData()._week;return Xi(this.weekYear(),e.dow,e.doy)}function fP(e,t,n,r,i){var o;return e==null?Ou(this,r,i).year:(o=Xi(e,r,i),t>o&&(t=o),mne.call(this,e,t,n,r,i))}function mne(e,t,n,r,i){var o=YM(e,t,n,r,i),s=Pu(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}_e("Q",0,"Qo","quarter");Tn("quarter","Q");Mn("quarter",7);ie("Q",$M);ot("Q",function(e,t){t[Gi]=(Ie(e)-1)*3});function gne(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}_e("D",["DD",2],"Do","date");Tn("date","D");Mn("date",9);ie("D",xt);ie("DD",xt,cr);ie("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});ot(["D","DD"],vi);ot("Do",function(e,t){t[vi]=Ie(e.match(xt)[0])});var pP=Il("Date",!0);_e("DDD",["DDDD",3],"DDDo","dayOfYear");Tn("dayOfYear","DDD");Mn("dayOfYear",4);ie("DDD",Qh);ie("DDDD",NM);ot(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Ie(e)});function vne(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}_e("m",["mm",2],0,"minute");Tn("minute","m");Mn("minute",14);ie("m",xt);ie("mm",xt,cr);ot(["m","mm"],Kr);var yne=Il("Minutes",!1);_e("s",["ss",2],0,"second");Tn("second","s");Mn("second",15);ie("s",xt);ie("ss",xt,cr);ot(["s","ss"],Ki);var _ne=Il("Seconds",!1);_e("S",0,0,function(){return~~(this.millisecond()/100)});_e(0,["SS",2],0,function(){return~~(this.millisecond()/10)});_e(0,["SSS",3],0,"millisecond");_e(0,["SSSS",4],0,function(){return this.millisecond()*10});_e(0,["SSSSS",5],0,function(){return this.millisecond()*100});_e(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});_e(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});_e(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});_e(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Tn("millisecond","ms");Mn("millisecond",16);ie("S",Qh,$M);ie("SS",Qh,cr);ie("SSS",Qh,NM);var Oo,hP;for(Oo="SSSS";Oo.length<=9;Oo+="S")ie(Oo,Dl);function bne(e,t){t[Ms]=Ie(("0."+e)*1e3)}for(Oo="S";Oo.length<=9;Oo+="S")ot(Oo,bne);hP=Il("Milliseconds",!1);_e("z",0,0,"zoneAbbr");_e("zz",0,0,"zoneName");function xne(){return this._isUTC?"UTC":""}function Sne(){return this._isUTC?"Coordinated Universal Time":""}var X=cd.prototype;X.add=hte;X.calendar=xte;X.clone=Ste;X.diff=Mte;X.endOf=Bte;X.format=Dte;X.from=Ate;X.fromNow=$te;X.to=Nte;X.toNow=Lte;X.get=EQ;X.invalidAt=Kte;X.isAfter=wte;X.isBefore=Ete;X.isBetween=kte;X.isSame=Cte;X.isSameOrAfter=Rte;X.isSameOrBefore=Tte;X.isValid=Vte;X.lang=aP;X.locale=sP;X.localeData=lP;X.max=Vee;X.min=Yee;X.parsingFlags=Gte;X.set=kQ;X.startOf=Fte;X.subtract=mte;X.toArray=jte;X.toObject=Hte;X.toDate=Wte;X.toISOString=Ote;X.inspect=Ite;typeof Symbol!="undefined"&&Symbol.for!=null&&(X[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});X.toJSON=Yte;X.toString=Pte;X.unix=Ute;X.valueOf=zte;X.creationData=qte;X.eraName=Qte;X.eraNarrow=ene;X.eraAbbr=tne;X.eraYear=nne;X.year=HM;X.isLeapYear=HQ;X.weekYear=cne;X.isoWeekYear=une;X.quarter=X.quarters=gne;X.month=WM;X.daysInMonth=UQ;X.week=X.weeks=XQ;X.isoWeek=X.isoWeeks=ZQ;X.weeksInYear=pne;X.weeksInWeekYear=hne;X.isoWeeksInYear=dne;X.isoWeeksInISOWeekYear=fne;X.date=pP;X.day=X.days=uee;X.weekday=dee;X.isoWeekday=fee;X.dayOfYear=vne;X.hour=X.hours=_ee;X.minute=X.minutes=yne;X.second=X.seconds=_ne;X.millisecond=X.milliseconds=hP;X.utcOffset=tte;X.utc=rte;X.local=ite;X.parseZone=ote;X.hasAlignedHourOffset=ste;X.isDST=ate;X.isLocal=cte;X.isUtcOffset=ute;X.isUtc=nP;X.isUTC=nP;X.zoneAbbr=xne;X.zoneName=Sne;X.dates=Ir("dates accessor is deprecated. Use date instead.",pP);X.months=Ir("months accessor is deprecated. Use month instead",WM);X.years=Ir("years accessor is deprecated. Use year instead",HM);X.zone=Ir("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",nte);X.isDSTShifted=Ir("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",lte);function wne(e){return _t(e*1e3)}function Ene(){return _t.apply(null,arguments).parseZone()}function mP(e){return e}var Xe=n1.prototype;Xe.calendar=uQ;Xe.longDateFormat=hQ;Xe.invalidDate=gQ;Xe.ordinal=_Q;Xe.preparse=mP;Xe.postformat=mP;Xe.relativeTime=xQ;Xe.pastFuture=SQ;Xe.set=lQ;Xe.eras=Xte;Xe.erasParse=Zte;Xe.erasConvertYear=Jte;Xe.erasAbbrRegex=ine;Xe.erasNameRegex=rne;Xe.erasNarrowRegex=one;Xe.months=LQ;Xe.monthsShort=FQ;Xe.monthsParse=zQ;Xe.monthsRegex=jQ;Xe.monthsShortRegex=WQ;Xe.week=VQ;Xe.firstDayOfYear=qQ;Xe.firstDayOfWeek=KQ;Xe.weekdays=oee;Xe.weekdaysMin=aee;Xe.weekdaysShort=see;Xe.weekdaysParse=cee;Xe.weekdaysRegex=pee;Xe.weekdaysShortRegex=hee;Xe.weekdaysMinRegex=mee;Xe.isPM=vee;Xe.meridiem=bee;function Ip(e,t,n,r){var i=so(),o=Ti().set(r,t);return i[n](o,e)}function gP(e,t,n){if(to(e)&&(t=e,e=void 0),e=e||"",t!=null)return Ip(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Ip(e,r,n,"month");return i}function y1(e,t,n,r){typeof e=="boolean"?(to(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,to(t)&&(n=t,t=void 0),t=t||"");var i=so(),o=e?i._week.dow:0,s,a=[];if(n!=null)return Ip(t,(n+o)%7,r,"day");for(s=0;s<7;s++)a[s]=Ip(t,(s+o)%7,r,"day");return a}function kne(e,t){return gP(e,t,"months")}function Cne(e,t){return gP(e,t,"monthsShort")}function Rne(e,t,n){return y1(e,t,n,"weekdays")}function Tne(e,t,n){return y1(e,t,n,"weekdaysShort")}function Mne(e,t,n){return y1(e,t,n,"weekdaysMin")}Ho("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Ie(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});ne.lang=Ir("moment.lang is deprecated. Use moment.locale instead.",Ho);ne.langData=Ir("moment.langData is deprecated. Use moment.localeData instead.",so);var $i=Math.abs;function Pne(){var e=this._data;return this._milliseconds=$i(this._milliseconds),this._days=$i(this._days),this._months=$i(this._months),e.milliseconds=$i(e.milliseconds),e.seconds=$i(e.seconds),e.minutes=$i(e.minutes),e.hours=$i(e.hours),e.months=$i(e.months),e.years=$i(e.years),this}function vP(e,t,n,r){var i=si(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function One(e,t){return vP(this,e,t,1)}function Ine(e,t){return vP(this,e,t,-1)}function TE(e){return e<0?Math.floor(e):Math.ceil(e)}function Dne(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,o,s,a,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=TE(ly(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=mr(e/1e3),r.seconds=i%60,o=mr(i/60),r.minutes=o%60,s=mr(o/60),r.hours=s%24,t+=mr(s/24),l=mr(yP(t)),n+=l,t-=TE(ly(l)),a=mr(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function yP(e){return e*4800/146097}function ly(e){return e*146097/4800}function Ane(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Dr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+yP(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(ly(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function $ne(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Ie(this._months/12)*31536e6:NaN}function ao(e){return function(){return this.as(e)}}var Nne=ao("ms"),Lne=ao("s"),Fne=ao("m"),Bne=ao("h"),zne=ao("d"),Une=ao("w"),Wne=ao("M"),jne=ao("Q"),Hne=ao("y");function Yne(){return si(this)}function Vne(e){return e=Dr(e),this.isValid()?this[e+"s"]():NaN}function na(e){return function(){return this.isValid()?this._data[e]:NaN}}var Gne=na("milliseconds"),Kne=na("seconds"),qne=na("minutes"),Xne=na("hours"),Zne=na("days"),Jne=na("months"),Qne=na("years");function ere(){return mr(this.days()/7)}var zi=Math.round,Na={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function tre(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function nre(e,t,n,r){var i=si(e).abs(),o=zi(i.as("s")),s=zi(i.as("m")),a=zi(i.as("h")),l=zi(i.as("d")),c=zi(i.as("M")),u=zi(i.as("w")),d=zi(i.as("y")),f=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(f=f||u<=1&&["w"]||u<n.w&&["ww",u]),f=f||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d],f[2]=t,f[3]=+e>0,f[4]=r,tre.apply(null,f)}function rre(e){return e===void 0?zi:typeof e=="function"?(zi=e,!0):!1}function ire(e,t){return Na[e]===void 0?!1:t===void 0?Na[e]:(Na[e]=t,e==="s"&&(Na.ss=t-1),!0)}function ore(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Na,i,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Na,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),o=nre(this,!n,r,i),n&&(o=i.pastFuture(+this,o)),i.postformat(o)}var Cg=Math.abs;function ga(e){return(e>0)-(e<0)||+e}function am(){if(!this.isValid())return this.localeData().invalidDate();var e=Cg(this._milliseconds)/1e3,t=Cg(this._days),n=Cg(this._months),r,i,o,s,a=this.asSeconds(),l,c,u,d;return a?(r=mr(e/60),i=mr(r/60),e%=60,r%=60,o=mr(n/12),n%=12,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",c=ga(this._months)!==ga(a)?"-":"",u=ga(this._days)!==ga(a)?"-":"",d=ga(this._milliseconds)!==ga(a)?"-":"",l+"P"+(o?c+o+"Y":"")+(n?c+n+"M":"")+(t?u+t+"D":"")+(i||r||e?"T":"")+(i?d+i+"H":"")+(r?d+r+"M":"")+(e?d+s+"S":"")):"P0D"}var Ue=om.prototype;Ue.isValid=Zee;Ue.abs=Pne;Ue.add=One;Ue.subtract=Ine;Ue.as=Ane;Ue.asMilliseconds=Nne;Ue.asSeconds=Lne;Ue.asMinutes=Fne;Ue.asHours=Bne;Ue.asDays=zne;Ue.asWeeks=Une;Ue.asMonths=Wne;Ue.asQuarters=jne;Ue.asYears=Hne;Ue.valueOf=$ne;Ue._bubble=Dne;Ue.clone=Yne;Ue.get=Vne;Ue.milliseconds=Gne;Ue.seconds=Kne;Ue.minutes=qne;Ue.hours=Xne;Ue.days=Zne;Ue.weeks=ere;Ue.months=Jne;Ue.years=Qne;Ue.humanize=ore;Ue.toISOString=am;Ue.toString=am;Ue.toJSON=am;Ue.locale=sP;Ue.localeData=lP;Ue.toIsoString=Ir("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",am);Ue.lang=aP;_e("X",0,0,"unix");_e("x",0,0,"valueOf");ie("x",tm);ie("X",RQ);ot("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});ot("x",function(e,t,n){n._d=new Date(Ie(e))});//! moment.js
218
+ ne.version="2.29.4";sQ(_t);ne.fn=X;ne.min=Gee;ne.max=Kee;ne.now=qee;ne.utc=Ti;ne.unix=wne;ne.months=kne;ne.isDate=ld;ne.locale=Ho;ne.invalid=Xh;ne.duration=si;ne.isMoment=ti;ne.weekdays=Rne;ne.parseZone=Ene;ne.localeData=so;ne.isDuration=Nf;ne.monthsShort=Cne;ne.weekdaysMin=Mne;ne.defineLocale=u1;ne.updateLocale=Eee;ne.locales=kee;ne.weekdaysShort=Tne;ne.normalizeUnits=Dr;ne.relativeTimeRounding=rre;ne.relativeTimeThreshold=ire;ne.calendarFormat=bte;ne.prototype=X;ne.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const sre={name:"Andorra",native:"Andorra",phone:"376",continent:"EU",capital:"Andorra la Vella",currency:"EUR",languages:["ca"]},are={name:"United Arab Emirates",native:"\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629",phone:"971",continent:"AS",capital:"Abu Dhabi",currency:"AED",languages:["ar"]},lre={name:"Afghanistan",native:"\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646",phone:"93",continent:"AS",capital:"Kabul",currency:"AFN",languages:["ps","uz","tk"]},cre={name:"Antigua and Barbuda",native:"Antigua and Barbuda",phone:"1268",continent:"NA",capital:"Saint John's",currency:"XCD",languages:["en"]},ure={name:"Anguilla",native:"Anguilla",phone:"1264",continent:"NA",capital:"The Valley",currency:"XCD",languages:["en"]},dre={name:"Albania",native:"Shqip\xEBria",phone:"355",continent:"EU",capital:"Tirana",currency:"ALL",languages:["sq"]},fre={name:"Armenia",native:"\u0540\u0561\u0575\u0561\u057D\u057F\u0561\u0576",phone:"374",continent:"AS",capital:"Yerevan",currency:"AMD",languages:["hy","ru"]},pre={name:"Angola",native:"Angola",phone:"244",continent:"AF",capital:"Luanda",currency:"AOA",languages:["pt"]},hre={name:"Antarctica",native:"Antarctica",phone:"672",continent:"AN",capital:"",currency:"",languages:[]},mre={name:"Argentina",native:"Argentina",phone:"54",continent:"SA",capital:"Buenos Aires",currency:"ARS",languages:["es","gn"]},gre={name:"American Samoa",native:"American Samoa",phone:"1684",continent:"OC",capital:"Pago Pago",currency:"USD",languages:["en","sm"]},vre={name:"Austria",native:"\xD6sterreich",phone:"43",continent:"EU",capital:"Vienna",currency:"EUR",languages:["de"]},yre={name:"Australia",native:"Australia",phone:"61",continent:"OC",capital:"Canberra",currency:"AUD",languages:["en"]},_re={name:"Aruba",native:"Aruba",phone:"297",continent:"NA",capital:"Oranjestad",currency:"AWG",languages:["nl","pa"]},bre={name:"\xC5land",native:"\xC5land",phone:"358",continent:"EU",capital:"Mariehamn",currency:"EUR",languages:["sv"]},xre={name:"Azerbaijan",native:"Az\u0259rbaycan",phone:"994",continent:"AS",capital:"Baku",currency:"AZN",languages:["az"]},Sre={name:"Bosnia and Herzegovina",native:"Bosna i Hercegovina",phone:"387",continent:"EU",capital:"Sarajevo",currency:"BAM",languages:["bs","hr","sr"]},wre={name:"Barbados",native:"Barbados",phone:"1246",continent:"NA",capital:"Bridgetown",currency:"BBD",languages:["en"]},Ere={name:"Bangladesh",native:"Bangladesh",phone:"880",continent:"AS",capital:"Dhaka",currency:"BDT",languages:["bn"]},kre={name:"Belgium",native:"Belgi\xEB",phone:"32",continent:"EU",capital:"Brussels",currency:"EUR",languages:["nl","fr","de"]},Cre={name:"Burkina Faso",native:"Burkina Faso",phone:"226",continent:"AF",capital:"Ouagadougou",currency:"XOF",languages:["fr","ff"]},Rre={name:"Bulgaria",native:"\u0411\u044A\u043B\u0433\u0430\u0440\u0438\u044F",phone:"359",continent:"EU",capital:"Sofia",currency:"BGN",languages:["bg"]},Tre={name:"Bahrain",native:"\u200F\u0627\u0644\u0628\u062D\u0631\u064A\u0646",phone:"973",continent:"AS",capital:"Manama",currency:"BHD",languages:["ar"]},Mre={name:"Burundi",native:"Burundi",phone:"257",continent:"AF",capital:"Bujumbura",currency:"BIF",languages:["fr","rn"]},Pre={name:"Benin",native:"B\xE9nin",phone:"229",continent:"AF",capital:"Porto-Novo",currency:"XOF",languages:["fr"]},Ore={name:"Saint Barth\xE9lemy",native:"Saint-Barth\xE9lemy",phone:"590",continent:"NA",capital:"Gustavia",currency:"EUR",languages:["fr"]},Ire={name:"Bermuda",native:"Bermuda",phone:"1441",continent:"NA",capital:"Hamilton",currency:"BMD",languages:["en"]},Dre={name:"Brunei",native:"Negara Brunei Darussalam",phone:"673",continent:"AS",capital:"Bandar Seri Begawan",currency:"BND",languages:["ms"]},Are={name:"Bolivia",native:"Bolivia",phone:"591",continent:"SA",capital:"Sucre",currency:"BOB,BOV",languages:["es","ay","qu"]},$re={name:"Bonaire",native:"Bonaire",phone:"5997",continent:"NA",capital:"Kralendijk",currency:"USD",languages:["nl"]},Nre={name:"Brazil",native:"Brasil",phone:"55",continent:"SA",capital:"Bras\xEDlia",currency:"BRL",languages:["pt"]},Lre={name:"Bahamas",native:"Bahamas",phone:"1242",continent:"NA",capital:"Nassau",currency:"BSD",languages:["en"]},Fre={name:"Bhutan",native:"\u02BCbrug-yul",phone:"975",continent:"AS",capital:"Thimphu",currency:"BTN,INR",languages:["dz"]},Bre={name:"Bouvet Island",native:"Bouvet\xF8ya",phone:"47",continent:"AN",capital:"",currency:"NOK",languages:["no","nb","nn"]},zre={name:"Botswana",native:"Botswana",phone:"267",continent:"AF",capital:"Gaborone",currency:"BWP",languages:["en","tn"]},Ure={name:"Belarus",native:"\u0411\u0435\u043B\u0430\u0440\u0443\u0301\u0441\u044C",phone:"375",continent:"EU",capital:"Minsk",currency:"BYN",languages:["be","ru"]},Wre={name:"Belize",native:"Belize",phone:"501",continent:"NA",capital:"Belmopan",currency:"BZD",languages:["en","es"]},jre={name:"Canada",native:"Canada",phone:"1",continent:"NA",capital:"Ottawa",currency:"CAD",languages:["en","fr"]},Hre={name:"Cocos [Keeling] Islands",native:"Cocos (Keeling) Islands",phone:"61",continent:"AS",capital:"West Island",currency:"AUD",languages:["en"]},Yre={name:"Democratic Republic of the Congo",native:"R\xE9publique d\xE9mocratique du Congo",phone:"243",continent:"AF",capital:"Kinshasa",currency:"CDF",languages:["fr","ln","kg","sw","lu"]},Vre={name:"Central African Republic",native:"K\xF6d\xF6r\xF6s\xEAse t\xEE B\xEAafr\xEEka",phone:"236",continent:"AF",capital:"Bangui",currency:"XAF",languages:["fr","sg"]},Gre={name:"Republic of the Congo",native:"R\xE9publique du Congo",phone:"242",continent:"AF",capital:"Brazzaville",currency:"XAF",languages:["fr","ln"]},Kre={name:"Switzerland",native:"Schweiz",phone:"41",continent:"EU",capital:"Bern",currency:"CHE,CHF,CHW",languages:["de","fr","it"]},qre={name:"Ivory Coast",native:"C\xF4te d'Ivoire",phone:"225",continent:"AF",capital:"Yamoussoukro",currency:"XOF",languages:["fr"]},Xre={name:"Cook Islands",native:"Cook Islands",phone:"682",continent:"OC",capital:"Avarua",currency:"NZD",languages:["en"]},Zre={name:"Chile",native:"Chile",phone:"56",continent:"SA",capital:"Santiago",currency:"CLF,CLP",languages:["es"]},Jre={name:"Cameroon",native:"Cameroon",phone:"237",continent:"AF",capital:"Yaound\xE9",currency:"XAF",languages:["en","fr"]},Qre={name:"China",native:"\u4E2D\u56FD",phone:"86",continent:"AS",capital:"Beijing",currency:"CNY",languages:["zh"]},eie={name:"Colombia",native:"Colombia",phone:"57",continent:"SA",capital:"Bogot\xE1",currency:"COP",languages:["es"]},tie={name:"Costa Rica",native:"Costa Rica",phone:"506",continent:"NA",capital:"San Jos\xE9",currency:"CRC",languages:["es"]},nie={name:"Cuba",native:"Cuba",phone:"53",continent:"NA",capital:"Havana",currency:"CUC,CUP",languages:["es"]},rie={name:"Cape Verde",native:"Cabo Verde",phone:"238",continent:"AF",capital:"Praia",currency:"CVE",languages:["pt"]},iie={name:"Curacao",native:"Cura\xE7ao",phone:"5999",continent:"NA",capital:"Willemstad",currency:"ANG",languages:["nl","pa","en"]},oie={name:"Christmas Island",native:"Christmas Island",phone:"61",continent:"AS",capital:"Flying Fish Cove",currency:"AUD",languages:["en"]},sie={name:"Cyprus",native:"\u039A\u03CD\u03C0\u03C1\u03BF\u03C2",phone:"357",continent:"EU",capital:"Nicosia",currency:"EUR",languages:["el","tr","hy"]},aie={name:"Czech Republic",native:"\u010Cesk\xE1 republika",phone:"420",continent:"EU",capital:"Prague",currency:"CZK",languages:["cs","sk"]},lie={name:"Germany",native:"Deutschland",phone:"49",continent:"EU",capital:"Berlin",currency:"EUR",languages:["de"]},cie={name:"Djibouti",native:"Djibouti",phone:"253",continent:"AF",capital:"Djibouti",currency:"DJF",languages:["fr","ar"]},uie={name:"Denmark",native:"Danmark",phone:"45",continent:"EU",capital:"Copenhagen",currency:"DKK",languages:["da"]},die={name:"Dominica",native:"Dominica",phone:"1767",continent:"NA",capital:"Roseau",currency:"XCD",languages:["en"]},fie={name:"Dominican Republic",native:"Rep\xFAblica Dominicana",phone:"1809,1829,1849",continent:"NA",capital:"Santo Domingo",currency:"DOP",languages:["es"]},pie={name:"Algeria",native:"\u0627\u0644\u062C\u0632\u0627\u0626\u0631",phone:"213",continent:"AF",capital:"Algiers",currency:"DZD",languages:["ar"]},hie={name:"Ecuador",native:"Ecuador",phone:"593",continent:"SA",capital:"Quito",currency:"USD",languages:["es"]},mie={name:"Estonia",native:"Eesti",phone:"372",continent:"EU",capital:"Tallinn",currency:"EUR",languages:["et"]},gie={name:"Egypt",native:"\u0645\u0635\u0631\u200E",phone:"20",continent:"AF",capital:"Cairo",currency:"EGP",languages:["ar"]},vie={name:"Western Sahara",native:"\u0627\u0644\u0635\u062D\u0631\u0627\u0621 \u0627\u0644\u063A\u0631\u0628\u064A\u0629",phone:"212",continent:"AF",capital:"El Aai\xFAn",currency:"MAD,DZD,MRU",languages:["es"]},yie={name:"Eritrea",native:"\u12A4\u122D\u1275\u122B",phone:"291",continent:"AF",capital:"Asmara",currency:"ERN",languages:["ti","ar","en"]},_ie={name:"Spain",native:"Espa\xF1a",phone:"34",continent:"EU",capital:"Madrid",currency:"EUR",languages:["es","eu","ca","gl","oc"]},bie={name:"Ethiopia",native:"\u12A2\u1275\u12EE\u1335\u12EB",phone:"251",continent:"AF",capital:"Addis Ababa",currency:"ETB",languages:["am"]},xie={name:"Finland",native:"Suomi",phone:"358",continent:"EU",capital:"Helsinki",currency:"EUR",languages:["fi","sv"]},Sie={name:"Fiji",native:"Fiji",phone:"679",continent:"OC",capital:"Suva",currency:"FJD",languages:["en","fj","hi","ur"]},wie={name:"Falkland Islands",native:"Falkland Islands",phone:"500",continent:"SA",capital:"Stanley",currency:"FKP",languages:["en"]},Eie={name:"Micronesia",native:"Micronesia",phone:"691",continent:"OC",capital:"Palikir",currency:"USD",languages:["en"]},kie={name:"Faroe Islands",native:"F\xF8royar",phone:"298",continent:"EU",capital:"T\xF3rshavn",currency:"DKK",languages:["fo"]},Cie={name:"France",native:"France",phone:"33",continent:"EU",capital:"Paris",currency:"EUR",languages:["fr"]},Rie={name:"Gabon",native:"Gabon",phone:"241",continent:"AF",capital:"Libreville",currency:"XAF",languages:["fr"]},Tie={name:"United Kingdom",native:"United Kingdom",phone:"44",continent:"EU",capital:"London",currency:"GBP",languages:["en"]},Mie={name:"Grenada",native:"Grenada",phone:"1473",continent:"NA",capital:"St. George's",currency:"XCD",languages:["en"]},Pie={name:"Georgia",native:"\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD",phone:"995",continent:"AS",capital:"Tbilisi",currency:"GEL",languages:["ka"]},Oie={name:"French Guiana",native:"Guyane fran\xE7aise",phone:"594",continent:"SA",capital:"Cayenne",currency:"EUR",languages:["fr"]},Iie={name:"Guernsey",native:"Guernsey",phone:"44",continent:"EU",capital:"St. Peter Port",currency:"GBP",languages:["en","fr"]},Die={name:"Ghana",native:"Ghana",phone:"233",continent:"AF",capital:"Accra",currency:"GHS",languages:["en"]},Aie={name:"Gibraltar",native:"Gibraltar",phone:"350",continent:"EU",capital:"Gibraltar",currency:"GIP",languages:["en"]},$ie={name:"Greenland",native:"Kalaallit Nunaat",phone:"299",continent:"NA",capital:"Nuuk",currency:"DKK",languages:["kl"]},Nie={name:"Gambia",native:"Gambia",phone:"220",continent:"AF",capital:"Banjul",currency:"GMD",languages:["en"]},Lie={name:"Guinea",native:"Guin\xE9e",phone:"224",continent:"AF",capital:"Conakry",currency:"GNF",languages:["fr","ff"]},Fie={name:"Guadeloupe",native:"Guadeloupe",phone:"590",continent:"NA",capital:"Basse-Terre",currency:"EUR",languages:["fr"]},Bie={name:"Equatorial Guinea",native:"Guinea Ecuatorial",phone:"240",continent:"AF",capital:"Malabo",currency:"XAF",languages:["es","fr"]},zie={name:"Greece",native:"\u0395\u03BB\u03BB\u03AC\u03B4\u03B1",phone:"30",continent:"EU",capital:"Athens",currency:"EUR",languages:["el"]},Uie={name:"South Georgia and the South Sandwich Islands",native:"South Georgia",phone:"500",continent:"AN",capital:"King Edward Point",currency:"GBP",languages:["en"]},Wie={name:"Guatemala",native:"Guatemala",phone:"502",continent:"NA",capital:"Guatemala City",currency:"GTQ",languages:["es"]},jie={name:"Guam",native:"Guam",phone:"1671",continent:"OC",capital:"Hag\xE5t\xF1a",currency:"USD",languages:["en","ch","es"]},Hie={name:"Guinea-Bissau",native:"Guin\xE9-Bissau",phone:"245",continent:"AF",capital:"Bissau",currency:"XOF",languages:["pt"]},Yie={name:"Guyana",native:"Guyana",phone:"592",continent:"SA",capital:"Georgetown",currency:"GYD",languages:["en"]},Vie={name:"Hong Kong",native:"\u9999\u6E2F",phone:"852",continent:"AS",capital:"City of Victoria",currency:"HKD",languages:["zh","en"]},Gie={name:"Heard Island and McDonald Islands",native:"Heard Island and McDonald Islands",phone:"61",continent:"AN",capital:"",currency:"AUD",languages:["en"]},Kie={name:"Honduras",native:"Honduras",phone:"504",continent:"NA",capital:"Tegucigalpa",currency:"HNL",languages:["es"]},qie={name:"Croatia",native:"Hrvatska",phone:"385",continent:"EU",capital:"Zagreb",currency:"HRK",languages:["hr"]},Xie={name:"Haiti",native:"Ha\xEFti",phone:"509",continent:"NA",capital:"Port-au-Prince",currency:"HTG,USD",languages:["fr","ht"]},Zie={name:"Hungary",native:"Magyarorsz\xE1g",phone:"36",continent:"EU",capital:"Budapest",currency:"HUF",languages:["hu"]},Jie={name:"Indonesia",native:"Indonesia",phone:"62",continent:"AS",capital:"Jakarta",currency:"IDR",languages:["id"]},Qie={name:"Ireland",native:"\xC9ire",phone:"353",continent:"EU",capital:"Dublin",currency:"EUR",languages:["ga","en"]},eoe={name:"Israel",native:"\u05D9\u05B4\u05E9\u05B0\u05C2\u05E8\u05B8\u05D0\u05B5\u05DC",phone:"972",continent:"AS",capital:"Jerusalem",currency:"ILS",languages:["he","ar"]},toe={name:"Isle of Man",native:"Isle of Man",phone:"44",continent:"EU",capital:"Douglas",currency:"GBP",languages:["en","gv"]},noe={name:"India",native:"\u092D\u093E\u0930\u0924",phone:"91",continent:"AS",capital:"New Delhi",currency:"INR",languages:["hi","en"]},roe={name:"British Indian Ocean Territory",native:"British Indian Ocean Territory",phone:"246",continent:"AS",capital:"Diego Garcia",currency:"USD",languages:["en"]},ioe={name:"Iraq",native:"\u0627\u0644\u0639\u0631\u0627\u0642",phone:"964",continent:"AS",capital:"Baghdad",currency:"IQD",languages:["ar","ku"]},ooe={name:"Iran",native:"\u0627\u06CC\u0631\u0627\u0646",phone:"98",continent:"AS",capital:"Tehran",currency:"IRR",languages:["fa"]},soe={name:"Iceland",native:"\xCDsland",phone:"354",continent:"EU",capital:"Reykjavik",currency:"ISK",languages:["is"]},aoe={name:"Italy",native:"Italia",phone:"39",continent:"EU",capital:"Rome",currency:"EUR",languages:["it"]},loe={name:"Jersey",native:"Jersey",phone:"44",continent:"EU",capital:"Saint Helier",currency:"GBP",languages:["en","fr"]},coe={name:"Jamaica",native:"Jamaica",phone:"1876",continent:"NA",capital:"Kingston",currency:"JMD",languages:["en"]},uoe={name:"Jordan",native:"\u0627\u0644\u0623\u0631\u062F\u0646",phone:"962",continent:"AS",capital:"Amman",currency:"JOD",languages:["ar"]},doe={name:"Japan",native:"\u65E5\u672C",phone:"81",continent:"AS",capital:"Tokyo",currency:"JPY",languages:["ja"]},foe={name:"Kenya",native:"Kenya",phone:"254",continent:"AF",capital:"Nairobi",currency:"KES",languages:["en","sw"]},poe={name:"Kyrgyzstan",native:"\u041A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D",phone:"996",continent:"AS",capital:"Bishkek",currency:"KGS",languages:["ky","ru"]},hoe={name:"Cambodia",native:"K\xE2mp\u016Dch\xE9a",phone:"855",continent:"AS",capital:"Phnom Penh",currency:"KHR",languages:["km"]},moe={name:"Kiribati",native:"Kiribati",phone:"686",continent:"OC",capital:"South Tarawa",currency:"AUD",languages:["en"]},goe={name:"Comoros",native:"Komori",phone:"269",continent:"AF",capital:"Moroni",currency:"KMF",languages:["ar","fr"]},voe={name:"Saint Kitts and Nevis",native:"Saint Kitts and Nevis",phone:"1869",continent:"NA",capital:"Basseterre",currency:"XCD",languages:["en"]},yoe={name:"North Korea",native:"\uBD81\uD55C",phone:"850",continent:"AS",capital:"Pyongyang",currency:"KPW",languages:["ko"]},_oe={name:"South Korea",native:"\uB300\uD55C\uBBFC\uAD6D",phone:"82",continent:"AS",capital:"Seoul",currency:"KRW",languages:["ko"]},boe={name:"Kuwait",native:"\u0627\u0644\u0643\u0648\u064A\u062A",phone:"965",continent:"AS",capital:"Kuwait City",currency:"KWD",languages:["ar"]},xoe={name:"Cayman Islands",native:"Cayman Islands",phone:"1345",continent:"NA",capital:"George Town",currency:"KYD",languages:["en"]},Soe={name:"Kazakhstan",native:"\u049A\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D",phone:"76,77",continent:"AS",capital:"Astana",currency:"KZT",languages:["kk","ru"]},woe={name:"Laos",native:"\u0EAA\u0E9B\u0E9B\u0EA5\u0EB2\u0EA7",phone:"856",continent:"AS",capital:"Vientiane",currency:"LAK",languages:["lo"]},Eoe={name:"Lebanon",native:"\u0644\u0628\u0646\u0627\u0646",phone:"961",continent:"AS",capital:"Beirut",currency:"LBP",languages:["ar","fr"]},koe={name:"Saint Lucia",native:"Saint Lucia",phone:"1758",continent:"NA",capital:"Castries",currency:"XCD",languages:["en"]},Coe={name:"Liechtenstein",native:"Liechtenstein",phone:"423",continent:"EU",capital:"Vaduz",currency:"CHF",languages:["de"]},Roe={name:"Sri Lanka",native:"\u015Br\u012B la\u1E43k\u0101va",phone:"94",continent:"AS",capital:"Colombo",currency:"LKR",languages:["si","ta"]},Toe={name:"Liberia",native:"Liberia",phone:"231",continent:"AF",capital:"Monrovia",currency:"LRD",languages:["en"]},Moe={name:"Lesotho",native:"Lesotho",phone:"266",continent:"AF",capital:"Maseru",currency:"LSL,ZAR",languages:["en","st"]},Poe={name:"Lithuania",native:"Lietuva",phone:"370",continent:"EU",capital:"Vilnius",currency:"EUR",languages:["lt"]},Ooe={name:"Luxembourg",native:"Luxembourg",phone:"352",continent:"EU",capital:"Luxembourg",currency:"EUR",languages:["fr","de","lb"]},Ioe={name:"Latvia",native:"Latvija",phone:"371",continent:"EU",capital:"Riga",currency:"EUR",languages:["lv"]},Doe={name:"Libya",native:"\u200F\u0644\u064A\u0628\u064A\u0627",phone:"218",continent:"AF",capital:"Tripoli",currency:"LYD",languages:["ar"]},Aoe={name:"Morocco",native:"\u0627\u0644\u0645\u063A\u0631\u0628",phone:"212",continent:"AF",capital:"Rabat",currency:"MAD",languages:["ar"]},$oe={name:"Monaco",native:"Monaco",phone:"377",continent:"EU",capital:"Monaco",currency:"EUR",languages:["fr"]},Noe={name:"Moldova",native:"Moldova",phone:"373",continent:"EU",capital:"Chi\u0219in\u0103u",currency:"MDL",languages:["ro"]},Loe={name:"Montenegro",native:"\u0426\u0440\u043D\u0430 \u0413\u043E\u0440\u0430",phone:"382",continent:"EU",capital:"Podgorica",currency:"EUR",languages:["sr","bs","sq","hr"]},Foe={name:"Saint Martin",native:"Saint-Martin",phone:"590",continent:"NA",capital:"Marigot",currency:"EUR",languages:["en","fr","nl"]},Boe={name:"Madagascar",native:"Madagasikara",phone:"261",continent:"AF",capital:"Antananarivo",currency:"MGA",languages:["fr","mg"]},zoe={name:"Marshall Islands",native:"M\u0327aje\u013C",phone:"692",continent:"OC",capital:"Majuro",currency:"USD",languages:["en","mh"]},Uoe={name:"North Macedonia",native:"\u0421\u0435\u0432\u0435\u0440\u043D\u0430 \u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430",phone:"389",continent:"EU",capital:"Skopje",currency:"MKD",languages:["mk"]},Woe={name:"Mali",native:"Mali",phone:"223",continent:"AF",capital:"Bamako",currency:"XOF",languages:["fr"]},joe={name:"Myanmar [Burma]",native:"\u1019\u103C\u1014\u103A\u1019\u102C",phone:"95",continent:"AS",capital:"Naypyidaw",currency:"MMK",languages:["my"]},Hoe={name:"Mongolia",native:"\u041C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441",phone:"976",continent:"AS",capital:"Ulan Bator",currency:"MNT",languages:["mn"]},Yoe={name:"Macao",native:"\u6FB3\u9580",phone:"853",continent:"AS",capital:"",currency:"MOP",languages:["zh","pt"]},Voe={name:"Northern Mariana Islands",native:"Northern Mariana Islands",phone:"1670",continent:"OC",capital:"Saipan",currency:"USD",languages:["en","ch"]},Goe={name:"Martinique",native:"Martinique",phone:"596",continent:"NA",capital:"Fort-de-France",currency:"EUR",languages:["fr"]},Koe={name:"Mauritania",native:"\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627",phone:"222",continent:"AF",capital:"Nouakchott",currency:"MRU",languages:["ar"]},qoe={name:"Montserrat",native:"Montserrat",phone:"1664",continent:"NA",capital:"Plymouth",currency:"XCD",languages:["en"]},Xoe={name:"Malta",native:"Malta",phone:"356",continent:"EU",capital:"Valletta",currency:"EUR",languages:["mt","en"]},Zoe={name:"Mauritius",native:"Maurice",phone:"230",continent:"AF",capital:"Port Louis",currency:"MUR",languages:["en"]},Joe={name:"Maldives",native:"Maldives",phone:"960",continent:"AS",capital:"Mal\xE9",currency:"MVR",languages:["dv"]},Qoe={name:"Malawi",native:"Malawi",phone:"265",continent:"AF",capital:"Lilongwe",currency:"MWK",languages:["en","ny"]},ese={name:"Mexico",native:"M\xE9xico",phone:"52",continent:"NA",capital:"Mexico City",currency:"MXN",languages:["es"]},tse={name:"Malaysia",native:"Malaysia",phone:"60",continent:"AS",capital:"Kuala Lumpur",currency:"MYR",languages:["ms"]},nse={name:"Mozambique",native:"Mo\xE7ambique",phone:"258",continent:"AF",capital:"Maputo",currency:"MZN",languages:["pt"]},rse={name:"Namibia",native:"Namibia",phone:"264",continent:"AF",capital:"Windhoek",currency:"NAD,ZAR",languages:["en","af"]},ise={name:"New Caledonia",native:"Nouvelle-Cal\xE9donie",phone:"687",continent:"OC",capital:"Noum\xE9a",currency:"XPF",languages:["fr"]},ose={name:"Niger",native:"Niger",phone:"227",continent:"AF",capital:"Niamey",currency:"XOF",languages:["fr"]},sse={name:"Norfolk Island",native:"Norfolk Island",phone:"672",continent:"OC",capital:"Kingston",currency:"AUD",languages:["en"]},ase={name:"Nigeria",native:"Nigeria",phone:"234",continent:"AF",capital:"Abuja",currency:"NGN",languages:["en"]},lse={name:"Nicaragua",native:"Nicaragua",phone:"505",continent:"NA",capital:"Managua",currency:"NIO",languages:["es"]},cse={name:"Netherlands",native:"Nederland",phone:"31",continent:"EU",capital:"Amsterdam",currency:"EUR",languages:["nl"]},use={name:"Norway",native:"Norge",phone:"47",continent:"EU",capital:"Oslo",currency:"NOK",languages:["no","nb","nn"]},dse={name:"Nepal",native:"\u0928\u092A\u0932",phone:"977",continent:"AS",capital:"Kathmandu",currency:"NPR",languages:["ne"]},fse={name:"Nauru",native:"Nauru",phone:"674",continent:"OC",capital:"Yaren",currency:"AUD",languages:["en","na"]},pse={name:"Niue",native:"Niu\u0113",phone:"683",continent:"OC",capital:"Alofi",currency:"NZD",languages:["en"]},hse={name:"New Zealand",native:"New Zealand",phone:"64",continent:"OC",capital:"Wellington",currency:"NZD",languages:["en","mi"]},mse={name:"Oman",native:"\u0639\u0645\u0627\u0646",phone:"968",continent:"AS",capital:"Muscat",currency:"OMR",languages:["ar"]},gse={name:"Panama",native:"Panam\xE1",phone:"507",continent:"NA",capital:"Panama City",currency:"PAB,USD",languages:["es"]},vse={name:"Peru",native:"Per\xFA",phone:"51",continent:"SA",capital:"Lima",currency:"PEN",languages:["es"]},yse={name:"French Polynesia",native:"Polyn\xE9sie fran\xE7aise",phone:"689",continent:"OC",capital:"Papeet\u0113",currency:"XPF",languages:["fr"]},_se={name:"Papua New Guinea",native:"Papua Niugini",phone:"675",continent:"OC",capital:"Port Moresby",currency:"PGK",languages:["en"]},bse={name:"Philippines",native:"Pilipinas",phone:"63",continent:"AS",capital:"Manila",currency:"PHP",languages:["en"]},xse={name:"Pakistan",native:"Pakistan",phone:"92",continent:"AS",capital:"Islamabad",currency:"PKR",languages:["en","ur"]},Sse={name:"Poland",native:"Polska",phone:"48",continent:"EU",capital:"Warsaw",currency:"PLN",languages:["pl"]},wse={name:"Saint Pierre and Miquelon",native:"Saint-Pierre-et-Miquelon",phone:"508",continent:"NA",capital:"Saint-Pierre",currency:"EUR",languages:["fr"]},Ese={name:"Pitcairn Islands",native:"Pitcairn Islands",phone:"64",continent:"OC",capital:"Adamstown",currency:"NZD",languages:["en"]},kse={name:"Puerto Rico",native:"Puerto Rico",phone:"1787,1939",continent:"NA",capital:"San Juan",currency:"USD",languages:["es","en"]},Cse={name:"Palestine",native:"\u0641\u0644\u0633\u0637\u064A\u0646",phone:"970",continent:"AS",capital:"Ramallah",currency:"ILS",languages:["ar"]},Rse={name:"Portugal",native:"Portugal",phone:"351",continent:"EU",capital:"Lisbon",currency:"EUR",languages:["pt"]},Tse={name:"Palau",native:"Palau",phone:"680",continent:"OC",capital:"Ngerulmud",currency:"USD",languages:["en"]},Mse={name:"Paraguay",native:"Paraguay",phone:"595",continent:"SA",capital:"Asunci\xF3n",currency:"PYG",languages:["es","gn"]},Pse={name:"Qatar",native:"\u0642\u0637\u0631",phone:"974",continent:"AS",capital:"Doha",currency:"QAR",languages:["ar"]},Ose={name:"R\xE9union",native:"La R\xE9union",phone:"262",continent:"AF",capital:"Saint-Denis",currency:"EUR",languages:["fr"]},Ise={name:"Romania",native:"Rom\xE2nia",phone:"40",continent:"EU",capital:"Bucharest",currency:"RON",languages:["ro"]},Dse={name:"Serbia",native:"\u0421\u0440\u0431\u0438\u0458\u0430",phone:"381",continent:"EU",capital:"Belgrade",currency:"RSD",languages:["sr"]},Ase={name:"Russia",native:"\u0420\u043E\u0441\u0441\u0438\u044F",phone:"7",continent:"EU",capital:"Moscow",currency:"RUB",languages:["ru"]},$se={name:"Rwanda",native:"Rwanda",phone:"250",continent:"AF",capital:"Kigali",currency:"RWF",languages:["rw","en","fr"]},Nse={name:"Saudi Arabia",native:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629",phone:"966",continent:"AS",capital:"Riyadh",currency:"SAR",languages:["ar"]},Lse={name:"Solomon Islands",native:"Solomon Islands",phone:"677",continent:"OC",capital:"Honiara",currency:"SBD",languages:["en"]},Fse={name:"Seychelles",native:"Seychelles",phone:"248",continent:"AF",capital:"Victoria",currency:"SCR",languages:["fr","en"]},Bse={name:"Sudan",native:"\u0627\u0644\u0633\u0648\u062F\u0627\u0646",phone:"249",continent:"AF",capital:"Khartoum",currency:"SDG",languages:["ar","en"]},zse={name:"Sweden",native:"Sverige",phone:"46",continent:"EU",capital:"Stockholm",currency:"SEK",languages:["sv"]},Use={name:"Singapore",native:"Singapore",phone:"65",continent:"AS",capital:"Singapore",currency:"SGD",languages:["en","ms","ta","zh"]},Wse={name:"Saint Helena",native:"Saint Helena",phone:"290",continent:"AF",capital:"Jamestown",currency:"SHP",languages:["en"]},jse={name:"Slovenia",native:"Slovenija",phone:"386",continent:"EU",capital:"Ljubljana",currency:"EUR",languages:["sl"]},Hse={name:"Svalbard and Jan Mayen",native:"Svalbard og Jan Mayen",phone:"4779",continent:"EU",capital:"Longyearbyen",currency:"NOK",languages:["no"]},Yse={name:"Slovakia",native:"Slovensko",phone:"421",continent:"EU",capital:"Bratislava",currency:"EUR",languages:["sk"]},Vse={name:"Sierra Leone",native:"Sierra Leone",phone:"232",continent:"AF",capital:"Freetown",currency:"SLL",languages:["en"]},Gse={name:"San Marino",native:"San Marino",phone:"378",continent:"EU",capital:"City of San Marino",currency:"EUR",languages:["it"]},Kse={name:"Senegal",native:"S\xE9n\xE9gal",phone:"221",continent:"AF",capital:"Dakar",currency:"XOF",languages:["fr"]},qse={name:"Somalia",native:"Soomaaliya",phone:"252",continent:"AF",capital:"Mogadishu",currency:"SOS",languages:["so","ar"]},Xse={name:"Suriname",native:"Suriname",phone:"597",continent:"SA",capital:"Paramaribo",currency:"SRD",languages:["nl"]},Zse={name:"South Sudan",native:"South Sudan",phone:"211",continent:"AF",capital:"Juba",currency:"SSP",languages:["en"]},Jse={name:"S\xE3o Tom\xE9 and Pr\xEDncipe",native:"S\xE3o Tom\xE9 e Pr\xEDncipe",phone:"239",continent:"AF",capital:"S\xE3o Tom\xE9",currency:"STN",languages:["pt"]},Qse={name:"El Salvador",native:"El Salvador",phone:"503",continent:"NA",capital:"San Salvador",currency:"SVC,USD",languages:["es"]},eae={name:"Sint Maarten",native:"Sint Maarten",phone:"1721",continent:"NA",capital:"Philipsburg",currency:"ANG",languages:["nl","en"]},tae={name:"Syria",native:"\u0633\u0648\u0631\u064A\u0627",phone:"963",continent:"AS",capital:"Damascus",currency:"SYP",languages:["ar"]},nae={name:"Swaziland",native:"Swaziland",phone:"268",continent:"AF",capital:"Lobamba",currency:"SZL",languages:["en","ss"]},rae={name:"Turks and Caicos Islands",native:"Turks and Caicos Islands",phone:"1649",continent:"NA",capital:"Cockburn Town",currency:"USD",languages:["en"]},iae={name:"Chad",native:"Tchad",phone:"235",continent:"AF",capital:"N'Djamena",currency:"XAF",languages:["fr","ar"]},oae={name:"French Southern Territories",native:"Territoire des Terres australes et antarctiques fr",phone:"262",continent:"AN",capital:"Port-aux-Fran\xE7ais",currency:"EUR",languages:["fr"]},sae={name:"Togo",native:"Togo",phone:"228",continent:"AF",capital:"Lom\xE9",currency:"XOF",languages:["fr"]},aae={name:"Thailand",native:"\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22",phone:"66",continent:"AS",capital:"Bangkok",currency:"THB",languages:["th"]},lae={name:"Tajikistan",native:"\u0422\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D",phone:"992",continent:"AS",capital:"Dushanbe",currency:"TJS",languages:["tg","ru"]},cae={name:"Tokelau",native:"Tokelau",phone:"690",continent:"OC",capital:"Fakaofo",currency:"NZD",languages:["en"]},uae={name:"East Timor",native:"Timor-Leste",phone:"670",continent:"OC",capital:"Dili",currency:"USD",languages:["pt"]},dae={name:"Turkmenistan",native:"T\xFCrkmenistan",phone:"993",continent:"AS",capital:"Ashgabat",currency:"TMT",languages:["tk","ru"]},fae={name:"Tunisia",native:"\u062A\u0648\u0646\u0633",phone:"216",continent:"AF",capital:"Tunis",currency:"TND",languages:["ar"]},pae={name:"Tonga",native:"Tonga",phone:"676",continent:"OC",capital:"Nuku'alofa",currency:"TOP",languages:["en","to"]},hae={name:"Turkey",native:"T\xFCrkiye",phone:"90",continent:"AS",capital:"Ankara",currency:"TRY",languages:["tr"]},mae={name:"Trinidad and Tobago",native:"Trinidad and Tobago",phone:"1868",continent:"NA",capital:"Port of Spain",currency:"TTD",languages:["en"]},gae={name:"Tuvalu",native:"Tuvalu",phone:"688",continent:"OC",capital:"Funafuti",currency:"AUD",languages:["en"]},vae={name:"Taiwan",native:"\u81FA\u7063",phone:"886",continent:"AS",capital:"Taipei",currency:"TWD",languages:["zh"]},yae={name:"Tanzania",native:"Tanzania",phone:"255",continent:"AF",capital:"Dodoma",currency:"TZS",languages:["sw","en"]},_ae={name:"Ukraine",native:"\u0423\u043A\u0440\u0430\u0457\u043D\u0430",phone:"380",continent:"EU",capital:"Kyiv",currency:"UAH",languages:["uk"]},bae={name:"Uganda",native:"Uganda",phone:"256",continent:"AF",capital:"Kampala",currency:"UGX",languages:["en","sw"]},xae={name:"U.S. Minor Outlying Islands",native:"United States Minor Outlying Islands",phone:"1",continent:"OC",capital:"",currency:"USD",languages:["en"]},Sae={name:"United States",native:"United States",phone:"1",continent:"NA",capital:"Washington D.C.",currency:"USD,USN,USS",languages:["en"]},wae={name:"Uruguay",native:"Uruguay",phone:"598",continent:"SA",capital:"Montevideo",currency:"UYI,UYU",languages:["es"]},Eae={name:"Uzbekistan",native:"O\u2018zbekiston",phone:"998",continent:"AS",capital:"Tashkent",currency:"UZS",languages:["uz","ru"]},kae={name:"Vatican City",native:"Vaticano",phone:"379",continent:"EU",capital:"Vatican City",currency:"EUR",languages:["it","la"]},Cae={name:"Saint Vincent and the Grenadines",native:"Saint Vincent and the Grenadines",phone:"1784",continent:"NA",capital:"Kingstown",currency:"XCD",languages:["en"]},Rae={name:"Venezuela",native:"Venezuela",phone:"58",continent:"SA",capital:"Caracas",currency:"VES",languages:["es"]},Tae={name:"British Virgin Islands",native:"British Virgin Islands",phone:"1284",continent:"NA",capital:"Road Town",currency:"USD",languages:["en"]},Mae={name:"U.S. Virgin Islands",native:"United States Virgin Islands",phone:"1340",continent:"NA",capital:"Charlotte Amalie",currency:"USD",languages:["en"]},Pae={name:"Vietnam",native:"Vi\u1EC7t Nam",phone:"84",continent:"AS",capital:"Hanoi",currency:"VND",languages:["vi"]},Oae={name:"Vanuatu",native:"Vanuatu",phone:"678",continent:"OC",capital:"Port Vila",currency:"VUV",languages:["bi","en","fr"]},Iae={name:"Wallis and Futuna",native:"Wallis et Futuna",phone:"681",continent:"OC",capital:"Mata-Utu",currency:"XPF",languages:["fr"]},Dae={name:"Samoa",native:"Samoa",phone:"685",continent:"OC",capital:"Apia",currency:"WST",languages:["sm","en"]},Aae={name:"Kosovo",native:"Republika e Kosov\xEBs",phone:"377,381,383,386",continent:"EU",capital:"Pristina",currency:"EUR",languages:["sq","sr"]},$ae={name:"Yemen",native:"\u0627\u0644\u064A\u064E\u0645\u064E\u0646",phone:"967",continent:"AS",capital:"Sana'a",currency:"YER",languages:["ar"]},Nae={name:"Mayotte",native:"Mayotte",phone:"262",continent:"AF",capital:"Mamoudzou",currency:"EUR",languages:["fr"]},Lae={name:"South Africa",native:"South Africa",phone:"27",continent:"AF",capital:"Pretoria",currency:"ZAR",languages:["af","en","nr","st","ss","tn","ts","ve","xh","zu"]},Fae={name:"Zambia",native:"Zambia",phone:"260",continent:"AF",capital:"Lusaka",currency:"ZMW",languages:["en"]},Bae={name:"Zimbabwe",native:"Zimbabwe",phone:"263",continent:"AF",capital:"Harare",currency:"USD,ZAR,BWP,GBP,AUD,CNY,INR,JPY",languages:["en","sn","nd"]};var vce={AD:sre,AE:are,AF:lre,AG:cre,AI:ure,AL:dre,AM:fre,AO:pre,AQ:hre,AR:mre,AS:gre,AT:vre,AU:yre,AW:_re,AX:bre,AZ:xre,BA:Sre,BB:wre,BD:Ere,BE:kre,BF:Cre,BG:Rre,BH:Tre,BI:Mre,BJ:Pre,BL:Ore,BM:Ire,BN:Dre,BO:Are,BQ:$re,BR:Nre,BS:Lre,BT:Fre,BV:Bre,BW:zre,BY:Ure,BZ:Wre,CA:jre,CC:Hre,CD:Yre,CF:Vre,CG:Gre,CH:Kre,CI:qre,CK:Xre,CL:Zre,CM:Jre,CN:Qre,CO:eie,CR:tie,CU:nie,CV:rie,CW:iie,CX:oie,CY:sie,CZ:aie,DE:lie,DJ:cie,DK:uie,DM:die,DO:fie,DZ:pie,EC:hie,EE:mie,EG:gie,EH:vie,ER:yie,ES:_ie,ET:bie,FI:xie,FJ:Sie,FK:wie,FM:Eie,FO:kie,FR:Cie,GA:Rie,GB:Tie,GD:Mie,GE:Pie,GF:Oie,GG:Iie,GH:Die,GI:Aie,GL:$ie,GM:Nie,GN:Lie,GP:Fie,GQ:Bie,GR:zie,GS:Uie,GT:Wie,GU:jie,GW:Hie,GY:Yie,HK:Vie,HM:Gie,HN:Kie,HR:qie,HT:Xie,HU:Zie,ID:Jie,IE:Qie,IL:eoe,IM:toe,IN:noe,IO:roe,IQ:ioe,IR:ooe,IS:soe,IT:aoe,JE:loe,JM:coe,JO:uoe,JP:doe,KE:foe,KG:poe,KH:hoe,KI:moe,KM:goe,KN:voe,KP:yoe,KR:_oe,KW:boe,KY:xoe,KZ:Soe,LA:woe,LB:Eoe,LC:koe,LI:Coe,LK:Roe,LR:Toe,LS:Moe,LT:Poe,LU:Ooe,LV:Ioe,LY:Doe,MA:Aoe,MC:$oe,MD:Noe,ME:Loe,MF:Foe,MG:Boe,MH:zoe,MK:Uoe,ML:Woe,MM:joe,MN:Hoe,MO:Yoe,MP:Voe,MQ:Goe,MR:Koe,MS:qoe,MT:Xoe,MU:Zoe,MV:Joe,MW:Qoe,MX:ese,MY:tse,MZ:nse,NA:rse,NC:ise,NE:ose,NF:sse,NG:ase,NI:lse,NL:cse,NO:use,NP:dse,NR:fse,NU:pse,NZ:hse,OM:mse,PA:gse,PE:vse,PF:yse,PG:_se,PH:bse,PK:xse,PL:Sse,PM:wse,PN:Ese,PR:kse,PS:Cse,PT:Rse,PW:Tse,PY:Mse,QA:Pse,RE:Ose,RO:Ise,RS:Dse,RU:Ase,RW:$se,SA:Nse,SB:Lse,SC:Fse,SD:Bse,SE:zse,SG:Use,SH:Wse,SI:jse,SJ:Hse,SK:Yse,SL:Vse,SM:Gse,SN:Kse,SO:qse,SR:Xse,SS:Zse,ST:Jse,SV:Qse,SX:eae,SY:tae,SZ:nae,TC:rae,TD:iae,TF:oae,TG:sae,TH:aae,TJ:lae,TK:cae,TL:uae,TM:dae,TN:fae,TO:pae,TR:hae,TT:mae,TV:gae,TW:vae,TZ:yae,UA:_ae,UG:bae,UM:xae,US:Sae,UY:wae,UZ:Eae,VA:kae,VC:Cae,VE:Rae,VG:Tae,VI:Mae,VN:Pae,VU:Oae,WF:Iae,WS:Dae,XK:Aae,YE:$ae,YT:Nae,ZA:Lae,ZM:Fae,ZW:Bae},_1={},zae=ft.exports;Object.defineProperty(_1,"__esModule",{value:!0});var Uae=_1.default=void 0,Wae=zae(pt),jae=bt,Hae=(0,Wae.default)((0,jae.jsx)("path",{d:"m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"}),"Map");Uae=_1.default=Hae;var b1={},Yae=ft.exports;Object.defineProperty(b1,"__esModule",{value:!0});var Vae=b1.default=void 0,Gae=Yae(pt),Kae=bt,qae=(0,Gae.default)((0,Kae.jsx)("path",{d:"M16.5 12c1.38 0 2.49-1.12 2.49-2.5S17.88 7 16.5 7C15.12 7 14 8.12 14 9.5s1.12 2.5 2.5 2.5zM9 11c1.66 0 2.99-1.34 2.99-3S10.66 5 9 5C7.34 5 6 6.34 6 8s1.34 3 3 3zm7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75zM9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"}),"SupervisorAccount");Vae=b1.default=qae;var x1={},Xae=ft.exports;Object.defineProperty(x1,"__esModule",{value:!0});var Zae=x1.default=void 0,Jae=Xae(pt),Qae=bt,ele=(0,Jae.default)((0,Qae.jsx)("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"}),"VerifiedUser");Zae=x1.default=ele;var S1={},tle=ft.exports;Object.defineProperty(S1,"__esModule",{value:!0});var nle=S1.default=void 0,rle=tle(pt),ile=bt,ole=(0,rle.default)((0,ile.jsx)("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"}),"BugReport");nle=S1.default=ole;var w1={},sle=ft.exports;Object.defineProperty(w1,"__esModule",{value:!0});var ale=w1.default=void 0,lle=sle(pt),ME=bt,cle=(0,lle.default)([(0,ME.jsx)("path",{d:"M17 11c.34 0 .67.04 1 .09V6.27L10.5 3 3 6.27v4.91c0 4.54 3.2 8.79 7.5 9.82.55-.13 1.08-.32 1.6-.55-.69-.98-1.1-2.17-1.1-3.45 0-3.31 2.69-6 6-6z"},"0"),(0,ME.jsx)("path",{d:"M17 13c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 1.38c.62 0 1.12.51 1.12 1.12s-.51 1.12-1.12 1.12-1.12-.51-1.12-1.12.5-1.12 1.12-1.12zm0 5.37c-.93 0-1.74-.46-2.24-1.17.05-.72 1.51-1.08 2.24-1.08s2.19.36 2.24 1.08c-.5.71-1.31 1.17-2.24 1.17z"},"1")],"AdminPanelSettings");ale=w1.default=cle;var E1={},ule=ft.exports;Object.defineProperty(E1,"__esModule",{value:!0});var dle=E1.default=void 0,fle=ule(pt),ple=bt,hle=(0,fle.default)((0,ple.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-5h2v5zm4 0h-2v-3h2v3zm0-5h-2v-2h2v2zm4 5h-2V7h2v10z"}),"Analytics");dle=E1.default=hle;var k1={},mle=ft.exports;Object.defineProperty(k1,"__esModule",{value:!0});var gle=k1.default=void 0,vle=mle(pt),yle=bt,_le=(0,vle.default)((0,yle.jsx)("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos");gle=k1.default=_le;export{jle as $,Ile as A,xW as B,f9 as C,AG as D,Cv as E,cL as F,Kle as G,Ple as H,q0 as I,lce as J,Vle as K,cce as L,aH as M,_G as N,nce as O,os as P,uK as Q,vr as R,kle as S,wle as T,mK as U,Ele as V,Tle as W,zle as X,q3 as Y,Ule as Z,Yle as _,Me as a,Hle as a0,Wle as a1,kK as a2,bj as a3,Zle as a4,Jle as a5,$le as a6,bK as a7,Yh as a8,q_ as a9,gU as aA,$K as aB,qT as aC,yU as aD,ale as aE,Ale as aF,sce as aG,Vae as aH,rce as aI,nle as aJ,Zae as aK,dle as aL,Nle as aM,Lle as aN,Fle as aO,gle as aP,Ole as aQ,Mle as aR,Qz as aS,Rle as aT,xle as aU,OR as aV,D1 as aW,Sle as aX,fce as aa,uce as ab,dce as ac,ey as ad,xM as ae,X_ as af,Vh as ag,pce as ah,ne as ai,Gle as aj,Ble as ak,p8 as al,oj as am,fY as an,f2 as ao,tce as ap,mce as aq,Z_ as ar,Uae as as,hce as at,gce as au,vce as av,PK as aw,oce as ax,ice as ay,zK as az,ace as b,w3 as c,Ce as d,Cle as e,HG as f,Dle as g,yi as h,qG as i,M as j,oK as k,qle as l,eK as m,Ph as n,hG as o,cG as p,mH as q,b as r,Xle as s,K as t,HT as u,Qle as v,EG as w,ece as x,MG as y,BG as z};
buttonizer.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Buttonizer - Smart Floating Action Button
4
  * Plugin URI: https://buttonizer.io
5
  * Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
6
- * Version: 3.3.2
7
  * Author: Buttonizer
8
  * Author URI: https://buttonizer.pro
9
  * License: GPLv3
@@ -24,7 +24,7 @@
24
  */
25
 
26
  // Define current Buttonizer version
27
- define('BUTTONIZER_VERSION', '3.3.2');
28
  define('BUTTONIZER_PLUGIN_FILE', __FILE__);
29
 
30
  // Get environment vars
3
  * Plugin Name: Buttonizer - Smart Floating Action Button
4
  * Plugin URI: https://buttonizer.io
5
  * Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
6
+ * Version: 3.3.3
7
  * Author: Buttonizer
8
  * Author URI: https://buttonizer.pro
9
  * License: GPLv3
24
  */
25
 
26
  // Define current Buttonizer version
27
+ define('BUTTONIZER_VERSION', '3.3.3');
28
  define('BUTTONIZER_PLUGIN_FILE', __FILE__);
29
 
30
  // Get environment vars
readme.txt CHANGED
@@ -4,7 +4,7 @@ Buy plugin: https://buttonizer.io
4
  Tags: Conversion, action button, call, marketing, Social Sharing
5
  Requires at least: 4.7
6
  Tested up to: 6.1
7
- Stable tag: 3.3.2
8
  Requires PHP: 7.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -236,6 +236,23 @@ Languages can have a different direction of writing and reading? While languages
236
 
237
  == Changelog ==
238
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  = 3.3.2 =
240
  Release date: November 14, 2022
241
 
4
  Tags: Conversion, action button, call, marketing, Social Sharing
5
  Requires at least: 4.7
6
  Tested up to: 6.1
7
+ Stable tag: 3.3.3
8
  Requires PHP: 7.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
236
 
237
  == Changelog ==
238
 
239
+ = 3.3.3 =
240
+ Release date: December 2, 2022
241
+
242
+ **Changelog:**
243
+ - Fix: Fixed an issue with analytics crashing dashboard
244
+
245
+ **Changelog of our editor:**
246
+ - New create-button wizard
247
+ - New create-widget wizard
248
+ - Fix issue in WhatsApp Widget
249
+ - Fix issue with phone number validator
250
+ - Faster editor since we're using lazy loading
251
+ - Lot's of bugs fixed
252
+
253
+
254
+ If you experience bugs, problems or you just have some feedback, let us know on our [Buttonizer community](https://community.buttonizer.pro/)!
255
+
256
  = 3.3.2 =
257
  Release date: November 14, 2022
258