ui-mathilde-web 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/style.css +1 -1
- package/dist/ui-mathilde-web.d.ts +43 -2
- package/dist/ui-mathilde-web.js +3181 -3037
- package/dist/ui-mathilde-web.umd.cjs +42 -37
- package/package.json +2 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
(function(ue,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],p):(ue=typeof globalThis<"u"?globalThis:ue||self,p(ue["ui-mathilde-web"]={},ue.jsxRuntime,ue.React,ue.ReactDOM))})(this,function(ue,p,k,$a){"use strict";var w5=Object.defineProperty;var k5=(ue,p,k)=>p in ue?w5(ue,p,{enumerable:!0,configurable:!0,writable:!0,value:k}):ue[p]=k;var te=(ue,p,k)=>k5(ue,typeof p!="symbol"?p+"":p,k);var Di,nr,Ba;function ja(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const C=ja(k),jg=ja($a),Qn={"mth-btn-default":"button-module__mth-btn-default__cda3k",mthBtnDefault:"button-module__mth-btn-default__cda3k","mth-btn-border":"button-module__mth-btn-border__-pdSm",mthBtnBorder:"button-module__mth-btn-border__-pdSm","mth-btn":"button-module__mth-btn__LkrNk",mthBtn:"button-module__mth-btn__LkrNk","mth-btn-full":"button-module__mth-btn-full__7QycJ",mthBtnFull:"button-module__mth-btn-full__7QycJ"},Wg=({txtBtn:t,typeButton:e,full:r,onClick:n,disabled:o,type:i})=>p.jsx("div",{className:`${r?Qn["mth-btn-full"]:""}`,children:p.jsx("button",{type:i,className:`${Qn["mth-btn"]} ${Qn[`mth-btn-${e}`]} ${r?Qn["mth-btn-full"]:""}`,onClick:n,disabled:o,children:t})}),eo={"checkbox-container":"checkbox-module__checkbox-container__jLidj",checkmark:"checkbox-module__checkmark__pC-qY"},Hg=({label:t,value:e,checked:r,onChange:n})=>p.jsxs("label",{className:eo["checkbox-container"],children:[p.jsx("input",{type:"checkbox",value:e,checked:r,onChange:n}),p.jsx("span",{className:eo.checkmark}),t&&p.jsx("span",{className:"ml-2",children:t})]}),Or=({src:t,alt:e,width:r,height:n,classIm:o})=>p.jsx("img",{className:o,src:t,alt:e,width:r,height:n}),Wa=k.forwardRef(({placeholder:t,label:e,error:r,type:n,classInclude:o,maxLength:i,onChange:s,...a},l)=>p.jsxs("div",{className:"mb-5",children:[e&&p.jsx("label",{className:" mb-1 block font-semibold",children:e}),p.jsx("input",{ref:l,type:n,placeholder:t,className:`w-full p-2 border ${o||""}`,maxLength:i,onChange:s,...a}),r&&p.jsx("p",{className:"text-red-500 text-sm mt-1",children:r})]}));Wa.displayName="InputForm";var Ha={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ra=k.createContext&&k.createContext(Ha),Rg=["attr","size","title"];function Vg(t,e){if(t==null)return{};var r=Yg(t,e),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)n=i[o],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Yg(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,i;for(i=0;i<n.length;i++)o=n[i],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}function to(){return to=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},to.apply(this,arguments)}function Va(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function ro(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Va(Object(r),!0).forEach(function(n){Ug(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Va(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ug(t,e,r){return e=qg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qg(t){var e=Kg(t,"string");return typeof e=="symbol"?e:String(e)}function Kg(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ya(t){return t&&t.map((e,r)=>k.createElement(e.tag,ro({key:r},e.attr),Ya(e.child)))}function xe(t){return e=>k.createElement(Gg,to({attr:ro({},t.attr)},e),Ya(t.child))}function Gg(t){var e=r=>{var{attr:n,size:o,title:i}=t,s=Vg(t,Rg),a=o||r.size||"1em",l;return r.className&&(l=r.className),t.className&&(l=(l?l+" ":"")+t.className),k.createElement("svg",to({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,s,{className:l,style:ro(ro({color:t.color||r.color},r.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),i&&k.createElement("title",null,i),t.children)};return Ra!==void 0?k.createElement(Ra.Consumer,null,r=>e(r)):e(Ha)}function Xg(t){return xe({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"},child:[]}]})(t)}function Jg(t){return xe({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},child:[]}]})(t)}function Zg(t){return xe({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},child:[]}]})(t)}function Qg(t){return xe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zM128 120c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm288-136v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12z"},child:[]}]})(t)}function ep(t){return xe({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"},child:[]}]})(t)}const tp={"mth-password":"passwordInput-module__mth-password__R6DoN"},rp=({placeholder:t,onChange:e,value:r,...n})=>{const[o,i]=k.useState(!1),s=()=>{i(!o)};return p.jsx("div",{className:"mb-5",children:p.jsxs("div",{className:"w-full relative inline-block",children:[p.jsx("input",{type:o?"text":"password",value:r,className:"w-full pr-10 p-2 border",onChange:e,placeholder:t,...n}),p.jsx("button",{type:"button",onClick:s,className:tp["mth-password"],children:o?p.jsx(Jg,{}):p.jsx(Zg,{})})]})})},Ua={"progress-check":"progressBar-module__progress-check__TVlHq","progress-no-check":"progressBar-module__progress-no-check__YeVq1"},qa=({start:t,end:e,current:r})=>{const n=(r-t)/(e-t)*100;return p.jsxs("div",{className:"relative w-full h-4 bg-gray-200 rounded-full overflow-hidden",children:[p.jsx("div",{className:`absolute top-0 left-0 h-full rounded-full ${n<50?Ua["progress-no-check"]:Ua["progress-check"]}`,style:{width:`${Math.min(n,100)}%`}}),p.jsx("div",{className:"absolute inset-0 flex items-center px-2",children:p.jsxs("span",{className:"text-sm font-medium text-gray-900 z-10",children:[r.toFixed(2),"%"]})})]})},Ka=k.forwardRef(({options:t,label:e,error:r,value:n,onChange:o,...i},s)=>p.jsxs("div",{className:"mb-5",children:[e&&p.jsx("label",{className:"block mb-1 font-semibold",children:e}),p.jsxs("select",{ref:s,className:"w-full p-2 border rounded",value:n,onChange:o,...i,children:[p.jsx("option",{disabled:!0,value:"",children:"Seleccione una opción"}),t==null?void 0:t.map(a=>p.jsx("option",{value:a.value,children:a.label},a.value))]}),r&&p.jsx("p",{className:"text-red-500 text-sm mt-1",children:r})]}));Ka.displayName="SelectForm";const np=void 0,op=({logo:t,number:e,title:r,start:n,end:o,current:i})=>{const s=a=>new Intl.NumberFormat("es-ES",{maximumFractionDigits:2,minimumFractionDigits:0}).format(a);return p.jsxs("div",{className:"flex flex-col border px-3.5 py-7",children:[p.jsx("div",{className:"flex justify-end",children:p.jsx(Or,{src:`${np}/assets/images/${t}.svg`,alt:"Icon",width:30,height:30})}),p.jsx("h2",{className:"my-3 font-bold",children:r}),p.jsx("small",{className:"text-3xl",children:s(e)}),p.jsx("div",{className:"mt-2 w-full",children:p.jsx(qa,{start:n,end:o,current:i})})]})};/*!
|
|
1
|
+
(function(ne,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],g):(ne=typeof globalThis<"u"?globalThis:ne||self,g(ne["ui-mathilde-web"]={},ne.jsxRuntime,ne.React,ne.ReactDOM))})(this,function(ne,g,k,Ha){"use strict";var TC=Object.defineProperty;var NC=(ne,g,k)=>g in ne?TC(ne,g,{enumerable:!0,configurable:!0,writable:!0,value:k}):ne[g]=k;var te=(ne,g,k)=>NC(ne,typeof g!="symbol"?g+"":g,k);var Ii,nr,Wa;function Va(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const C=Va(k),Hg=Va(Ha),Qn={"mth-btn-default":"button-module__mth-btn-default__cda3k",mthBtnDefault:"button-module__mth-btn-default__cda3k","mth-btn-border":"button-module__mth-btn-border__-pdSm",mthBtnBorder:"button-module__mth-btn-border__-pdSm","mth-btn":"button-module__mth-btn__LkrNk",mthBtn:"button-module__mth-btn__LkrNk","mth-btn-full":"button-module__mth-btn-full__7QycJ",mthBtnFull:"button-module__mth-btn-full__7QycJ"},Vg=({txtBtn:t,typeButton:e,full:r,onClick:n,disabled:o,type:i})=>g.jsx("div",{className:`${r?Qn["mth-btn-full"]:""}`,children:g.jsx("button",{type:i,className:`${Qn["mth-btn"]} ${Qn[`mth-btn-${e}`]} ${r?Qn["mth-btn-full"]:""}`,onClick:n,disabled:o,children:t})}),eo={"checkbox-container":"checkbox-module__checkbox-container__jLidj",checkmark:"checkbox-module__checkmark__pC-qY"},Rg=({label:t,value:e,checked:r,onChange:n})=>g.jsxs("label",{className:eo["checkbox-container"],children:[g.jsx("input",{type:"checkbox",value:e,checked:r,onChange:n}),g.jsx("span",{className:eo.checkmark}),t&&g.jsx("span",{className:"ml-2",children:t})]}),Or=({src:t,alt:e,width:r,height:n,classIm:o})=>g.jsx("img",{className:o,src:t,alt:e,width:r,height:n}),Ra=k.forwardRef(({placeholder:t,label:e,error:r,type:n,classInclude:o,maxLength:i,onChange:s,...a},l)=>g.jsxs("div",{className:"mb-5",children:[e&&g.jsx("label",{className:" mb-1 block font-semibold",children:e}),g.jsx("input",{ref:l,type:n,placeholder:t,className:`w-full p-2 border ${o||""}`,maxLength:i,onChange:s,...a}),r&&g.jsx("p",{className:"text-red-500 text-sm mt-1",children:r})]}));Ra.displayName="InputForm";var Ya={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ua=k.createContext&&k.createContext(Ya),Yg=["attr","size","title"];function Ug(t,e){if(t==null)return{};var r=qg(t,e),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)n=i[o],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function qg(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,i;for(i=0;i<n.length;i++)o=n[i],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}function to(){return to=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},to.apply(this,arguments)}function qa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function ro(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?qa(Object(r),!0).forEach(function(n){Kg(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qa(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Kg(t,e,r){return e=Gg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gg(t){var e=Xg(t,"string");return typeof e=="symbol"?e:String(e)}function Xg(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ka(t){return t&&t.map((e,r)=>k.createElement(e.tag,ro({key:r},e.attr),Ka(e.child)))}function me(t){return e=>k.createElement(Zg,to({attr:ro({},t.attr)},e),Ka(t.child))}function Zg(t){var e=r=>{var{attr:n,size:o,title:i}=t,s=Ug(t,Yg),a=o||r.size||"1em",l;return r.className&&(l=r.className),t.className&&(l=(l?l+" ":"")+t.className),k.createElement("svg",to({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,s,{className:l,style:ro(ro({color:t.color||r.color},r.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),i&&k.createElement("title",null,i),t.children)};return Ua!==void 0?k.createElement(Ua.Consumer,null,r=>e(r)):e(Ya)}function Jg(t){return me({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"},child:[]}]})(t)}function Qg(t){return me({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"},child:[]}]})(t)}function ep(t){return me({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"},child:[]}]})(t)}function tp(t){return me({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},child:[]}]})(t)}function rp(t){return me({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},child:[]}]})(t)}function np(t){return me({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zM128 120c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm288-136v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12z"},child:[]}]})(t)}function op(t){return me({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"},child:[]}]})(t)}const ip={"mth-password":"passwordInput-module__mth-password__R6DoN"},Fi=({placeholder:t,onChange:e,value:r,...n})=>{const[o,i]=k.useState(!1),s=()=>{i(!o)};return g.jsx("div",{className:"mb-5",children:g.jsxs("div",{className:"w-full relative inline-block",children:[g.jsx("input",{type:o?"text":"password",value:r,className:"w-full pr-10 p-2 border",onChange:e,placeholder:t,...n}),g.jsx("button",{type:"button",onClick:s,className:ip["mth-password"],children:o?g.jsx(tp,{}):g.jsx(rp,{})})]})})},Ga={"progress-check":"progressBar-module__progress-check__TVlHq","progress-no-check":"progressBar-module__progress-no-check__YeVq1"},Xa=({start:t,end:e,current:r})=>{const n=(r-t)/(e-t)*100;return g.jsxs("div",{className:"relative w-full h-4 bg-gray-200 rounded-full overflow-hidden",children:[g.jsx("div",{className:`absolute top-0 left-0 h-full rounded-full ${n<50?Ga["progress-no-check"]:Ga["progress-check"]}`,style:{width:`${Math.min(n,100)}%`}}),g.jsx("div",{className:"absolute inset-0 flex items-center px-2",children:g.jsxs("span",{className:"text-sm font-medium text-gray-900 z-10",children:[r.toFixed(2),"%"]})})]})},Za=k.forwardRef(({options:t,label:e,error:r,value:n,onChange:o,...i},s)=>g.jsxs("div",{className:"mb-5",children:[e&&g.jsx("label",{className:"block mb-1 font-semibold",children:e}),g.jsxs("select",{ref:s,className:"w-full p-2 border rounded",value:n,onChange:o,...i,children:[g.jsx("option",{disabled:!0,value:"",children:"Seleccione una opción"}),t==null?void 0:t.map(a=>g.jsx("option",{value:a.value,children:a.label},a.value))]}),r&&g.jsx("p",{className:"text-red-500 text-sm mt-1",children:r})]}));Za.displayName="SelectForm";const no=()=>{const{protocol:t,host:e}=window.location;return`${t}//${e}/`},sp=no(),ap=({logo:t,number:e,title:r,start:n,end:o,current:i})=>{const s=a=>new Intl.NumberFormat("es-ES",{maximumFractionDigits:2,minimumFractionDigits:0}).format(a);return g.jsxs("div",{className:"flex flex-col border px-3.5 py-7",children:[g.jsx("div",{className:"flex justify-end",children:g.jsx(Or,{src:`${sp}/public/assets/images/${t}.svg`,alt:"Icon",width:30,height:30})}),g.jsx("h2",{className:"my-3 font-bold",children:r}),g.jsx("small",{className:"text-3xl",children:s(e)}),g.jsx("div",{className:"mt-2 w-full",children:g.jsx(Xa,{start:n,end:o,current:i})})]})};/*!
|
|
2
2
|
* @kurkle/color v0.3.4
|
|
3
3
|
* https://github.com/kurkle/color#readme
|
|
4
4
|
* (c) 2024 Jukka Kurkela
|
|
5
5
|
* Released under the MIT License
|
|
6
|
-
*/function tn(t){return t+.5|0}const Yt=(t,e,r)=>Math.max(Math.min(t,r),e);function rn(t){return Yt(tn(t*2.55),0,255)}function Ut(t){return Yt(tn(t*255),0,255)}function At(t){return Yt(tn(t/2.55)/100,0,1)}function
|
|
6
|
+
*/function tn(t){return t+.5|0}const Yt=(t,e,r)=>Math.max(Math.min(t,r),e);function rn(t){return Yt(tn(t*2.55),0,255)}function Ut(t){return Yt(tn(t*255),0,255)}function At(t){return Yt(tn(t/2.55)/100,0,1)}function Ja(t){return Yt(tn(t*100),0,100)}const at={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},zi=[..."0123456789ABCDEF"],lp=t=>zi[t&15],cp=t=>zi[(t&240)>>4]+zi[t&15],oo=t=>(t&240)>>4===(t&15),dp=t=>oo(t.r)&&oo(t.g)&&oo(t.b)&&oo(t.a);function up(t){var e=t.length,r;return t[0]==="#"&&(e===4||e===5?r={r:255&at[t[1]]*17,g:255&at[t[2]]*17,b:255&at[t[3]]*17,a:e===5?at[t[4]]*17:255}:(e===7||e===9)&&(r={r:at[t[1]]<<4|at[t[2]],g:at[t[3]]<<4|at[t[4]],b:at[t[5]]<<4|at[t[6]],a:e===9?at[t[7]]<<4|at[t[8]]:255})),r}const fp=(t,e)=>t<255?e(t):"";function hp(t){var e=dp(t)?lp:cp;return t?"#"+e(t.r)+e(t.g)+e(t.b)+fp(t.a,e):void 0}const gp=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Qa(t,e,r){const n=e*Math.min(r,1-r),o=(i,s=(i+t/30)%12)=>r-n*Math.max(Math.min(s-3,9-s,1),-1);return[o(0),o(8),o(4)]}function pp(t,e,r){const n=(o,i=(o+t/60)%6)=>r-r*e*Math.max(Math.min(i,4-i,1),0);return[n(5),n(3),n(1)]}function mp(t,e,r){const n=Qa(t,1,.5);let o;for(e+r>1&&(o=1/(e+r),e*=o,r*=o),o=0;o<3;o++)n[o]*=1-e-r,n[o]+=e;return n}function bp(t,e,r,n,o){return t===o?(e-r)/n+(e<r?6:0):e===o?(r-t)/n+2:(t-e)/n+4}function Bi(t){const r=t.r/255,n=t.g/255,o=t.b/255,i=Math.max(r,n,o),s=Math.min(r,n,o),a=(i+s)/2;let l,c,d;return i!==s&&(d=i-s,c=a>.5?d/(2-i-s):d/(i+s),l=bp(r,n,o,d,i),l=l*60+.5),[l|0,c||0,a]}function $i(t,e,r,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,r,n)).map(Ut)}function ji(t,e,r){return $i(Qa,t,e,r)}function yp(t,e,r){return $i(mp,t,e,r)}function vp(t,e,r){return $i(pp,t,e,r)}function el(t){return(t%360+360)%360}function xp(t){const e=gp.exec(t);let r=255,n;if(!e)return;e[5]!==n&&(r=e[6]?rn(+e[5]):Ut(+e[5]));const o=el(+e[2]),i=+e[3]/100,s=+e[4]/100;return e[1]==="hwb"?n=yp(o,i,s):e[1]==="hsv"?n=vp(o,i,s):n=ji(o,i,s),{r:n[0],g:n[1],b:n[2],a:r}}function wp(t,e){var r=Bi(t);r[0]=el(r[0]+e),r=ji(r),t.r=r[0],t.g=r[1],t.b=r[2]}function kp(t){if(!t)return;const e=Bi(t),r=e[0],n=Ja(e[1]),o=Ja(e[2]);return t.a<255?`hsla(${r}, ${n}%, ${o}%, ${At(t.a)})`:`hsl(${r}, ${n}%, ${o}%)`}const tl={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},rl={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Cp(){const t={},e=Object.keys(rl),r=Object.keys(tl);let n,o,i,s,a;for(n=0;n<e.length;n++){for(s=a=e[n],o=0;o<r.length;o++)i=r[o],a=a.replace(i,tl[i]);i=parseInt(rl[s],16),t[a]=[i>>16&255,i>>8&255,i&255]}return t}let io;function _p(t){io||(io=Cp(),io.transparent=[0,0,0,0]);const e=io[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const Sp=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ep(t){const e=Sp.exec(t);let r=255,n,o,i;if(e){if(e[7]!==n){const s=+e[7];r=e[8]?rn(s):Yt(s*255,0,255)}return n=+e[1],o=+e[3],i=+e[5],n=255&(e[2]?rn(n):Yt(n,0,255)),o=255&(e[4]?rn(o):Yt(o,0,255)),i=255&(e[6]?rn(i):Yt(i,0,255)),{r:n,g:o,b:i,a:r}}}function Op(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${At(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Wi=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Tr=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Tp(t,e,r){const n=Tr(At(t.r)),o=Tr(At(t.g)),i=Tr(At(t.b));return{r:Ut(Wi(n+r*(Tr(At(e.r))-n))),g:Ut(Wi(o+r*(Tr(At(e.g))-o))),b:Ut(Wi(i+r*(Tr(At(e.b))-i))),a:t.a+r*(e.a-t.a)}}function so(t,e,r){if(t){let n=Bi(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*r,e===0?360:1)),n=ji(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function nl(t,e){return t&&Object.assign(e||{},t)}function ol(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Ut(t[3]))):(e=nl(t,{r:0,g:0,b:0,a:1}),e.a=Ut(e.a)),e}function Np(t){return t.charAt(0)==="r"?Ep(t):xp(t)}class nn{constructor(e){if(e instanceof nn)return e;const r=typeof e;let n;r==="object"?n=ol(e):r==="string"&&(n=up(e)||_p(e)||Np(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=nl(this._rgb);return e&&(e.a=At(e.a)),e}set rgb(e){this._rgb=ol(e)}rgbString(){return this._valid?Op(this._rgb):void 0}hexString(){return this._valid?hp(this._rgb):void 0}hslString(){return this._valid?kp(this._rgb):void 0}mix(e,r){if(e){const n=this.rgb,o=e.rgb;let i;const s=r===i?.5:r,a=2*s-1,l=n.a-o.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;i=1-c,n.r=255&c*n.r+i*o.r+.5,n.g=255&c*n.g+i*o.g+.5,n.b=255&c*n.b+i*o.b+.5,n.a=s*n.a+(1-s)*o.a,this.rgb=n}return this}interpolate(e,r){return e&&(this._rgb=Tp(this._rgb,e._rgb,r)),this}clone(){return new nn(this.rgb)}alpha(e){return this._rgb.a=Ut(e),this}clearer(e){const r=this._rgb;return r.a*=1-e,this}greyscale(){const e=this._rgb,r=tn(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=r,this}opaquer(e){const r=this._rgb;return r.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return so(this._rgb,2,e),this}darken(e){return so(this._rgb,2,-e),this}saturate(e){return so(this._rgb,1,e),this}desaturate(e){return so(this._rgb,1,-e),this}rotate(e){return wp(this._rgb,e),this}}/*!
|
|
7
7
|
* Chart.js v4.4.8
|
|
8
8
|
* https://www.chartjs.org
|
|
9
9
|
* (c) 2025 Chart.js Contributors
|
|
10
10
|
* Released under the MIT License
|
|
11
|
-
*/function Dt(){}const Op=(()=>{let t=0;return()=>t++})();function Re(t){return t==null}function ze(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function ne(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function It(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function xt(t,e){return It(t)?t:e}function fe(t,e){return typeof t>"u"?e:t}const Tp=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,rl=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function be(t,e,r){if(t&&typeof t.call=="function")return t.apply(r,e)}function he(t,e,r,n){let o,i,s;if(ze(t))for(i=t.length,o=0;o<i;o++)e.call(r,t[o],o);else if(ne(t))for(s=Object.keys(t),i=s.length,o=0;o<i;o++)e.call(r,t[s[o]],s[o])}function so(t,e){let r,n,o,i;if(!t||!e||t.length!==e.length)return!1;for(r=0,n=t.length;r<n;++r)if(o=t[r],i=e[r],o.datasetIndex!==i.datasetIndex||o.index!==i.index)return!1;return!0}function ao(t){if(ze(t))return t.map(ao);if(ne(t)){const e=Object.create(null),r=Object.keys(t),n=r.length;let o=0;for(;o<n;++o)e[r[o]]=ao(t[r[o]]);return e}return t}function nl(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Mp(t,e,r,n){if(!nl(t))return;const o=e[t],i=r[t];ne(o)&&ne(i)?on(o,i,n):e[t]=ao(i)}function on(t,e,r){const n=ze(e)?e:[e],o=n.length;if(!ne(t))return t;r=r||{};const i=r.merger||Mp;let s;for(let a=0;a<o;++a){if(s=n[a],!ne(s))continue;const l=Object.keys(s);for(let c=0,d=l.length;c<d;++c)i(l[c],t,s,r)}return t}function sn(t,e){return on(t,e,{merger:Np})}function Np(t,e,r){if(!nl(t))return;const n=e[t],o=r[t];ne(n)&&ne(o)?sn(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=ao(o))}const ol={"":t=>t,x:t=>t.x,y:t=>t.y};function Pp(t){const e=t.split("."),r=[];let n="";for(const o of e)n+=o,n.endsWith("\\")?n=n.slice(0,-1)+".":(r.push(n),n="");return r}function Ap(t){const e=Pp(t);return r=>{for(const n of e){if(n==="")break;r=r&&r[n]}return r}}function an(t,e){return(ol[e]||(ol[e]=Ap(e)))(t)}function ji(t){return t.charAt(0).toUpperCase()+t.slice(1)}const lo=t=>typeof t<"u",qt=t=>typeof t=="function",il=(t,e)=>{if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0};function Dp(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const De=Math.PI,_e=2*De,co=Number.POSITIVE_INFINITY,Ip=De/180,Me=De/2,ir=De/4,sl=De*2/3,al=Math.sign;function Lp(t){const e=[],r=Math.sqrt(t);let n;for(n=1;n<r;n++)t%n===0&&(e.push(n),e.push(t/n));return r===(r|0)&&e.push(r),e.sort((o,i)=>o-i).pop(),e}function Fp(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function uo(t){return!Fp(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function sr(t){return t*(De/180)}function zp(t){return t*(180/De)}function ll(t,e){const r=e.x-t.x,n=e.y-t.y,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r);return i<-.5*De&&(i+=_e),{angle:i,distance:o}}function Bp(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ar(t){return(t%_e+_e)%_e}function fo(t,e,r,n){const o=ar(t),i=ar(e),s=ar(r),a=ar(i-o),l=ar(s-o),c=ar(o-i),d=ar(o-s);return o===i||o===s||n&&i===s||a>l&&c<d}function lt(t,e,r){return Math.max(e,Math.min(r,t))}function $p(t){return lt(t,-32768,32767)}function ln(t,e,r,n=1e-6){return t>=Math.min(e,r)-n&&t<=Math.max(e,r)+n}function Wi(t,e,r){r=r||(s=>t[s]<e);let n=t.length-1,o=0,i;for(;n-o>1;)i=o+n>>1,r(i)?o=i:n=i;return{lo:o,hi:n}}const Hi=(t,e,r,n)=>Wi(t,r,n?o=>{const i=t[o][e];return i<r||i===r&&t[o+1][e]===r}:o=>t[o][e]<r),jp=(t,e,r)=>Wi(t,r,n=>t[n][e]>=r);function Wp(t,e,r){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>r;)o--;return n>0||o<t.length?t.slice(n,o):t}const cl=["push","pop","shift","splice","unshift"];function Hp(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),cl.forEach(r=>{const n="_onData"+ji(r),o=t[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value(...i){const s=o.apply(this,i);return t._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...i)}),s}})})}function dl(t,e){const r=t._chartjs;if(!r)return;const n=r.listeners,o=n.indexOf(e);o!==-1&&n.splice(o,1),!(n.length>0)&&(cl.forEach(i=>{delete t[i]}),delete t._chartjs)}function Rp(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const ul=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function fl(t,e){let r=[],n=!1;return function(...o){r=o,n||(n=!0,ul.call(window,()=>{n=!1,t.apply(e,r)}))}}function Vp(t,e){let r;return function(...n){return e?(clearTimeout(r),r=setTimeout(t,e,n)):t.apply(this,n),e}}const hl=t=>t==="start"?"left":t==="end"?"right":"center",tt=(t,e,r)=>t==="start"?e:t==="end"?r:(e+r)/2,Yp=(t,e,r,n)=>t===(n?"left":"right")?r:t==="center"?(e+r)/2:e,ho=t=>t===0||t===1,gl=(t,e,r)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*_e/r)),pl=(t,e,r)=>Math.pow(2,-10*t)*Math.sin((t-e)*_e/r)+1,cn={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Me)+1,easeOutSine:t=>Math.sin(t*Me),easeInOutSine:t=>-.5*(Math.cos(De*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>ho(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ho(t)?t:gl(t,.075,.3),easeOutElastic:t=>ho(t)?t:pl(t,.075,.3),easeInOutElastic(t){return ho(t)?t:t<.5?.5*gl(t*2,.1125,.45):.5+.5*pl(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-cn.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?cn.easeInBounce(t*2)*.5:cn.easeOutBounce(t*2-1)*.5+.5};function ml(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function bl(t){return ml(t)?t:new nn(t)}function Ri(t){return ml(t)?t:new nn(t).saturate(.5).darken(.1).hexString()}const Up=["x","y","borderWidth","radius","tension"],qp=["color","borderColor","backgroundColor"];function Kp(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:qp},numbers:{type:"number",properties:Up}}),t.describe("animations",{_fallback:"animation"}),t.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}}}})}function Gp(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const yl=new Map;function Xp(t,e){e=e||{};const r=t+JSON.stringify(e);let n=yl.get(r);return n||(n=new Intl.NumberFormat(t,e),yl.set(r,n)),n}function Jp(t,e,r){return Xp(e,r).format(t)}var Zp={formatters:{values(t){return ze(t)?t:""+t}}};function Qp(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,r)=>r.lineWidth,tickColor:(e,r)=>r.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Zp.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const lr=Object.create(null),Vi=Object.create(null);function dn(t,e){if(!e)return t;const r=e.split(".");for(let n=0,o=r.length;n<o;++n){const i=r[n];t=t[i]||(t[i]=Object.create(null))}return t}function Yi(t,e,r){return typeof e=="string"?on(dn(t,e),r):on(dn(t,""),e)}class e0{constructor(e,r){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,o)=>Ri(o.backgroundColor),this.hoverBorderColor=(n,o)=>Ri(o.borderColor),this.hoverColor=(n,o)=>Ri(o.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(r)}set(e,r){return Yi(this,e,r)}get(e){return dn(this,e)}describe(e,r){return Yi(Vi,e,r)}override(e,r){return Yi(lr,e,r)}route(e,r,n,o){const i=dn(this,e),s=dn(this,n),a="_"+r;Object.defineProperties(i,{[a]:{value:i[r],writable:!0},[r]:{enumerable:!0,get(){const l=this[a],c=s[o];return ne(l)?Object.assign({},c,l):fe(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(r=>r(this))}}var ke=new e0({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Kp,Gp,Qp]);function t0(t){return!t||Re(t.size)||Re(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function vl(t,e,r,n,o){let i=e[o];return i||(i=e[o]=t.measureText(o).width,r.push(o)),i>n&&(n=i),n}function cr(t,e,r){const n=t.currentDevicePixelRatio,o=r!==0?Math.max(r/2,.5):0;return Math.round((e-o)*n)/n+o}function xl(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function wl(t,e,r,n){kl(t,e,r,n,null)}function kl(t,e,r,n,o){let i,s,a,l,c,d,u,f;const h=e.pointStyle,g=e.rotation,m=e.radius;let b=(g||0)*Ip;if(h&&typeof h=="object"&&(i=h.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){t.save(),t.translate(r,n),t.rotate(b),t.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),t.restore();return}if(!(isNaN(m)||m<=0)){switch(t.beginPath(),h){default:o?t.ellipse(r,n,o/2,m,0,0,_e):t.arc(r,n,m,0,_e),t.closePath();break;case"triangle":d=o?o/2:m,t.moveTo(r+Math.sin(b)*d,n-Math.cos(b)*m),b+=sl,t.lineTo(r+Math.sin(b)*d,n-Math.cos(b)*m),b+=sl,t.lineTo(r+Math.sin(b)*d,n-Math.cos(b)*m),t.closePath();break;case"rectRounded":c=m*.516,l=m-c,s=Math.cos(b+ir)*l,u=Math.cos(b+ir)*(o?o/2-c:l),a=Math.sin(b+ir)*l,f=Math.sin(b+ir)*(o?o/2-c:l),t.arc(r-u,n-a,c,b-De,b-Me),t.arc(r+f,n-s,c,b-Me,b),t.arc(r+u,n+a,c,b,b+Me),t.arc(r-f,n+s,c,b+Me,b+De),t.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,d=o?o/2:l,t.rect(r-d,n-l,2*d,2*l);break}b+=ir;case"rectRot":u=Math.cos(b)*(o?o/2:m),s=Math.cos(b)*m,a=Math.sin(b)*m,f=Math.sin(b)*(o?o/2:m),t.moveTo(r-u,n-a),t.lineTo(r+f,n-s),t.lineTo(r+u,n+a),t.lineTo(r-f,n+s),t.closePath();break;case"crossRot":b+=ir;case"cross":u=Math.cos(b)*(o?o/2:m),s=Math.cos(b)*m,a=Math.sin(b)*m,f=Math.sin(b)*(o?o/2:m),t.moveTo(r-u,n-a),t.lineTo(r+u,n+a),t.moveTo(r+f,n-s),t.lineTo(r-f,n+s);break;case"star":u=Math.cos(b)*(o?o/2:m),s=Math.cos(b)*m,a=Math.sin(b)*m,f=Math.sin(b)*(o?o/2:m),t.moveTo(r-u,n-a),t.lineTo(r+u,n+a),t.moveTo(r+f,n-s),t.lineTo(r-f,n+s),b+=ir,u=Math.cos(b)*(o?o/2:m),s=Math.cos(b)*m,a=Math.sin(b)*m,f=Math.sin(b)*(o?o/2:m),t.moveTo(r-u,n-a),t.lineTo(r+u,n+a),t.moveTo(r+f,n-s),t.lineTo(r-f,n+s);break;case"line":s=o?o/2:Math.cos(b)*m,a=Math.sin(b)*m,t.moveTo(r-s,n-a),t.lineTo(r+s,n+a);break;case"dash":t.moveTo(r,n),t.lineTo(r+Math.cos(b)*(o?o/2:m),n+Math.sin(b)*m);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Cl(t,e,r){return r=r||.5,!e||t&&t.x>e.left-r&&t.x<e.right+r&&t.y>e.top-r&&t.y<e.bottom+r}function Ui(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function qi(t){t.restore()}function r0(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Re(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function n0(t,e,r,n,o){if(o.strikethrough||o.underline){const i=t.measureText(n),s=e-i.actualBoundingBoxLeft,a=e+i.actualBoundingBoxRight,l=r-i.actualBoundingBoxAscent,c=r+i.actualBoundingBoxDescent,d=o.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(s,d),t.lineTo(a,d),t.stroke()}}function o0(t,e){const r=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=r}function go(t,e,r,n,o,i={}){const s=ze(e)?e:[e],a=i.strokeWidth>0&&i.strokeColor!=="";let l,c;for(t.save(),t.font=o.string,r0(t,i),l=0;l<s.length;++l)c=s[l],i.backdrop&&o0(t,i.backdrop),a&&(i.strokeColor&&(t.strokeStyle=i.strokeColor),Re(i.strokeWidth)||(t.lineWidth=i.strokeWidth),t.strokeText(c,r,n,i.maxWidth)),t.fillText(c,r,n,i.maxWidth),n0(t,r,n,c,i),n+=Number(o.lineHeight);t.restore()}function Ki(t,e){const{x:r,y:n,w:o,h:i,radius:s}=e;t.arc(r+s.topLeft,n+s.topLeft,s.topLeft,1.5*De,De,!0),t.lineTo(r,n+i-s.bottomLeft),t.arc(r+s.bottomLeft,n+i-s.bottomLeft,s.bottomLeft,De,Me,!0),t.lineTo(r+o-s.bottomRight,n+i),t.arc(r+o-s.bottomRight,n+i-s.bottomRight,s.bottomRight,Me,0,!0),t.lineTo(r+o,n+s.topRight),t.arc(r+o-s.topRight,n+s.topRight,s.topRight,0,-Me,!0),t.lineTo(r+s.topLeft,n)}const i0=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,s0=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function a0(t,e){const r=(""+t).match(i0);if(!r||r[1]==="normal")return e*1.2;switch(t=+r[2],r[3]){case"px":return t;case"%":t/=100;break}return e*t}const l0=t=>+t||0;function Gi(t,e){const r={},n=ne(e),o=n?Object.keys(e):e,i=ne(t)?n?s=>fe(t[s],t[e[s]]):s=>t[s]:()=>t;for(const s of o)r[s]=l0(i(s));return r}function c0(t){return Gi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function un(t){return Gi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function gt(t){const e=c0(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ke(t,e){t=t||{},e=e||ke.font;let r=fe(t.size,e.size);typeof r=="string"&&(r=parseInt(r,10));let n=fe(t.style,e.style);n&&!(""+n).match(s0)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const o={family:fe(t.family,e.family),lineHeight:a0(fe(t.lineHeight,e.lineHeight),r),size:r,style:n,weight:fe(t.weight,e.weight),string:""};return o.string=t0(o),o}function po(t,e,r,n){let o,i,s;for(o=0,i=t.length;o<i;++o)if(s=t[o],s!==void 0&&s!==void 0)return s}function d0(t,e,r){const{min:n,max:o}=t,i=rl(e,(o-n)/2),s=(a,l)=>r&&a===0?0:a+l;return{min:s(n,-Math.abs(i)),max:s(o,i)}}function Mr(t,e){return Object.assign(Object.create(t),e)}function Xi(t,e=[""],r,n,o=()=>t[0]){const i=r||t;typeof n>"u"&&(n=Tl("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:a=>Xi([a,...t],e,i,n)};return new Proxy(s,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return Sl(a,l,()=>y0(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return Ml(a).includes(l)},ownKeys(a){return Ml(a)},set(a,l,c){const d=a._storage||(a._storage=o());return a[l]=d[l]=c,delete a._keys,!0}})}function Nr(t,e,r,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:r,_stack:new Set,_descriptors:_l(t,n),setContext:i=>Nr(t,i,r,n),override:i=>Nr(t.override(i),e,r,n)};return new Proxy(o,{deleteProperty(i,s){return delete i[s],delete t[s],!0},get(i,s,a){return Sl(i,s,()=>f0(i,s,a))},getOwnPropertyDescriptor(i,s){return i._descriptors.allKeys?Reflect.has(t,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(i,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(i,s,a){return t[s]=a,delete i[s],!0}})}function _l(t,e={scriptable:!0,indexable:!0}){const{_scriptable:r=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:r,indexable:n,isScriptable:qt(r)?r:()=>r,isIndexable:qt(n)?n:()=>n}}const u0=(t,e)=>t?t+ji(e):e,Ji=(t,e)=>ne(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Sl(t,e,r){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const n=r();return t[e]=n,n}function f0(t,e,r){const{_proxy:n,_context:o,_subProxy:i,_descriptors:s}=t;let a=n[e];return qt(a)&&s.isScriptable(e)&&(a=h0(e,a,t,r)),ze(a)&&a.length&&(a=g0(e,a,t,s.isIndexable)),Ji(e,a)&&(a=Nr(a,o,i&&i[e],s)),a}function h0(t,e,r,n){const{_proxy:o,_context:i,_subProxy:s,_stack:a}=r;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(i,s||n);return a.delete(t),Ji(t,l)&&(l=Zi(o._scopes,o,t,l)),l}function g0(t,e,r,n){const{_proxy:o,_context:i,_subProxy:s,_descriptors:a}=r;if(typeof i.index<"u"&&n(t))return e[i.index%e.length];if(ne(e[0])){const l=e,c=o._scopes.filter(d=>d!==l);e=[];for(const d of l){const u=Zi(c,o,t,d);e.push(Nr(u,i,s&&s[t],a))}}return e}function El(t,e,r){return qt(t)?t(e,r):t}const p0=(t,e)=>t===!0?e:typeof t=="string"?an(e,t):void 0;function m0(t,e,r,n,o){for(const i of e){const s=p0(r,i);if(s){t.add(s);const a=El(s._fallback,r,o);if(typeof a<"u"&&a!==r&&a!==n)return a}else if(s===!1&&typeof n<"u"&&r!==n)return null}return!1}function Zi(t,e,r,n){const o=e._rootScopes,i=El(e._fallback,r,n),s=[...t,...o],a=new Set;a.add(n);let l=Ol(a,s,r,i||r,n);return l===null||typeof i<"u"&&i!==r&&(l=Ol(a,s,i,l,n),l===null)?!1:Xi(Array.from(a),[""],o,i,()=>b0(e,r,n))}function Ol(t,e,r,n,o){for(;r;)r=m0(t,e,r,n,o);return r}function b0(t,e,r){const n=t._getTarget();e in n||(n[e]={});const o=n[e];return ze(o)&&ne(r)?r:o||{}}function y0(t,e,r,n){let o;for(const i of e)if(o=Tl(u0(i,t),r),typeof o<"u")return Ji(t,o)?Zi(r,n,t,o):o}function Tl(t,e){for(const r of e){if(!r)continue;const n=r[t];if(typeof n<"u")return n}}function Ml(t){let e=t._keys;return e||(e=t._keys=v0(t._scopes)),e}function v0(t){const e=new Set;for(const r of t)for(const n of Object.keys(r).filter(o=>!o.startsWith("_")))e.add(n);return Array.from(e)}function Qi(){return typeof window<"u"&&typeof document<"u"}function es(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function mo(t,e,r){let n;return typeof t=="string"?(n=parseInt(t,10),t.indexOf("%")!==-1&&(n=n/100*e.parentNode[r])):n=t,n}const bo=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function x0(t,e){return bo(t).getPropertyValue(e)}const w0=["top","right","bottom","left"];function dr(t,e,r){const n={};r=r?"-"+r:"";for(let o=0;o<4;o++){const i=w0[o];n[i]=parseFloat(t[e+"-"+i+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const k0=(t,e,r)=>(t>0||e>0)&&(!r||!r.shadowRoot);function C0(t,e){const r=t.touches,n=r&&r.length?r[0]:t,{offsetX:o,offsetY:i}=n;let s=!1,a,l;if(k0(o,i,t.target))a=o,l=i;else{const c=e.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function ur(t,e){if("native"in t)return t;const{canvas:r,currentDevicePixelRatio:n}=e,o=bo(r),i=o.boxSizing==="border-box",s=dr(o,"padding"),a=dr(o,"border","width"),{x:l,y:c,box:d}=C0(t,r),u=s.left+(d&&a.left),f=s.top+(d&&a.top);let{width:h,height:g}=e;return i&&(h-=s.width+a.width,g-=s.height+a.height),{x:Math.round((l-u)/h*r.width/n),y:Math.round((c-f)/g*r.height/n)}}function _0(t,e,r){let n,o;if(e===void 0||r===void 0){const i=t&&es(t);if(!i)e=t.clientWidth,r=t.clientHeight;else{const s=i.getBoundingClientRect(),a=bo(i),l=dr(a,"border","width"),c=dr(a,"padding");e=s.width-c.width-l.width,r=s.height-c.height-l.height,n=mo(a.maxWidth,i,"clientWidth"),o=mo(a.maxHeight,i,"clientHeight")}}return{width:e,height:r,maxWidth:n||co,maxHeight:o||co}}const yo=t=>Math.round(t*10)/10;function S0(t,e,r,n){const o=bo(t),i=dr(o,"margin"),s=mo(o.maxWidth,t,"clientWidth")||co,a=mo(o.maxHeight,t,"clientHeight")||co,l=_0(t,e,r);let{width:c,height:d}=l;if(o.boxSizing==="content-box"){const f=dr(o,"border","width"),h=dr(o,"padding");c-=h.width+f.width,d-=h.height+f.height}return c=Math.max(0,c-i.width),d=Math.max(0,n?c/n:d-i.height),c=yo(Math.min(c,s,l.maxWidth)),d=yo(Math.min(d,a,l.maxHeight)),c&&!d&&(d=yo(c/2)),(e!==void 0||r!==void 0)&&n&&l.height&&d>l.height&&(d=l.height,c=yo(Math.floor(d*n))),{width:c,height:d}}function Nl(t,e,r){const n=e||1,o=Math.floor(t.height*n),i=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const s=t.canvas;return s.style&&(r||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),t.currentDevicePixelRatio!==n||s.height!==o||s.width!==i?(t.currentDevicePixelRatio=n,s.height=o,s.width=i,t.ctx.setTransform(n,0,0,n,0,0),!0):!1}const E0=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Qi()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Pl(t,e){const r=x0(t,e),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}const O0=function(t,e){return{x(r){return t+t+e-r},setWidth(r){e=r},textAlign(r){return r==="center"?r:r==="right"?"left":"right"},xPlus(r,n){return r-n},leftForLtr(r,n){return r-n}}},T0=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Pr(t,e,r){return t?O0(e,r):T0()}function Al(t,e){let r,n;(e==="ltr"||e==="rtl")&&(r=t.canvas.style,n=[r.getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Dl(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}/*!
|
|
11
|
+
*/function Dt(){}const Mp=(()=>{let t=0;return()=>t++})();function Ve(t){return t==null}function ze(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function oe(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function It(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function xt(t,e){return It(t)?t:e}function fe(t,e){return typeof t>"u"?e:t}const Pp=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,il=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ye(t,e,r){if(t&&typeof t.call=="function")return t.apply(r,e)}function he(t,e,r,n){let o,i,s;if(ze(t))for(i=t.length,o=0;o<i;o++)e.call(r,t[o],o);else if(oe(t))for(s=Object.keys(t),i=s.length,o=0;o<i;o++)e.call(r,t[s[o]],s[o])}function ao(t,e){let r,n,o,i;if(!t||!e||t.length!==e.length)return!1;for(r=0,n=t.length;r<n;++r)if(o=t[r],i=e[r],o.datasetIndex!==i.datasetIndex||o.index!==i.index)return!1;return!0}function lo(t){if(ze(t))return t.map(lo);if(oe(t)){const e=Object.create(null),r=Object.keys(t),n=r.length;let o=0;for(;o<n;++o)e[r[o]]=lo(t[r[o]]);return e}return t}function sl(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Ap(t,e,r,n){if(!sl(t))return;const o=e[t],i=r[t];oe(o)&&oe(i)?on(o,i,n):e[t]=lo(i)}function on(t,e,r){const n=ze(e)?e:[e],o=n.length;if(!oe(t))return t;r=r||{};const i=r.merger||Ap;let s;for(let a=0;a<o;++a){if(s=n[a],!oe(s))continue;const l=Object.keys(s);for(let c=0,d=l.length;c<d;++c)i(l[c],t,s,r)}return t}function sn(t,e){return on(t,e,{merger:Dp})}function Dp(t,e,r){if(!sl(t))return;const n=e[t],o=r[t];oe(n)&&oe(o)?sn(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=lo(o))}const al={"":t=>t,x:t=>t.x,y:t=>t.y};function Ip(t){const e=t.split("."),r=[];let n="";for(const o of e)n+=o,n.endsWith("\\")?n=n.slice(0,-1)+".":(r.push(n),n="");return r}function Lp(t){const e=Ip(t);return r=>{for(const n of e){if(n==="")break;r=r&&r[n]}return r}}function an(t,e){return(al[e]||(al[e]=Lp(e)))(t)}function Hi(t){return t.charAt(0).toUpperCase()+t.slice(1)}const co=t=>typeof t<"u",qt=t=>typeof t=="function",ll=(t,e)=>{if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0};function Fp(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const De=Math.PI,_e=2*De,uo=Number.POSITIVE_INFINITY,zp=De/180,Ne=De/2,ir=De/4,cl=De*2/3,dl=Math.sign;function Bp(t){const e=[],r=Math.sqrt(t);let n;for(n=1;n<r;n++)t%n===0&&(e.push(n),e.push(t/n));return r===(r|0)&&e.push(r),e.sort((o,i)=>o-i).pop(),e}function $p(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function fo(t){return!$p(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function sr(t){return t*(De/180)}function jp(t){return t*(180/De)}function ul(t,e){const r=e.x-t.x,n=e.y-t.y,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r);return i<-.5*De&&(i+=_e),{angle:i,distance:o}}function Wp(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ar(t){return(t%_e+_e)%_e}function ho(t,e,r,n){const o=ar(t),i=ar(e),s=ar(r),a=ar(i-o),l=ar(s-o),c=ar(o-i),d=ar(o-s);return o===i||o===s||n&&i===s||a>l&&c<d}function lt(t,e,r){return Math.max(e,Math.min(r,t))}function Hp(t){return lt(t,-32768,32767)}function ln(t,e,r,n=1e-6){return t>=Math.min(e,r)-n&&t<=Math.max(e,r)+n}function Vi(t,e,r){r=r||(s=>t[s]<e);let n=t.length-1,o=0,i;for(;n-o>1;)i=o+n>>1,r(i)?o=i:n=i;return{lo:o,hi:n}}const Ri=(t,e,r,n)=>Vi(t,r,n?o=>{const i=t[o][e];return i<r||i===r&&t[o+1][e]===r}:o=>t[o][e]<r),Vp=(t,e,r)=>Vi(t,r,n=>t[n][e]>=r);function Rp(t,e,r){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>r;)o--;return n>0||o<t.length?t.slice(n,o):t}const fl=["push","pop","shift","splice","unshift"];function Yp(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),fl.forEach(r=>{const n="_onData"+Hi(r),o=t[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value(...i){const s=o.apply(this,i);return t._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...i)}),s}})})}function hl(t,e){const r=t._chartjs;if(!r)return;const n=r.listeners,o=n.indexOf(e);o!==-1&&n.splice(o,1),!(n.length>0)&&(fl.forEach(i=>{delete t[i]}),delete t._chartjs)}function Up(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const gl=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function pl(t,e){let r=[],n=!1;return function(...o){r=o,n||(n=!0,gl.call(window,()=>{n=!1,t.apply(e,r)}))}}function qp(t,e){let r;return function(...n){return e?(clearTimeout(r),r=setTimeout(t,e,n)):t.apply(this,n),e}}const ml=t=>t==="start"?"left":t==="end"?"right":"center",tt=(t,e,r)=>t==="start"?e:t==="end"?r:(e+r)/2,Kp=(t,e,r,n)=>t===(n?"left":"right")?r:t==="center"?(e+r)/2:e,go=t=>t===0||t===1,bl=(t,e,r)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*_e/r)),yl=(t,e,r)=>Math.pow(2,-10*t)*Math.sin((t-e)*_e/r)+1,cn={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Ne)+1,easeOutSine:t=>Math.sin(t*Ne),easeInOutSine:t=>-.5*(Math.cos(De*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>go(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>go(t)?t:bl(t,.075,.3),easeOutElastic:t=>go(t)?t:yl(t,.075,.3),easeInOutElastic(t){return go(t)?t:t<.5?.5*bl(t*2,.1125,.45):.5+.5*yl(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-cn.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?cn.easeInBounce(t*2)*.5:cn.easeOutBounce(t*2-1)*.5+.5};function vl(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function xl(t){return vl(t)?t:new nn(t)}function Yi(t){return vl(t)?t:new nn(t).saturate(.5).darken(.1).hexString()}const Gp=["x","y","borderWidth","radius","tension"],Xp=["color","borderColor","backgroundColor"];function Zp(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Xp},numbers:{type:"number",properties:Gp}}),t.describe("animations",{_fallback:"animation"}),t.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}}}})}function Jp(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const wl=new Map;function Qp(t,e){e=e||{};const r=t+JSON.stringify(e);let n=wl.get(r);return n||(n=new Intl.NumberFormat(t,e),wl.set(r,n)),n}function e0(t,e,r){return Qp(e,r).format(t)}var t0={formatters:{values(t){return ze(t)?t:""+t}}};function r0(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,r)=>r.lineWidth,tickColor:(e,r)=>r.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:t0.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const lr=Object.create(null),Ui=Object.create(null);function dn(t,e){if(!e)return t;const r=e.split(".");for(let n=0,o=r.length;n<o;++n){const i=r[n];t=t[i]||(t[i]=Object.create(null))}return t}function qi(t,e,r){return typeof e=="string"?on(dn(t,e),r):on(dn(t,""),e)}class n0{constructor(e,r){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,o)=>Yi(o.backgroundColor),this.hoverBorderColor=(n,o)=>Yi(o.borderColor),this.hoverColor=(n,o)=>Yi(o.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(r)}set(e,r){return qi(this,e,r)}get(e){return dn(this,e)}describe(e,r){return qi(Ui,e,r)}override(e,r){return qi(lr,e,r)}route(e,r,n,o){const i=dn(this,e),s=dn(this,n),a="_"+r;Object.defineProperties(i,{[a]:{value:i[r],writable:!0},[r]:{enumerable:!0,get(){const l=this[a],c=s[o];return oe(l)?Object.assign({},c,l):fe(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(r=>r(this))}}var ke=new n0({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Zp,Jp,r0]);function o0(t){return!t||Ve(t.size)||Ve(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function kl(t,e,r,n,o){let i=e[o];return i||(i=e[o]=t.measureText(o).width,r.push(o)),i>n&&(n=i),n}function cr(t,e,r){const n=t.currentDevicePixelRatio,o=r!==0?Math.max(r/2,.5):0;return Math.round((e-o)*n)/n+o}function Cl(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function _l(t,e,r,n){Sl(t,e,r,n,null)}function Sl(t,e,r,n,o){let i,s,a,l,c,d,u,f;const h=e.pointStyle,p=e.rotation,m=e.radius;let b=(p||0)*zp;if(h&&typeof h=="object"&&(i=h.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){t.save(),t.translate(r,n),t.rotate(b),t.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),t.restore();return}if(!(isNaN(m)||m<=0)){switch(t.beginPath(),h){default:o?t.ellipse(r,n,o/2,m,0,0,_e):t.arc(r,n,m,0,_e),t.closePath();break;case"triangle":d=o?o/2:m,t.moveTo(r+Math.sin(b)*d,n-Math.cos(b)*m),b+=cl,t.lineTo(r+Math.sin(b)*d,n-Math.cos(b)*m),b+=cl,t.lineTo(r+Math.sin(b)*d,n-Math.cos(b)*m),t.closePath();break;case"rectRounded":c=m*.516,l=m-c,s=Math.cos(b+ir)*l,u=Math.cos(b+ir)*(o?o/2-c:l),a=Math.sin(b+ir)*l,f=Math.sin(b+ir)*(o?o/2-c:l),t.arc(r-u,n-a,c,b-De,b-Ne),t.arc(r+f,n-s,c,b-Ne,b),t.arc(r+u,n+a,c,b,b+Ne),t.arc(r-f,n+s,c,b+Ne,b+De),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*m,d=o?o/2:l,t.rect(r-d,n-l,2*d,2*l);break}b+=ir;case"rectRot":u=Math.cos(b)*(o?o/2:m),s=Math.cos(b)*m,a=Math.sin(b)*m,f=Math.sin(b)*(o?o/2:m),t.moveTo(r-u,n-a),t.lineTo(r+f,n-s),t.lineTo(r+u,n+a),t.lineTo(r-f,n+s),t.closePath();break;case"crossRot":b+=ir;case"cross":u=Math.cos(b)*(o?o/2:m),s=Math.cos(b)*m,a=Math.sin(b)*m,f=Math.sin(b)*(o?o/2:m),t.moveTo(r-u,n-a),t.lineTo(r+u,n+a),t.moveTo(r+f,n-s),t.lineTo(r-f,n+s);break;case"star":u=Math.cos(b)*(o?o/2:m),s=Math.cos(b)*m,a=Math.sin(b)*m,f=Math.sin(b)*(o?o/2:m),t.moveTo(r-u,n-a),t.lineTo(r+u,n+a),t.moveTo(r+f,n-s),t.lineTo(r-f,n+s),b+=ir,u=Math.cos(b)*(o?o/2:m),s=Math.cos(b)*m,a=Math.sin(b)*m,f=Math.sin(b)*(o?o/2:m),t.moveTo(r-u,n-a),t.lineTo(r+u,n+a),t.moveTo(r+f,n-s),t.lineTo(r-f,n+s);break;case"line":s=o?o/2:Math.cos(b)*m,a=Math.sin(b)*m,t.moveTo(r-s,n-a),t.lineTo(r+s,n+a);break;case"dash":t.moveTo(r,n),t.lineTo(r+Math.cos(b)*(o?o/2:m),n+Math.sin(b)*m);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function El(t,e,r){return r=r||.5,!e||t&&t.x>e.left-r&&t.x<e.right+r&&t.y>e.top-r&&t.y<e.bottom+r}function Ki(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Gi(t){t.restore()}function i0(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Ve(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function s0(t,e,r,n,o){if(o.strikethrough||o.underline){const i=t.measureText(n),s=e-i.actualBoundingBoxLeft,a=e+i.actualBoundingBoxRight,l=r-i.actualBoundingBoxAscent,c=r+i.actualBoundingBoxDescent,d=o.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(s,d),t.lineTo(a,d),t.stroke()}}function a0(t,e){const r=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=r}function po(t,e,r,n,o,i={}){const s=ze(e)?e:[e],a=i.strokeWidth>0&&i.strokeColor!=="";let l,c;for(t.save(),t.font=o.string,i0(t,i),l=0;l<s.length;++l)c=s[l],i.backdrop&&a0(t,i.backdrop),a&&(i.strokeColor&&(t.strokeStyle=i.strokeColor),Ve(i.strokeWidth)||(t.lineWidth=i.strokeWidth),t.strokeText(c,r,n,i.maxWidth)),t.fillText(c,r,n,i.maxWidth),s0(t,r,n,c,i),n+=Number(o.lineHeight);t.restore()}function Xi(t,e){const{x:r,y:n,w:o,h:i,radius:s}=e;t.arc(r+s.topLeft,n+s.topLeft,s.topLeft,1.5*De,De,!0),t.lineTo(r,n+i-s.bottomLeft),t.arc(r+s.bottomLeft,n+i-s.bottomLeft,s.bottomLeft,De,Ne,!0),t.lineTo(r+o-s.bottomRight,n+i),t.arc(r+o-s.bottomRight,n+i-s.bottomRight,s.bottomRight,Ne,0,!0),t.lineTo(r+o,n+s.topRight),t.arc(r+o-s.topRight,n+s.topRight,s.topRight,0,-Ne,!0),t.lineTo(r+s.topLeft,n)}const l0=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,c0=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function d0(t,e){const r=(""+t).match(l0);if(!r||r[1]==="normal")return e*1.2;switch(t=+r[2],r[3]){case"px":return t;case"%":t/=100;break}return e*t}const u0=t=>+t||0;function Zi(t,e){const r={},n=oe(e),o=n?Object.keys(e):e,i=oe(t)?n?s=>fe(t[s],t[e[s]]):s=>t[s]:()=>t;for(const s of o)r[s]=u0(i(s));return r}function f0(t){return Zi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function un(t){return Zi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function gt(t){const e=f0(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ke(t,e){t=t||{},e=e||ke.font;let r=fe(t.size,e.size);typeof r=="string"&&(r=parseInt(r,10));let n=fe(t.style,e.style);n&&!(""+n).match(c0)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const o={family:fe(t.family,e.family),lineHeight:d0(fe(t.lineHeight,e.lineHeight),r),size:r,style:n,weight:fe(t.weight,e.weight),string:""};return o.string=o0(o),o}function mo(t,e,r,n){let o,i,s;for(o=0,i=t.length;o<i;++o)if(s=t[o],s!==void 0&&s!==void 0)return s}function h0(t,e,r){const{min:n,max:o}=t,i=il(e,(o-n)/2),s=(a,l)=>r&&a===0?0:a+l;return{min:s(n,-Math.abs(i)),max:s(o,i)}}function Nr(t,e){return Object.assign(Object.create(t),e)}function Ji(t,e=[""],r,n,o=()=>t[0]){const i=r||t;typeof n>"u"&&(n=Pl("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:a=>Ji([a,...t],e,i,n)};return new Proxy(s,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return Tl(a,l,()=>w0(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return Al(a).includes(l)},ownKeys(a){return Al(a)},set(a,l,c){const d=a._storage||(a._storage=o());return a[l]=d[l]=c,delete a._keys,!0}})}function Mr(t,e,r,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:r,_stack:new Set,_descriptors:Ol(t,n),setContext:i=>Mr(t,i,r,n),override:i=>Mr(t.override(i),e,r,n)};return new Proxy(o,{deleteProperty(i,s){return delete i[s],delete t[s],!0},get(i,s,a){return Tl(i,s,()=>p0(i,s,a))},getOwnPropertyDescriptor(i,s){return i._descriptors.allKeys?Reflect.has(t,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(i,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(i,s,a){return t[s]=a,delete i[s],!0}})}function Ol(t,e={scriptable:!0,indexable:!0}){const{_scriptable:r=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:r,indexable:n,isScriptable:qt(r)?r:()=>r,isIndexable:qt(n)?n:()=>n}}const g0=(t,e)=>t?t+Hi(e):e,Qi=(t,e)=>oe(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Tl(t,e,r){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const n=r();return t[e]=n,n}function p0(t,e,r){const{_proxy:n,_context:o,_subProxy:i,_descriptors:s}=t;let a=n[e];return qt(a)&&s.isScriptable(e)&&(a=m0(e,a,t,r)),ze(a)&&a.length&&(a=b0(e,a,t,s.isIndexable)),Qi(e,a)&&(a=Mr(a,o,i&&i[e],s)),a}function m0(t,e,r,n){const{_proxy:o,_context:i,_subProxy:s,_stack:a}=r;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(i,s||n);return a.delete(t),Qi(t,l)&&(l=es(o._scopes,o,t,l)),l}function b0(t,e,r,n){const{_proxy:o,_context:i,_subProxy:s,_descriptors:a}=r;if(typeof i.index<"u"&&n(t))return e[i.index%e.length];if(oe(e[0])){const l=e,c=o._scopes.filter(d=>d!==l);e=[];for(const d of l){const u=es(c,o,t,d);e.push(Mr(u,i,s&&s[t],a))}}return e}function Nl(t,e,r){return qt(t)?t(e,r):t}const y0=(t,e)=>t===!0?e:typeof t=="string"?an(e,t):void 0;function v0(t,e,r,n,o){for(const i of e){const s=y0(r,i);if(s){t.add(s);const a=Nl(s._fallback,r,o);if(typeof a<"u"&&a!==r&&a!==n)return a}else if(s===!1&&typeof n<"u"&&r!==n)return null}return!1}function es(t,e,r,n){const o=e._rootScopes,i=Nl(e._fallback,r,n),s=[...t,...o],a=new Set;a.add(n);let l=Ml(a,s,r,i||r,n);return l===null||typeof i<"u"&&i!==r&&(l=Ml(a,s,i,l,n),l===null)?!1:Ji(Array.from(a),[""],o,i,()=>x0(e,r,n))}function Ml(t,e,r,n,o){for(;r;)r=v0(t,e,r,n,o);return r}function x0(t,e,r){const n=t._getTarget();e in n||(n[e]={});const o=n[e];return ze(o)&&oe(r)?r:o||{}}function w0(t,e,r,n){let o;for(const i of e)if(o=Pl(g0(i,t),r),typeof o<"u")return Qi(t,o)?es(r,n,t,o):o}function Pl(t,e){for(const r of e){if(!r)continue;const n=r[t];if(typeof n<"u")return n}}function Al(t){let e=t._keys;return e||(e=t._keys=k0(t._scopes)),e}function k0(t){const e=new Set;for(const r of t)for(const n of Object.keys(r).filter(o=>!o.startsWith("_")))e.add(n);return Array.from(e)}function ts(){return typeof window<"u"&&typeof document<"u"}function rs(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function bo(t,e,r){let n;return typeof t=="string"?(n=parseInt(t,10),t.indexOf("%")!==-1&&(n=n/100*e.parentNode[r])):n=t,n}const yo=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function C0(t,e){return yo(t).getPropertyValue(e)}const _0=["top","right","bottom","left"];function dr(t,e,r){const n={};r=r?"-"+r:"";for(let o=0;o<4;o++){const i=_0[o];n[i]=parseFloat(t[e+"-"+i+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const S0=(t,e,r)=>(t>0||e>0)&&(!r||!r.shadowRoot);function E0(t,e){const r=t.touches,n=r&&r.length?r[0]:t,{offsetX:o,offsetY:i}=n;let s=!1,a,l;if(S0(o,i,t.target))a=o,l=i;else{const c=e.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function ur(t,e){if("native"in t)return t;const{canvas:r,currentDevicePixelRatio:n}=e,o=yo(r),i=o.boxSizing==="border-box",s=dr(o,"padding"),a=dr(o,"border","width"),{x:l,y:c,box:d}=E0(t,r),u=s.left+(d&&a.left),f=s.top+(d&&a.top);let{width:h,height:p}=e;return i&&(h-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-u)/h*r.width/n),y:Math.round((c-f)/p*r.height/n)}}function O0(t,e,r){let n,o;if(e===void 0||r===void 0){const i=t&&rs(t);if(!i)e=t.clientWidth,r=t.clientHeight;else{const s=i.getBoundingClientRect(),a=yo(i),l=dr(a,"border","width"),c=dr(a,"padding");e=s.width-c.width-l.width,r=s.height-c.height-l.height,n=bo(a.maxWidth,i,"clientWidth"),o=bo(a.maxHeight,i,"clientHeight")}}return{width:e,height:r,maxWidth:n||uo,maxHeight:o||uo}}const vo=t=>Math.round(t*10)/10;function T0(t,e,r,n){const o=yo(t),i=dr(o,"margin"),s=bo(o.maxWidth,t,"clientWidth")||uo,a=bo(o.maxHeight,t,"clientHeight")||uo,l=O0(t,e,r);let{width:c,height:d}=l;if(o.boxSizing==="content-box"){const f=dr(o,"border","width"),h=dr(o,"padding");c-=h.width+f.width,d-=h.height+f.height}return c=Math.max(0,c-i.width),d=Math.max(0,n?c/n:d-i.height),c=vo(Math.min(c,s,l.maxWidth)),d=vo(Math.min(d,a,l.maxHeight)),c&&!d&&(d=vo(c/2)),(e!==void 0||r!==void 0)&&n&&l.height&&d>l.height&&(d=l.height,c=vo(Math.floor(d*n))),{width:c,height:d}}function Dl(t,e,r){const n=e||1,o=Math.floor(t.height*n),i=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const s=t.canvas;return s.style&&(r||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),t.currentDevicePixelRatio!==n||s.height!==o||s.width!==i?(t.currentDevicePixelRatio=n,s.height=o,s.width=i,t.ctx.setTransform(n,0,0,n,0,0),!0):!1}const N0=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};ts()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Il(t,e){const r=C0(t,e),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}const M0=function(t,e){return{x(r){return t+t+e-r},setWidth(r){e=r},textAlign(r){return r==="center"?r:r==="right"?"left":"right"},xPlus(r,n){return r-n},leftForLtr(r,n){return r-n}}},P0=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Pr(t,e,r){return t?M0(e,r):P0()}function Ll(t,e){let r,n;(e==="ltr"||e==="rtl")&&(r=t.canvas.style,n=[r.getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Fl(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}/*!
|
|
12
12
|
* Chart.js v4.4.8
|
|
13
13
|
* https://www.chartjs.org
|
|
14
14
|
* (c) 2025 Chart.js Contributors
|
|
15
15
|
* Released under the MIT License
|
|
16
|
-
*/class M0{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,r,n,o){const i=r.listeners[o],s=r.duration;i.forEach(a=>a({chart:e,initial:r.initial,numSteps:s,currentStep:Math.min(n-r.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=ul.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let r=0;this._charts.forEach((n,o)=>{if(!n.running||!n.items.length)return;const i=n.items;let s=i.length-1,a=!1,l;for(;s>=0;--s)l=i[s],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(e),a=!0):(i[s]=i[i.length-1],i.pop());a&&(o.draw(),this._notify(o,n,e,"progress")),i.length||(n.running=!1,this._notify(o,n,e,"complete"),n.initial=!1),r+=i.length}),this._lastDate=e,r===0&&(this._running=!1)}_getAnims(e){const r=this._charts;let n=r.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},r.set(e,n)),n}listen(e,r,n){this._getAnims(e).listeners[r].push(n)}add(e,r){!r||!r.length||this._getAnims(e).items.push(...r)}has(e){return this._getAnims(e).items.length>0}start(e){const r=this._charts.get(e);r&&(r.running=!0,r.start=Date.now(),r.duration=r.items.reduce((n,o)=>Math.max(n,o._duration),0),this._refresh())}running(e){if(!this._running)return!1;const r=this._charts.get(e);return!(!r||!r.running||!r.items.length)}stop(e){const r=this._charts.get(e);if(!r||!r.items.length)return;const n=r.items;let o=n.length-1;for(;o>=0;--o)n[o].cancel();r.items=[],this._notify(e,r,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Lt=new M0;const Il="transparent",N0={boolean(t,e,r){return r>.5?e:t},color(t,e,r){const n=bl(t||Il),o=n.valid&&bl(e||Il);return o&&o.valid?o.mix(n,r).hexString():e},number(t,e,r){return t+(e-t)*r}};class P0{constructor(e,r,n,o){const i=r[n];o=po([e.to,o,i,e.from]);const s=po([e.from,i,o]);this._active=!0,this._fn=e.fn||N0[e.type||typeof s],this._easing=cn[e.easing]||cn.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=r,this._prop=n,this._from=s,this._to=o,this._promises=void 0}active(){return this._active}update(e,r,n){if(this._active){this._notify(!1);const o=this._target[this._prop],i=n-this._start,s=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=po([e.to,r,o,e.from]),this._from=po([e.from,o,r])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const r=e-this._start,n=this._duration,o=this._prop,i=this._from,s=this._loop,a=this._to;let l;if(this._active=i!==a&&(s||r<n),!this._active){this._target[o]=a,this._notify(!0);return}if(r<0){this._target[o]=i;return}l=r/n%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[o]=this._fn(i,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((r,n)=>{e.push({res:r,rej:n})})}_notify(e){const r=e?"res":"rej",n=this._promises||[];for(let o=0;o<n.length;o++)n[o][r]()}}class Ll{constructor(e,r){this._chart=e,this._properties=new Map,this.configure(r)}configure(e){if(!ne(e))return;const r=Object.keys(ke.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach(o=>{const i=e[o];if(!ne(i))return;const s={};for(const a of r)s[a]=i[a];(ze(i.properties)&&i.properties||[o]).forEach(a=>{(a===o||!n.has(a))&&n.set(a,s)})})}_animateOptions(e,r){const n=r.options,o=D0(e,n);if(!o)return[];const i=this._createAnimations(o,n);return n.$shared&&A0(e.options.$animations,n).then(()=>{e.options=n},()=>{}),i}_createAnimations(e,r){const n=this._properties,o=[],i=e.$animations||(e.$animations={}),s=Object.keys(r),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"){o.push(...this._animateOptions(e,r));continue}const d=r[c];let u=i[c];const f=n.get(c);if(u)if(f&&u.active()){u.update(f,d,a);continue}else u.cancel();if(!f||!f.duration){e[c]=d;continue}i[c]=u=new P0(f,e,c,d),o.push(u)}return o}update(e,r){if(this._properties.size===0){Object.assign(e,r);return}const n=this._createAnimations(e,r);if(n.length)return Lt.add(this._chart,n),!0}}function A0(t,e){const r=[],n=Object.keys(e);for(let o=0;o<n.length;o++){const i=t[n[o]];i&&i.active()&&r.push(i.wait())}return Promise.all(r)}function D0(t,e){if(!e)return;let r=t.options;if(!r){t.options=e;return}return r.$shared&&(t.options=r=Object.assign({},r,{$shared:!1,$animations:{}})),r}function Fl(t,e){const r=t&&t.options||{},n=r.reverse,o=r.min===void 0?e:0,i=r.max===void 0?e:0;return{start:n?i:o,end:n?o:i}}function I0(t,e,r){if(r===!1)return!1;const n=Fl(t,r),o=Fl(e,r);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}function L0(t){let e,r,n,o;return ne(t)?(e=t.top,r=t.right,n=t.bottom,o=t.left):e=r=n=o=t,{top:e,right:r,bottom:n,left:o,disabled:t===!1}}function zl(t,e){const r=[],n=t._getSortedDatasetMetas(e);let o,i;for(o=0,i=n.length;o<i;++o)r.push(n[o].index);return r}function Bl(t,e,r,n={}){const o=t.keys,i=n.mode==="single";let s,a,l,c;if(e===null)return;let d=!1;for(s=0,a=o.length;s<a;++s){if(l=+o[s],l===r){if(d=!0,n.all)continue;break}c=t.values[l],It(c)&&(i||e===0||al(e)===al(c))&&(e+=c)}return!d&&!n.all?0:e}function F0(t,e){const{iScale:r,vScale:n}=e,o=r.axis==="x"?"x":"y",i=n.axis==="x"?"x":"y",s=Object.keys(t),a=new Array(s.length);let l,c,d;for(l=0,c=s.length;l<c;++l)d=s[l],a[l]={[o]:d,[i]:t[d]};return a}function ts(t,e){const r=t&&t.options.stacked;return r||r===void 0&&e.stack!==void 0}function z0(t,e,r){return`${t.id}.${e.id}.${r.stack||r.type}`}function B0(t){const{min:e,max:r,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?r:Number.POSITIVE_INFINITY}}function $0(t,e,r){const n=t[e]||(t[e]={});return n[r]||(n[r]={})}function $l(t,e,r,n){for(const o of e.getMatchingVisibleMetas(n).reverse()){const i=t[o.index];if(r&&i>0||!r&&i<0)return o.index}return null}function jl(t,e){const{chart:r,_cachedMeta:n}=t,o=r._stacks||(r._stacks={}),{iScale:i,vScale:s,index:a}=n,l=i.axis,c=s.axis,d=z0(i,s,n),u=e.length;let f;for(let h=0;h<u;++h){const g=e[h],{[l]:m,[c]:b}=g,v=g._stacks||(g._stacks={});f=v[c]=$0(o,d,m),f[a]=b,f._top=$l(f,s,!0,n.type),f._bottom=$l(f,s,!1,n.type);const y=f._visualValues||(f._visualValues={});y[a]=b}}function rs(t,e){const r=t.scales;return Object.keys(r).filter(n=>r[n].axis===e).shift()}function j0(t,e){return Mr(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function W0(t,e,r){return Mr(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:r,index:e,mode:"default",type:"data"})}function fn(t,e){const r=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const o of e){const i=o._stacks;if(!i||i[n]===void 0||i[n][r]===void 0)return;delete i[n][r],i[n]._visualValues!==void 0&&i[n]._visualValues[r]!==void 0&&delete i[n]._visualValues[r]}}}const ns=t=>t==="reset"||t==="none",Wl=(t,e)=>e?t:Object.assign({},t),H0=(t,e,r)=>t&&!e.hidden&&e._stacked&&{keys:zl(r,!0),values:null};class hn{constructor(e,r){this.chart=e,this._ctx=e.ctx,this.index=r,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=ts(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&fn(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,r=this._cachedMeta,n=this.getDataset(),o=(u,f,h,g)=>u==="x"?f:u==="r"?g:h,i=r.xAxisID=fe(n.xAxisID,rs(e,"x")),s=r.yAxisID=fe(n.yAxisID,rs(e,"y")),a=r.rAxisID=fe(n.rAxisID,rs(e,"r")),l=r.indexAxis,c=r.iAxisID=o(l,i,s,a),d=r.vAxisID=o(l,s,i,a);r.xScale=this.getScaleForId(i),r.yScale=this.getScaleForId(s),r.rScale=this.getScaleForId(a),r.iScale=this.getScaleForId(c),r.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const r=this._cachedMeta;return e===r.iScale?r.vScale:r.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&dl(this._data,this),e._stacked&&fn(e)}_dataCheck(){const e=this.getDataset(),r=e.data||(e.data=[]),n=this._data;if(ne(r)){const o=this._cachedMeta;this._data=F0(r,o)}else if(n!==r){if(n){dl(n,this);const o=this._cachedMeta;fn(o),o._parsed=[]}r&&Object.isExtensible(r)&&Hp(r,this),this._syncList=[],this._data=r}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const r=this._cachedMeta,n=this.getDataset();let o=!1;this._dataCheck();const i=r._stacked;r._stacked=ts(r.vScale,r),r.stack!==n.stack&&(o=!0,fn(r),r.stack=n.stack),this._resyncElements(e),(o||i!==r._stacked)&&(jl(this,r._parsed),r._stacked=ts(r.vScale,r))}configure(){const e=this.chart.config,r=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),r,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,r){const{_cachedMeta:n,_data:o}=this,{iScale:i,_stacked:s}=n,a=i.axis;let l=e===0&&r===o.length?!0:n._sorted,c=e>0&&n._parsed[e-1],d,u,f;if(this._parsing===!1)n._parsed=o,n._sorted=!0,f=o;else{ze(o[e])?f=this.parseArrayData(n,o,e,r):ne(o[e])?f=this.parseObjectData(n,o,e,r):f=this.parsePrimitiveData(n,o,e,r);const h=()=>u[a]===null||c&&u[a]<c[a];for(d=0;d<r;++d)n._parsed[d+e]=u=f[d],l&&(h()&&(l=!1),c=u);n._sorted=l}s&&jl(this,f)}parsePrimitiveData(e,r,n,o){const{iScale:i,vScale:s}=e,a=i.axis,l=s.axis,c=i.getLabels(),d=i===s,u=new Array(o);let f,h,g;for(f=0,h=o;f<h;++f)g=f+n,u[f]={[a]:d||i.parse(c[g],g),[l]:s.parse(r[g],g)};return u}parseArrayData(e,r,n,o){const{xScale:i,yScale:s}=e,a=new Array(o);let l,c,d,u;for(l=0,c=o;l<c;++l)d=l+n,u=r[d],a[l]={x:i.parse(u[0],d),y:s.parse(u[1],d)};return a}parseObjectData(e,r,n,o){const{xScale:i,yScale:s}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(o);let d,u,f,h;for(d=0,u=o;d<u;++d)f=d+n,h=r[f],c[d]={x:i.parse(an(h,a),f),y:s.parse(an(h,l),f)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,r,n){const o=this.chart,i=this._cachedMeta,s=r[e.axis],a={keys:zl(o,!0),values:r._stacks[e.axis]._visualValues};return Bl(a,s,i.index,{mode:n})}updateRangeFromParsed(e,r,n,o){const i=n[r.axis];let s=i===null?NaN:i;const a=o&&n._stacks[r.axis];o&&a&&(o.values=a,s=Bl(o,i,this._cachedMeta.index)),e.min=Math.min(e.min,s),e.max=Math.max(e.max,s)}getMinMax(e,r){const n=this._cachedMeta,o=n._parsed,i=n._sorted&&e===n.iScale,s=o.length,a=this._getOtherScale(e),l=H0(r,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:u}=B0(a);let f,h;function g(){h=o[f];const m=h[a.axis];return!It(h[e.axis])||d>m||u<m}for(f=0;f<s&&!(!g()&&(this.updateRangeFromParsed(c,e,h,l),i));++f);if(i){for(f=s-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(c,e,h,l);break}}return c}getAllParsedValues(e){const r=this._cachedMeta._parsed,n=[];let o,i,s;for(o=0,i=r.length;o<i;++o)s=r[o][e.axis],It(s)&&n.push(s);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const r=this._cachedMeta,n=r.iScale,o=r.vScale,i=this.getParsed(e);return{label:n?""+n.getLabelForValue(i[n.axis]):"",value:o?""+o.getLabelForValue(i[o.axis]):""}}_update(e){const r=this._cachedMeta;this.update(e||"default"),r._clip=L0(fe(this.options.clip,I0(r.xScale,r.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,r=this.chart,n=this._cachedMeta,o=n.data||[],i=r.chartArea,s=[],a=this._drawStart||0,l=this._drawCount||o.length-a,c=this.options.drawActiveElementsOnTop;let d;for(n.dataset&&n.dataset.draw(e,i,a,l),d=a;d<a+l;++d){const u=o[d];u.hidden||(u.active&&c?s.push(u):u.draw(e,i))}for(d=0;d<s.length;++d)s[d].draw(e,i)}getStyle(e,r){const n=r?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,r,n){const o=this.getDataset();let i;if(e>=0&&e<this._cachedMeta.data.length){const s=this._cachedMeta.data[e];i=s.$context||(s.$context=W0(this.getContext(),e,s)),i.parsed=this.getParsed(e),i.raw=o.data[e],i.index=i.dataIndex=e}else i=this.$context||(this.$context=j0(this.chart.getContext(),this.index)),i.dataset=o,i.index=i.datasetIndex=this.index;return i.active=!!r,i.mode=n,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,r){return this._resolveElementOptions(this.dataElementType.id,r,e)}_resolveElementOptions(e,r="default",n){const o=r==="active",i=this._cachedDataOpts,s=e+"-"+r,a=i[s],l=this.enableOptionSharing&&lo(n);if(a)return Wl(a,l);const c=this.chart.config,d=c.datasetElementScopeKeys(this._type,e),u=o?[`${e}Hover`,"hover",e,""]:[e,""],f=c.getOptionScopes(this.getDataset(),d),h=Object.keys(ke.elements[e]),g=()=>this.getContext(n,o,r),m=c.resolveNamedOptions(f,h,g,u);return m.$shared&&(m.$shared=l,i[s]=Object.freeze(Wl(m,l))),m}_resolveAnimations(e,r,n){const o=this.chart,i=this._cachedDataOpts,s=`animation-${r}`,a=i[s];if(a)return a;let l;if(o.options.animation!==!1){const d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,r),f=d.getOptionScopes(this.getDataset(),u);l=d.createResolver(f,this.getContext(e,n,r))}const c=new Ll(o,l&&l.animations);return l&&l._cacheable&&(i[s]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,r){return!r||ns(e)||this.chart._animationsDisabled}_getSharedOptions(e,r){const n=this.resolveDataElementOptions(e,r),o=this._sharedOptions,i=this.getSharedOptions(n),s=this.includeOptions(r,i)||i!==o;return this.updateSharedOptions(i,r,n),{sharedOptions:i,includeOptions:s}}updateElement(e,r,n,o){ns(o)?Object.assign(e,n):this._resolveAnimations(r,o).update(e,n)}updateSharedOptions(e,r,n){e&&!ns(r)&&this._resolveAnimations(void 0,r).update(e,n)}_setStyle(e,r,n,o){e.active=o;const i=this.getStyle(r,o);this._resolveAnimations(r,n,o).update(e,{options:!o&&this.getSharedOptions(i)||i})}removeHoverStyle(e,r,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,r,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const r=this._data,n=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const o=n.length,i=r.length,s=Math.min(i,o);s&&this.parse(0,s),i>o?this._insertElements(o,i-o,e):i<o&&this._removeElements(i,o-i)}_insertElements(e,r,n=!0){const o=this._cachedMeta,i=o.data,s=e+r;let a;const l=c=>{for(c.length+=r,a=c.length-1;a>=s;a--)c[a]=c[a-r]};for(l(i),a=e;a<s;++a)i[a]=new this.dataElementType;this._parsing&&l(o._parsed),this.parse(e,r),n&&this.updateElements(i,e,r,"reset")}updateElements(e,r,n,o){}_removeElements(e,r){const n=this._cachedMeta;if(this._parsing){const o=n._parsed.splice(e,r);n._stacked&&fn(n,o)}n.data.splice(e,r)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[r,n,o]=e;this[r](n,o)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,r){r&&this._sync(["_removeElements",e,r]);const n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}te(hn,"defaults",{}),te(hn,"datasetElementType",null),te(hn,"dataElementType",null);function R0(t,e,r){let n=1,o=1,i=0,s=0;if(e<_e){const a=t,l=a+e,c=Math.cos(a),d=Math.sin(a),u=Math.cos(l),f=Math.sin(l),h=(_,x,w)=>fo(_,a,l,!0)?1:Math.max(x,x*r,w,w*r),g=(_,x,w)=>fo(_,a,l,!0)?-1:Math.min(x,x*r,w,w*r),m=h(0,c,u),b=h(Me,d,f),v=g(De,c,u),y=g(De+Me,d,f);n=(m-v)/2,o=(b-y)/2,i=-(m+v)/2,s=-(b+y)/2}return{ratioX:n,ratioY:o,offsetX:i,offsetY:s}}class gn extends hn{constructor(e,r){super(e,r),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,r){const n=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=n;else{let i=l=>+n[l];if(ne(n[e])){const{key:l="value"}=this._parsing;i=c=>+an(n[c],l)}let s,a;for(s=e,a=e+r;s<a;++s)o._parsed[s]=i(s)}}_getRotation(){return sr(this.options.rotation-90)}_getCircumference(){return sr(this.options.circumference)}_getRotationExtents(){let e=_e,r=-_e;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const o=this.chart.getDatasetMeta(n).controller,i=o._getRotation(),s=o._getCircumference();e=Math.min(e,i),r=Math.max(r,i+s)}return{rotation:e,circumference:r-e}}update(e){const r=this.chart,{chartArea:n}=r,o=this._cachedMeta,i=o.data,s=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-s)/2,0),l=Math.min(Tp(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:h,offsetX:g,offsetY:m}=R0(u,d,l),b=(n.width-s)/f,v=(n.height-s)/h,y=Math.max(Math.min(b,v)/2,0),_=rl(this.options.radius,y),x=Math.max(_*l,0),w=(_-x)/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=m*_,o.total=this.calculateTotal(),this.outerRadius=_-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(i,0,i.length,e)}_circumference(e,r){const n=this.options,o=this._cachedMeta,i=this._getCircumference();return r&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||o._parsed[e]===null||o.data[e].hidden?0:this.calculateCircumference(o._parsed[e]*i/_e)}updateElements(e,r,n,o){const i=o==="reset",s=this.chart,a=s.chartArea,c=s.options.animation,d=(a.left+a.right)/2,u=(a.top+a.bottom)/2,f=i&&c.animateScale,h=f?0:this.innerRadius,g=f?0:this.outerRadius,{sharedOptions:m,includeOptions:b}=this._getSharedOptions(r,o);let v=this._getRotation(),y;for(y=0;y<r;++y)v+=this._circumference(y,i);for(y=r;y<r+n;++y){const _=this._circumference(y,i),x=e[y],w={x:d+this.offsetX,y:u+this.offsetY,startAngle:v,endAngle:v+_,circumference:_,outerRadius:g,innerRadius:h};b&&(w.options=m||this.resolveDataElementOptions(y,x.active?"active":o)),v+=_,this.updateElement(x,y,w,o)}}calculateTotal(){const e=this._cachedMeta,r=e.data;let n=0,o;for(o=0;o<r.length;o++){const i=e._parsed[o];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(o)&&!r[o].hidden&&(n+=Math.abs(i))}return n}calculateCircumference(e){const r=this._cachedMeta.total;return r>0&&!isNaN(e)?_e*(Math.abs(e)/r):0}getLabelAndValue(e){const r=this._cachedMeta,n=this.chart,o=n.data.labels||[],i=Jp(r._parsed[e],n.options.locale);return{label:o[e]||"",value:i}}getMaxBorderWidth(e){let r=0;const n=this.chart;let o,i,s,a,l;if(!e){for(o=0,i=n.data.datasets.length;o<i;++o)if(n.isDatasetVisible(o)){s=n.getDatasetMeta(o),e=s.data,a=s.controller;break}}if(!e)return 0;for(o=0,i=e.length;o<i;++o)l=a.resolveDataElementOptions(o),l.borderAlign!=="inner"&&(r=Math.max(r,l.borderWidth||0,l.hoverBorderWidth||0));return r}getMaxOffset(e){let r=0;for(let n=0,o=e.length;n<o;++n){const i=this.resolveDataElementOptions(n);r=Math.max(r,i.offset||0,i.hoverOffset||0)}return r}_getRingWeightOffset(e){let r=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(r+=this._getRingWeight(n));return r}_getRingWeight(e){return Math.max(fe(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}te(gn,"id","doughnut"),te(gn,"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"}),te(gn,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),te(gn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const r=e.data;if(r.labels.length&&r.datasets.length){const{labels:{pointStyle:n,color:o}}=e.legend.options;return r.labels.map((i,s)=>{const l=e.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:o,lineWidth:l.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,r,n){n.chart.toggleDataVisibility(r.index),n.chart.update()}}}});function fr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class os{constructor(e){te(this,"options");this.options=e||{}}static override(e){Object.assign(os.prototype,e)}init(){}formats(){return fr()}parse(){return fr()}format(){return fr()}add(){return fr()}diff(){return fr()}startOf(){return fr()}endOf(){return fr()}}var V0={_date:os};function Y0(t,e,r,n){const{controller:o,data:i,_sorted:s}=t,a=o._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(a&&e===a.axis&&e!=="r"&&s&&i.length){const c=a._reversePixels?jp:Hi;if(n){if(o._sharedOptions){const d=i[0],u=typeof d.getRange=="function"&&d.getRange(e);if(u){const f=c(i,e,r-u),h=c(i,e,r+u);return{lo:f.lo,hi:h.hi}}}}else{const d=c(i,e,r);if(l){const{vScale:u}=o._cachedMeta,{_parsed:f}=t,h=f.slice(0,d.lo+1).reverse().findIndex(m=>!Re(m[u.axis]));d.lo-=Math.max(0,h);const g=f.slice(d.hi).findIndex(m=>!Re(m[u.axis]));d.hi+=Math.max(0,g)}return d}}return{lo:0,hi:i.length-1}}function vo(t,e,r,n,o){const i=t.getSortedVisibleDatasetMetas(),s=r[e];for(let a=0,l=i.length;a<l;++a){const{index:c,data:d}=i[a],{lo:u,hi:f}=Y0(i[a],e,s,o);for(let h=u;h<=f;++h){const g=d[h];g.skip||n(g,c,h)}}}function U0(t){const e=t.indexOf("x")!==-1,r=t.indexOf("y")!==-1;return function(n,o){const i=e?Math.abs(n.x-o.x):0,s=r?Math.abs(n.y-o.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(s,2))}}function is(t,e,r,n,o){const i=[];return!o&&!t.isPointInArea(e)||vo(t,r,e,function(a,l,c){!o&&!Cl(a,t.chartArea,0)||a.inRange(e.x,e.y,n)&&i.push({element:a,datasetIndex:l,index:c})},!0),i}function q0(t,e,r,n){let o=[];function i(s,a,l){const{startAngle:c,endAngle:d}=s.getProps(["startAngle","endAngle"],n),{angle:u}=ll(s,{x:e.x,y:e.y});fo(u,c,d)&&o.push({element:s,datasetIndex:a,index:l})}return vo(t,r,e,i),o}function K0(t,e,r,n,o,i){let s=[];const a=U0(r);let l=Number.POSITIVE_INFINITY;function c(d,u,f){const h=d.inRange(e.x,e.y,o);if(n&&!h)return;const g=d.getCenterPoint(o);if(!(!!i||t.isPointInArea(g))&&!h)return;const b=a(e,g);b<l?(s=[{element:d,datasetIndex:u,index:f}],l=b):b===l&&s.push({element:d,datasetIndex:u,index:f})}return vo(t,r,e,c),s}function ss(t,e,r,n,o,i){return!i&&!t.isPointInArea(e)?[]:r==="r"&&!n?q0(t,e,r,o):K0(t,e,r,n,o,i)}function Hl(t,e,r,n,o){const i=[],s=r==="x"?"inXRange":"inYRange";let a=!1;return vo(t,r,e,(l,c,d)=>{l[s]&&l[s](e[r],o)&&(i.push({element:l,datasetIndex:c,index:d}),a=a||l.inRange(e.x,e.y,o))}),n&&!a?[]:i}var G0={modes:{index(t,e,r,n){const o=ur(e,t),i=r.axis||"x",s=r.includeInvisible||!1,a=r.intersect?is(t,o,i,n,s):ss(t,o,i,!1,n,s),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const d=a[0].index,u=c.data[d];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:d})}),l):[]},dataset(t,e,r,n){const o=ur(e,t),i=r.axis||"xy",s=r.includeInvisible||!1;let a=r.intersect?is(t,o,i,n,s):ss(t,o,i,!1,n,s);if(a.length>0){const l=a[0].datasetIndex,c=t.getDatasetMeta(l).data;a=[];for(let d=0;d<c.length;++d)a.push({element:c[d],datasetIndex:l,index:d})}return a},point(t,e,r,n){const o=ur(e,t),i=r.axis||"xy",s=r.includeInvisible||!1;return is(t,o,i,n,s)},nearest(t,e,r,n){const o=ur(e,t),i=r.axis||"xy",s=r.includeInvisible||!1;return ss(t,o,i,r.intersect,n,s)},x(t,e,r,n){const o=ur(e,t);return Hl(t,o,"x",r.intersect,n)},y(t,e,r,n){const o=ur(e,t);return Hl(t,o,"y",r.intersect,n)}}};const Rl=["left","top","right","bottom"];function pn(t,e){return t.filter(r=>r.pos===e)}function Vl(t,e){return t.filter(r=>Rl.indexOf(r.pos)===-1&&r.box.axis===e)}function mn(t,e){return t.sort((r,n)=>{const o=e?n:r,i=e?r:n;return o.weight===i.weight?o.index-i.index:o.weight-i.weight})}function X0(t){const e=[];let r,n,o,i,s,a;for(r=0,n=(t||[]).length;r<n;++r)o=t[r],{position:i,options:{stack:s,stackWeight:a=1}}=o,e.push({index:r,box:o,pos:i,horizontal:o.isHorizontal(),weight:o.weight,stack:s&&i+s,stackWeight:a});return e}function J0(t){const e={};for(const r of t){const{stack:n,pos:o,stackWeight:i}=r;if(!n||!Rl.includes(o))continue;const s=e[n]||(e[n]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=i}return e}function Z0(t,e){const r=J0(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;let i,s,a;for(i=0,s=t.length;i<s;++i){a=t[i];const{fullSize:l}=a.box,c=r[a.stack],d=c&&a.stackWeight/c.weight;a.horizontal?(a.width=d?d*n:l&&e.availableWidth,a.height=o):(a.width=n,a.height=d?d*o:l&&e.availableHeight)}return r}function Q0(t){const e=X0(t),r=mn(e.filter(c=>c.box.fullSize),!0),n=mn(pn(e,"left"),!0),o=mn(pn(e,"right")),i=mn(pn(e,"top"),!0),s=mn(pn(e,"bottom")),a=Vl(e,"x"),l=Vl(e,"y");return{fullSize:r,leftAndTop:n.concat(i),rightAndBottom:o.concat(l).concat(s).concat(a),chartArea:pn(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:i.concat(s).concat(a)}}function Yl(t,e,r,n){return Math.max(t[r],e[r])+Math.max(t[n],e[n])}function Ul(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function em(t,e,r,n){const{pos:o,box:i}=r,s=t.maxPadding;if(!ne(o)){r.size&&(t[o]-=r.size);const u=n[r.stack]||{size:0,count:1};u.size=Math.max(u.size,r.horizontal?i.height:i.width),r.size=u.size/u.count,t[o]+=r.size}i.getPadding&&Ul(s,i.getPadding());const a=Math.max(0,e.outerWidth-Yl(s,t,"left","right")),l=Math.max(0,e.outerHeight-Yl(s,t,"top","bottom")),c=a!==t.w,d=l!==t.h;return t.w=a,t.h=l,r.horizontal?{same:c,other:d}:{same:d,other:c}}function tm(t){const e=t.maxPadding;function r(n){const o=Math.max(e[n]-t[n],0);return t[n]+=o,o}t.y+=r("top"),t.x+=r("left"),r("right"),r("bottom")}function rm(t,e){const r=e.maxPadding;function n(o){const i={left:0,top:0,right:0,bottom:0};return o.forEach(s=>{i[s]=Math.max(e[s],r[s])}),i}return n(t?["left","right"]:["top","bottom"])}function bn(t,e,r,n){const o=[];let i,s,a,l,c,d;for(i=0,s=t.length,c=0;i<s;++i){a=t[i],l=a.box,l.update(a.width||e.w,a.height||e.h,rm(a.horizontal,e));const{same:u,other:f}=em(e,r,a,n);c|=u&&o.length,d=d||f,l.fullSize||o.push(a)}return c&&bn(o,e,r,n)||d}function xo(t,e,r,n,o){t.top=r,t.left=e,t.right=e+n,t.bottom=r+o,t.width=n,t.height=o}function ql(t,e,r,n){const o=r.padding;let{x:i,y:s}=e;for(const a of t){const l=a.box,c=n[a.stack]||{placed:0,weight:1},d=a.stackWeight/c.weight||1;if(a.horizontal){const u=e.w*d,f=c.size||l.height;lo(c.start)&&(s=c.start),l.fullSize?xo(l,o.left,s,r.outerWidth-o.right-o.left,f):xo(l,e.left+c.placed,s,u,f),c.start=s,c.placed+=u,s=l.bottom}else{const u=e.h*d,f=c.size||l.width;lo(c.start)&&(i=c.start),l.fullSize?xo(l,i,o.top,f,r.outerHeight-o.bottom-o.top):xo(l,i,e.top+c.placed,f,u),c.start=i,c.placed+=u,i=l.right}}e.x=i,e.y=s}var Kt={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(r){e.draw(r)}}]},t.boxes.push(e)},removeBox(t,e){const r=t.boxes?t.boxes.indexOf(e):-1;r!==-1&&t.boxes.splice(r,1)},configure(t,e,r){e.fullSize=r.fullSize,e.position=r.position,e.weight=r.weight},update(t,e,r,n){if(!t)return;const o=gt(t.options.layout.padding),i=Math.max(e-o.width,0),s=Math.max(r-o.height,0),a=Q0(t.boxes),l=a.vertical,c=a.horizontal;he(t.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const d=l.reduce((m,b)=>b.box.options&&b.box.options.display===!1?m:m+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:r,padding:o,availableWidth:i,availableHeight:s,vBoxMaxWidth:i/2/d,hBoxMaxHeight:s/2}),f=Object.assign({},o);Ul(f,gt(n));const h=Object.assign({maxPadding:f,w:i,h:s,x:o.left,y:o.top},o),g=Z0(l.concat(c),u);bn(a.fullSize,h,u,g),bn(l,h,u,g),bn(c,h,u,g)&&bn(l,h,u,g),tm(h),ql(a.leftAndTop,h,u,g),h.x+=h.w,h.y+=h.h,ql(a.rightAndBottom,h,u,g),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},he(a.chartArea,m=>{const b=m.box;Object.assign(b,t.chartArea),b.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class Kl{acquireContext(e,r){}releaseContext(e){return!1}addEventListener(e,r,n){}removeEventListener(e,r,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,r,n,o){return r=Math.max(0,r||e.width),n=n||e.height,{width:r,height:Math.max(0,o?Math.floor(r/o):n)}}isAttached(e){return!0}updateConfig(e){}}class nm extends Kl{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const wo="$chartjs",om={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Gl=t=>t===null||t==="";function im(t,e){const r=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t[wo]={initial:{height:n,width:o,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",r.boxSizing=r.boxSizing||"border-box",Gl(o)){const i=Pl(t,"width");i!==void 0&&(t.width=i)}if(Gl(n))if(t.style.height==="")t.height=t.width/(e||2);else{const i=Pl(t,"height");i!==void 0&&(t.height=i)}return t}const Xl=E0?{passive:!0}:!1;function sm(t,e,r){t&&t.addEventListener(e,r,Xl)}function am(t,e,r){t&&t.canvas&&t.canvas.removeEventListener(e,r,Xl)}function lm(t,e){const r=om[t.type]||t.type,{x:n,y:o}=ur(t,e);return{type:r,chart:e,native:t,x:n!==void 0?n:null,y:o!==void 0?o:null}}function ko(t,e){for(const r of t)if(r===e||r.contains(e))return!0}function cm(t,e,r){const n=t.canvas,o=new MutationObserver(i=>{let s=!1;for(const a of i)s=s||ko(a.addedNodes,n),s=s&&!ko(a.removedNodes,n);s&&r()});return o.observe(document,{childList:!0,subtree:!0}),o}function dm(t,e,r){const n=t.canvas,o=new MutationObserver(i=>{let s=!1;for(const a of i)s=s||ko(a.removedNodes,n),s=s&&!ko(a.addedNodes,n);s&&r()});return o.observe(document,{childList:!0,subtree:!0}),o}const yn=new Map;let Jl=0;function Zl(){const t=window.devicePixelRatio;t!==Jl&&(Jl=t,yn.forEach((e,r)=>{r.currentDevicePixelRatio!==t&&e()}))}function um(t,e){yn.size||window.addEventListener("resize",Zl),yn.set(t,e)}function fm(t){yn.delete(t),yn.size||window.removeEventListener("resize",Zl)}function hm(t,e,r){const n=t.canvas,o=n&&es(n);if(!o)return;const i=fl((a,l)=>{const c=o.clientWidth;r(a,l),c<o.clientWidth&&r()},window),s=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||i(c,d)});return s.observe(o),um(t,i),s}function as(t,e,r){r&&r.disconnect(),e==="resize"&&fm(t)}function gm(t,e,r){const n=t.canvas,o=fl(i=>{t.ctx!==null&&r(lm(i,t))},t);return sm(n,e,o),o}class pm extends Kl{acquireContext(e,r){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(im(e,r),n):null}releaseContext(e){const r=e.canvas;if(!r[wo])return!1;const n=r[wo].initial;["height","width"].forEach(i=>{const s=n[i];Re(s)?r.removeAttribute(i):r.setAttribute(i,s)});const o=n.style||{};return Object.keys(o).forEach(i=>{r.style[i]=o[i]}),r.width=r.width,delete r[wo],!0}addEventListener(e,r,n){this.removeEventListener(e,r);const o=e.$proxies||(e.$proxies={}),s={attach:cm,detach:dm,resize:hm}[r]||gm;o[r]=s(e,r,n)}removeEventListener(e,r){const n=e.$proxies||(e.$proxies={}),o=n[r];if(!o)return;({attach:as,detach:as,resize:as}[r]||am)(e,r,o),n[r]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,r,n,o){return S0(e,r,n,o)}isAttached(e){const r=e&&es(e);return!!(r&&r.isConnected)}}function mm(t){return!Qi()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?nm:pm}let vn=(Di=class{constructor(){te(this,"x");te(this,"y");te(this,"active",!1);te(this,"options");te(this,"$animations")}tooltipPosition(e){const{x:r,y:n}=this.getProps(["x","y"],e);return{x:r,y:n}}hasValue(){return uo(this.x)&&uo(this.y)}getProps(e,r){const n=this.$animations;if(!r||!n)return this;const o={};return e.forEach(i=>{o[i]=n[i]&&n[i].active()?n[i]._to:this[i]}),o}},te(Di,"defaults",{}),te(Di,"defaultRoutes"),Di);function bm(t,e){const r=t.options.ticks,n=ym(t),o=Math.min(r.maxTicksLimit||n,n),i=r.major.enabled?xm(e):[],s=i.length,a=i[0],l=i[s-1],c=[];if(s>o)return wm(e,c,i,s/o),c;const d=vm(i,e,o);if(s>0){let u,f;const h=s>1?Math.round((l-a)/(s-1)):null;for(Co(e,c,d,Re(h)?0:a-h,a),u=0,f=s-1;u<f;u++)Co(e,c,d,i[u],i[u+1]);return Co(e,c,d,l,Re(h)?e.length:l+h),c}return Co(e,c,d),c}function ym(t){const e=t.options.offset,r=t._tickSize(),n=t._length/r+(e?0:1),o=t._maxLength/r;return Math.floor(Math.min(n,o))}function vm(t,e,r){const n=km(t),o=e.length/r;if(!n)return Math.max(o,1);const i=Lp(n);for(let s=0,a=i.length-1;s<a;s++){const l=i[s];if(l>o)return l}return Math.max(o,1)}function xm(t){const e=[];let r,n;for(r=0,n=t.length;r<n;r++)t[r].major&&e.push(r);return e}function wm(t,e,r,n){let o=0,i=r[0],s;for(n=Math.ceil(n),s=0;s<t.length;s++)s===i&&(e.push(t[s]),o++,i=r[o*n])}function Co(t,e,r,n,o){const i=fe(n,0),s=Math.min(fe(o,t.length),t.length);let a=0,l,c,d;for(r=Math.ceil(r),o&&(l=o-n,r=l/Math.floor(l/r)),d=i;d<0;)a++,d=Math.round(i+a*r);for(c=Math.max(i,0);c<s;c++)c===d&&(e.push(t[c]),a++,d=Math.round(i+a*r))}function km(t){const e=t.length;let r,n;if(e<2)return!1;for(n=t[0],r=1;r<e;++r)if(t[r]-t[r-1]!==n)return!1;return n}const Cm=t=>t==="left"?"right":t==="right"?"left":t,Ql=(t,e,r)=>e==="top"||e==="left"?t[e]+r:t[e]-r,ec=(t,e)=>Math.min(e||t,t);function tc(t,e){const r=[],n=t.length/e,o=t.length;let i=0;for(;i<o;i+=n)r.push(t[Math.floor(i)]);return r}function _m(t,e,r){const n=t.ticks.length,o=Math.min(e,n-1),i=t._startPixel,s=t._endPixel,a=1e-6;let l=t.getPixelForTick(o),c;if(!(r&&(n===1?c=Math.max(l-i,s-l):e===0?c=(t.getPixelForTick(1)-l)/2:c=(l-t.getPixelForTick(o-1))/2,l+=o<e?c:-c,l<i-a||l>s+a)))return l}function Sm(t,e){he(t,r=>{const n=r.gc,o=n.length/2;let i;if(o>e){for(i=0;i<o;++i)delete r.data[n[i]];n.splice(0,o)}})}function xn(t){return t.drawTicks?t.tickLength:0}function rc(t,e){if(!t.display)return 0;const r=Ke(t.font,e),n=gt(t.padding);return(ze(t.text)?t.text.length:1)*r.lineHeight+n.height}function Em(t,e){return Mr(t,{scale:e,type:"scale"})}function Om(t,e,r){return Mr(t,{tick:r,index:e,type:"tick"})}function Tm(t,e,r){let n=hl(t);return(r&&e!=="right"||!r&&e==="right")&&(n=Cm(n)),n}function Mm(t,e,r,n){const{top:o,left:i,bottom:s,right:a,chart:l}=t,{chartArea:c,scales:d}=l;let u=0,f,h,g;const m=s-o,b=a-i;if(t.isHorizontal()){if(h=tt(n,i,a),ne(r)){const v=Object.keys(r)[0],y=r[v];g=d[v].getPixelForValue(y)+m-e}else r==="center"?g=(c.bottom+c.top)/2+m-e:g=Ql(t,r,e);f=a-i}else{if(ne(r)){const v=Object.keys(r)[0],y=r[v];h=d[v].getPixelForValue(y)-b+e}else r==="center"?h=(c.left+c.right)/2-b+e:h=Ql(t,r,e);g=tt(n,s,o),u=r==="left"?-Me:Me}return{titleX:h,titleY:g,maxWidth:f,rotation:u}}class _o extends vn{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,r){return e}getUserBounds(){let{_userMin:e,_userMax:r,_suggestedMin:n,_suggestedMax:o}=this;return e=xt(e,Number.POSITIVE_INFINITY),r=xt(r,Number.NEGATIVE_INFINITY),n=xt(n,Number.POSITIVE_INFINITY),o=xt(o,Number.NEGATIVE_INFINITY),{min:xt(e,n),max:xt(r,o),minDefined:It(e),maxDefined:It(r)}}getMinMax(e){let{min:r,max:n,minDefined:o,maxDefined:i}=this.getUserBounds(),s;if(o&&i)return{min:r,max:n};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)s=a[l].controller.getMinMax(this,e),o||(r=Math.min(r,s.min)),i||(n=Math.max(n,s.max));return r=i&&r>n?n:r,n=o&&r>n?r:n,{min:xt(r,xt(n,r)),max:xt(n,xt(r,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){be(this.options.beforeUpdate,[this])}update(e,r,n){const{beginAtZero:o,grace:i,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=r,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=d0(this,i,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?tc(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=bm(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,r,n;this.isHorizontal()?(r=this.left,n=this.right):(r=this.top,n=this.bottom,e=!e),this._startPixel=r,this._endPixel=n,this._reversePixels=e,this._length=n-r,this._alignToPixels=this.options.alignToPixels}afterUpdate(){be(this.options.afterUpdate,[this])}beforeSetDimensions(){be(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(){be(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),be(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){be(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const r=this.options.ticks;let n,o,i;for(n=0,o=e.length;n<o;n++)i=e[n],i.label=be(r.callback,[i.value,n,e],this)}afterTickToLabelConversion(){be(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){be(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,r=e.ticks,n=ec(this.ticks.length,e.ticks.maxTicksLimit),o=r.minRotation||0,i=r.maxRotation;let s=o,a,l,c;if(!this._isVisible()||!r.display||o>=i||n<=1||!this.isHorizontal()){this.labelRotation=o;return}const d=this._getLabelSizes(),u=d.widest.width,f=d.highest.height,h=lt(this.chart.width-u,0,this.maxWidth);a=e.offset?this.maxWidth/n:h/(n-1),u+6>a&&(a=h/(n-(e.offset?.5:1)),l=this.maxHeight-xn(e.grid)-r.padding-rc(e.title,this.chart.options.font),c=Math.sqrt(u*u+f*f),s=zp(Math.min(Math.asin(lt((d.highest.height+6)/a,-1,1)),Math.asin(lt(l/c,-1,1))-Math.asin(lt(f/c,-1,1)))),s=Math.max(o,Math.min(i,s))),this.labelRotation=s}afterCalculateLabelRotation(){be(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){be(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:r,options:{ticks:n,title:o,grid:i}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=rc(o,r.options.font);if(a?(e.width=this.maxWidth,e.height=xn(i)+l):(e.height=this.maxHeight,e.width=xn(i)+l),n.display&&this.ticks.length){const{first:c,last:d,widest:u,highest:f}=this._getLabelSizes(),h=n.padding*2,g=sr(this.labelRotation),m=Math.cos(g),b=Math.sin(g);if(a){const v=n.mirror?0:b*u.width+m*f.height;e.height=Math.min(this.maxHeight,e.height+v+h)}else{const v=n.mirror?0:m*u.width+b*f.height;e.width=Math.min(this.maxWidth,e.width+v+h)}this._calculatePadding(c,d,b,m)}}this._handleMargins(),a?(this.width=this._length=r.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=r.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,r,n,o){const{ticks:{align:i,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?c?(f=o*e.width,h=n*r.height):(f=n*e.height,h=o*r.width):i==="start"?h=r.width:i==="end"?f=e.width:i!=="inner"&&(f=e.width/2,h=r.width/2),this.paddingLeft=Math.max((f-d+s)*this.width/(this.width-d),0),this.paddingRight=Math.max((h-u+s)*this.width/(this.width-u),0)}else{let d=r.height/2,u=e.height/2;i==="start"?(d=0,u=e.height):i==="end"&&(d=r.height,u=0),this.paddingTop=d+s,this.paddingBottom=u+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(){be(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:r}=this.options;return r==="top"||r==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let r,n;for(r=0,n=e.length;r<n;r++)Re(e[r].label)&&(e.splice(r,1),n--,r--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const r=this.options.ticks.sampleSize;let n=this.ticks;r<n.length&&(n=tc(n,r)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,r,n){const{ctx:o,_longestTextCache:i}=this,s=[],a=[],l=Math.floor(r/ec(r,n));let c=0,d=0,u,f,h,g,m,b,v,y,_,x,w;for(u=0;u<r;u+=l){if(g=e[u].label,m=this._resolveTickFontOptions(u),o.font=b=m.string,v=i[b]=i[b]||{data:{},gc:[]},y=m.lineHeight,_=x=0,!Re(g)&&!ze(g))_=vl(o,v.data,v.gc,_,g),x=y;else if(ze(g))for(f=0,h=g.length;f<h;++f)w=g[f],!Re(w)&&!ze(w)&&(_=vl(o,v.data,v.gc,_,w),x+=y);s.push(_),a.push(x),c=Math.max(_,c),d=Math.max(x,d)}Sm(i,r);const S=s.indexOf(c),T=a.indexOf(d),N=M=>({width:s[M]||0,height:a[M]||0});return{first:N(0),last:N(r-1),widest:N(S),highest:N(T),widths:s,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,r){return NaN}getValueForPixel(e){}getPixelForTick(e){const r=this.ticks;return e<0||e>r.length-1?null:this.getPixelForValue(r[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const r=this._startPixel+e*this._length;return $p(this._alignToPixels?cr(this.chart,r,0):r)}getDecimalForPixel(e){const r=(e-this._startPixel)/this._length;return this._reversePixels?1-r:r}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:r}=this;return e<0&&r<0?r:e>0&&r>0?e:0}getContext(e){const r=this.ticks||[];if(e>=0&&e<r.length){const n=r[e];return n.$context||(n.$context=Om(this.getContext(),e,n))}return this.$context||(this.$context=Em(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,r=sr(this.labelRotation),n=Math.abs(Math.cos(r)),o=Math.abs(Math.sin(r)),i=this._getLabelSizes(),s=e.autoSkipPadding||0,a=i?i.widest.width+s:0,l=i?i.highest.height+s:0;return this.isHorizontal()?l*n>a*o?a/n:l/o:l*o<a*n?l/n:a/o}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const r=this.axis,n=this.chart,o=this.options,{grid:i,position:s,border:a}=o,l=i.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),f=xn(i),h=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,b=m/2,v=function(L){return cr(n,L,m)};let y,_,x,w,S,T,N,M,E,I,A,D;if(s==="top")y=v(this.bottom),T=this.bottom-f,M=y-b,I=v(e.top)+b,D=e.bottom;else if(s==="bottom")y=v(this.top),I=e.top,D=v(e.bottom)-b,T=y+b,M=this.top+f;else if(s==="left")y=v(this.right),S=this.right-f,N=y-b,E=v(e.left)+b,A=e.right;else if(s==="right")y=v(this.left),E=e.left,A=v(e.right)-b,S=y+b,N=this.left+f;else if(r==="x"){if(s==="center")y=v((e.top+e.bottom)/2+.5);else if(ne(s)){const L=Object.keys(s)[0],z=s[L];y=v(this.chart.scales[L].getPixelForValue(z))}I=e.top,D=e.bottom,T=y+b,M=T+f}else if(r==="y"){if(s==="center")y=v((e.left+e.right)/2);else if(ne(s)){const L=Object.keys(s)[0],z=s[L];y=v(this.chart.scales[L].getPixelForValue(z))}S=y-b,N=S-f,E=e.left,A=e.right}const O=fe(o.ticks.maxTicksLimit,u),P=Math.max(1,Math.ceil(u/O));for(_=0;_<u;_+=P){const L=this.getContext(_),z=i.setContext(L),B=a.setContext(L),j=z.lineWidth,$=z.color,H=B.dash||[],R=B.dashOffset,Y=z.tickWidth,U=z.tickColor,q=z.tickBorderDash||[],G=z.tickBorderDashOffset;x=_m(this,_,l),x!==void 0&&(w=cr(n,x,j),c?S=N=E=A=w:T=M=I=D=w,h.push({tx1:S,ty1:T,tx2:N,ty2:M,x1:E,y1:I,x2:A,y2:D,width:j,color:$,borderDash:H,borderDashOffset:R,tickWidth:Y,tickColor:U,tickBorderDash:q,tickBorderDashOffset:G}))}return this._ticksLength=u,this._borderValue=y,h}_computeLabelItems(e){const r=this.axis,n=this.options,{position:o,ticks:i}=n,s=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:d,mirror:u}=i,f=xn(n.grid),h=f+d,g=u?-d:h,m=-sr(this.labelRotation),b=[];let v,y,_,x,w,S,T,N,M,E,I,A,D="middle";if(o==="top")S=this.bottom-g,T=this._getXAxisLabelAlignment();else if(o==="bottom")S=this.top+g,T=this._getXAxisLabelAlignment();else if(o==="left"){const P=this._getYAxisLabelAlignment(f);T=P.textAlign,w=P.x}else if(o==="right"){const P=this._getYAxisLabelAlignment(f);T=P.textAlign,w=P.x}else if(r==="x"){if(o==="center")S=(e.top+e.bottom)/2+h;else if(ne(o)){const P=Object.keys(o)[0],L=o[P];S=this.chart.scales[P].getPixelForValue(L)+h}T=this._getXAxisLabelAlignment()}else if(r==="y"){if(o==="center")w=(e.left+e.right)/2-h;else if(ne(o)){const P=Object.keys(o)[0],L=o[P];w=this.chart.scales[P].getPixelForValue(L)}T=this._getYAxisLabelAlignment(f).textAlign}r==="y"&&(l==="start"?D="top":l==="end"&&(D="bottom"));const O=this._getLabelSizes();for(v=0,y=a.length;v<y;++v){_=a[v],x=_.label;const P=i.setContext(this.getContext(v));N=this.getPixelForTick(v)+i.labelOffset,M=this._resolveTickFontOptions(v),E=M.lineHeight,I=ze(x)?x.length:1;const L=I/2,z=P.color,B=P.textStrokeColor,j=P.textStrokeWidth;let $=T;s?(w=N,T==="inner"&&(v===y-1?$=this.options.reverse?"left":"right":v===0?$=this.options.reverse?"right":"left":$="center"),o==="top"?c==="near"||m!==0?A=-I*E+E/2:c==="center"?A=-O.highest.height/2-L*E+E:A=-O.highest.height+E/2:c==="near"||m!==0?A=E/2:c==="center"?A=O.highest.height/2-L*E:A=O.highest.height-I*E,u&&(A*=-1),m!==0&&!P.showLabelBackdrop&&(w+=E/2*Math.sin(m))):(S=N,A=(1-I)*E/2);let H;if(P.showLabelBackdrop){const R=gt(P.backdropPadding),Y=O.heights[v],U=O.widths[v];let q=A-R.top,G=0-R.left;switch(D){case"middle":q-=Y/2;break;case"bottom":q-=Y;break}switch(T){case"center":G-=U/2;break;case"right":G-=U;break;case"inner":v===y-1?G-=U:v>0&&(G-=U/2);break}H={left:G,top:q,width:U+R.width,height:Y+R.height,color:P.backdropColor}}b.push({label:x,font:M,textOffset:A,options:{rotation:m,color:z,strokeColor:B,strokeWidth:j,textAlign:$,textBaseline:D,translation:[w,S],backdrop:H}})}return b}_getXAxisLabelAlignment(){const{position:e,ticks:r}=this.options;if(-sr(this.labelRotation))return e==="top"?"left":"right";let o="center";return r.align==="start"?o="left":r.align==="end"?o="right":r.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(e){const{position:r,ticks:{crossAlign:n,mirror:o,padding:i}}=this.options,s=this._getLabelSizes(),a=e+i,l=s.widest.width;let c,d;return r==="left"?o?(d=this.right+i,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-a,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d=this.left)):r==="right"?o?(d=this.left+i,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+a,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,r=this.options.position;if(r==="left"||r==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(r==="top"||r==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:r},left:n,top:o,width:i,height:s}=this;r&&(e.save(),e.fillStyle=r,e.fillRect(n,o,i,s),e.restore())}getLineWidthForValue(e){const r=this.options.grid;if(!this._isVisible()||!r.display)return 0;const o=this.ticks.findIndex(i=>i.value===e);return o>=0?r.setContext(this.getContext(o)).lineWidth:0}drawGrid(e){const r=this.options.grid,n=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,s;const a=(l,c,d)=>{!d.width||!d.color||(n.save(),n.lineWidth=d.width,n.strokeStyle=d.color,n.setLineDash(d.borderDash||[]),n.lineDashOffset=d.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(r.display)for(i=0,s=o.length;i<s;++i){const l=o[i];r.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),r.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:e,ctx:r,options:{border:n,grid:o}}=this,i=n.setContext(this.getContext()),s=n.display?i.width:0;if(!s)return;const a=o.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,d,u,f;this.isHorizontal()?(c=cr(e,this.left,s)-s/2,d=cr(e,this.right,a)+a/2,u=f=l):(u=cr(e,this.top,s)-s/2,f=cr(e,this.bottom,a)+a/2,c=d=l),r.save(),r.lineWidth=i.width,r.strokeStyle=i.color,r.beginPath(),r.moveTo(c,u),r.lineTo(d,f),r.stroke(),r.restore()}drawLabels(e){if(!this.options.ticks.display)return;const n=this.ctx,o=this._computeLabelArea();o&&Ui(n,o);const i=this.getLabelItems(e);for(const s of i){const a=s.options,l=s.font,c=s.label,d=s.textOffset;go(n,c,0,d,l,a)}o&&qi(n)}drawTitle(){const{ctx:e,options:{position:r,title:n,reverse:o}}=this;if(!n.display)return;const i=Ke(n.font),s=gt(n.padding),a=n.align;let l=i.lineHeight/2;r==="bottom"||r==="center"||ne(r)?(l+=s.bottom,ze(n.text)&&(l+=i.lineHeight*(n.text.length-1))):l+=s.top;const{titleX:c,titleY:d,maxWidth:u,rotation:f}=Mm(this,l,r,a);go(e,n.text,0,0,i,{color:n.color,maxWidth:u,rotation:f,textAlign:Tm(a,r,o),textBaseline:"middle",translation:[c,d]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,r=e.ticks&&e.ticks.z||0,n=fe(e.grid&&e.grid.z,-1),o=fe(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==_o.prototype.draw?[{z:r,draw:i=>{this.draw(i)}}]:[{z:n,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:r,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(e){const r=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",o=[];let i,s;for(i=0,s=r.length;i<s;++i){const a=r[i];a[n]===this.id&&(!e||a.type===e)&&o.push(a)}return o}_resolveTickFontOptions(e){const r=this.options.ticks.setContext(this.getContext(e));return Ke(r.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class So{constructor(e,r,n){this.type=e,this.scope=r,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const r=Object.getPrototypeOf(e);let n;Am(r)&&(n=this.register(r));const o=this.items,i=e.id,s=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+e);return i in o||(o[i]=e,Nm(e,s,n),this.override&&ke.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){const r=this.items,n=e.id,o=this.scope;n in r&&delete r[n],o&&n in ke[o]&&(delete ke[o][n],this.override&&delete lr[n])}}function Nm(t,e,r){const n=on(Object.create(null),[r?ke.get(r):{},ke.get(e),t.defaults]);ke.set(e,n),t.defaultRoutes&&Pm(e,t.defaultRoutes),t.descriptors&&ke.describe(e,t.descriptors)}function Pm(t,e){Object.keys(e).forEach(r=>{const n=r.split("."),o=n.pop(),i=[t].concat(n).join("."),s=e[r].split("."),a=s.pop(),l=s.join(".");ke.route(i,o,l,a)})}function Am(t){return"id"in t&&"defaults"in t}class Dm{constructor(){this.controllers=new So(hn,"datasets",!0),this.elements=new So(vn,"elements"),this.plugins=new So(Object,"plugins"),this.scales=new So(_o,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,r,n){[...r].forEach(o=>{const i=n||this._getRegistryForType(o);n||i.isForType(o)||i===this.plugins&&o.id?this._exec(e,i,o):he(o,s=>{const a=n||this._getRegistryForType(s);this._exec(e,a,s)})})}_exec(e,r,n){const o=ji(e);be(n["before"+o],[],n),r[e](n),be(n["after"+o],[],n)}_getRegistryForType(e){for(let r=0;r<this._typedRegistries.length;r++){const n=this._typedRegistries[r];if(n.isForType(e))return n}return this.plugins}_get(e,r,n){const o=r.get(e);if(o===void 0)throw new Error('"'+e+'" is not a registered '+n+".");return o}}var wt=new Dm;class Im{constructor(){this._init=[]}notify(e,r,n,o){r==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const i=o?this._descriptors(e).filter(o):this._descriptors(e),s=this._notify(i,e,r,n);return r==="afterDestroy"&&(this._notify(i,e,"stop"),this._notify(this._init,e,"uninstall")),s}_notify(e,r,n,o){o=o||{};for(const i of e){const s=i.plugin,a=s[n],l=[r,o,i.options];if(be(a,l,s)===!1&&o.cancelable)return!1}return!0}invalidate(){Re(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const r=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),r}_createDescriptors(e,r){const n=e&&e.config,o=fe(n.options&&n.options.plugins,{}),i=Lm(n);return o===!1&&!r?[]:zm(e,i,o,r)}_notifyStateChanges(e){const r=this._oldCache||[],n=this._cache,o=(i,s)=>i.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(o(r,n),e,"stop"),this._notify(o(n,r),e,"start")}}function Lm(t){const e={},r=[],n=Object.keys(wt.plugins.items);for(let i=0;i<n.length;i++)r.push(wt.getPlugin(n[i]));const o=t.plugins||[];for(let i=0;i<o.length;i++){const s=o[i];r.indexOf(s)===-1&&(r.push(s),e[s.id]=!0)}return{plugins:r,localIds:e}}function Fm(t,e){return!e&&t===!1?null:t===!0?{}:t}function zm(t,{plugins:e,localIds:r},n,o){const i=[],s=t.getContext();for(const a of e){const l=a.id,c=Fm(n[l],o);c!==null&&i.push({plugin:a,options:Bm(t.config,{plugin:a,local:r[l]},c,s)})}return i}function Bm(t,{plugin:e,local:r},n,o){const i=t.pluginScopeKeys(e),s=t.getOptionScopes(n,i);return r&&e.defaults&&s.push(e.defaults),t.createResolver(s,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ls(t,e){const r=ke.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||r.indexAxis||"x"}function $m(t,e){let r=t;return t==="_index_"?r=e:t==="_value_"&&(r=e==="x"?"y":"x"),r}function jm(t,e){return t===e?"_index_":"_value_"}function nc(t){if(t==="x"||t==="y"||t==="r")return t}function Wm(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function cs(t,...e){if(nc(t))return t;for(const r of e){const n=r.axis||Wm(r.position)||t.length>1&&nc(t[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function oc(t,e,r){if(r[e+"AxisID"]===t)return{axis:e}}function Hm(t,e){if(e.data&&e.data.datasets){const r=e.data.datasets.filter(n=>n.xAxisID===t||n.yAxisID===t);if(r.length)return oc(t,"x",r[0])||oc(t,"y",r[0])}return{}}function Rm(t,e){const r=lr[t.type]||{scales:{}},n=e.scales||{},o=ls(t.type,e),i=Object.create(null);return Object.keys(n).forEach(s=>{const a=n[s];if(!ne(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=cs(s,a,Hm(s,t),ke.scales[a.type]),c=jm(l,o),d=r.scales||{};i[s]=sn(Object.create(null),[{axis:l},a,d[l],d[c]])}),t.data.datasets.forEach(s=>{const a=s.type||t.type,l=s.indexAxis||ls(a,e),d=(lr[a]||{}).scales||{};Object.keys(d).forEach(u=>{const f=$m(u,l),h=s[f+"AxisID"]||f;i[h]=i[h]||Object.create(null),sn(i[h],[{axis:f},n[h],d[u]])})}),Object.keys(i).forEach(s=>{const a=i[s];sn(a,[ke.scales[a.type],ke.scale])}),i}function ic(t){const e=t.options||(t.options={});e.plugins=fe(e.plugins,{}),e.scales=Rm(t,e)}function sc(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Vm(t){return t=t||{},t.data=sc(t.data),ic(t),t}const ac=new Map,lc=new Set;function Eo(t,e){let r=ac.get(t);return r||(r=e(),ac.set(t,r),lc.add(r)),r}const wn=(t,e,r)=>{const n=an(e,r);n!==void 0&&t.add(n)};class Ym{constructor(e){this._config=Vm(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=sc(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),ic(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Eo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,r){return Eo(`${e}.transition.${r}`,()=>[[`datasets.${e}.transitions.${r}`,`transitions.${r}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,r){return Eo(`${e}-${r}`,()=>[[`datasets.${e}.elements.${r}`,`datasets.${e}`,`elements.${r}`,""]])}pluginScopeKeys(e){const r=e.id,n=this.type;return Eo(`${n}-plugin-${r}`,()=>[[`plugins.${r}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,r){const n=this._scopeCache;let o=n.get(e);return(!o||r)&&(o=new Map,n.set(e,o)),o}getOptionScopes(e,r,n){const{options:o,type:i}=this,s=this._cachedScopes(e,n),a=s.get(r);if(a)return a;const l=new Set;r.forEach(d=>{e&&(l.add(e),d.forEach(u=>wn(l,e,u))),d.forEach(u=>wn(l,o,u)),d.forEach(u=>wn(l,lr[i]||{},u)),d.forEach(u=>wn(l,ke,u)),d.forEach(u=>wn(l,Vi,u))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),lc.has(r)&&s.set(r,c),c}chartOptionScopes(){const{options:e,type:r}=this;return[e,lr[r]||{},ke.datasets[r]||{},{type:r},ke,Vi]}resolveNamedOptions(e,r,n,o=[""]){const i={$shared:!0},{resolver:s,subPrefixes:a}=cc(this._resolverCache,e,o);let l=s;if(qm(s,r)){i.$shared=!1,n=qt(n)?n():n;const c=this.createResolver(e,n,a);l=Nr(s,n,c)}for(const c of r)i[c]=l[c];return i}createResolver(e,r,n=[""],o){const{resolver:i}=cc(this._resolverCache,e,n);return ne(r)?Nr(i,r,void 0,o):i}}function cc(t,e,r){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=r.join();let i=n.get(o);return i||(i={resolver:Xi(e,r),subPrefixes:r.filter(a=>!a.toLowerCase().includes("hover"))},n.set(o,i)),i}const Um=t=>ne(t)&&Object.getOwnPropertyNames(t).some(e=>qt(t[e]));function qm(t,e){const{isScriptable:r,isIndexable:n}=_l(t);for(const o of e){const i=r(o),s=n(o),a=(s||i)&&t[o];if(i&&(qt(a)||Um(a))||s&&ze(a))return!0}return!1}var Km="4.4.8";const Gm=["top","bottom","left","right","chartArea"];function dc(t,e){return t==="top"||t==="bottom"||Gm.indexOf(t)===-1&&e==="x"}function uc(t,e){return function(r,n){return r[t]===n[t]?r[e]-n[e]:r[t]-n[t]}}function fc(t){const e=t.chart,r=e.options.animation;e.notifyPlugins("afterRender"),be(r&&r.onComplete,[t],e)}function Xm(t){const e=t.chart,r=e.options.animation;be(r&&r.onProgress,[t],e)}function hc(t){return Qi()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Oo={},gc=t=>{const e=hc(t);return Object.values(Oo).filter(r=>r.canvas===e).pop()};function Jm(t,e,r){const n=Object.keys(t);for(const o of n){const i=+o;if(i>=e){const s=t[o];delete t[o],(r>0||i>e)&&(t[i+r]=s)}}}function Zm(t,e,r,n){return!r||t.type==="mouseout"?null:n?e:t}function To(t,e,r){return t.options.clip?t[r]:e[r]}function Qm(t,e){const{xScale:r,yScale:n}=t;return r&&n?{left:To(r,e,"left"),right:To(r,e,"right"),top:To(n,e,"top"),bottom:To(n,e,"bottom")}:e}let Mo=(nr=class{static register(...e){wt.add(...e),pc()}static unregister(...e){wt.remove(...e),pc()}constructor(e,r){const n=this.config=new Ym(r),o=hc(e),i=gc(o);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const s=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||mm(o)),this.platform.updateConfig(n);const a=this.platform.acquireContext(o,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,d=l&&l.width;if(this.id=Op(),this.ctx=a,this.canvas=l,this.width=d,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 Im,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Vp(u=>this.update(u),s.resizeDelay||0),this._dataChanges=[],Oo[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Lt.listen(this,"complete",fc),Lt.listen(this,"progress",Xm),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:r},width:n,height:o,_aspectRatio:i}=this;return Re(e)?r&&i?i:o?n/o:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return wt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Nl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return xl(this.canvas,this.ctx),this}stop(){return Lt.stop(this),this}resize(e,r){Lt.running(this)?this._resizeBeforeDraw={width:e,height:r}:this._resize(e,r)}_resize(e,r){const n=this.options,o=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(o,e,r,i),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Nl(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),be(n.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const r=this.options.scales||{};he(r,(n,o)=>{n.id=o})}buildOrUpdateScales(){const e=this.options,r=e.scales,n=this.scales,o=Object.keys(n).reduce((s,a)=>(s[a]=!1,s),{});let i=[];r&&(i=i.concat(Object.keys(r).map(s=>{const a=r[s],l=cs(s,a),c=l==="r",d=l==="x";return{options:a,dposition:c?"chartArea":d?"bottom":"left",dtype:c?"radialLinear":d?"category":"linear"}}))),he(i,s=>{const a=s.options,l=a.id,c=cs(l,a),d=fe(a.type,s.dtype);(a.position===void 0||dc(a.position,c)!==dc(s.dposition))&&(a.position=s.dposition),o[l]=!0;let u=null;if(l in n&&n[l].type===d)u=n[l];else{const f=wt.getScale(d);u=new f({id:l,type:d,ctx:this.ctx,chart:this}),n[u.id]=u}u.init(a,e)}),he(o,(s,a)=>{s||delete n[a]}),he(n,s=>{Kt.configure(this,s,s.options),Kt.addBox(this,s)})}_updateMetasets(){const e=this._metasets,r=this.data.datasets.length,n=e.length;if(e.sort((o,i)=>o.index-i.index),n>r){for(let o=r;o<n;++o)this._destroyDatasetMeta(o);e.splice(r,n-r)}this._sortedMetasets=e.slice(0).sort(uc("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:r}}=this;e.length>r.length&&delete this._stacks,e.forEach((n,o)=>{r.filter(i=>i===n._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){const e=[],r=this.data.datasets;let n,o;for(this._removeUnreferencedMetasets(),n=0,o=r.length;n<o;n++){const i=r[n];let s=this.getDatasetMeta(n);const a=i.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(n),s=this.getDatasetMeta(n)),s.type=a,s.indexAxis=i.indexAxis||ls(a,this.options),s.order=i.order||0,s.index=n,s.label=""+i.label,s.visible=this.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const l=wt.getController(a),{datasetElementType:c,dataElementType:d}=ke.datasets[a];Object.assign(l,{dataElementType:wt.getElement(d),datasetElementType:c&&wt.getElement(c)}),s.controller=new l(this,n),e.push(s.controller)}}return this._updateMetasets(),e}_resetElements(){he(this.data.datasets,(e,r)=>{this.getDatasetMeta(r).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const r=this.config;r.update();const n=this._options=r.createResolver(r.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,d=this.data.datasets.length;c<d;c++){const{controller:u}=this.getDatasetMeta(c),f=!o&&i.indexOf(u)===-1;u.buildOrUpdateElements(f),s=Math.max(+u.getMaxOverflow(),s)}s=this._minPadding=n.layout.autoPadding?s:0,this._updateLayout(s),o||he(i,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(uc("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){he(this.scales,e=>{Kt.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,r=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!il(r,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,r=this._getUniformDataChanges()||[];for(const{method:n,start:o,count:i}of r){const s=n==="_removeElements"?-i:i;Jm(e,o,s)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const r=this.data.datasets.length,n=i=>new Set(e.filter(s=>s[0]===i).map((s,a)=>a+","+s.splice(1).join(","))),o=n(0);for(let i=1;i<r;i++)if(!il(o,n(i)))return;return Array.from(o).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Kt.update(this,this.width,this.height,e);const r=this.chartArea,n=r.width<=0||r.height<=0;this._layers=[],he(this.boxes,o=>{n&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,i)=>{o._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let r=0,n=this.data.datasets.length;r<n;++r)this.getDatasetMeta(r).controller.configure();for(let r=0,n=this.data.datasets.length;r<n;++r)this._updateDataset(r,qt(e)?e({datasetIndex:r}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,r){const n=this.getDatasetMeta(e),o={meta:n,index:e,mode:r,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(n.controller._update(r),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Lt.has(this)?this.attached&&!Lt.running(this)&&Lt.start(this):(this.draw(),fc({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:n,height:o}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,o)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const r=this._layers;for(e=0;e<r.length&&r[e].z<=0;++e)r[e].draw(this.chartArea);for(this._drawDatasets();e<r.length;++e)r[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const r=this._sortedMetasets,n=[];let o,i;for(o=0,i=r.length;o<i;++o){const s=r[o];(!e||s.visible)&&n.push(s)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let r=e.length-1;r>=0;--r)this._drawDataset(e[r]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const r=this.ctx,n=e._clip,o=!n.disabled,i=Qm(e,this.chartArea),s={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(o&&Ui(r,{left:n.left===!1?0:i.left-n.left,right:n.right===!1?this.width:i.right+n.right,top:n.top===!1?0:i.top-n.top,bottom:n.bottom===!1?this.height:i.bottom+n.bottom}),e.controller.draw(),o&&qi(r),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return Cl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,r,n,o){const i=G0.modes[r];return typeof i=="function"?i(this,e,n,o):[]}getDatasetMeta(e){const r=this.data.datasets[e],n=this._metasets;let o=n.filter(i=>i&&i._dataset===r).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r&&r.order||0,index:e,_dataset:r,_parsed:[],_sorted:!1},n.push(o)),o}getContext(){return this.$context||(this.$context=Mr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const r=this.data.datasets[e];if(!r)return!1;const n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!r.hidden}setDatasetVisibility(e,r){const n=this.getDatasetMeta(e);n.hidden=!r}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,r,n){const o=n?"show":"hide",i=this.getDatasetMeta(e),s=i.controller._resolveAnimations(void 0,o);lo(r)?(i.data[r].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),s.update(i,{visible:n}),this.update(a=>a.datasetIndex===e?o:void 0))}hide(e,r){this._updateVisibility(e,r,!1)}show(e,r){this._updateVisibility(e,r,!0)}_destroyDatasetMeta(e){const r=this._metasets[e];r&&r.controller&&r.controller._destroy(),delete this._metasets[e]}_stop(){let e,r;for(this.stop(),Lt.remove(this),e=0,r=this.data.datasets.length;e<r;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:r}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),xl(e,r),this.platform.releaseContext(r),this.canvas=null,this.ctx=null),delete Oo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,r=this.platform,n=(i,s)=>{r.addEventListener(this,i,s),e[i]=s},o=(i,s,a)=>{i.offsetX=s,i.offsetY=a,this._eventHandler(i)};he(this.options.events,i=>n(i,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,r=this.platform,n=(l,c)=>{r.addEventListener(this,l,c),e[l]=c},o=(l,c)=>{e[l]&&(r.removeEventListener(this,l,c),delete e[l])},i=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{o("attach",a),this.attached=!0,this.resize(),n("resize",i),n("detach",s)};s=()=>{this.attached=!1,o("resize",i),this._stop(),this._resize(0,0),n("attach",a)},r.isAttached(this.canvas)?a():s()}unbindEvents(){he(this._listeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._listeners={},he(this._responsiveListeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,r,n){const o=n?"set":"remove";let i,s,a,l;for(r==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+o+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){s=e[a];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[o+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const r=this._active||[],n=e.map(({datasetIndex:i,index:s})=>{const a=this.getDatasetMeta(i);if(!a)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:a.data[s],index:s}});!so(n,r)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,r))}notifyPlugins(e,r,n){return this._plugins.notify(this,e,r,n)}isPluginEnabled(e){return this._plugins._cache.filter(r=>r.plugin.id===e).length===1}_updateHoverStyles(e,r,n){const o=this.options.hover,i=(l,c)=>l.filter(d=>!c.some(u=>d.datasetIndex===u.datasetIndex&&d.index===u.index)),s=i(r,e),a=n?e:i(e,r);s.length&&this.updateHoverStyle(s,o.mode,!1),a.length&&o.mode&&this.updateHoverStyle(a,o.mode,!0)}_eventHandler(e,r){const n={event:e,replay:r,cancelable:!0,inChartArea:this.isPointInArea(e)},o=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,o)===!1)return;const i=this._handleEvent(e,r,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,o),(i||n.changed)&&this.render(),this}_handleEvent(e,r,n){const{_active:o=[],options:i}=this,s=r,a=this._getActiveElements(e,o,n,s),l=Dp(e),c=Zm(e,this._lastEvent,n,l);n&&(this._lastEvent=null,be(i.onHover,[e,a,this],this),l&&be(i.onClick,[e,a,this],this));const d=!so(a,o);return(d||r)&&(this._active=a,this._updateHoverStyles(a,o,r)),this._lastEvent=c,d}_getActiveElements(e,r,n,o){if(e.type==="mouseout")return[];if(!n)return r;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,o)}},te(nr,"defaults",ke),te(nr,"instances",Oo),te(nr,"overrides",lr),te(nr,"registry",wt),te(nr,"version",Km),te(nr,"getChart",gc),nr);function pc(){return he(Mo.instances,t=>t._plugins.invalidate())}function eb(t,e,r){const{startAngle:n,pixelMargin:o,x:i,y:s,outerRadius:a,innerRadius:l}=e;let c=o/a;t.beginPath(),t.arc(i,s,a,n-c,r+c),l>o?(c=o/l,t.arc(i,s,l,r+c,n-c,!0)):t.arc(i,s,o,r+Me,n-Me),t.closePath(),t.clip()}function tb(t){return Gi(t,["outerStart","outerEnd","innerStart","innerEnd"])}function rb(t,e,r,n){const o=tb(t.options.borderRadius),i=(r-e)/2,s=Math.min(i,n*e/2),a=l=>{const c=(r-Math.min(i,l))*n/2;return lt(l,0,Math.min(i,c))};return{outerStart:a(o.outerStart),outerEnd:a(o.outerEnd),innerStart:lt(o.innerStart,0,s),innerEnd:lt(o.innerEnd,0,s)}}function Ar(t,e,r,n){return{x:r+t*Math.cos(e),y:n+t*Math.sin(e)}}function No(t,e,r,n,o,i){const{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:d}=e,u=Math.max(e.outerRadius+n+r-c,0),f=d>0?d+n+r+c:0;let h=0;const g=o-l;if(n){const P=d>0?d-n:0,L=u>0?u-n:0,z=(P+L)/2,B=z!==0?g*z/(z+n):g;h=(g-B)/2}const m=Math.max(.001,g*u-r/De)/u,b=(g-m)/2,v=l+b+h,y=o-b-h,{outerStart:_,outerEnd:x,innerStart:w,innerEnd:S}=rb(e,f,u,y-v),T=u-_,N=u-x,M=v+_/T,E=y-x/N,I=f+w,A=f+S,D=v+w/I,O=y-S/A;if(t.beginPath(),i){const P=(M+E)/2;if(t.arc(s,a,u,M,P),t.arc(s,a,u,P,E),x>0){const j=Ar(N,E,s,a);t.arc(j.x,j.y,x,E,y+Me)}const L=Ar(A,y,s,a);if(t.lineTo(L.x,L.y),S>0){const j=Ar(A,O,s,a);t.arc(j.x,j.y,S,y+Me,O+Math.PI)}const z=(y-S/f+(v+w/f))/2;if(t.arc(s,a,f,y-S/f,z,!0),t.arc(s,a,f,z,v+w/f,!0),w>0){const j=Ar(I,D,s,a);t.arc(j.x,j.y,w,D+Math.PI,v-Me)}const B=Ar(T,v,s,a);if(t.lineTo(B.x,B.y),_>0){const j=Ar(T,M,s,a);t.arc(j.x,j.y,_,v-Me,M)}}else{t.moveTo(s,a);const P=Math.cos(M)*u+s,L=Math.sin(M)*u+a;t.lineTo(P,L);const z=Math.cos(E)*u+s,B=Math.sin(E)*u+a;t.lineTo(z,B)}t.closePath()}function nb(t,e,r,n,o){const{fullCircles:i,startAngle:s,circumference:a}=e;let l=e.endAngle;if(i){No(t,e,r,n,l,o);for(let c=0;c<i;++c)t.fill();isNaN(a)||(l=s+(a%_e||_e))}return No(t,e,r,n,l,o),t.fill(),l}function ob(t,e,r,n,o){const{fullCircles:i,startAngle:s,circumference:a,options:l}=e,{borderWidth:c,borderJoinStyle:d,borderDash:u,borderDashOffset:f}=l,h=l.borderAlign==="inner";if(!c)return;t.setLineDash(u||[]),t.lineDashOffset=f,h?(t.lineWidth=c*2,t.lineJoin=d||"round"):(t.lineWidth=c,t.lineJoin=d||"bevel");let g=e.endAngle;if(i){No(t,e,r,n,g,o);for(let m=0;m<i;++m)t.stroke();isNaN(a)||(g=s+(a%_e||_e))}h&&eb(t,e,g),i||(No(t,e,r,n,g,o),t.stroke())}class kn extends vn{constructor(r){super();te(this,"circumference");te(this,"endAngle");te(this,"fullCircles");te(this,"innerRadius");te(this,"outerRadius");te(this,"pixelMargin");te(this,"startAngle");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,r&&Object.assign(this,r)}inRange(r,n,o){const i=this.getProps(["x","y"],o),{angle:s,distance:a}=ll(i,{x:r,y:n}),{startAngle:l,endAngle:c,innerRadius:d,outerRadius:u,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],o),h=(this.options.spacing+this.options.borderWidth)/2,g=fe(f,c-l),m=fo(s,l,c)&&l!==c,b=g>=_e||m,v=ln(a,d+h,u+h);return b&&v}getCenterPoint(r){const{x:n,y:o,startAngle:i,endAngle:s,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],r),{offset:c,spacing:d}=this.options,u=(i+s)/2,f=(a+l+d+c)/2;return{x:n+Math.cos(u)*f,y:o+Math.sin(u)*f}}tooltipPosition(r){return this.getCenterPoint(r)}draw(r){const{options:n,circumference:o}=this,i=(n.offset||0)/4,s=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=o>_e?Math.floor(o/_e):0,o===0||this.innerRadius<0||this.outerRadius<0)return;r.save();const l=(this.startAngle+this.endAngle)/2;r.translate(Math.cos(l)*i,Math.sin(l)*i);const c=1-Math.sin(Math.min(De,o||0)),d=i*c;r.fillStyle=n.backgroundColor,r.strokeStyle=n.borderColor,nb(r,this,d,s,a),ob(r,this,d,s,a),r.restore()}}te(kn,"id","arc"),te(kn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),te(kn,"defaultRoutes",{backgroundColor:"backgroundColor"}),te(kn,"descriptors",{_scriptable:!0,_indexable:r=>r!=="borderDash"});const mc=(t,e)=>{let{boxHeight:r=e,boxWidth:n=e}=t;return t.usePointStyle&&(r=Math.min(r,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:r,itemHeight:Math.max(e,r)}},ib=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class bc extends vn{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,r,n){this.maxWidth=e,this.maxHeight=r,this._margins=n,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 e=this.options.labels||{};let r=be(e.generateLabels,[this.chart],this)||[];e.filter&&(r=r.filter(n=>e.filter(n,this.chart.data))),e.sort&&(r=r.sort((n,o)=>e.sort(n,o,this.chart.data))),this.options.reverse&&r.reverse(),this.legendItems=r}fit(){const{options:e,ctx:r}=this;if(!e.display){this.width=this.height=0;return}const n=e.labels,o=Ke(n.font),i=o.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=mc(n,i);let c,d;r.font=o.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(s,i,a,l)+10):(d=this.maxHeight,c=this._fitCols(s,o,a,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(d,e.maxHeight||this.maxHeight)}_fitRows(e,r,n,o){const{ctx:i,maxWidth:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=o+a;let u=e;i.textAlign="left",i.textBaseline="middle";let f=-1,h=-d;return this.legendItems.forEach((g,m)=>{const b=n+r/2+i.measureText(g.text).width;(m===0||c[c.length-1]+b+2*a>s)&&(u+=d,c[c.length-(m>0?0:1)]=0,h+=d,f++),l[m]={left:0,top:h,row:f,width:b,height:o},c[c.length-1]+=b+a}),u}_fitCols(e,r,n,o){const{ctx:i,maxHeight:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=s-e;let u=a,f=0,h=0,g=0,m=0;return this.legendItems.forEach((b,v)=>{const{itemWidth:y,itemHeight:_}=sb(n,r,i,b,o);v>0&&h+_+2*a>d&&(u+=f+a,c.push({width:f,height:h}),g+=f+a,m++,f=h=0),l[v]={left:g,top:h,col:m,width:y,height:_},f=Math.max(f,y),h+=_+a}),u+=f,c.push({width:f,height:h}),u}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:r,options:{align:n,labels:{padding:o},rtl:i}}=this,s=Pr(i,this.left,this.width);if(this.isHorizontal()){let a=0,l=tt(n,this.left+o,this.right-this.lineWidths[a]);for(const c of r)a!==c.row&&(a=c.row,l=tt(n,this.left+o,this.right-this.lineWidths[a])),c.top+=this.top+e+o,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+o}else{let a=0,l=tt(n,this.top+e+o,this.bottom-this.columnSizes[a].height);for(const c of r)c.col!==a&&(a=c.col,l=tt(n,this.top+e+o,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+o,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+o}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Ui(e,this),this._draw(),qi(e)}}_draw(){const{options:e,columnSizes:r,lineWidths:n,ctx:o}=this,{align:i,labels:s}=e,a=ke.color,l=Pr(e.rtl,this.left,this.width),c=Ke(s.font),{padding:d}=s,u=c.size,f=u/2;let h;this.drawTitle(),o.textAlign=l.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=c.string;const{boxWidth:g,boxHeight:m,itemHeight:b}=mc(s,u),v=function(S,T,N){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;o.save();const M=fe(N.lineWidth,1);if(o.fillStyle=fe(N.fillStyle,a),o.lineCap=fe(N.lineCap,"butt"),o.lineDashOffset=fe(N.lineDashOffset,0),o.lineJoin=fe(N.lineJoin,"miter"),o.lineWidth=M,o.strokeStyle=fe(N.strokeStyle,a),o.setLineDash(fe(N.lineDash,[])),s.usePointStyle){const E={radius:m*Math.SQRT2/2,pointStyle:N.pointStyle,rotation:N.rotation,borderWidth:M},I=l.xPlus(S,g/2),A=T+f;kl(o,E,I,A,s.pointStyleWidth&&g)}else{const E=T+Math.max((u-m)/2,0),I=l.leftForLtr(S,g),A=un(N.borderRadius);o.beginPath(),Object.values(A).some(D=>D!==0)?Ki(o,{x:I,y:E,w:g,h:m,radius:A}):o.rect(I,E,g,m),o.fill(),M!==0&&o.stroke()}o.restore()},y=function(S,T,N){go(o,N.text,S,T+b/2,c,{strikethrough:N.hidden,textAlign:l.textAlign(N.textAlign)})},_=this.isHorizontal(),x=this._computeTitleHeight();_?h={x:tt(i,this.left+d,this.right-n[0]),y:this.top+d+x,line:0}:h={x:this.left+d,y:tt(i,this.top+x+d,this.bottom-r[0].height),line:0},Al(this.ctx,e.textDirection);const w=b+d;this.legendItems.forEach((S,T)=>{o.strokeStyle=S.fontColor,o.fillStyle=S.fontColor;const N=o.measureText(S.text).width,M=l.textAlign(S.textAlign||(S.textAlign=s.textAlign)),E=g+f+N;let I=h.x,A=h.y;l.setWidth(this.width),_?T>0&&I+E+d>this.right&&(A=h.y+=w,h.line++,I=h.x=tt(i,this.left+d,this.right-n[h.line])):T>0&&A+w>this.bottom&&(I=h.x=I+r[h.line].width+d,h.line++,A=h.y=tt(i,this.top+x+d,this.bottom-r[h.line].height));const D=l.x(I);if(v(D,A,S),I=Yp(M,I+g+f,_?I+E:this.right,e.rtl),y(l.x(I),A,S),_)h.x+=E+d;else if(typeof S.text!="string"){const O=c.lineHeight;h.y+=yc(S,O)+d}else h.y+=w}),Dl(this.ctx,e.textDirection)}drawTitle(){const e=this.options,r=e.title,n=Ke(r.font),o=gt(r.padding);if(!r.display)return;const i=Pr(e.rtl,this.left,this.width),s=this.ctx,a=r.position,l=n.size/2,c=o.top+l;let d,u=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),d=this.top+c,u=tt(e.align,u,this.right-f);else{const g=this.columnSizes.reduce((m,b)=>Math.max(m,b.height),0);d=c+tt(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}const h=tt(a,u,u+f);s.textAlign=i.textAlign(hl(a)),s.textBaseline="middle",s.strokeStyle=r.color,s.fillStyle=r.color,s.font=n.string,go(s,r.text,h,d,n)}_computeTitleHeight(){const e=this.options.title,r=Ke(e.font),n=gt(e.padding);return e.display?r.lineHeight+n.height:0}_getLegendItemAt(e,r){let n,o,i;if(ln(e,this.left,this.right)&&ln(r,this.top,this.bottom)){for(i=this.legendHitBoxes,n=0;n<i.length;++n)if(o=i[n],ln(e,o.left,o.left+o.width)&&ln(r,o.top,o.top+o.height))return this.legendItems[n]}return null}handleEvent(e){const r=this.options;if(!cb(e.type,r))return;const n=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const o=this._hoveredItem,i=ib(o,n);o&&!i&&be(r.onLeave,[e,o,this],this),this._hoveredItem=n,n&&!i&&be(r.onHover,[e,n,this],this)}else n&&be(r.onClick,[e,n,this],this)}}function sb(t,e,r,n,o){const i=ab(n,t,e,r),s=lb(o,n,e.lineHeight);return{itemWidth:i,itemHeight:s}}function ab(t,e,r,n){let o=t.text;return o&&typeof o!="string"&&(o=o.reduce((i,s)=>i.length>s.length?i:s)),e+r.size/2+n.measureText(o).width}function lb(t,e,r){let n=t;return typeof e.text!="string"&&(n=yc(e,r)),n}function yc(t,e){const r=t.text?t.text.length:0;return e*r}function cb(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var db={id:"legend",_element:bc,start(t,e,r){const n=t.legend=new bc({ctx:t.ctx,options:r,chart:t});Kt.configure(t,n,r),Kt.addBox(t,n)},stop(t){Kt.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,r){const n=t.legend;Kt.configure(t,n,r),n.options=r},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,r){const n=e.datasetIndex,o=r.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:r,pointStyle:n,textAlign:o,color:i,useBorderRadius:s,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(r?0:void 0),d=gt(c.borderWidth);return{text:e[l.index].label,fillStyle:c.backgroundColor,fontColor:i,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:o||c.textAlign,borderRadius:s&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};const Cn={average(t){if(!t.length)return!1;let e,r,n=new Set,o=0,i=0;for(e=0,r=t.length;e<r;++e){const a=t[e].element;if(a&&a.hasValue()){const l=a.tooltipPosition();n.add(l.x),o+=l.y,++i}}return i===0||n.size===0?!1:{x:[...n].reduce((a,l)=>a+l)/n.size,y:o/i}},nearest(t,e){if(!t.length)return!1;let r=e.x,n=e.y,o=Number.POSITIVE_INFINITY,i,s,a;for(i=0,s=t.length;i<s;++i){const l=t[i].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),d=Bp(e,c);d<o&&(o=d,a=l)}}if(a){const l=a.tooltipPosition();r=l.x,n=l.y}return{x:r,y:n}}};function kt(t,e){return e&&(ze(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ft(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
16
|
+
*/class A0{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,r,n,o){const i=r.listeners[o],s=r.duration;i.forEach(a=>a({chart:e,initial:r.initial,numSteps:s,currentStep:Math.min(n-r.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=gl.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let r=0;this._charts.forEach((n,o)=>{if(!n.running||!n.items.length)return;const i=n.items;let s=i.length-1,a=!1,l;for(;s>=0;--s)l=i[s],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(e),a=!0):(i[s]=i[i.length-1],i.pop());a&&(o.draw(),this._notify(o,n,e,"progress")),i.length||(n.running=!1,this._notify(o,n,e,"complete"),n.initial=!1),r+=i.length}),this._lastDate=e,r===0&&(this._running=!1)}_getAnims(e){const r=this._charts;let n=r.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},r.set(e,n)),n}listen(e,r,n){this._getAnims(e).listeners[r].push(n)}add(e,r){!r||!r.length||this._getAnims(e).items.push(...r)}has(e){return this._getAnims(e).items.length>0}start(e){const r=this._charts.get(e);r&&(r.running=!0,r.start=Date.now(),r.duration=r.items.reduce((n,o)=>Math.max(n,o._duration),0),this._refresh())}running(e){if(!this._running)return!1;const r=this._charts.get(e);return!(!r||!r.running||!r.items.length)}stop(e){const r=this._charts.get(e);if(!r||!r.items.length)return;const n=r.items;let o=n.length-1;for(;o>=0;--o)n[o].cancel();r.items=[],this._notify(e,r,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Lt=new A0;const zl="transparent",D0={boolean(t,e,r){return r>.5?e:t},color(t,e,r){const n=xl(t||zl),o=n.valid&&xl(e||zl);return o&&o.valid?o.mix(n,r).hexString():e},number(t,e,r){return t+(e-t)*r}};class I0{constructor(e,r,n,o){const i=r[n];o=mo([e.to,o,i,e.from]);const s=mo([e.from,i,o]);this._active=!0,this._fn=e.fn||D0[e.type||typeof s],this._easing=cn[e.easing]||cn.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=r,this._prop=n,this._from=s,this._to=o,this._promises=void 0}active(){return this._active}update(e,r,n){if(this._active){this._notify(!1);const o=this._target[this._prop],i=n-this._start,s=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=mo([e.to,r,o,e.from]),this._from=mo([e.from,o,r])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const r=e-this._start,n=this._duration,o=this._prop,i=this._from,s=this._loop,a=this._to;let l;if(this._active=i!==a&&(s||r<n),!this._active){this._target[o]=a,this._notify(!0);return}if(r<0){this._target[o]=i;return}l=r/n%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[o]=this._fn(i,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((r,n)=>{e.push({res:r,rej:n})})}_notify(e){const r=e?"res":"rej",n=this._promises||[];for(let o=0;o<n.length;o++)n[o][r]()}}class Bl{constructor(e,r){this._chart=e,this._properties=new Map,this.configure(r)}configure(e){if(!oe(e))return;const r=Object.keys(ke.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach(o=>{const i=e[o];if(!oe(i))return;const s={};for(const a of r)s[a]=i[a];(ze(i.properties)&&i.properties||[o]).forEach(a=>{(a===o||!n.has(a))&&n.set(a,s)})})}_animateOptions(e,r){const n=r.options,o=F0(e,n);if(!o)return[];const i=this._createAnimations(o,n);return n.$shared&&L0(e.options.$animations,n).then(()=>{e.options=n},()=>{}),i}_createAnimations(e,r){const n=this._properties,o=[],i=e.$animations||(e.$animations={}),s=Object.keys(r),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"){o.push(...this._animateOptions(e,r));continue}const d=r[c];let u=i[c];const f=n.get(c);if(u)if(f&&u.active()){u.update(f,d,a);continue}else u.cancel();if(!f||!f.duration){e[c]=d;continue}i[c]=u=new I0(f,e,c,d),o.push(u)}return o}update(e,r){if(this._properties.size===0){Object.assign(e,r);return}const n=this._createAnimations(e,r);if(n.length)return Lt.add(this._chart,n),!0}}function L0(t,e){const r=[],n=Object.keys(e);for(let o=0;o<n.length;o++){const i=t[n[o]];i&&i.active()&&r.push(i.wait())}return Promise.all(r)}function F0(t,e){if(!e)return;let r=t.options;if(!r){t.options=e;return}return r.$shared&&(t.options=r=Object.assign({},r,{$shared:!1,$animations:{}})),r}function $l(t,e){const r=t&&t.options||{},n=r.reverse,o=r.min===void 0?e:0,i=r.max===void 0?e:0;return{start:n?i:o,end:n?o:i}}function z0(t,e,r){if(r===!1)return!1;const n=$l(t,r),o=$l(e,r);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}function B0(t){let e,r,n,o;return oe(t)?(e=t.top,r=t.right,n=t.bottom,o=t.left):e=r=n=o=t,{top:e,right:r,bottom:n,left:o,disabled:t===!1}}function jl(t,e){const r=[],n=t._getSortedDatasetMetas(e);let o,i;for(o=0,i=n.length;o<i;++o)r.push(n[o].index);return r}function Wl(t,e,r,n={}){const o=t.keys,i=n.mode==="single";let s,a,l,c;if(e===null)return;let d=!1;for(s=0,a=o.length;s<a;++s){if(l=+o[s],l===r){if(d=!0,n.all)continue;break}c=t.values[l],It(c)&&(i||e===0||dl(e)===dl(c))&&(e+=c)}return!d&&!n.all?0:e}function $0(t,e){const{iScale:r,vScale:n}=e,o=r.axis==="x"?"x":"y",i=n.axis==="x"?"x":"y",s=Object.keys(t),a=new Array(s.length);let l,c,d;for(l=0,c=s.length;l<c;++l)d=s[l],a[l]={[o]:d,[i]:t[d]};return a}function ns(t,e){const r=t&&t.options.stacked;return r||r===void 0&&e.stack!==void 0}function j0(t,e,r){return`${t.id}.${e.id}.${r.stack||r.type}`}function W0(t){const{min:e,max:r,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?r:Number.POSITIVE_INFINITY}}function H0(t,e,r){const n=t[e]||(t[e]={});return n[r]||(n[r]={})}function Hl(t,e,r,n){for(const o of e.getMatchingVisibleMetas(n).reverse()){const i=t[o.index];if(r&&i>0||!r&&i<0)return o.index}return null}function Vl(t,e){const{chart:r,_cachedMeta:n}=t,o=r._stacks||(r._stacks={}),{iScale:i,vScale:s,index:a}=n,l=i.axis,c=s.axis,d=j0(i,s,n),u=e.length;let f;for(let h=0;h<u;++h){const p=e[h],{[l]:m,[c]:b}=p,v=p._stacks||(p._stacks={});f=v[c]=H0(o,d,m),f[a]=b,f._top=Hl(f,s,!0,n.type),f._bottom=Hl(f,s,!1,n.type);const y=f._visualValues||(f._visualValues={});y[a]=b}}function os(t,e){const r=t.scales;return Object.keys(r).filter(n=>r[n].axis===e).shift()}function V0(t,e){return Nr(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function R0(t,e,r){return Nr(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:r,index:e,mode:"default",type:"data"})}function fn(t,e){const r=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const o of e){const i=o._stacks;if(!i||i[n]===void 0||i[n][r]===void 0)return;delete i[n][r],i[n]._visualValues!==void 0&&i[n]._visualValues[r]!==void 0&&delete i[n]._visualValues[r]}}}const is=t=>t==="reset"||t==="none",Rl=(t,e)=>e?t:Object.assign({},t),Y0=(t,e,r)=>t&&!e.hidden&&e._stacked&&{keys:jl(r,!0),values:null};class hn{constructor(e,r){this.chart=e,this._ctx=e.ctx,this.index=r,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=ns(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&fn(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,r=this._cachedMeta,n=this.getDataset(),o=(u,f,h,p)=>u==="x"?f:u==="r"?p:h,i=r.xAxisID=fe(n.xAxisID,os(e,"x")),s=r.yAxisID=fe(n.yAxisID,os(e,"y")),a=r.rAxisID=fe(n.rAxisID,os(e,"r")),l=r.indexAxis,c=r.iAxisID=o(l,i,s,a),d=r.vAxisID=o(l,s,i,a);r.xScale=this.getScaleForId(i),r.yScale=this.getScaleForId(s),r.rScale=this.getScaleForId(a),r.iScale=this.getScaleForId(c),r.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const r=this._cachedMeta;return e===r.iScale?r.vScale:r.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&hl(this._data,this),e._stacked&&fn(e)}_dataCheck(){const e=this.getDataset(),r=e.data||(e.data=[]),n=this._data;if(oe(r)){const o=this._cachedMeta;this._data=$0(r,o)}else if(n!==r){if(n){hl(n,this);const o=this._cachedMeta;fn(o),o._parsed=[]}r&&Object.isExtensible(r)&&Yp(r,this),this._syncList=[],this._data=r}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const r=this._cachedMeta,n=this.getDataset();let o=!1;this._dataCheck();const i=r._stacked;r._stacked=ns(r.vScale,r),r.stack!==n.stack&&(o=!0,fn(r),r.stack=n.stack),this._resyncElements(e),(o||i!==r._stacked)&&(Vl(this,r._parsed),r._stacked=ns(r.vScale,r))}configure(){const e=this.chart.config,r=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),r,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,r){const{_cachedMeta:n,_data:o}=this,{iScale:i,_stacked:s}=n,a=i.axis;let l=e===0&&r===o.length?!0:n._sorted,c=e>0&&n._parsed[e-1],d,u,f;if(this._parsing===!1)n._parsed=o,n._sorted=!0,f=o;else{ze(o[e])?f=this.parseArrayData(n,o,e,r):oe(o[e])?f=this.parseObjectData(n,o,e,r):f=this.parsePrimitiveData(n,o,e,r);const h=()=>u[a]===null||c&&u[a]<c[a];for(d=0;d<r;++d)n._parsed[d+e]=u=f[d],l&&(h()&&(l=!1),c=u);n._sorted=l}s&&Vl(this,f)}parsePrimitiveData(e,r,n,o){const{iScale:i,vScale:s}=e,a=i.axis,l=s.axis,c=i.getLabels(),d=i===s,u=new Array(o);let f,h,p;for(f=0,h=o;f<h;++f)p=f+n,u[f]={[a]:d||i.parse(c[p],p),[l]:s.parse(r[p],p)};return u}parseArrayData(e,r,n,o){const{xScale:i,yScale:s}=e,a=new Array(o);let l,c,d,u;for(l=0,c=o;l<c;++l)d=l+n,u=r[d],a[l]={x:i.parse(u[0],d),y:s.parse(u[1],d)};return a}parseObjectData(e,r,n,o){const{xScale:i,yScale:s}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(o);let d,u,f,h;for(d=0,u=o;d<u;++d)f=d+n,h=r[f],c[d]={x:i.parse(an(h,a),f),y:s.parse(an(h,l),f)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,r,n){const o=this.chart,i=this._cachedMeta,s=r[e.axis],a={keys:jl(o,!0),values:r._stacks[e.axis]._visualValues};return Wl(a,s,i.index,{mode:n})}updateRangeFromParsed(e,r,n,o){const i=n[r.axis];let s=i===null?NaN:i;const a=o&&n._stacks[r.axis];o&&a&&(o.values=a,s=Wl(o,i,this._cachedMeta.index)),e.min=Math.min(e.min,s),e.max=Math.max(e.max,s)}getMinMax(e,r){const n=this._cachedMeta,o=n._parsed,i=n._sorted&&e===n.iScale,s=o.length,a=this._getOtherScale(e),l=Y0(r,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:u}=W0(a);let f,h;function p(){h=o[f];const m=h[a.axis];return!It(h[e.axis])||d>m||u<m}for(f=0;f<s&&!(!p()&&(this.updateRangeFromParsed(c,e,h,l),i));++f);if(i){for(f=s-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(c,e,h,l);break}}return c}getAllParsedValues(e){const r=this._cachedMeta._parsed,n=[];let o,i,s;for(o=0,i=r.length;o<i;++o)s=r[o][e.axis],It(s)&&n.push(s);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const r=this._cachedMeta,n=r.iScale,o=r.vScale,i=this.getParsed(e);return{label:n?""+n.getLabelForValue(i[n.axis]):"",value:o?""+o.getLabelForValue(i[o.axis]):""}}_update(e){const r=this._cachedMeta;this.update(e||"default"),r._clip=B0(fe(this.options.clip,z0(r.xScale,r.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,r=this.chart,n=this._cachedMeta,o=n.data||[],i=r.chartArea,s=[],a=this._drawStart||0,l=this._drawCount||o.length-a,c=this.options.drawActiveElementsOnTop;let d;for(n.dataset&&n.dataset.draw(e,i,a,l),d=a;d<a+l;++d){const u=o[d];u.hidden||(u.active&&c?s.push(u):u.draw(e,i))}for(d=0;d<s.length;++d)s[d].draw(e,i)}getStyle(e,r){const n=r?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,r,n){const o=this.getDataset();let i;if(e>=0&&e<this._cachedMeta.data.length){const s=this._cachedMeta.data[e];i=s.$context||(s.$context=R0(this.getContext(),e,s)),i.parsed=this.getParsed(e),i.raw=o.data[e],i.index=i.dataIndex=e}else i=this.$context||(this.$context=V0(this.chart.getContext(),this.index)),i.dataset=o,i.index=i.datasetIndex=this.index;return i.active=!!r,i.mode=n,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,r){return this._resolveElementOptions(this.dataElementType.id,r,e)}_resolveElementOptions(e,r="default",n){const o=r==="active",i=this._cachedDataOpts,s=e+"-"+r,a=i[s],l=this.enableOptionSharing&&co(n);if(a)return Rl(a,l);const c=this.chart.config,d=c.datasetElementScopeKeys(this._type,e),u=o?[`${e}Hover`,"hover",e,""]:[e,""],f=c.getOptionScopes(this.getDataset(),d),h=Object.keys(ke.elements[e]),p=()=>this.getContext(n,o,r),m=c.resolveNamedOptions(f,h,p,u);return m.$shared&&(m.$shared=l,i[s]=Object.freeze(Rl(m,l))),m}_resolveAnimations(e,r,n){const o=this.chart,i=this._cachedDataOpts,s=`animation-${r}`,a=i[s];if(a)return a;let l;if(o.options.animation!==!1){const d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,r),f=d.getOptionScopes(this.getDataset(),u);l=d.createResolver(f,this.getContext(e,n,r))}const c=new Bl(o,l&&l.animations);return l&&l._cacheable&&(i[s]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,r){return!r||is(e)||this.chart._animationsDisabled}_getSharedOptions(e,r){const n=this.resolveDataElementOptions(e,r),o=this._sharedOptions,i=this.getSharedOptions(n),s=this.includeOptions(r,i)||i!==o;return this.updateSharedOptions(i,r,n),{sharedOptions:i,includeOptions:s}}updateElement(e,r,n,o){is(o)?Object.assign(e,n):this._resolveAnimations(r,o).update(e,n)}updateSharedOptions(e,r,n){e&&!is(r)&&this._resolveAnimations(void 0,r).update(e,n)}_setStyle(e,r,n,o){e.active=o;const i=this.getStyle(r,o);this._resolveAnimations(r,n,o).update(e,{options:!o&&this.getSharedOptions(i)||i})}removeHoverStyle(e,r,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,r,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const r=this._data,n=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const o=n.length,i=r.length,s=Math.min(i,o);s&&this.parse(0,s),i>o?this._insertElements(o,i-o,e):i<o&&this._removeElements(i,o-i)}_insertElements(e,r,n=!0){const o=this._cachedMeta,i=o.data,s=e+r;let a;const l=c=>{for(c.length+=r,a=c.length-1;a>=s;a--)c[a]=c[a-r]};for(l(i),a=e;a<s;++a)i[a]=new this.dataElementType;this._parsing&&l(o._parsed),this.parse(e,r),n&&this.updateElements(i,e,r,"reset")}updateElements(e,r,n,o){}_removeElements(e,r){const n=this._cachedMeta;if(this._parsing){const o=n._parsed.splice(e,r);n._stacked&&fn(n,o)}n.data.splice(e,r)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[r,n,o]=e;this[r](n,o)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,r){r&&this._sync(["_removeElements",e,r]);const n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}te(hn,"defaults",{}),te(hn,"datasetElementType",null),te(hn,"dataElementType",null);function U0(t,e,r){let n=1,o=1,i=0,s=0;if(e<_e){const a=t,l=a+e,c=Math.cos(a),d=Math.sin(a),u=Math.cos(l),f=Math.sin(l),h=(_,x,w)=>ho(_,a,l,!0)?1:Math.max(x,x*r,w,w*r),p=(_,x,w)=>ho(_,a,l,!0)?-1:Math.min(x,x*r,w,w*r),m=h(0,c,u),b=h(Ne,d,f),v=p(De,c,u),y=p(De+Ne,d,f);n=(m-v)/2,o=(b-y)/2,i=-(m+v)/2,s=-(b+y)/2}return{ratioX:n,ratioY:o,offsetX:i,offsetY:s}}class gn extends hn{constructor(e,r){super(e,r),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,r){const n=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=n;else{let i=l=>+n[l];if(oe(n[e])){const{key:l="value"}=this._parsing;i=c=>+an(n[c],l)}let s,a;for(s=e,a=e+r;s<a;++s)o._parsed[s]=i(s)}}_getRotation(){return sr(this.options.rotation-90)}_getCircumference(){return sr(this.options.circumference)}_getRotationExtents(){let e=_e,r=-_e;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const o=this.chart.getDatasetMeta(n).controller,i=o._getRotation(),s=o._getCircumference();e=Math.min(e,i),r=Math.max(r,i+s)}return{rotation:e,circumference:r-e}}update(e){const r=this.chart,{chartArea:n}=r,o=this._cachedMeta,i=o.data,s=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-s)/2,0),l=Math.min(Pp(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:h,offsetX:p,offsetY:m}=U0(u,d,l),b=(n.width-s)/f,v=(n.height-s)/h,y=Math.max(Math.min(b,v)/2,0),_=il(this.options.radius,y),x=Math.max(_*l,0),w=(_-x)/this._getVisibleDatasetWeightTotal();this.offsetX=p*_,this.offsetY=m*_,o.total=this.calculateTotal(),this.outerRadius=_-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(i,0,i.length,e)}_circumference(e,r){const n=this.options,o=this._cachedMeta,i=this._getCircumference();return r&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||o._parsed[e]===null||o.data[e].hidden?0:this.calculateCircumference(o._parsed[e]*i/_e)}updateElements(e,r,n,o){const i=o==="reset",s=this.chart,a=s.chartArea,c=s.options.animation,d=(a.left+a.right)/2,u=(a.top+a.bottom)/2,f=i&&c.animateScale,h=f?0:this.innerRadius,p=f?0:this.outerRadius,{sharedOptions:m,includeOptions:b}=this._getSharedOptions(r,o);let v=this._getRotation(),y;for(y=0;y<r;++y)v+=this._circumference(y,i);for(y=r;y<r+n;++y){const _=this._circumference(y,i),x=e[y],w={x:d+this.offsetX,y:u+this.offsetY,startAngle:v,endAngle:v+_,circumference:_,outerRadius:p,innerRadius:h};b&&(w.options=m||this.resolveDataElementOptions(y,x.active?"active":o)),v+=_,this.updateElement(x,y,w,o)}}calculateTotal(){const e=this._cachedMeta,r=e.data;let n=0,o;for(o=0;o<r.length;o++){const i=e._parsed[o];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(o)&&!r[o].hidden&&(n+=Math.abs(i))}return n}calculateCircumference(e){const r=this._cachedMeta.total;return r>0&&!isNaN(e)?_e*(Math.abs(e)/r):0}getLabelAndValue(e){const r=this._cachedMeta,n=this.chart,o=n.data.labels||[],i=e0(r._parsed[e],n.options.locale);return{label:o[e]||"",value:i}}getMaxBorderWidth(e){let r=0;const n=this.chart;let o,i,s,a,l;if(!e){for(o=0,i=n.data.datasets.length;o<i;++o)if(n.isDatasetVisible(o)){s=n.getDatasetMeta(o),e=s.data,a=s.controller;break}}if(!e)return 0;for(o=0,i=e.length;o<i;++o)l=a.resolveDataElementOptions(o),l.borderAlign!=="inner"&&(r=Math.max(r,l.borderWidth||0,l.hoverBorderWidth||0));return r}getMaxOffset(e){let r=0;for(let n=0,o=e.length;n<o;++n){const i=this.resolveDataElementOptions(n);r=Math.max(r,i.offset||0,i.hoverOffset||0)}return r}_getRingWeightOffset(e){let r=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(r+=this._getRingWeight(n));return r}_getRingWeight(e){return Math.max(fe(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}te(gn,"id","doughnut"),te(gn,"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"}),te(gn,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),te(gn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const r=e.data;if(r.labels.length&&r.datasets.length){const{labels:{pointStyle:n,color:o}}=e.legend.options;return r.labels.map((i,s)=>{const l=e.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:o,lineWidth:l.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(s),index:s}})}return[]}},onClick(e,r,n){n.chart.toggleDataVisibility(r.index),n.chart.update()}}}});function fr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ss{constructor(e){te(this,"options");this.options=e||{}}static override(e){Object.assign(ss.prototype,e)}init(){}formats(){return fr()}parse(){return fr()}format(){return fr()}add(){return fr()}diff(){return fr()}startOf(){return fr()}endOf(){return fr()}}var q0={_date:ss};function K0(t,e,r,n){const{controller:o,data:i,_sorted:s}=t,a=o._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(a&&e===a.axis&&e!=="r"&&s&&i.length){const c=a._reversePixels?Vp:Ri;if(n){if(o._sharedOptions){const d=i[0],u=typeof d.getRange=="function"&&d.getRange(e);if(u){const f=c(i,e,r-u),h=c(i,e,r+u);return{lo:f.lo,hi:h.hi}}}}else{const d=c(i,e,r);if(l){const{vScale:u}=o._cachedMeta,{_parsed:f}=t,h=f.slice(0,d.lo+1).reverse().findIndex(m=>!Ve(m[u.axis]));d.lo-=Math.max(0,h);const p=f.slice(d.hi).findIndex(m=>!Ve(m[u.axis]));d.hi+=Math.max(0,p)}return d}}return{lo:0,hi:i.length-1}}function xo(t,e,r,n,o){const i=t.getSortedVisibleDatasetMetas(),s=r[e];for(let a=0,l=i.length;a<l;++a){const{index:c,data:d}=i[a],{lo:u,hi:f}=K0(i[a],e,s,o);for(let h=u;h<=f;++h){const p=d[h];p.skip||n(p,c,h)}}}function G0(t){const e=t.indexOf("x")!==-1,r=t.indexOf("y")!==-1;return function(n,o){const i=e?Math.abs(n.x-o.x):0,s=r?Math.abs(n.y-o.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(s,2))}}function as(t,e,r,n,o){const i=[];return!o&&!t.isPointInArea(e)||xo(t,r,e,function(a,l,c){!o&&!El(a,t.chartArea,0)||a.inRange(e.x,e.y,n)&&i.push({element:a,datasetIndex:l,index:c})},!0),i}function X0(t,e,r,n){let o=[];function i(s,a,l){const{startAngle:c,endAngle:d}=s.getProps(["startAngle","endAngle"],n),{angle:u}=ul(s,{x:e.x,y:e.y});ho(u,c,d)&&o.push({element:s,datasetIndex:a,index:l})}return xo(t,r,e,i),o}function Z0(t,e,r,n,o,i){let s=[];const a=G0(r);let l=Number.POSITIVE_INFINITY;function c(d,u,f){const h=d.inRange(e.x,e.y,o);if(n&&!h)return;const p=d.getCenterPoint(o);if(!(!!i||t.isPointInArea(p))&&!h)return;const b=a(e,p);b<l?(s=[{element:d,datasetIndex:u,index:f}],l=b):b===l&&s.push({element:d,datasetIndex:u,index:f})}return xo(t,r,e,c),s}function ls(t,e,r,n,o,i){return!i&&!t.isPointInArea(e)?[]:r==="r"&&!n?X0(t,e,r,o):Z0(t,e,r,n,o,i)}function Yl(t,e,r,n,o){const i=[],s=r==="x"?"inXRange":"inYRange";let a=!1;return xo(t,r,e,(l,c,d)=>{l[s]&&l[s](e[r],o)&&(i.push({element:l,datasetIndex:c,index:d}),a=a||l.inRange(e.x,e.y,o))}),n&&!a?[]:i}var J0={modes:{index(t,e,r,n){const o=ur(e,t),i=r.axis||"x",s=r.includeInvisible||!1,a=r.intersect?as(t,o,i,n,s):ls(t,o,i,!1,n,s),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const d=a[0].index,u=c.data[d];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:d})}),l):[]},dataset(t,e,r,n){const o=ur(e,t),i=r.axis||"xy",s=r.includeInvisible||!1;let a=r.intersect?as(t,o,i,n,s):ls(t,o,i,!1,n,s);if(a.length>0){const l=a[0].datasetIndex,c=t.getDatasetMeta(l).data;a=[];for(let d=0;d<c.length;++d)a.push({element:c[d],datasetIndex:l,index:d})}return a},point(t,e,r,n){const o=ur(e,t),i=r.axis||"xy",s=r.includeInvisible||!1;return as(t,o,i,n,s)},nearest(t,e,r,n){const o=ur(e,t),i=r.axis||"xy",s=r.includeInvisible||!1;return ls(t,o,i,r.intersect,n,s)},x(t,e,r,n){const o=ur(e,t);return Yl(t,o,"x",r.intersect,n)},y(t,e,r,n){const o=ur(e,t);return Yl(t,o,"y",r.intersect,n)}}};const Ul=["left","top","right","bottom"];function pn(t,e){return t.filter(r=>r.pos===e)}function ql(t,e){return t.filter(r=>Ul.indexOf(r.pos)===-1&&r.box.axis===e)}function mn(t,e){return t.sort((r,n)=>{const o=e?n:r,i=e?r:n;return o.weight===i.weight?o.index-i.index:o.weight-i.weight})}function Q0(t){const e=[];let r,n,o,i,s,a;for(r=0,n=(t||[]).length;r<n;++r)o=t[r],{position:i,options:{stack:s,stackWeight:a=1}}=o,e.push({index:r,box:o,pos:i,horizontal:o.isHorizontal(),weight:o.weight,stack:s&&i+s,stackWeight:a});return e}function em(t){const e={};for(const r of t){const{stack:n,pos:o,stackWeight:i}=r;if(!n||!Ul.includes(o))continue;const s=e[n]||(e[n]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=i}return e}function tm(t,e){const r=em(t),{vBoxMaxWidth:n,hBoxMaxHeight:o}=e;let i,s,a;for(i=0,s=t.length;i<s;++i){a=t[i];const{fullSize:l}=a.box,c=r[a.stack],d=c&&a.stackWeight/c.weight;a.horizontal?(a.width=d?d*n:l&&e.availableWidth,a.height=o):(a.width=n,a.height=d?d*o:l&&e.availableHeight)}return r}function rm(t){const e=Q0(t),r=mn(e.filter(c=>c.box.fullSize),!0),n=mn(pn(e,"left"),!0),o=mn(pn(e,"right")),i=mn(pn(e,"top"),!0),s=mn(pn(e,"bottom")),a=ql(e,"x"),l=ql(e,"y");return{fullSize:r,leftAndTop:n.concat(i),rightAndBottom:o.concat(l).concat(s).concat(a),chartArea:pn(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:i.concat(s).concat(a)}}function Kl(t,e,r,n){return Math.max(t[r],e[r])+Math.max(t[n],e[n])}function Gl(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function nm(t,e,r,n){const{pos:o,box:i}=r,s=t.maxPadding;if(!oe(o)){r.size&&(t[o]-=r.size);const u=n[r.stack]||{size:0,count:1};u.size=Math.max(u.size,r.horizontal?i.height:i.width),r.size=u.size/u.count,t[o]+=r.size}i.getPadding&&Gl(s,i.getPadding());const a=Math.max(0,e.outerWidth-Kl(s,t,"left","right")),l=Math.max(0,e.outerHeight-Kl(s,t,"top","bottom")),c=a!==t.w,d=l!==t.h;return t.w=a,t.h=l,r.horizontal?{same:c,other:d}:{same:d,other:c}}function om(t){const e=t.maxPadding;function r(n){const o=Math.max(e[n]-t[n],0);return t[n]+=o,o}t.y+=r("top"),t.x+=r("left"),r("right"),r("bottom")}function im(t,e){const r=e.maxPadding;function n(o){const i={left:0,top:0,right:0,bottom:0};return o.forEach(s=>{i[s]=Math.max(e[s],r[s])}),i}return n(t?["left","right"]:["top","bottom"])}function bn(t,e,r,n){const o=[];let i,s,a,l,c,d;for(i=0,s=t.length,c=0;i<s;++i){a=t[i],l=a.box,l.update(a.width||e.w,a.height||e.h,im(a.horizontal,e));const{same:u,other:f}=nm(e,r,a,n);c|=u&&o.length,d=d||f,l.fullSize||o.push(a)}return c&&bn(o,e,r,n)||d}function wo(t,e,r,n,o){t.top=r,t.left=e,t.right=e+n,t.bottom=r+o,t.width=n,t.height=o}function Xl(t,e,r,n){const o=r.padding;let{x:i,y:s}=e;for(const a of t){const l=a.box,c=n[a.stack]||{placed:0,weight:1},d=a.stackWeight/c.weight||1;if(a.horizontal){const u=e.w*d,f=c.size||l.height;co(c.start)&&(s=c.start),l.fullSize?wo(l,o.left,s,r.outerWidth-o.right-o.left,f):wo(l,e.left+c.placed,s,u,f),c.start=s,c.placed+=u,s=l.bottom}else{const u=e.h*d,f=c.size||l.width;co(c.start)&&(i=c.start),l.fullSize?wo(l,i,o.top,f,r.outerHeight-o.bottom-o.top):wo(l,i,e.top+c.placed,f,u),c.start=i,c.placed+=u,i=l.right}}e.x=i,e.y=s}var Kt={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(r){e.draw(r)}}]},t.boxes.push(e)},removeBox(t,e){const r=t.boxes?t.boxes.indexOf(e):-1;r!==-1&&t.boxes.splice(r,1)},configure(t,e,r){e.fullSize=r.fullSize,e.position=r.position,e.weight=r.weight},update(t,e,r,n){if(!t)return;const o=gt(t.options.layout.padding),i=Math.max(e-o.width,0),s=Math.max(r-o.height,0),a=rm(t.boxes),l=a.vertical,c=a.horizontal;he(t.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const d=l.reduce((m,b)=>b.box.options&&b.box.options.display===!1?m:m+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:r,padding:o,availableWidth:i,availableHeight:s,vBoxMaxWidth:i/2/d,hBoxMaxHeight:s/2}),f=Object.assign({},o);Gl(f,gt(n));const h=Object.assign({maxPadding:f,w:i,h:s,x:o.left,y:o.top},o),p=tm(l.concat(c),u);bn(a.fullSize,h,u,p),bn(l,h,u,p),bn(c,h,u,p)&&bn(l,h,u,p),om(h),Xl(a.leftAndTop,h,u,p),h.x+=h.w,h.y+=h.h,Xl(a.rightAndBottom,h,u,p),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},he(a.chartArea,m=>{const b=m.box;Object.assign(b,t.chartArea),b.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class Zl{acquireContext(e,r){}releaseContext(e){return!1}addEventListener(e,r,n){}removeEventListener(e,r,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,r,n,o){return r=Math.max(0,r||e.width),n=n||e.height,{width:r,height:Math.max(0,o?Math.floor(r/o):n)}}isAttached(e){return!0}updateConfig(e){}}class sm extends Zl{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ko="$chartjs",am={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Jl=t=>t===null||t==="";function lm(t,e){const r=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t[ko]={initial:{height:n,width:o,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",r.boxSizing=r.boxSizing||"border-box",Jl(o)){const i=Il(t,"width");i!==void 0&&(t.width=i)}if(Jl(n))if(t.style.height==="")t.height=t.width/(e||2);else{const i=Il(t,"height");i!==void 0&&(t.height=i)}return t}const Ql=N0?{passive:!0}:!1;function cm(t,e,r){t&&t.addEventListener(e,r,Ql)}function dm(t,e,r){t&&t.canvas&&t.canvas.removeEventListener(e,r,Ql)}function um(t,e){const r=am[t.type]||t.type,{x:n,y:o}=ur(t,e);return{type:r,chart:e,native:t,x:n!==void 0?n:null,y:o!==void 0?o:null}}function Co(t,e){for(const r of t)if(r===e||r.contains(e))return!0}function fm(t,e,r){const n=t.canvas,o=new MutationObserver(i=>{let s=!1;for(const a of i)s=s||Co(a.addedNodes,n),s=s&&!Co(a.removedNodes,n);s&&r()});return o.observe(document,{childList:!0,subtree:!0}),o}function hm(t,e,r){const n=t.canvas,o=new MutationObserver(i=>{let s=!1;for(const a of i)s=s||Co(a.removedNodes,n),s=s&&!Co(a.addedNodes,n);s&&r()});return o.observe(document,{childList:!0,subtree:!0}),o}const yn=new Map;let ec=0;function tc(){const t=window.devicePixelRatio;t!==ec&&(ec=t,yn.forEach((e,r)=>{r.currentDevicePixelRatio!==t&&e()}))}function gm(t,e){yn.size||window.addEventListener("resize",tc),yn.set(t,e)}function pm(t){yn.delete(t),yn.size||window.removeEventListener("resize",tc)}function mm(t,e,r){const n=t.canvas,o=n&&rs(n);if(!o)return;const i=pl((a,l)=>{const c=o.clientWidth;r(a,l),c<o.clientWidth&&r()},window),s=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||i(c,d)});return s.observe(o),gm(t,i),s}function cs(t,e,r){r&&r.disconnect(),e==="resize"&&pm(t)}function bm(t,e,r){const n=t.canvas,o=pl(i=>{t.ctx!==null&&r(um(i,t))},t);return cm(n,e,o),o}class ym extends Zl{acquireContext(e,r){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(lm(e,r),n):null}releaseContext(e){const r=e.canvas;if(!r[ko])return!1;const n=r[ko].initial;["height","width"].forEach(i=>{const s=n[i];Ve(s)?r.removeAttribute(i):r.setAttribute(i,s)});const o=n.style||{};return Object.keys(o).forEach(i=>{r.style[i]=o[i]}),r.width=r.width,delete r[ko],!0}addEventListener(e,r,n){this.removeEventListener(e,r);const o=e.$proxies||(e.$proxies={}),s={attach:fm,detach:hm,resize:mm}[r]||bm;o[r]=s(e,r,n)}removeEventListener(e,r){const n=e.$proxies||(e.$proxies={}),o=n[r];if(!o)return;({attach:cs,detach:cs,resize:cs}[r]||dm)(e,r,o),n[r]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,r,n,o){return T0(e,r,n,o)}isAttached(e){const r=e&&rs(e);return!!(r&&r.isConnected)}}function vm(t){return!ts()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?sm:ym}let vn=(Ii=class{constructor(){te(this,"x");te(this,"y");te(this,"active",!1);te(this,"options");te(this,"$animations")}tooltipPosition(e){const{x:r,y:n}=this.getProps(["x","y"],e);return{x:r,y:n}}hasValue(){return fo(this.x)&&fo(this.y)}getProps(e,r){const n=this.$animations;if(!r||!n)return this;const o={};return e.forEach(i=>{o[i]=n[i]&&n[i].active()?n[i]._to:this[i]}),o}},te(Ii,"defaults",{}),te(Ii,"defaultRoutes"),Ii);function xm(t,e){const r=t.options.ticks,n=wm(t),o=Math.min(r.maxTicksLimit||n,n),i=r.major.enabled?Cm(e):[],s=i.length,a=i[0],l=i[s-1],c=[];if(s>o)return _m(e,c,i,s/o),c;const d=km(i,e,o);if(s>0){let u,f;const h=s>1?Math.round((l-a)/(s-1)):null;for(_o(e,c,d,Ve(h)?0:a-h,a),u=0,f=s-1;u<f;u++)_o(e,c,d,i[u],i[u+1]);return _o(e,c,d,l,Ve(h)?e.length:l+h),c}return _o(e,c,d),c}function wm(t){const e=t.options.offset,r=t._tickSize(),n=t._length/r+(e?0:1),o=t._maxLength/r;return Math.floor(Math.min(n,o))}function km(t,e,r){const n=Sm(t),o=e.length/r;if(!n)return Math.max(o,1);const i=Bp(n);for(let s=0,a=i.length-1;s<a;s++){const l=i[s];if(l>o)return l}return Math.max(o,1)}function Cm(t){const e=[];let r,n;for(r=0,n=t.length;r<n;r++)t[r].major&&e.push(r);return e}function _m(t,e,r,n){let o=0,i=r[0],s;for(n=Math.ceil(n),s=0;s<t.length;s++)s===i&&(e.push(t[s]),o++,i=r[o*n])}function _o(t,e,r,n,o){const i=fe(n,0),s=Math.min(fe(o,t.length),t.length);let a=0,l,c,d;for(r=Math.ceil(r),o&&(l=o-n,r=l/Math.floor(l/r)),d=i;d<0;)a++,d=Math.round(i+a*r);for(c=Math.max(i,0);c<s;c++)c===d&&(e.push(t[c]),a++,d=Math.round(i+a*r))}function Sm(t){const e=t.length;let r,n;if(e<2)return!1;for(n=t[0],r=1;r<e;++r)if(t[r]-t[r-1]!==n)return!1;return n}const Em=t=>t==="left"?"right":t==="right"?"left":t,rc=(t,e,r)=>e==="top"||e==="left"?t[e]+r:t[e]-r,nc=(t,e)=>Math.min(e||t,t);function oc(t,e){const r=[],n=t.length/e,o=t.length;let i=0;for(;i<o;i+=n)r.push(t[Math.floor(i)]);return r}function Om(t,e,r){const n=t.ticks.length,o=Math.min(e,n-1),i=t._startPixel,s=t._endPixel,a=1e-6;let l=t.getPixelForTick(o),c;if(!(r&&(n===1?c=Math.max(l-i,s-l):e===0?c=(t.getPixelForTick(1)-l)/2:c=(l-t.getPixelForTick(o-1))/2,l+=o<e?c:-c,l<i-a||l>s+a)))return l}function Tm(t,e){he(t,r=>{const n=r.gc,o=n.length/2;let i;if(o>e){for(i=0;i<o;++i)delete r.data[n[i]];n.splice(0,o)}})}function xn(t){return t.drawTicks?t.tickLength:0}function ic(t,e){if(!t.display)return 0;const r=Ke(t.font,e),n=gt(t.padding);return(ze(t.text)?t.text.length:1)*r.lineHeight+n.height}function Nm(t,e){return Nr(t,{scale:e,type:"scale"})}function Mm(t,e,r){return Nr(t,{tick:r,index:e,type:"tick"})}function Pm(t,e,r){let n=ml(t);return(r&&e!=="right"||!r&&e==="right")&&(n=Em(n)),n}function Am(t,e,r,n){const{top:o,left:i,bottom:s,right:a,chart:l}=t,{chartArea:c,scales:d}=l;let u=0,f,h,p;const m=s-o,b=a-i;if(t.isHorizontal()){if(h=tt(n,i,a),oe(r)){const v=Object.keys(r)[0],y=r[v];p=d[v].getPixelForValue(y)+m-e}else r==="center"?p=(c.bottom+c.top)/2+m-e:p=rc(t,r,e);f=a-i}else{if(oe(r)){const v=Object.keys(r)[0],y=r[v];h=d[v].getPixelForValue(y)-b+e}else r==="center"?h=(c.left+c.right)/2-b+e:h=rc(t,r,e);p=tt(n,s,o),u=r==="left"?-Ne:Ne}return{titleX:h,titleY:p,maxWidth:f,rotation:u}}class So extends vn{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,r){return e}getUserBounds(){let{_userMin:e,_userMax:r,_suggestedMin:n,_suggestedMax:o}=this;return e=xt(e,Number.POSITIVE_INFINITY),r=xt(r,Number.NEGATIVE_INFINITY),n=xt(n,Number.POSITIVE_INFINITY),o=xt(o,Number.NEGATIVE_INFINITY),{min:xt(e,n),max:xt(r,o),minDefined:It(e),maxDefined:It(r)}}getMinMax(e){let{min:r,max:n,minDefined:o,maxDefined:i}=this.getUserBounds(),s;if(o&&i)return{min:r,max:n};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)s=a[l].controller.getMinMax(this,e),o||(r=Math.min(r,s.min)),i||(n=Math.max(n,s.max));return r=i&&r>n?n:r,n=o&&r>n?r:n,{min:xt(r,xt(n,r)),max:xt(n,xt(r,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ye(this.options.beforeUpdate,[this])}update(e,r,n){const{beginAtZero:o,grace:i,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=r,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=h0(this,i,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?oc(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=xm(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,r,n;this.isHorizontal()?(r=this.left,n=this.right):(r=this.top,n=this.bottom,e=!e),this._startPixel=r,this._endPixel=n,this._reversePixels=e,this._length=n-r,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ye(this.options.afterUpdate,[this])}beforeSetDimensions(){ye(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(){ye(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),ye(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ye(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const r=this.options.ticks;let n,o,i;for(n=0,o=e.length;n<o;n++)i=e[n],i.label=ye(r.callback,[i.value,n,e],this)}afterTickToLabelConversion(){ye(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ye(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,r=e.ticks,n=nc(this.ticks.length,e.ticks.maxTicksLimit),o=r.minRotation||0,i=r.maxRotation;let s=o,a,l,c;if(!this._isVisible()||!r.display||o>=i||n<=1||!this.isHorizontal()){this.labelRotation=o;return}const d=this._getLabelSizes(),u=d.widest.width,f=d.highest.height,h=lt(this.chart.width-u,0,this.maxWidth);a=e.offset?this.maxWidth/n:h/(n-1),u+6>a&&(a=h/(n-(e.offset?.5:1)),l=this.maxHeight-xn(e.grid)-r.padding-ic(e.title,this.chart.options.font),c=Math.sqrt(u*u+f*f),s=jp(Math.min(Math.asin(lt((d.highest.height+6)/a,-1,1)),Math.asin(lt(l/c,-1,1))-Math.asin(lt(f/c,-1,1)))),s=Math.max(o,Math.min(i,s))),this.labelRotation=s}afterCalculateLabelRotation(){ye(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ye(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:r,options:{ticks:n,title:o,grid:i}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=ic(o,r.options.font);if(a?(e.width=this.maxWidth,e.height=xn(i)+l):(e.height=this.maxHeight,e.width=xn(i)+l),n.display&&this.ticks.length){const{first:c,last:d,widest:u,highest:f}=this._getLabelSizes(),h=n.padding*2,p=sr(this.labelRotation),m=Math.cos(p),b=Math.sin(p);if(a){const v=n.mirror?0:b*u.width+m*f.height;e.height=Math.min(this.maxHeight,e.height+v+h)}else{const v=n.mirror?0:m*u.width+b*f.height;e.width=Math.min(this.maxWidth,e.width+v+h)}this._calculatePadding(c,d,b,m)}}this._handleMargins(),a?(this.width=this._length=r.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=r.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,r,n,o){const{ticks:{align:i,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?c?(f=o*e.width,h=n*r.height):(f=n*e.height,h=o*r.width):i==="start"?h=r.width:i==="end"?f=e.width:i!=="inner"&&(f=e.width/2,h=r.width/2),this.paddingLeft=Math.max((f-d+s)*this.width/(this.width-d),0),this.paddingRight=Math.max((h-u+s)*this.width/(this.width-u),0)}else{let d=r.height/2,u=e.height/2;i==="start"?(d=0,u=e.height):i==="end"&&(d=r.height,u=0),this.paddingTop=d+s,this.paddingBottom=u+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(){ye(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:r}=this.options;return r==="top"||r==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let r,n;for(r=0,n=e.length;r<n;r++)Ve(e[r].label)&&(e.splice(r,1),n--,r--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const r=this.options.ticks.sampleSize;let n=this.ticks;r<n.length&&(n=oc(n,r)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,r,n){const{ctx:o,_longestTextCache:i}=this,s=[],a=[],l=Math.floor(r/nc(r,n));let c=0,d=0,u,f,h,p,m,b,v,y,_,x,w;for(u=0;u<r;u+=l){if(p=e[u].label,m=this._resolveTickFontOptions(u),o.font=b=m.string,v=i[b]=i[b]||{data:{},gc:[]},y=m.lineHeight,_=x=0,!Ve(p)&&!ze(p))_=kl(o,v.data,v.gc,_,p),x=y;else if(ze(p))for(f=0,h=p.length;f<h;++f)w=p[f],!Ve(w)&&!ze(w)&&(_=kl(o,v.data,v.gc,_,w),x+=y);s.push(_),a.push(x),c=Math.max(_,c),d=Math.max(x,d)}Tm(i,r);const S=s.indexOf(c),T=a.indexOf(d),M=N=>({width:s[N]||0,height:a[N]||0});return{first:M(0),last:M(r-1),widest:M(S),highest:M(T),widths:s,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,r){return NaN}getValueForPixel(e){}getPixelForTick(e){const r=this.ticks;return e<0||e>r.length-1?null:this.getPixelForValue(r[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const r=this._startPixel+e*this._length;return Hp(this._alignToPixels?cr(this.chart,r,0):r)}getDecimalForPixel(e){const r=(e-this._startPixel)/this._length;return this._reversePixels?1-r:r}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:r}=this;return e<0&&r<0?r:e>0&&r>0?e:0}getContext(e){const r=this.ticks||[];if(e>=0&&e<r.length){const n=r[e];return n.$context||(n.$context=Mm(this.getContext(),e,n))}return this.$context||(this.$context=Nm(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,r=sr(this.labelRotation),n=Math.abs(Math.cos(r)),o=Math.abs(Math.sin(r)),i=this._getLabelSizes(),s=e.autoSkipPadding||0,a=i?i.widest.width+s:0,l=i?i.highest.height+s:0;return this.isHorizontal()?l*n>a*o?a/n:l/o:l*o<a*n?l/n:a/o}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const r=this.axis,n=this.chart,o=this.options,{grid:i,position:s,border:a}=o,l=i.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),f=xn(i),h=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,b=m/2,v=function(L){return cr(n,L,m)};let y,_,x,w,S,T,M,N,E,I,A,D;if(s==="top")y=v(this.bottom),T=this.bottom-f,N=y-b,I=v(e.top)+b,D=e.bottom;else if(s==="bottom")y=v(this.top),I=e.top,D=v(e.bottom)-b,T=y+b,N=this.top+f;else if(s==="left")y=v(this.right),S=this.right-f,M=y-b,E=v(e.left)+b,A=e.right;else if(s==="right")y=v(this.left),E=e.left,A=v(e.right)-b,S=y+b,M=this.left+f;else if(r==="x"){if(s==="center")y=v((e.top+e.bottom)/2+.5);else if(oe(s)){const L=Object.keys(s)[0],z=s[L];y=v(this.chart.scales[L].getPixelForValue(z))}I=e.top,D=e.bottom,T=y+b,N=T+f}else if(r==="y"){if(s==="center")y=v((e.left+e.right)/2);else if(oe(s)){const L=Object.keys(s)[0],z=s[L];y=v(this.chart.scales[L].getPixelForValue(z))}S=y-b,M=S-f,E=e.left,A=e.right}const O=fe(o.ticks.maxTicksLimit,u),P=Math.max(1,Math.ceil(u/O));for(_=0;_<u;_+=P){const L=this.getContext(_),z=i.setContext(L),B=a.setContext(L),j=z.lineWidth,$=z.color,H=B.dash||[],V=B.dashOffset,Y=z.tickWidth,U=z.tickColor,q=z.tickBorderDash||[],G=z.tickBorderDashOffset;x=Om(this,_,l),x!==void 0&&(w=cr(n,x,j),c?S=M=E=A=w:T=N=I=D=w,h.push({tx1:S,ty1:T,tx2:M,ty2:N,x1:E,y1:I,x2:A,y2:D,width:j,color:$,borderDash:H,borderDashOffset:V,tickWidth:Y,tickColor:U,tickBorderDash:q,tickBorderDashOffset:G}))}return this._ticksLength=u,this._borderValue=y,h}_computeLabelItems(e){const r=this.axis,n=this.options,{position:o,ticks:i}=n,s=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:d,mirror:u}=i,f=xn(n.grid),h=f+d,p=u?-d:h,m=-sr(this.labelRotation),b=[];let v,y,_,x,w,S,T,M,N,E,I,A,D="middle";if(o==="top")S=this.bottom-p,T=this._getXAxisLabelAlignment();else if(o==="bottom")S=this.top+p,T=this._getXAxisLabelAlignment();else if(o==="left"){const P=this._getYAxisLabelAlignment(f);T=P.textAlign,w=P.x}else if(o==="right"){const P=this._getYAxisLabelAlignment(f);T=P.textAlign,w=P.x}else if(r==="x"){if(o==="center")S=(e.top+e.bottom)/2+h;else if(oe(o)){const P=Object.keys(o)[0],L=o[P];S=this.chart.scales[P].getPixelForValue(L)+h}T=this._getXAxisLabelAlignment()}else if(r==="y"){if(o==="center")w=(e.left+e.right)/2-h;else if(oe(o)){const P=Object.keys(o)[0],L=o[P];w=this.chart.scales[P].getPixelForValue(L)}T=this._getYAxisLabelAlignment(f).textAlign}r==="y"&&(l==="start"?D="top":l==="end"&&(D="bottom"));const O=this._getLabelSizes();for(v=0,y=a.length;v<y;++v){_=a[v],x=_.label;const P=i.setContext(this.getContext(v));M=this.getPixelForTick(v)+i.labelOffset,N=this._resolveTickFontOptions(v),E=N.lineHeight,I=ze(x)?x.length:1;const L=I/2,z=P.color,B=P.textStrokeColor,j=P.textStrokeWidth;let $=T;s?(w=M,T==="inner"&&(v===y-1?$=this.options.reverse?"left":"right":v===0?$=this.options.reverse?"right":"left":$="center"),o==="top"?c==="near"||m!==0?A=-I*E+E/2:c==="center"?A=-O.highest.height/2-L*E+E:A=-O.highest.height+E/2:c==="near"||m!==0?A=E/2:c==="center"?A=O.highest.height/2-L*E:A=O.highest.height-I*E,u&&(A*=-1),m!==0&&!P.showLabelBackdrop&&(w+=E/2*Math.sin(m))):(S=M,A=(1-I)*E/2);let H;if(P.showLabelBackdrop){const V=gt(P.backdropPadding),Y=O.heights[v],U=O.widths[v];let q=A-V.top,G=0-V.left;switch(D){case"middle":q-=Y/2;break;case"bottom":q-=Y;break}switch(T){case"center":G-=U/2;break;case"right":G-=U;break;case"inner":v===y-1?G-=U:v>0&&(G-=U/2);break}H={left:G,top:q,width:U+V.width,height:Y+V.height,color:P.backdropColor}}b.push({label:x,font:N,textOffset:A,options:{rotation:m,color:z,strokeColor:B,strokeWidth:j,textAlign:$,textBaseline:D,translation:[w,S],backdrop:H}})}return b}_getXAxisLabelAlignment(){const{position:e,ticks:r}=this.options;if(-sr(this.labelRotation))return e==="top"?"left":"right";let o="center";return r.align==="start"?o="left":r.align==="end"?o="right":r.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(e){const{position:r,ticks:{crossAlign:n,mirror:o,padding:i}}=this.options,s=this._getLabelSizes(),a=e+i,l=s.widest.width;let c,d;return r==="left"?o?(d=this.right+i,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-a,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d=this.left)):r==="right"?o?(d=this.left+i,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+a,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,r=this.options.position;if(r==="left"||r==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(r==="top"||r==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:r},left:n,top:o,width:i,height:s}=this;r&&(e.save(),e.fillStyle=r,e.fillRect(n,o,i,s),e.restore())}getLineWidthForValue(e){const r=this.options.grid;if(!this._isVisible()||!r.display)return 0;const o=this.ticks.findIndex(i=>i.value===e);return o>=0?r.setContext(this.getContext(o)).lineWidth:0}drawGrid(e){const r=this.options.grid,n=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,s;const a=(l,c,d)=>{!d.width||!d.color||(n.save(),n.lineWidth=d.width,n.strokeStyle=d.color,n.setLineDash(d.borderDash||[]),n.lineDashOffset=d.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(r.display)for(i=0,s=o.length;i<s;++i){const l=o[i];r.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),r.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:e,ctx:r,options:{border:n,grid:o}}=this,i=n.setContext(this.getContext()),s=n.display?i.width:0;if(!s)return;const a=o.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,d,u,f;this.isHorizontal()?(c=cr(e,this.left,s)-s/2,d=cr(e,this.right,a)+a/2,u=f=l):(u=cr(e,this.top,s)-s/2,f=cr(e,this.bottom,a)+a/2,c=d=l),r.save(),r.lineWidth=i.width,r.strokeStyle=i.color,r.beginPath(),r.moveTo(c,u),r.lineTo(d,f),r.stroke(),r.restore()}drawLabels(e){if(!this.options.ticks.display)return;const n=this.ctx,o=this._computeLabelArea();o&&Ki(n,o);const i=this.getLabelItems(e);for(const s of i){const a=s.options,l=s.font,c=s.label,d=s.textOffset;po(n,c,0,d,l,a)}o&&Gi(n)}drawTitle(){const{ctx:e,options:{position:r,title:n,reverse:o}}=this;if(!n.display)return;const i=Ke(n.font),s=gt(n.padding),a=n.align;let l=i.lineHeight/2;r==="bottom"||r==="center"||oe(r)?(l+=s.bottom,ze(n.text)&&(l+=i.lineHeight*(n.text.length-1))):l+=s.top;const{titleX:c,titleY:d,maxWidth:u,rotation:f}=Am(this,l,r,a);po(e,n.text,0,0,i,{color:n.color,maxWidth:u,rotation:f,textAlign:Pm(a,r,o),textBaseline:"middle",translation:[c,d]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,r=e.ticks&&e.ticks.z||0,n=fe(e.grid&&e.grid.z,-1),o=fe(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==So.prototype.draw?[{z:r,draw:i=>{this.draw(i)}}]:[{z:n,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:r,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(e){const r=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",o=[];let i,s;for(i=0,s=r.length;i<s;++i){const a=r[i];a[n]===this.id&&(!e||a.type===e)&&o.push(a)}return o}_resolveTickFontOptions(e){const r=this.options.ticks.setContext(this.getContext(e));return Ke(r.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Eo{constructor(e,r,n){this.type=e,this.scope=r,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const r=Object.getPrototypeOf(e);let n;Lm(r)&&(n=this.register(r));const o=this.items,i=e.id,s=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+e);return i in o||(o[i]=e,Dm(e,s,n),this.override&&ke.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){const r=this.items,n=e.id,o=this.scope;n in r&&delete r[n],o&&n in ke[o]&&(delete ke[o][n],this.override&&delete lr[n])}}function Dm(t,e,r){const n=on(Object.create(null),[r?ke.get(r):{},ke.get(e),t.defaults]);ke.set(e,n),t.defaultRoutes&&Im(e,t.defaultRoutes),t.descriptors&&ke.describe(e,t.descriptors)}function Im(t,e){Object.keys(e).forEach(r=>{const n=r.split("."),o=n.pop(),i=[t].concat(n).join("."),s=e[r].split("."),a=s.pop(),l=s.join(".");ke.route(i,o,l,a)})}function Lm(t){return"id"in t&&"defaults"in t}class Fm{constructor(){this.controllers=new Eo(hn,"datasets",!0),this.elements=new Eo(vn,"elements"),this.plugins=new Eo(Object,"plugins"),this.scales=new Eo(So,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,r,n){[...r].forEach(o=>{const i=n||this._getRegistryForType(o);n||i.isForType(o)||i===this.plugins&&o.id?this._exec(e,i,o):he(o,s=>{const a=n||this._getRegistryForType(s);this._exec(e,a,s)})})}_exec(e,r,n){const o=Hi(e);ye(n["before"+o],[],n),r[e](n),ye(n["after"+o],[],n)}_getRegistryForType(e){for(let r=0;r<this._typedRegistries.length;r++){const n=this._typedRegistries[r];if(n.isForType(e))return n}return this.plugins}_get(e,r,n){const o=r.get(e);if(o===void 0)throw new Error('"'+e+'" is not a registered '+n+".");return o}}var wt=new Fm;class zm{constructor(){this._init=[]}notify(e,r,n,o){r==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const i=o?this._descriptors(e).filter(o):this._descriptors(e),s=this._notify(i,e,r,n);return r==="afterDestroy"&&(this._notify(i,e,"stop"),this._notify(this._init,e,"uninstall")),s}_notify(e,r,n,o){o=o||{};for(const i of e){const s=i.plugin,a=s[n],l=[r,o,i.options];if(ye(a,l,s)===!1&&o.cancelable)return!1}return!0}invalidate(){Ve(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const r=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),r}_createDescriptors(e,r){const n=e&&e.config,o=fe(n.options&&n.options.plugins,{}),i=Bm(n);return o===!1&&!r?[]:jm(e,i,o,r)}_notifyStateChanges(e){const r=this._oldCache||[],n=this._cache,o=(i,s)=>i.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(o(r,n),e,"stop"),this._notify(o(n,r),e,"start")}}function Bm(t){const e={},r=[],n=Object.keys(wt.plugins.items);for(let i=0;i<n.length;i++)r.push(wt.getPlugin(n[i]));const o=t.plugins||[];for(let i=0;i<o.length;i++){const s=o[i];r.indexOf(s)===-1&&(r.push(s),e[s.id]=!0)}return{plugins:r,localIds:e}}function $m(t,e){return!e&&t===!1?null:t===!0?{}:t}function jm(t,{plugins:e,localIds:r},n,o){const i=[],s=t.getContext();for(const a of e){const l=a.id,c=$m(n[l],o);c!==null&&i.push({plugin:a,options:Wm(t.config,{plugin:a,local:r[l]},c,s)})}return i}function Wm(t,{plugin:e,local:r},n,o){const i=t.pluginScopeKeys(e),s=t.getOptionScopes(n,i);return r&&e.defaults&&s.push(e.defaults),t.createResolver(s,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ds(t,e){const r=ke.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||r.indexAxis||"x"}function Hm(t,e){let r=t;return t==="_index_"?r=e:t==="_value_"&&(r=e==="x"?"y":"x"),r}function Vm(t,e){return t===e?"_index_":"_value_"}function sc(t){if(t==="x"||t==="y"||t==="r")return t}function Rm(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function us(t,...e){if(sc(t))return t;for(const r of e){const n=r.axis||Rm(r.position)||t.length>1&&sc(t[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function ac(t,e,r){if(r[e+"AxisID"]===t)return{axis:e}}function Ym(t,e){if(e.data&&e.data.datasets){const r=e.data.datasets.filter(n=>n.xAxisID===t||n.yAxisID===t);if(r.length)return ac(t,"x",r[0])||ac(t,"y",r[0])}return{}}function Um(t,e){const r=lr[t.type]||{scales:{}},n=e.scales||{},o=ds(t.type,e),i=Object.create(null);return Object.keys(n).forEach(s=>{const a=n[s];if(!oe(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=us(s,a,Ym(s,t),ke.scales[a.type]),c=Vm(l,o),d=r.scales||{};i[s]=sn(Object.create(null),[{axis:l},a,d[l],d[c]])}),t.data.datasets.forEach(s=>{const a=s.type||t.type,l=s.indexAxis||ds(a,e),d=(lr[a]||{}).scales||{};Object.keys(d).forEach(u=>{const f=Hm(u,l),h=s[f+"AxisID"]||f;i[h]=i[h]||Object.create(null),sn(i[h],[{axis:f},n[h],d[u]])})}),Object.keys(i).forEach(s=>{const a=i[s];sn(a,[ke.scales[a.type],ke.scale])}),i}function lc(t){const e=t.options||(t.options={});e.plugins=fe(e.plugins,{}),e.scales=Um(t,e)}function cc(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function qm(t){return t=t||{},t.data=cc(t.data),lc(t),t}const dc=new Map,uc=new Set;function Oo(t,e){let r=dc.get(t);return r||(r=e(),dc.set(t,r),uc.add(r)),r}const wn=(t,e,r)=>{const n=an(e,r);n!==void 0&&t.add(n)};class Km{constructor(e){this._config=qm(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=cc(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),lc(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Oo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,r){return Oo(`${e}.transition.${r}`,()=>[[`datasets.${e}.transitions.${r}`,`transitions.${r}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,r){return Oo(`${e}-${r}`,()=>[[`datasets.${e}.elements.${r}`,`datasets.${e}`,`elements.${r}`,""]])}pluginScopeKeys(e){const r=e.id,n=this.type;return Oo(`${n}-plugin-${r}`,()=>[[`plugins.${r}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,r){const n=this._scopeCache;let o=n.get(e);return(!o||r)&&(o=new Map,n.set(e,o)),o}getOptionScopes(e,r,n){const{options:o,type:i}=this,s=this._cachedScopes(e,n),a=s.get(r);if(a)return a;const l=new Set;r.forEach(d=>{e&&(l.add(e),d.forEach(u=>wn(l,e,u))),d.forEach(u=>wn(l,o,u)),d.forEach(u=>wn(l,lr[i]||{},u)),d.forEach(u=>wn(l,ke,u)),d.forEach(u=>wn(l,Ui,u))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),uc.has(r)&&s.set(r,c),c}chartOptionScopes(){const{options:e,type:r}=this;return[e,lr[r]||{},ke.datasets[r]||{},{type:r},ke,Ui]}resolveNamedOptions(e,r,n,o=[""]){const i={$shared:!0},{resolver:s,subPrefixes:a}=fc(this._resolverCache,e,o);let l=s;if(Xm(s,r)){i.$shared=!1,n=qt(n)?n():n;const c=this.createResolver(e,n,a);l=Mr(s,n,c)}for(const c of r)i[c]=l[c];return i}createResolver(e,r,n=[""],o){const{resolver:i}=fc(this._resolverCache,e,n);return oe(r)?Mr(i,r,void 0,o):i}}function fc(t,e,r){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=r.join();let i=n.get(o);return i||(i={resolver:Ji(e,r),subPrefixes:r.filter(a=>!a.toLowerCase().includes("hover"))},n.set(o,i)),i}const Gm=t=>oe(t)&&Object.getOwnPropertyNames(t).some(e=>qt(t[e]));function Xm(t,e){const{isScriptable:r,isIndexable:n}=Ol(t);for(const o of e){const i=r(o),s=n(o),a=(s||i)&&t[o];if(i&&(qt(a)||Gm(a))||s&&ze(a))return!0}return!1}var Zm="4.4.8";const Jm=["top","bottom","left","right","chartArea"];function hc(t,e){return t==="top"||t==="bottom"||Jm.indexOf(t)===-1&&e==="x"}function gc(t,e){return function(r,n){return r[t]===n[t]?r[e]-n[e]:r[t]-n[t]}}function pc(t){const e=t.chart,r=e.options.animation;e.notifyPlugins("afterRender"),ye(r&&r.onComplete,[t],e)}function Qm(t){const e=t.chart,r=e.options.animation;ye(r&&r.onProgress,[t],e)}function mc(t){return ts()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const To={},bc=t=>{const e=mc(t);return Object.values(To).filter(r=>r.canvas===e).pop()};function eb(t,e,r){const n=Object.keys(t);for(const o of n){const i=+o;if(i>=e){const s=t[o];delete t[o],(r>0||i>e)&&(t[i+r]=s)}}}function tb(t,e,r,n){return!r||t.type==="mouseout"?null:n?e:t}function No(t,e,r){return t.options.clip?t[r]:e[r]}function rb(t,e){const{xScale:r,yScale:n}=t;return r&&n?{left:No(r,e,"left"),right:No(r,e,"right"),top:No(n,e,"top"),bottom:No(n,e,"bottom")}:e}let Mo=(nr=class{static register(...e){wt.add(...e),yc()}static unregister(...e){wt.remove(...e),yc()}constructor(e,r){const n=this.config=new Km(r),o=mc(e),i=bc(o);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const s=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||vm(o)),this.platform.updateConfig(n);const a=this.platform.acquireContext(o,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,d=l&&l.width;if(this.id=Mp(),this.ctx=a,this.canvas=l,this.width=d,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 zm,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=qp(u=>this.update(u),s.resizeDelay||0),this._dataChanges=[],To[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Lt.listen(this,"complete",pc),Lt.listen(this,"progress",Qm),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:r},width:n,height:o,_aspectRatio:i}=this;return Ve(e)?r&&i?i:o?n/o:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return wt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Dl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Cl(this.canvas,this.ctx),this}stop(){return Lt.stop(this),this}resize(e,r){Lt.running(this)?this._resizeBeforeDraw={width:e,height:r}:this._resize(e,r)}_resize(e,r){const n=this.options,o=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(o,e,r,i),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Dl(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),ye(n.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const r=this.options.scales||{};he(r,(n,o)=>{n.id=o})}buildOrUpdateScales(){const e=this.options,r=e.scales,n=this.scales,o=Object.keys(n).reduce((s,a)=>(s[a]=!1,s),{});let i=[];r&&(i=i.concat(Object.keys(r).map(s=>{const a=r[s],l=us(s,a),c=l==="r",d=l==="x";return{options:a,dposition:c?"chartArea":d?"bottom":"left",dtype:c?"radialLinear":d?"category":"linear"}}))),he(i,s=>{const a=s.options,l=a.id,c=us(l,a),d=fe(a.type,s.dtype);(a.position===void 0||hc(a.position,c)!==hc(s.dposition))&&(a.position=s.dposition),o[l]=!0;let u=null;if(l in n&&n[l].type===d)u=n[l];else{const f=wt.getScale(d);u=new f({id:l,type:d,ctx:this.ctx,chart:this}),n[u.id]=u}u.init(a,e)}),he(o,(s,a)=>{s||delete n[a]}),he(n,s=>{Kt.configure(this,s,s.options),Kt.addBox(this,s)})}_updateMetasets(){const e=this._metasets,r=this.data.datasets.length,n=e.length;if(e.sort((o,i)=>o.index-i.index),n>r){for(let o=r;o<n;++o)this._destroyDatasetMeta(o);e.splice(r,n-r)}this._sortedMetasets=e.slice(0).sort(gc("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:r}}=this;e.length>r.length&&delete this._stacks,e.forEach((n,o)=>{r.filter(i=>i===n._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){const e=[],r=this.data.datasets;let n,o;for(this._removeUnreferencedMetasets(),n=0,o=r.length;n<o;n++){const i=r[n];let s=this.getDatasetMeta(n);const a=i.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(n),s=this.getDatasetMeta(n)),s.type=a,s.indexAxis=i.indexAxis||ds(a,this.options),s.order=i.order||0,s.index=n,s.label=""+i.label,s.visible=this.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const l=wt.getController(a),{datasetElementType:c,dataElementType:d}=ke.datasets[a];Object.assign(l,{dataElementType:wt.getElement(d),datasetElementType:c&&wt.getElement(c)}),s.controller=new l(this,n),e.push(s.controller)}}return this._updateMetasets(),e}_resetElements(){he(this.data.datasets,(e,r)=>{this.getDatasetMeta(r).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const r=this.config;r.update();const n=this._options=r.createResolver(r.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,d=this.data.datasets.length;c<d;c++){const{controller:u}=this.getDatasetMeta(c),f=!o&&i.indexOf(u)===-1;u.buildOrUpdateElements(f),s=Math.max(+u.getMaxOverflow(),s)}s=this._minPadding=n.layout.autoPadding?s:0,this._updateLayout(s),o||he(i,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(gc("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){he(this.scales,e=>{Kt.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,r=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!ll(r,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,r=this._getUniformDataChanges()||[];for(const{method:n,start:o,count:i}of r){const s=n==="_removeElements"?-i:i;eb(e,o,s)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const r=this.data.datasets.length,n=i=>new Set(e.filter(s=>s[0]===i).map((s,a)=>a+","+s.splice(1).join(","))),o=n(0);for(let i=1;i<r;i++)if(!ll(o,n(i)))return;return Array.from(o).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Kt.update(this,this.width,this.height,e);const r=this.chartArea,n=r.width<=0||r.height<=0;this._layers=[],he(this.boxes,o=>{n&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,i)=>{o._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let r=0,n=this.data.datasets.length;r<n;++r)this.getDatasetMeta(r).controller.configure();for(let r=0,n=this.data.datasets.length;r<n;++r)this._updateDataset(r,qt(e)?e({datasetIndex:r}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,r){const n=this.getDatasetMeta(e),o={meta:n,index:e,mode:r,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(n.controller._update(r),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Lt.has(this)?this.attached&&!Lt.running(this)&&Lt.start(this):(this.draw(),pc({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:n,height:o}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,o)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const r=this._layers;for(e=0;e<r.length&&r[e].z<=0;++e)r[e].draw(this.chartArea);for(this._drawDatasets();e<r.length;++e)r[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const r=this._sortedMetasets,n=[];let o,i;for(o=0,i=r.length;o<i;++o){const s=r[o];(!e||s.visible)&&n.push(s)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let r=e.length-1;r>=0;--r)this._drawDataset(e[r]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const r=this.ctx,n=e._clip,o=!n.disabled,i=rb(e,this.chartArea),s={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(o&&Ki(r,{left:n.left===!1?0:i.left-n.left,right:n.right===!1?this.width:i.right+n.right,top:n.top===!1?0:i.top-n.top,bottom:n.bottom===!1?this.height:i.bottom+n.bottom}),e.controller.draw(),o&&Gi(r),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return El(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,r,n,o){const i=J0.modes[r];return typeof i=="function"?i(this,e,n,o):[]}getDatasetMeta(e){const r=this.data.datasets[e],n=this._metasets;let o=n.filter(i=>i&&i._dataset===r).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r&&r.order||0,index:e,_dataset:r,_parsed:[],_sorted:!1},n.push(o)),o}getContext(){return this.$context||(this.$context=Nr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const r=this.data.datasets[e];if(!r)return!1;const n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!r.hidden}setDatasetVisibility(e,r){const n=this.getDatasetMeta(e);n.hidden=!r}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,r,n){const o=n?"show":"hide",i=this.getDatasetMeta(e),s=i.controller._resolveAnimations(void 0,o);co(r)?(i.data[r].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),s.update(i,{visible:n}),this.update(a=>a.datasetIndex===e?o:void 0))}hide(e,r){this._updateVisibility(e,r,!1)}show(e,r){this._updateVisibility(e,r,!0)}_destroyDatasetMeta(e){const r=this._metasets[e];r&&r.controller&&r.controller._destroy(),delete this._metasets[e]}_stop(){let e,r;for(this.stop(),Lt.remove(this),e=0,r=this.data.datasets.length;e<r;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:r}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Cl(e,r),this.platform.releaseContext(r),this.canvas=null,this.ctx=null),delete To[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,r=this.platform,n=(i,s)=>{r.addEventListener(this,i,s),e[i]=s},o=(i,s,a)=>{i.offsetX=s,i.offsetY=a,this._eventHandler(i)};he(this.options.events,i=>n(i,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,r=this.platform,n=(l,c)=>{r.addEventListener(this,l,c),e[l]=c},o=(l,c)=>{e[l]&&(r.removeEventListener(this,l,c),delete e[l])},i=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{o("attach",a),this.attached=!0,this.resize(),n("resize",i),n("detach",s)};s=()=>{this.attached=!1,o("resize",i),this._stop(),this._resize(0,0),n("attach",a)},r.isAttached(this.canvas)?a():s()}unbindEvents(){he(this._listeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._listeners={},he(this._responsiveListeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,r,n){const o=n?"set":"remove";let i,s,a,l;for(r==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+o+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){s=e[a];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[o+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const r=this._active||[],n=e.map(({datasetIndex:i,index:s})=>{const a=this.getDatasetMeta(i);if(!a)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:a.data[s],index:s}});!ao(n,r)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,r))}notifyPlugins(e,r,n){return this._plugins.notify(this,e,r,n)}isPluginEnabled(e){return this._plugins._cache.filter(r=>r.plugin.id===e).length===1}_updateHoverStyles(e,r,n){const o=this.options.hover,i=(l,c)=>l.filter(d=>!c.some(u=>d.datasetIndex===u.datasetIndex&&d.index===u.index)),s=i(r,e),a=n?e:i(e,r);s.length&&this.updateHoverStyle(s,o.mode,!1),a.length&&o.mode&&this.updateHoverStyle(a,o.mode,!0)}_eventHandler(e,r){const n={event:e,replay:r,cancelable:!0,inChartArea:this.isPointInArea(e)},o=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,o)===!1)return;const i=this._handleEvent(e,r,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,o),(i||n.changed)&&this.render(),this}_handleEvent(e,r,n){const{_active:o=[],options:i}=this,s=r,a=this._getActiveElements(e,o,n,s),l=Fp(e),c=tb(e,this._lastEvent,n,l);n&&(this._lastEvent=null,ye(i.onHover,[e,a,this],this),l&&ye(i.onClick,[e,a,this],this));const d=!ao(a,o);return(d||r)&&(this._active=a,this._updateHoverStyles(a,o,r)),this._lastEvent=c,d}_getActiveElements(e,r,n,o){if(e.type==="mouseout")return[];if(!n)return r;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,o)}},te(nr,"defaults",ke),te(nr,"instances",To),te(nr,"overrides",lr),te(nr,"registry",wt),te(nr,"version",Zm),te(nr,"getChart",bc),nr);function yc(){return he(Mo.instances,t=>t._plugins.invalidate())}function nb(t,e,r){const{startAngle:n,pixelMargin:o,x:i,y:s,outerRadius:a,innerRadius:l}=e;let c=o/a;t.beginPath(),t.arc(i,s,a,n-c,r+c),l>o?(c=o/l,t.arc(i,s,l,r+c,n-c,!0)):t.arc(i,s,o,r+Ne,n-Ne),t.closePath(),t.clip()}function ob(t){return Zi(t,["outerStart","outerEnd","innerStart","innerEnd"])}function ib(t,e,r,n){const o=ob(t.options.borderRadius),i=(r-e)/2,s=Math.min(i,n*e/2),a=l=>{const c=(r-Math.min(i,l))*n/2;return lt(l,0,Math.min(i,c))};return{outerStart:a(o.outerStart),outerEnd:a(o.outerEnd),innerStart:lt(o.innerStart,0,s),innerEnd:lt(o.innerEnd,0,s)}}function Ar(t,e,r,n){return{x:r+t*Math.cos(e),y:n+t*Math.sin(e)}}function Po(t,e,r,n,o,i){const{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:d}=e,u=Math.max(e.outerRadius+n+r-c,0),f=d>0?d+n+r+c:0;let h=0;const p=o-l;if(n){const P=d>0?d-n:0,L=u>0?u-n:0,z=(P+L)/2,B=z!==0?p*z/(z+n):p;h=(p-B)/2}const m=Math.max(.001,p*u-r/De)/u,b=(p-m)/2,v=l+b+h,y=o-b-h,{outerStart:_,outerEnd:x,innerStart:w,innerEnd:S}=ib(e,f,u,y-v),T=u-_,M=u-x,N=v+_/T,E=y-x/M,I=f+w,A=f+S,D=v+w/I,O=y-S/A;if(t.beginPath(),i){const P=(N+E)/2;if(t.arc(s,a,u,N,P),t.arc(s,a,u,P,E),x>0){const j=Ar(M,E,s,a);t.arc(j.x,j.y,x,E,y+Ne)}const L=Ar(A,y,s,a);if(t.lineTo(L.x,L.y),S>0){const j=Ar(A,O,s,a);t.arc(j.x,j.y,S,y+Ne,O+Math.PI)}const z=(y-S/f+(v+w/f))/2;if(t.arc(s,a,f,y-S/f,z,!0),t.arc(s,a,f,z,v+w/f,!0),w>0){const j=Ar(I,D,s,a);t.arc(j.x,j.y,w,D+Math.PI,v-Ne)}const B=Ar(T,v,s,a);if(t.lineTo(B.x,B.y),_>0){const j=Ar(T,N,s,a);t.arc(j.x,j.y,_,v-Ne,N)}}else{t.moveTo(s,a);const P=Math.cos(N)*u+s,L=Math.sin(N)*u+a;t.lineTo(P,L);const z=Math.cos(E)*u+s,B=Math.sin(E)*u+a;t.lineTo(z,B)}t.closePath()}function sb(t,e,r,n,o){const{fullCircles:i,startAngle:s,circumference:a}=e;let l=e.endAngle;if(i){Po(t,e,r,n,l,o);for(let c=0;c<i;++c)t.fill();isNaN(a)||(l=s+(a%_e||_e))}return Po(t,e,r,n,l,o),t.fill(),l}function ab(t,e,r,n,o){const{fullCircles:i,startAngle:s,circumference:a,options:l}=e,{borderWidth:c,borderJoinStyle:d,borderDash:u,borderDashOffset:f}=l,h=l.borderAlign==="inner";if(!c)return;t.setLineDash(u||[]),t.lineDashOffset=f,h?(t.lineWidth=c*2,t.lineJoin=d||"round"):(t.lineWidth=c,t.lineJoin=d||"bevel");let p=e.endAngle;if(i){Po(t,e,r,n,p,o);for(let m=0;m<i;++m)t.stroke();isNaN(a)||(p=s+(a%_e||_e))}h&&nb(t,e,p),i||(Po(t,e,r,n,p,o),t.stroke())}class kn extends vn{constructor(r){super();te(this,"circumference");te(this,"endAngle");te(this,"fullCircles");te(this,"innerRadius");te(this,"outerRadius");te(this,"pixelMargin");te(this,"startAngle");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,r&&Object.assign(this,r)}inRange(r,n,o){const i=this.getProps(["x","y"],o),{angle:s,distance:a}=ul(i,{x:r,y:n}),{startAngle:l,endAngle:c,innerRadius:d,outerRadius:u,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],o),h=(this.options.spacing+this.options.borderWidth)/2,p=fe(f,c-l),m=ho(s,l,c)&&l!==c,b=p>=_e||m,v=ln(a,d+h,u+h);return b&&v}getCenterPoint(r){const{x:n,y:o,startAngle:i,endAngle:s,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],r),{offset:c,spacing:d}=this.options,u=(i+s)/2,f=(a+l+d+c)/2;return{x:n+Math.cos(u)*f,y:o+Math.sin(u)*f}}tooltipPosition(r){return this.getCenterPoint(r)}draw(r){const{options:n,circumference:o}=this,i=(n.offset||0)/4,s=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=o>_e?Math.floor(o/_e):0,o===0||this.innerRadius<0||this.outerRadius<0)return;r.save();const l=(this.startAngle+this.endAngle)/2;r.translate(Math.cos(l)*i,Math.sin(l)*i);const c=1-Math.sin(Math.min(De,o||0)),d=i*c;r.fillStyle=n.backgroundColor,r.strokeStyle=n.borderColor,sb(r,this,d,s,a),ab(r,this,d,s,a),r.restore()}}te(kn,"id","arc"),te(kn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),te(kn,"defaultRoutes",{backgroundColor:"backgroundColor"}),te(kn,"descriptors",{_scriptable:!0,_indexable:r=>r!=="borderDash"});const vc=(t,e)=>{let{boxHeight:r=e,boxWidth:n=e}=t;return t.usePointStyle&&(r=Math.min(r,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:r,itemHeight:Math.max(e,r)}},lb=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class xc extends vn{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,r,n){this.maxWidth=e,this.maxHeight=r,this._margins=n,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 e=this.options.labels||{};let r=ye(e.generateLabels,[this.chart],this)||[];e.filter&&(r=r.filter(n=>e.filter(n,this.chart.data))),e.sort&&(r=r.sort((n,o)=>e.sort(n,o,this.chart.data))),this.options.reverse&&r.reverse(),this.legendItems=r}fit(){const{options:e,ctx:r}=this;if(!e.display){this.width=this.height=0;return}const n=e.labels,o=Ke(n.font),i=o.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=vc(n,i);let c,d;r.font=o.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(s,i,a,l)+10):(d=this.maxHeight,c=this._fitCols(s,o,a,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(d,e.maxHeight||this.maxHeight)}_fitRows(e,r,n,o){const{ctx:i,maxWidth:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=o+a;let u=e;i.textAlign="left",i.textBaseline="middle";let f=-1,h=-d;return this.legendItems.forEach((p,m)=>{const b=n+r/2+i.measureText(p.text).width;(m===0||c[c.length-1]+b+2*a>s)&&(u+=d,c[c.length-(m>0?0:1)]=0,h+=d,f++),l[m]={left:0,top:h,row:f,width:b,height:o},c[c.length-1]+=b+a}),u}_fitCols(e,r,n,o){const{ctx:i,maxHeight:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=s-e;let u=a,f=0,h=0,p=0,m=0;return this.legendItems.forEach((b,v)=>{const{itemWidth:y,itemHeight:_}=cb(n,r,i,b,o);v>0&&h+_+2*a>d&&(u+=f+a,c.push({width:f,height:h}),p+=f+a,m++,f=h=0),l[v]={left:p,top:h,col:m,width:y,height:_},f=Math.max(f,y),h+=_+a}),u+=f,c.push({width:f,height:h}),u}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:r,options:{align:n,labels:{padding:o},rtl:i}}=this,s=Pr(i,this.left,this.width);if(this.isHorizontal()){let a=0,l=tt(n,this.left+o,this.right-this.lineWidths[a]);for(const c of r)a!==c.row&&(a=c.row,l=tt(n,this.left+o,this.right-this.lineWidths[a])),c.top+=this.top+e+o,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+o}else{let a=0,l=tt(n,this.top+e+o,this.bottom-this.columnSizes[a].height);for(const c of r)c.col!==a&&(a=c.col,l=tt(n,this.top+e+o,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+o,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+o}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Ki(e,this),this._draw(),Gi(e)}}_draw(){const{options:e,columnSizes:r,lineWidths:n,ctx:o}=this,{align:i,labels:s}=e,a=ke.color,l=Pr(e.rtl,this.left,this.width),c=Ke(s.font),{padding:d}=s,u=c.size,f=u/2;let h;this.drawTitle(),o.textAlign=l.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:b}=vc(s,u),v=function(S,T,M){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;o.save();const N=fe(M.lineWidth,1);if(o.fillStyle=fe(M.fillStyle,a),o.lineCap=fe(M.lineCap,"butt"),o.lineDashOffset=fe(M.lineDashOffset,0),o.lineJoin=fe(M.lineJoin,"miter"),o.lineWidth=N,o.strokeStyle=fe(M.strokeStyle,a),o.setLineDash(fe(M.lineDash,[])),s.usePointStyle){const E={radius:m*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:N},I=l.xPlus(S,p/2),A=T+f;Sl(o,E,I,A,s.pointStyleWidth&&p)}else{const E=T+Math.max((u-m)/2,0),I=l.leftForLtr(S,p),A=un(M.borderRadius);o.beginPath(),Object.values(A).some(D=>D!==0)?Xi(o,{x:I,y:E,w:p,h:m,radius:A}):o.rect(I,E,p,m),o.fill(),N!==0&&o.stroke()}o.restore()},y=function(S,T,M){po(o,M.text,S,T+b/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},_=this.isHorizontal(),x=this._computeTitleHeight();_?h={x:tt(i,this.left+d,this.right-n[0]),y:this.top+d+x,line:0}:h={x:this.left+d,y:tt(i,this.top+x+d,this.bottom-r[0].height),line:0},Ll(this.ctx,e.textDirection);const w=b+d;this.legendItems.forEach((S,T)=>{o.strokeStyle=S.fontColor,o.fillStyle=S.fontColor;const M=o.measureText(S.text).width,N=l.textAlign(S.textAlign||(S.textAlign=s.textAlign)),E=p+f+M;let I=h.x,A=h.y;l.setWidth(this.width),_?T>0&&I+E+d>this.right&&(A=h.y+=w,h.line++,I=h.x=tt(i,this.left+d,this.right-n[h.line])):T>0&&A+w>this.bottom&&(I=h.x=I+r[h.line].width+d,h.line++,A=h.y=tt(i,this.top+x+d,this.bottom-r[h.line].height));const D=l.x(I);if(v(D,A,S),I=Kp(N,I+p+f,_?I+E:this.right,e.rtl),y(l.x(I),A,S),_)h.x+=E+d;else if(typeof S.text!="string"){const O=c.lineHeight;h.y+=wc(S,O)+d}else h.y+=w}),Fl(this.ctx,e.textDirection)}drawTitle(){const e=this.options,r=e.title,n=Ke(r.font),o=gt(r.padding);if(!r.display)return;const i=Pr(e.rtl,this.left,this.width),s=this.ctx,a=r.position,l=n.size/2,c=o.top+l;let d,u=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),d=this.top+c,u=tt(e.align,u,this.right-f);else{const p=this.columnSizes.reduce((m,b)=>Math.max(m,b.height),0);d=c+tt(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const h=tt(a,u,u+f);s.textAlign=i.textAlign(ml(a)),s.textBaseline="middle",s.strokeStyle=r.color,s.fillStyle=r.color,s.font=n.string,po(s,r.text,h,d,n)}_computeTitleHeight(){const e=this.options.title,r=Ke(e.font),n=gt(e.padding);return e.display?r.lineHeight+n.height:0}_getLegendItemAt(e,r){let n,o,i;if(ln(e,this.left,this.right)&&ln(r,this.top,this.bottom)){for(i=this.legendHitBoxes,n=0;n<i.length;++n)if(o=i[n],ln(e,o.left,o.left+o.width)&&ln(r,o.top,o.top+o.height))return this.legendItems[n]}return null}handleEvent(e){const r=this.options;if(!fb(e.type,r))return;const n=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const o=this._hoveredItem,i=lb(o,n);o&&!i&&ye(r.onLeave,[e,o,this],this),this._hoveredItem=n,n&&!i&&ye(r.onHover,[e,n,this],this)}else n&&ye(r.onClick,[e,n,this],this)}}function cb(t,e,r,n,o){const i=db(n,t,e,r),s=ub(o,n,e.lineHeight);return{itemWidth:i,itemHeight:s}}function db(t,e,r,n){let o=t.text;return o&&typeof o!="string"&&(o=o.reduce((i,s)=>i.length>s.length?i:s)),e+r.size/2+n.measureText(o).width}function ub(t,e,r){let n=t;return typeof e.text!="string"&&(n=wc(e,r)),n}function wc(t,e){const r=t.text?t.text.length:0;return e*r}function fb(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var hb={id:"legend",_element:xc,start(t,e,r){const n=t.legend=new xc({ctx:t.ctx,options:r,chart:t});Kt.configure(t,n,r),Kt.addBox(t,n)},stop(t){Kt.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,r){const n=t.legend;Kt.configure(t,n,r),n.options=r},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,r){const n=e.datasetIndex,o=r.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:r,pointStyle:n,textAlign:o,color:i,useBorderRadius:s,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(r?0:void 0),d=gt(c.borderWidth);return{text:e[l.index].label,fillStyle:c.backgroundColor,fontColor:i,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:o||c.textAlign,borderRadius:s&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};const Cn={average(t){if(!t.length)return!1;let e,r,n=new Set,o=0,i=0;for(e=0,r=t.length;e<r;++e){const a=t[e].element;if(a&&a.hasValue()){const l=a.tooltipPosition();n.add(l.x),o+=l.y,++i}}return i===0||n.size===0?!1:{x:[...n].reduce((a,l)=>a+l)/n.size,y:o/i}},nearest(t,e){if(!t.length)return!1;let r=e.x,n=e.y,o=Number.POSITIVE_INFINITY,i,s,a;for(i=0,s=t.length;i<s;++i){const l=t[i].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),d=Wp(e,c);d<o&&(o=d,a=l)}}if(a){const l=a.tooltipPosition();r=l.x,n=l.y}return{x:r,y:n}}};function kt(t,e){return e&&(ze(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ft(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
17
17
|
`)>-1?t.split(`
|
|
18
|
-
`):t}function ub(t,e){const{element:r,datasetIndex:n,index:o}=e,i=t.getDatasetMeta(n).controller,{label:s,value:a}=i.getLabelAndValue(o);return{chart:t,label:s,parsed:i.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:a,dataset:i.getDataset(),dataIndex:o,datasetIndex:n,element:r}}function vc(t,e){const r=t.chart.ctx,{body:n,footer:o,title:i}=t,{boxWidth:s,boxHeight:a}=e,l=Ke(e.bodyFont),c=Ke(e.titleFont),d=Ke(e.footerFont),u=i.length,f=o.length,h=n.length,g=gt(e.padding);let m=g.height,b=0,v=n.reduce((x,w)=>x+w.before.length+w.lines.length+w.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),v){const x=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=h*x+(v-h)*l.lineHeight+(v-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*d.lineHeight+(f-1)*e.footerSpacing);let y=0;const _=function(x){b=Math.max(b,r.measureText(x).width+y)};return r.save(),r.font=c.string,he(t.title,_),r.font=l.string,he(t.beforeBody.concat(t.afterBody),_),y=e.displayColors?s+2+e.boxPadding:0,he(n,x=>{he(x.before,_),he(x.lines,_),he(x.after,_)}),y=0,r.font=d.string,he(t.footer,_),r.restore(),b+=g.width,{width:b,height:m}}function fb(t,e){const{y:r,height:n}=e;return r<n/2?"top":r>t.height-n/2?"bottom":"center"}function hb(t,e,r,n){const{x:o,width:i}=n,s=r.caretSize+r.caretPadding;if(t==="left"&&o+i+s>e.width||t==="right"&&o-i-s<0)return!0}function gb(t,e,r,n){const{x:o,width:i}=r,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return n==="center"?c=o<=(a+l)/2?"left":"right":o<=i/2?c="left":o>=s-i/2&&(c="right"),hb(c,t,e,r)&&(c="center"),c}function xc(t,e,r){const n=r.yAlign||e.yAlign||fb(t,r);return{xAlign:r.xAlign||e.xAlign||gb(t,e,r,n),yAlign:n}}function pb(t,e){let{x:r,width:n}=t;return e==="right"?r-=n:e==="center"&&(r-=n/2),r}function mb(t,e,r){let{y:n,height:o}=t;return e==="top"?n+=r:e==="bottom"?n-=o+r:n-=o/2,n}function wc(t,e,r,n){const{caretSize:o,caretPadding:i,cornerRadius:s}=t,{xAlign:a,yAlign:l}=r,c=o+i,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:h}=un(s);let g=pb(e,a);const m=mb(e,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(d,f)+o:a==="right"&&(g+=Math.max(u,h)+o),{x:lt(g,0,n.width-e.width),y:lt(m,0,n.height-e.height)}}function Po(t,e,r){const n=gt(r.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-n.right:t.x+n.left}function kc(t){return kt([],Ft(t))}function bb(t,e,r){return Mr(t,{tooltip:e,tooltipItems:r,type:"tooltip"})}function Cc(t,e){const r=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return r?t.override(r):t}const _c={beforeTitle:Dt,title(t){if(t.length>0){const e=t[0],r=e.chart.data.labels,n=r?r.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return r[e.dataIndex]}return""},afterTitle:Dt,beforeBody:Dt,beforeLabel:Dt,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const r=t.formattedValue;return Re(r)||(e+=r),e},labelColor(t){const r=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:r.borderColor,backgroundColor:r.backgroundColor,borderWidth:r.borderWidth,borderDash:r.borderDash,borderDashOffset:r.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const r=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:r.pointStyle,rotation:r.rotation}},afterLabel:Dt,afterBody:Dt,beforeFooter:Dt,footer:Dt,afterFooter:Dt};function Ge(t,e,r,n){const o=t[e].call(r,n);return typeof o>"u"?_c[e].call(r,n):o}let Sc=(Ba=class extends vn{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const r=this.chart,n=this.options.setContext(this.getContext()),o=n.enabled&&r.options.animation&&n.animations,i=new Ll(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=bb(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,r){const{callbacks:n}=r,o=Ge(n,"beforeTitle",this,e),i=Ge(n,"title",this,e),s=Ge(n,"afterTitle",this,e);let a=[];return a=kt(a,Ft(o)),a=kt(a,Ft(i)),a=kt(a,Ft(s)),a}getBeforeBody(e,r){return kc(Ge(r.callbacks,"beforeBody",this,e))}getBody(e,r){const{callbacks:n}=r,o=[];return he(e,i=>{const s={before:[],lines:[],after:[]},a=Cc(n,i);kt(s.before,Ft(Ge(a,"beforeLabel",this,i))),kt(s.lines,Ge(a,"label",this,i)),kt(s.after,Ft(Ge(a,"afterLabel",this,i))),o.push(s)}),o}getAfterBody(e,r){return kc(Ge(r.callbacks,"afterBody",this,e))}getFooter(e,r){const{callbacks:n}=r,o=Ge(n,"beforeFooter",this,e),i=Ge(n,"footer",this,e),s=Ge(n,"afterFooter",this,e);let a=[];return a=kt(a,Ft(o)),a=kt(a,Ft(i)),a=kt(a,Ft(s)),a}_createItems(e){const r=this._active,n=this.chart.data,o=[],i=[],s=[];let a=[],l,c;for(l=0,c=r.length;l<c;++l)a.push(ub(this.chart,r[l]));return e.filter&&(a=a.filter((d,u,f)=>e.filter(d,u,f,n))),e.itemSort&&(a=a.sort((d,u)=>e.itemSort(d,u,n))),he(a,d=>{const u=Cc(e.callbacks,d);o.push(Ge(u,"labelColor",this,d)),i.push(Ge(u,"labelPointStyle",this,d)),s.push(Ge(u,"labelTextColor",this,d))}),this.labelColors=o,this.labelPointStyles=i,this.labelTextColors=s,this.dataPoints=a,a}update(e,r){const n=this.options.setContext(this.getContext()),o=this._active;let i,s=[];if(!o.length)this.opacity!==0&&(i={opacity:0});else{const a=Cn[n.position].call(this,o,this._eventPosition);s=this._createItems(n),this.title=this.getTitle(s,n),this.beforeBody=this.getBeforeBody(s,n),this.body=this.getBody(s,n),this.afterBody=this.getAfterBody(s,n),this.footer=this.getFooter(s,n);const l=this._size=vc(this,n),c=Object.assign({},a,l),d=xc(this.chart,n,c),u=wc(n,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,i={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:r})}drawCaret(e,r,n,o){const i=this.getCaretPosition(e,n,o);r.lineTo(i.x1,i.y1),r.lineTo(i.x2,i.y2),r.lineTo(i.x3,i.y3)}getCaretPosition(e,r,n){const{xAlign:o,yAlign:i}=this,{caretSize:s,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:u}=un(a),{x:f,y:h}=e,{width:g,height:m}=r;let b,v,y,_,x,w;return i==="center"?(x=h+m/2,o==="left"?(b=f,v=b-s,_=x+s,w=x-s):(b=f+g,v=b+s,_=x-s,w=x+s),y=b):(o==="left"?v=f+Math.max(l,d)+s:o==="right"?v=f+g-Math.max(c,u)-s:v=this.caretX,i==="top"?(_=h,x=_-s,b=v-s,y=v+s):(_=h+m,x=_+s,b=v+s,y=v-s),w=_),{x1:b,x2:v,x3:y,y1:_,y2:x,y3:w}}drawTitle(e,r,n){const o=this.title,i=o.length;let s,a,l;if(i){const c=Pr(n.rtl,this.x,this.width);for(e.x=Po(this,n.titleAlign,n),r.textAlign=c.textAlign(n.titleAlign),r.textBaseline="middle",s=Ke(n.titleFont),a=n.titleSpacing,r.fillStyle=n.titleColor,r.font=s.string,l=0;l<i;++l)r.fillText(o[l],c.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+a,l+1===i&&(e.y+=n.titleMarginBottom-a)}}_drawColorBox(e,r,n,o,i){const s=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=i,d=Ke(i.bodyFont),u=Po(this,"left",i),f=o.x(u),h=l<d.lineHeight?(d.lineHeight-l)/2:0,g=r.y+h;if(i.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},b=o.leftForLtr(f,c)+c/2,v=g+l/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,wl(e,m,b,v),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,wl(e,m,b,v)}else{e.lineWidth=ne(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const m=o.leftForLtr(f,c),b=o.leftForLtr(o.xPlus(f,1),c-2),v=un(s.borderRadius);Object.values(v).some(y=>y!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,Ki(e,{x:m,y:g,w:c,h:l,radius:v}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),Ki(e,{x:b,y:g+1,w:c-2,h:l-2,radius:v}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(m,g,c,l),e.strokeRect(m,g,c,l),e.fillStyle=s.backgroundColor,e.fillRect(b,g+1,c-2,l-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,r,n){const{body:o}=this,{bodySpacing:i,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:d}=n,u=Ke(n.bodyFont);let f=u.lineHeight,h=0;const g=Pr(n.rtl,this.x,this.width),m=function(N){r.fillText(N,g.x(e.x+h),e.y+f/2),e.y+=f+i},b=g.textAlign(s);let v,y,_,x,w,S,T;for(r.textAlign=s,r.textBaseline="middle",r.font=u.string,e.x=Po(this,b,n),r.fillStyle=n.bodyColor,he(this.beforeBody,m),h=a&&b!=="right"?s==="center"?c/2+d:c+2+d:0,x=0,S=o.length;x<S;++x){for(v=o[x],y=this.labelTextColors[x],r.fillStyle=y,he(v.before,m),_=v.lines,a&&_.length&&(this._drawColorBox(r,e,x,g,n),f=Math.max(u.lineHeight,l)),w=0,T=_.length;w<T;++w)m(_[w]),f=u.lineHeight;he(v.after,m)}h=0,f=u.lineHeight,he(this.afterBody,m),e.y-=i}drawFooter(e,r,n){const o=this.footer,i=o.length;let s,a;if(i){const l=Pr(n.rtl,this.x,this.width);for(e.x=Po(this,n.footerAlign,n),e.y+=n.footerMarginTop,r.textAlign=l.textAlign(n.footerAlign),r.textBaseline="middle",s=Ke(n.footerFont),r.fillStyle=n.footerColor,r.font=s.string,a=0;a<i;++a)r.fillText(o[a],l.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+n.footerSpacing}}drawBackground(e,r,n,o){const{xAlign:i,yAlign:s}=this,{x:a,y:l}=e,{width:c,height:d}=n,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:g}=un(o.cornerRadius);r.fillStyle=o.backgroundColor,r.strokeStyle=o.borderColor,r.lineWidth=o.borderWidth,r.beginPath(),r.moveTo(a+u,l),s==="top"&&this.drawCaret(e,r,n,o),r.lineTo(a+c-f,l),r.quadraticCurveTo(a+c,l,a+c,l+f),s==="center"&&i==="right"&&this.drawCaret(e,r,n,o),r.lineTo(a+c,l+d-g),r.quadraticCurveTo(a+c,l+d,a+c-g,l+d),s==="bottom"&&this.drawCaret(e,r,n,o),r.lineTo(a+h,l+d),r.quadraticCurveTo(a,l+d,a,l+d-h),s==="center"&&i==="left"&&this.drawCaret(e,r,n,o),r.lineTo(a,l+u),r.quadraticCurveTo(a,l,a+u,l),r.closePath(),r.fill(),o.borderWidth>0&&r.stroke()}_updateAnimationTarget(e){const r=this.chart,n=this.$animations,o=n&&n.x,i=n&&n.y;if(o||i){const s=Cn[e.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=vc(this,e),l=Object.assign({},s,this._size),c=xc(r,e,l),d=wc(e,l,c,r);(o._to!==d.x||i._to!==d.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,d))}}_willRender(){return!!this.opacity}draw(e){const r=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(r);const o={width:this.width,height:this.height},i={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const s=gt(r.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;r.enabled&&a&&(e.save(),e.globalAlpha=n,this.drawBackground(i,e,o,r),Al(e,r.textDirection),i.y+=s.top,this.drawTitle(i,e,r),this.drawBody(i,e,r),this.drawFooter(i,e,r),Dl(e,r.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,r){const n=this._active,o=e.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}}),i=!so(n,o),s=this._positionChanged(o,r);(i||s)&&(this._active=o,this._eventPosition=r,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,r,n=!0){if(r&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,i=this._active||[],s=this._getActiveElements(e,i,r,n),a=this._positionChanged(s,e),l=r||!so(s,i)||a;return l&&(this._active=s,(o.enabled||o.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,r))),l}_getActiveElements(e,r,n,o){const i=this.options;if(e.type==="mouseout")return[];if(!o)return r.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const s=this.chart.getElementsAtEventForMode(e,i.mode,i,n);return i.reverse&&s.reverse(),s}_positionChanged(e,r){const{caretX:n,caretY:o,options:i}=this,s=Cn[i.position].call(this,e,r);return s!==!1&&(n!==s.x||o!==s.y)}},te(Ba,"positioners",Cn),Ba);var yb={id:"tooltip",_element:Sc,positioners:Cn,afterInit(t,e,r){r&&(t.tooltip=new Sc({chart:t,options:r}))},beforeUpdate(t,e,r){t.tooltip&&t.tooltip.initialize(r)},reset(t,e,r){t.tooltip&&t.tooltip.initialize(r)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const r={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...r,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",r)}},afterEvent(t,e){if(t.tooltip){const r=e.replay;t.tooltip.handleEvent(e.event,r,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:_c},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Ao={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}},Xe=Object.keys(Ao);function Ec(t,e){return t-e}function Oc(t,e){if(Re(e))return null;const r=t._adapter,{parser:n,round:o,isoWeekday:i}=t._parseOpts;let s=e;return typeof n=="function"&&(s=n(s)),It(s)||(s=typeof n=="string"?r.parse(s,n):r.parse(s)),s===null?null:(o&&(s=o==="week"&&(uo(i)||i===!0)?r.startOf(s,"isoWeek",i):r.startOf(s,o)),+s)}function Tc(t,e,r,n){const o=Xe.length;for(let i=Xe.indexOf(t);i<o-1;++i){const s=Ao[Xe[i]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((r-e)/(a*s.size))<=n)return Xe[i]}return Xe[o-1]}function vb(t,e,r,n,o){for(let i=Xe.length-1;i>=Xe.indexOf(r);i--){const s=Xe[i];if(Ao[s].common&&t._adapter.diff(o,n,s)>=e-1)return s}return Xe[r?Xe.indexOf(r):0]}function xb(t){for(let e=Xe.indexOf(t)+1,r=Xe.length;e<r;++e)if(Ao[Xe[e]].common)return Xe[e]}function Mc(t,e,r){if(!r)t[e]=!0;else if(r.length){const{lo:n,hi:o}=Wi(r,e),i=r[n]>=e?r[n]:r[o];t[i]=!0}}function wb(t,e,r,n){const o=t._adapter,i=+o.startOf(e[0].value,n),s=e[e.length-1].value;let a,l;for(a=i;a<=s;a=+o.add(a,1,n))l=r[a],l>=0&&(e[l].major=!0);return e}function Nc(t,e,r){const n=[],o={},i=e.length;let s,a;for(s=0;s<i;++s)a=e[s],o[a]=s,n.push({value:a,major:!1});return i===0||!r?n:wb(t,n,o,r)}class Do extends _o{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,r={}){const n=e.time||(e.time={}),o=this._adapter=new V0._date(e.adapters.date);o.init(r),sn(n.displayFormats,o.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=r.normalized}parse(e,r){return e===void 0?null:Oc(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,r=this._adapter,n=e.time.unit||"day";let{min:o,max:i,minDefined:s,maxDefined:a}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(o=Math.min(o,c.min)),!a&&!isNaN(c.max)&&(i=Math.max(i,c.max))}(!s||!a)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),o=It(o)&&!isNaN(o)?o:+r.startOf(Date.now(),n),i=It(i)&&!isNaN(i)?i:+r.endOf(Date.now(),n)+1,this.min=Math.min(o,i-1),this.max=Math.max(o+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(r=e[0],n=e[e.length-1]),{min:r,max:n}}buildTicks(){const e=this.options,r=e.time,n=e.ticks,o=n.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);const i=this.min,s=this.max,a=Wp(o,i,s);return this._unit=r.unit||(n.autoSkip?Tc(r.minUnit,this.min,this.max,this._getLabelCapacity(i)):vb(this,a.length,r.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:xb(this._unit),this.initOffsets(o),e.reverse&&a.reverse(),Nc(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let r=0,n=0,o,i;this.options.offset&&e.length&&(o=this.getDecimalForValue(e[0]),e.length===1?r=1-o:r=(this.getDecimalForValue(e[1])-o)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?n=i:n=(i-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;r=lt(r,0,s),n=lt(n,0,s),this._offsets={start:r,end:n,factor:1/(r+1+n)}}_generate(){const e=this._adapter,r=this.min,n=this.max,o=this.options,i=o.time,s=i.unit||Tc(i.minUnit,r,n,this._getLabelCapacity(r)),a=fe(o.ticks.stepSize,1),l=s==="week"?i.isoWeekday:!1,c=uo(l)||l===!0,d={};let u=r,f,h;if(c&&(u=+e.startOf(u,"isoWeek",l)),u=+e.startOf(u,c?"day":s),e.diff(n,r,s)>1e5*a)throw new Error(r+" and "+n+" are too far apart with stepSize of "+a+" "+s);const g=o.ticks.source==="data"&&this.getDataTimestamps();for(f=u,h=0;f<n;f=+e.add(f,a,s),h++)Mc(d,f,g);return(f===n||o.bounds==="ticks"||h===1)&&Mc(d,f,g),Object.keys(d).sort(Ec).map(m=>+m)}getLabelForValue(e){const r=this._adapter,n=this.options.time;return n.tooltipFormat?r.format(e,n.tooltipFormat):r.format(e,n.displayFormats.datetime)}format(e,r){const o=this.options.time.displayFormats,i=this._unit,s=r||o[i];return this._adapter.format(e,s)}_tickFormatFunction(e,r,n,o){const i=this.options,s=i.ticks.callback;if(s)return be(s,[e,r,n],this);const a=i.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&a[l],u=c&&a[c],f=n[r],h=c&&u&&f&&f.major;return this._adapter.format(e,o||(h?u:d))}generateTickLabels(e){let r,n,o;for(r=0,n=e.length;r<n;++r)o=e[r],o.label=this._tickFormatFunction(o.value,r,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const r=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((r.start+n)*r.factor)}getValueForPixel(e){const r=this._offsets,n=this.getDecimalForPixel(e)/r.factor-r.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){const r=this.options.ticks,n=this.ctx.measureText(e).width,o=sr(this.isHorizontal()?r.maxRotation:r.minRotation),i=Math.cos(o),s=Math.sin(o),a=this._resolveTickFontOptions(0).size;return{w:n*i+a*s,h:n*s+a*i}}_getLabelCapacity(e){const r=this.options.time,n=r.displayFormats,o=n[r.unit]||n.millisecond,i=this._tickFormatFunction(e,0,Nc(this,[e],this._majorUnit),o),s=this._getLabelSize(i),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],r,n;if(e.length)return e;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(r=0,n=o.length;r<n;++r)e=e.concat(o[r].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let r,n;if(e.length)return e;const o=this.getLabels();for(r=0,n=o.length;r<n;++r)e.push(Oc(this,o[r]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Rp(e.sort(Ec))}}te(Do,"id","time"),te(Do,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Io(t,e,r){let n=0,o=t.length-1,i,s,a,l;r?(e>=t[n].pos&&e<=t[o].pos&&({lo:n,hi:o}=Hi(t,"pos",e)),{pos:i,time:a}=t[n],{pos:s,time:l}=t[o]):(e>=t[n].time&&e<=t[o].time&&({lo:n,hi:o}=Hi(t,"time",e)),{time:i,pos:a}=t[n],{time:s,pos:l}=t[o]);const c=s-i;return c?a+(l-a)*(e-i)/c:a}class Pc extends Do{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),r=this._table=this.buildLookupTable(e);this._minPos=Io(r,this.min),this._tableRange=Io(r,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:r,max:n}=this,o=[],i=[];let s,a,l,c,d;for(s=0,a=e.length;s<a;++s)c=e[s],c>=r&&c<=n&&o.push(c);if(o.length<2)return[{time:r,pos:0},{time:n,pos:1}];for(s=0,a=o.length;s<a;++s)d=o[s+1],l=o[s-1],c=o[s],Math.round((d+l)/2)!==c&&i.push({time:c,pos:s/(a-1)});return i}_generate(){const e=this.min,r=this.max;let n=super.getDataTimestamps();return(!n.includes(e)||!n.length)&&n.splice(0,0,e),(!n.includes(r)||n.length===1)&&n.push(r),n.sort((o,i)=>o-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const r=this.getDataTimestamps(),n=this.getLabelTimestamps();return r.length&&n.length?e=this.normalize(r.concat(n)):e=r.length?r:n,e=this._cache.all=e,e}getDecimalForValue(e){return(Io(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const r=this._offsets,n=this.getDecimalForPixel(e)/r.factor-r.end;return Io(this._table,n*this._tableRange+this._minPos,!0)}}te(Pc,"id","timeseries"),te(Pc,"defaults",Do.defaults);const Ac="label";function Dc(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function kb(t,e){const r=t.options;r&&e&&Object.assign(r,e)}function Ic(t,e){t.labels=e}function Lc(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ac;const n=[];t.datasets=e.map(o=>{const i=t.datasets.find(s=>s[r]===o[r]);return!i||!o.data||n.includes(i)?{...o}:(n.push(i),Object.assign(i,o),i)})}function Cb(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ac;const r={labels:[],datasets:[]};return Ic(r,t.labels),Lc(r,t.datasets,e),r}function _b(t,e){const{height:r=150,width:n=300,redraw:o=!1,datasetIdKey:i,type:s,data:a,options:l,plugins:c=[],fallbackContent:d,updateMode:u,...f}=t,h=k.useRef(null),g=k.useRef(null),m=()=>{h.current&&(g.current=new Mo(h.current,{type:s,data:Cb(a,i),options:l&&{...l},plugins:c}),Dc(e,g.current))},b=()=>{Dc(e,null),g.current&&(g.current.destroy(),g.current=null)};return k.useEffect(()=>{!o&&g.current&&l&&kb(g.current,l)},[o,l]),k.useEffect(()=>{!o&&g.current&&Ic(g.current.config.data,a.labels)},[o,a.labels]),k.useEffect(()=>{!o&&g.current&&a.datasets&&Lc(g.current.config.data,a.datasets,i)},[o,a.datasets]),k.useEffect(()=>{g.current&&(o?(b(),setTimeout(m)):g.current.update(u))},[o,l,a.labels,a.datasets,u]),k.useEffect(()=>{g.current&&(b(),setTimeout(m))},[s]),k.useEffect(()=>(m(),()=>b()),[]),k.createElement("canvas",{ref:h,role:"img",height:r,width:n,...f},d)}const Sb=k.forwardRef(_b);function Eb(t,e){return Mo.register(e),k.forwardRef((r,n)=>k.createElement(Sb,{...r,ref:n,type:t}))}const Ob=Eb("doughnut",gn);Mo.register(kn,yb,db);const Tb=()=>{const t={labels:["Planeado","Ejecutado"],datasets:[{label:"Presupuesto",data:[14.7,11.6],backgroundColor:["#EBE1FF","#9873e8"],borderColor:["#EBE1F9","#9873e1"],borderWidth:1,circumference:180,rotation:-90}]},e={responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:!0,text:"PRESUPUESTO"},legend:{position:"right"},tooltip:{enabled:!0},doughnutLabel:{labels:[{text:"Total",font:{size:"16",weight:"bold"}},{text:`${t.datasets[0].data.reduce((n,o)=>n+o,0).toFixed(1)}`,font:{size:"20"}}]}}},r={id:"textCenter",beforeDraw(n){const{ctx:o,chartArea:{top:i,width:s,height:a}}=n,l="Total",c=t.datasets[0].data.reduce((u,f)=>u+f,0).toFixed(1),d=i+a*.75;o.save(),o.font="16px Arial",o.fillStyle="black",o.textAlign="center",o.fillText(l,s/2,d-15),o.font="bold 20px Arial",o.fillText(c,s/2,d+15),o.restore()}};return p.jsx("div",{className:"size-full min-h-[200px]",children:p.jsx(Ob,{data:t,options:e,plugins:[r]})})},ds={overlay:"modal-module__overlay__cc2Es",modal:"modal-module__modal__WAkuU",closeButton:"modal-module__closeButton__1lo1j"},Dr=k.forwardRef(({isOpen:t,onClose:e,children:r,width:n="auto"},o)=>t?p.jsx("div",{className:ds.overlay,children:p.jsxs("div",{ref:o,className:ds.modal,style:{width:n},children:[p.jsx("button",{onClick:e,className:ds.closeButton,children:"×"}),r]})}):null);/*! *****************************************************************************
|
|
18
|
+
`):t}function gb(t,e){const{element:r,datasetIndex:n,index:o}=e,i=t.getDatasetMeta(n).controller,{label:s,value:a}=i.getLabelAndValue(o);return{chart:t,label:s,parsed:i.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:a,dataset:i.getDataset(),dataIndex:o,datasetIndex:n,element:r}}function kc(t,e){const r=t.chart.ctx,{body:n,footer:o,title:i}=t,{boxWidth:s,boxHeight:a}=e,l=Ke(e.bodyFont),c=Ke(e.titleFont),d=Ke(e.footerFont),u=i.length,f=o.length,h=n.length,p=gt(e.padding);let m=p.height,b=0,v=n.reduce((x,w)=>x+w.before.length+w.lines.length+w.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),v){const x=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=h*x+(v-h)*l.lineHeight+(v-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*d.lineHeight+(f-1)*e.footerSpacing);let y=0;const _=function(x){b=Math.max(b,r.measureText(x).width+y)};return r.save(),r.font=c.string,he(t.title,_),r.font=l.string,he(t.beforeBody.concat(t.afterBody),_),y=e.displayColors?s+2+e.boxPadding:0,he(n,x=>{he(x.before,_),he(x.lines,_),he(x.after,_)}),y=0,r.font=d.string,he(t.footer,_),r.restore(),b+=p.width,{width:b,height:m}}function pb(t,e){const{y:r,height:n}=e;return r<n/2?"top":r>t.height-n/2?"bottom":"center"}function mb(t,e,r,n){const{x:o,width:i}=n,s=r.caretSize+r.caretPadding;if(t==="left"&&o+i+s>e.width||t==="right"&&o-i-s<0)return!0}function bb(t,e,r,n){const{x:o,width:i}=r,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return n==="center"?c=o<=(a+l)/2?"left":"right":o<=i/2?c="left":o>=s-i/2&&(c="right"),mb(c,t,e,r)&&(c="center"),c}function Cc(t,e,r){const n=r.yAlign||e.yAlign||pb(t,r);return{xAlign:r.xAlign||e.xAlign||bb(t,e,r,n),yAlign:n}}function yb(t,e){let{x:r,width:n}=t;return e==="right"?r-=n:e==="center"&&(r-=n/2),r}function vb(t,e,r){let{y:n,height:o}=t;return e==="top"?n+=r:e==="bottom"?n-=o+r:n-=o/2,n}function _c(t,e,r,n){const{caretSize:o,caretPadding:i,cornerRadius:s}=t,{xAlign:a,yAlign:l}=r,c=o+i,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:h}=un(s);let p=yb(e,a);const m=vb(e,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(d,f)+o:a==="right"&&(p+=Math.max(u,h)+o),{x:lt(p,0,n.width-e.width),y:lt(m,0,n.height-e.height)}}function Ao(t,e,r){const n=gt(r.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-n.right:t.x+n.left}function Sc(t){return kt([],Ft(t))}function xb(t,e,r){return Nr(t,{tooltip:e,tooltipItems:r,type:"tooltip"})}function Ec(t,e){const r=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return r?t.override(r):t}const Oc={beforeTitle:Dt,title(t){if(t.length>0){const e=t[0],r=e.chart.data.labels,n=r?r.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return r[e.dataIndex]}return""},afterTitle:Dt,beforeBody:Dt,beforeLabel:Dt,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const r=t.formattedValue;return Ve(r)||(e+=r),e},labelColor(t){const r=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:r.borderColor,backgroundColor:r.backgroundColor,borderWidth:r.borderWidth,borderDash:r.borderDash,borderDashOffset:r.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const r=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:r.pointStyle,rotation:r.rotation}},afterLabel:Dt,afterBody:Dt,beforeFooter:Dt,footer:Dt,afterFooter:Dt};function Ge(t,e,r,n){const o=t[e].call(r,n);return typeof o>"u"?Oc[e].call(r,n):o}let Tc=(Wa=class extends vn{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const r=this.chart,n=this.options.setContext(this.getContext()),o=n.enabled&&r.options.animation&&n.animations,i=new Bl(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=xb(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,r){const{callbacks:n}=r,o=Ge(n,"beforeTitle",this,e),i=Ge(n,"title",this,e),s=Ge(n,"afterTitle",this,e);let a=[];return a=kt(a,Ft(o)),a=kt(a,Ft(i)),a=kt(a,Ft(s)),a}getBeforeBody(e,r){return Sc(Ge(r.callbacks,"beforeBody",this,e))}getBody(e,r){const{callbacks:n}=r,o=[];return he(e,i=>{const s={before:[],lines:[],after:[]},a=Ec(n,i);kt(s.before,Ft(Ge(a,"beforeLabel",this,i))),kt(s.lines,Ge(a,"label",this,i)),kt(s.after,Ft(Ge(a,"afterLabel",this,i))),o.push(s)}),o}getAfterBody(e,r){return Sc(Ge(r.callbacks,"afterBody",this,e))}getFooter(e,r){const{callbacks:n}=r,o=Ge(n,"beforeFooter",this,e),i=Ge(n,"footer",this,e),s=Ge(n,"afterFooter",this,e);let a=[];return a=kt(a,Ft(o)),a=kt(a,Ft(i)),a=kt(a,Ft(s)),a}_createItems(e){const r=this._active,n=this.chart.data,o=[],i=[],s=[];let a=[],l,c;for(l=0,c=r.length;l<c;++l)a.push(gb(this.chart,r[l]));return e.filter&&(a=a.filter((d,u,f)=>e.filter(d,u,f,n))),e.itemSort&&(a=a.sort((d,u)=>e.itemSort(d,u,n))),he(a,d=>{const u=Ec(e.callbacks,d);o.push(Ge(u,"labelColor",this,d)),i.push(Ge(u,"labelPointStyle",this,d)),s.push(Ge(u,"labelTextColor",this,d))}),this.labelColors=o,this.labelPointStyles=i,this.labelTextColors=s,this.dataPoints=a,a}update(e,r){const n=this.options.setContext(this.getContext()),o=this._active;let i,s=[];if(!o.length)this.opacity!==0&&(i={opacity:0});else{const a=Cn[n.position].call(this,o,this._eventPosition);s=this._createItems(n),this.title=this.getTitle(s,n),this.beforeBody=this.getBeforeBody(s,n),this.body=this.getBody(s,n),this.afterBody=this.getAfterBody(s,n),this.footer=this.getFooter(s,n);const l=this._size=kc(this,n),c=Object.assign({},a,l),d=Cc(this.chart,n,c),u=_c(n,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,i={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:r})}drawCaret(e,r,n,o){const i=this.getCaretPosition(e,n,o);r.lineTo(i.x1,i.y1),r.lineTo(i.x2,i.y2),r.lineTo(i.x3,i.y3)}getCaretPosition(e,r,n){const{xAlign:o,yAlign:i}=this,{caretSize:s,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:u}=un(a),{x:f,y:h}=e,{width:p,height:m}=r;let b,v,y,_,x,w;return i==="center"?(x=h+m/2,o==="left"?(b=f,v=b-s,_=x+s,w=x-s):(b=f+p,v=b+s,_=x-s,w=x+s),y=b):(o==="left"?v=f+Math.max(l,d)+s:o==="right"?v=f+p-Math.max(c,u)-s:v=this.caretX,i==="top"?(_=h,x=_-s,b=v-s,y=v+s):(_=h+m,x=_+s,b=v+s,y=v-s),w=_),{x1:b,x2:v,x3:y,y1:_,y2:x,y3:w}}drawTitle(e,r,n){const o=this.title,i=o.length;let s,a,l;if(i){const c=Pr(n.rtl,this.x,this.width);for(e.x=Ao(this,n.titleAlign,n),r.textAlign=c.textAlign(n.titleAlign),r.textBaseline="middle",s=Ke(n.titleFont),a=n.titleSpacing,r.fillStyle=n.titleColor,r.font=s.string,l=0;l<i;++l)r.fillText(o[l],c.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+a,l+1===i&&(e.y+=n.titleMarginBottom-a)}}_drawColorBox(e,r,n,o,i){const s=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=i,d=Ke(i.bodyFont),u=Ao(this,"left",i),f=o.x(u),h=l<d.lineHeight?(d.lineHeight-l)/2:0,p=r.y+h;if(i.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},b=o.leftForLtr(f,c)+c/2,v=p+l/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,_l(e,m,b,v),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,_l(e,m,b,v)}else{e.lineWidth=oe(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const m=o.leftForLtr(f,c),b=o.leftForLtr(o.xPlus(f,1),c-2),v=un(s.borderRadius);Object.values(v).some(y=>y!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,Xi(e,{x:m,y:p,w:c,h:l,radius:v}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),Xi(e,{x:b,y:p+1,w:c-2,h:l-2,radius:v}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(m,p,c,l),e.strokeRect(m,p,c,l),e.fillStyle=s.backgroundColor,e.fillRect(b,p+1,c-2,l-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,r,n){const{body:o}=this,{bodySpacing:i,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:d}=n,u=Ke(n.bodyFont);let f=u.lineHeight,h=0;const p=Pr(n.rtl,this.x,this.width),m=function(M){r.fillText(M,p.x(e.x+h),e.y+f/2),e.y+=f+i},b=p.textAlign(s);let v,y,_,x,w,S,T;for(r.textAlign=s,r.textBaseline="middle",r.font=u.string,e.x=Ao(this,b,n),r.fillStyle=n.bodyColor,he(this.beforeBody,m),h=a&&b!=="right"?s==="center"?c/2+d:c+2+d:0,x=0,S=o.length;x<S;++x){for(v=o[x],y=this.labelTextColors[x],r.fillStyle=y,he(v.before,m),_=v.lines,a&&_.length&&(this._drawColorBox(r,e,x,p,n),f=Math.max(u.lineHeight,l)),w=0,T=_.length;w<T;++w)m(_[w]),f=u.lineHeight;he(v.after,m)}h=0,f=u.lineHeight,he(this.afterBody,m),e.y-=i}drawFooter(e,r,n){const o=this.footer,i=o.length;let s,a;if(i){const l=Pr(n.rtl,this.x,this.width);for(e.x=Ao(this,n.footerAlign,n),e.y+=n.footerMarginTop,r.textAlign=l.textAlign(n.footerAlign),r.textBaseline="middle",s=Ke(n.footerFont),r.fillStyle=n.footerColor,r.font=s.string,a=0;a<i;++a)r.fillText(o[a],l.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+n.footerSpacing}}drawBackground(e,r,n,o){const{xAlign:i,yAlign:s}=this,{x:a,y:l}=e,{width:c,height:d}=n,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:p}=un(o.cornerRadius);r.fillStyle=o.backgroundColor,r.strokeStyle=o.borderColor,r.lineWidth=o.borderWidth,r.beginPath(),r.moveTo(a+u,l),s==="top"&&this.drawCaret(e,r,n,o),r.lineTo(a+c-f,l),r.quadraticCurveTo(a+c,l,a+c,l+f),s==="center"&&i==="right"&&this.drawCaret(e,r,n,o),r.lineTo(a+c,l+d-p),r.quadraticCurveTo(a+c,l+d,a+c-p,l+d),s==="bottom"&&this.drawCaret(e,r,n,o),r.lineTo(a+h,l+d),r.quadraticCurveTo(a,l+d,a,l+d-h),s==="center"&&i==="left"&&this.drawCaret(e,r,n,o),r.lineTo(a,l+u),r.quadraticCurveTo(a,l,a+u,l),r.closePath(),r.fill(),o.borderWidth>0&&r.stroke()}_updateAnimationTarget(e){const r=this.chart,n=this.$animations,o=n&&n.x,i=n&&n.y;if(o||i){const s=Cn[e.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=kc(this,e),l=Object.assign({},s,this._size),c=Cc(r,e,l),d=_c(e,l,c,r);(o._to!==d.x||i._to!==d.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,d))}}_willRender(){return!!this.opacity}draw(e){const r=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(r);const o={width:this.width,height:this.height},i={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const s=gt(r.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;r.enabled&&a&&(e.save(),e.globalAlpha=n,this.drawBackground(i,e,o,r),Ll(e,r.textDirection),i.y+=s.top,this.drawTitle(i,e,r),this.drawBody(i,e,r),this.drawFooter(i,e,r),Fl(e,r.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,r){const n=this._active,o=e.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}}),i=!ao(n,o),s=this._positionChanged(o,r);(i||s)&&(this._active=o,this._eventPosition=r,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,r,n=!0){if(r&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,i=this._active||[],s=this._getActiveElements(e,i,r,n),a=this._positionChanged(s,e),l=r||!ao(s,i)||a;return l&&(this._active=s,(o.enabled||o.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,r))),l}_getActiveElements(e,r,n,o){const i=this.options;if(e.type==="mouseout")return[];if(!o)return r.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const s=this.chart.getElementsAtEventForMode(e,i.mode,i,n);return i.reverse&&s.reverse(),s}_positionChanged(e,r){const{caretX:n,caretY:o,options:i}=this,s=Cn[i.position].call(this,e,r);return s!==!1&&(n!==s.x||o!==s.y)}},te(Wa,"positioners",Cn),Wa);var wb={id:"tooltip",_element:Tc,positioners:Cn,afterInit(t,e,r){r&&(t.tooltip=new Tc({chart:t,options:r}))},beforeUpdate(t,e,r){t.tooltip&&t.tooltip.initialize(r)},reset(t,e,r){t.tooltip&&t.tooltip.initialize(r)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const r={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...r,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",r)}},afterEvent(t,e){if(t.tooltip){const r=e.replay;t.tooltip.handleEvent(e.event,r,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:Oc},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Do={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}},Xe=Object.keys(Do);function Nc(t,e){return t-e}function Mc(t,e){if(Ve(e))return null;const r=t._adapter,{parser:n,round:o,isoWeekday:i}=t._parseOpts;let s=e;return typeof n=="function"&&(s=n(s)),It(s)||(s=typeof n=="string"?r.parse(s,n):r.parse(s)),s===null?null:(o&&(s=o==="week"&&(fo(i)||i===!0)?r.startOf(s,"isoWeek",i):r.startOf(s,o)),+s)}function Pc(t,e,r,n){const o=Xe.length;for(let i=Xe.indexOf(t);i<o-1;++i){const s=Do[Xe[i]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((r-e)/(a*s.size))<=n)return Xe[i]}return Xe[o-1]}function kb(t,e,r,n,o){for(let i=Xe.length-1;i>=Xe.indexOf(r);i--){const s=Xe[i];if(Do[s].common&&t._adapter.diff(o,n,s)>=e-1)return s}return Xe[r?Xe.indexOf(r):0]}function Cb(t){for(let e=Xe.indexOf(t)+1,r=Xe.length;e<r;++e)if(Do[Xe[e]].common)return Xe[e]}function Ac(t,e,r){if(!r)t[e]=!0;else if(r.length){const{lo:n,hi:o}=Vi(r,e),i=r[n]>=e?r[n]:r[o];t[i]=!0}}function _b(t,e,r,n){const o=t._adapter,i=+o.startOf(e[0].value,n),s=e[e.length-1].value;let a,l;for(a=i;a<=s;a=+o.add(a,1,n))l=r[a],l>=0&&(e[l].major=!0);return e}function Dc(t,e,r){const n=[],o={},i=e.length;let s,a;for(s=0;s<i;++s)a=e[s],o[a]=s,n.push({value:a,major:!1});return i===0||!r?n:_b(t,n,o,r)}class Io extends So{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,r={}){const n=e.time||(e.time={}),o=this._adapter=new q0._date(e.adapters.date);o.init(r),sn(n.displayFormats,o.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=r.normalized}parse(e,r){return e===void 0?null:Mc(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,r=this._adapter,n=e.time.unit||"day";let{min:o,max:i,minDefined:s,maxDefined:a}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(o=Math.min(o,c.min)),!a&&!isNaN(c.max)&&(i=Math.max(i,c.max))}(!s||!a)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),o=It(o)&&!isNaN(o)?o:+r.startOf(Date.now(),n),i=It(i)&&!isNaN(i)?i:+r.endOf(Date.now(),n)+1,this.min=Math.min(o,i-1),this.max=Math.max(o+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(r=e[0],n=e[e.length-1]),{min:r,max:n}}buildTicks(){const e=this.options,r=e.time,n=e.ticks,o=n.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);const i=this.min,s=this.max,a=Rp(o,i,s);return this._unit=r.unit||(n.autoSkip?Pc(r.minUnit,this.min,this.max,this._getLabelCapacity(i)):kb(this,a.length,r.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:Cb(this._unit),this.initOffsets(o),e.reverse&&a.reverse(),Dc(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let r=0,n=0,o,i;this.options.offset&&e.length&&(o=this.getDecimalForValue(e[0]),e.length===1?r=1-o:r=(this.getDecimalForValue(e[1])-o)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?n=i:n=(i-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;r=lt(r,0,s),n=lt(n,0,s),this._offsets={start:r,end:n,factor:1/(r+1+n)}}_generate(){const e=this._adapter,r=this.min,n=this.max,o=this.options,i=o.time,s=i.unit||Pc(i.minUnit,r,n,this._getLabelCapacity(r)),a=fe(o.ticks.stepSize,1),l=s==="week"?i.isoWeekday:!1,c=fo(l)||l===!0,d={};let u=r,f,h;if(c&&(u=+e.startOf(u,"isoWeek",l)),u=+e.startOf(u,c?"day":s),e.diff(n,r,s)>1e5*a)throw new Error(r+" and "+n+" are too far apart with stepSize of "+a+" "+s);const p=o.ticks.source==="data"&&this.getDataTimestamps();for(f=u,h=0;f<n;f=+e.add(f,a,s),h++)Ac(d,f,p);return(f===n||o.bounds==="ticks"||h===1)&&Ac(d,f,p),Object.keys(d).sort(Nc).map(m=>+m)}getLabelForValue(e){const r=this._adapter,n=this.options.time;return n.tooltipFormat?r.format(e,n.tooltipFormat):r.format(e,n.displayFormats.datetime)}format(e,r){const o=this.options.time.displayFormats,i=this._unit,s=r||o[i];return this._adapter.format(e,s)}_tickFormatFunction(e,r,n,o){const i=this.options,s=i.ticks.callback;if(s)return ye(s,[e,r,n],this);const a=i.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&a[l],u=c&&a[c],f=n[r],h=c&&u&&f&&f.major;return this._adapter.format(e,o||(h?u:d))}generateTickLabels(e){let r,n,o;for(r=0,n=e.length;r<n;++r)o=e[r],o.label=this._tickFormatFunction(o.value,r,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const r=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((r.start+n)*r.factor)}getValueForPixel(e){const r=this._offsets,n=this.getDecimalForPixel(e)/r.factor-r.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){const r=this.options.ticks,n=this.ctx.measureText(e).width,o=sr(this.isHorizontal()?r.maxRotation:r.minRotation),i=Math.cos(o),s=Math.sin(o),a=this._resolveTickFontOptions(0).size;return{w:n*i+a*s,h:n*s+a*i}}_getLabelCapacity(e){const r=this.options.time,n=r.displayFormats,o=n[r.unit]||n.millisecond,i=this._tickFormatFunction(e,0,Dc(this,[e],this._majorUnit),o),s=this._getLabelSize(i),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],r,n;if(e.length)return e;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(r=0,n=o.length;r<n;++r)e=e.concat(o[r].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let r,n;if(e.length)return e;const o=this.getLabels();for(r=0,n=o.length;r<n;++r)e.push(Mc(this,o[r]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Up(e.sort(Nc))}}te(Io,"id","time"),te(Io,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Lo(t,e,r){let n=0,o=t.length-1,i,s,a,l;r?(e>=t[n].pos&&e<=t[o].pos&&({lo:n,hi:o}=Ri(t,"pos",e)),{pos:i,time:a}=t[n],{pos:s,time:l}=t[o]):(e>=t[n].time&&e<=t[o].time&&({lo:n,hi:o}=Ri(t,"time",e)),{time:i,pos:a}=t[n],{time:s,pos:l}=t[o]);const c=s-i;return c?a+(l-a)*(e-i)/c:a}class Ic extends Io{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),r=this._table=this.buildLookupTable(e);this._minPos=Lo(r,this.min),this._tableRange=Lo(r,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:r,max:n}=this,o=[],i=[];let s,a,l,c,d;for(s=0,a=e.length;s<a;++s)c=e[s],c>=r&&c<=n&&o.push(c);if(o.length<2)return[{time:r,pos:0},{time:n,pos:1}];for(s=0,a=o.length;s<a;++s)d=o[s+1],l=o[s-1],c=o[s],Math.round((d+l)/2)!==c&&i.push({time:c,pos:s/(a-1)});return i}_generate(){const e=this.min,r=this.max;let n=super.getDataTimestamps();return(!n.includes(e)||!n.length)&&n.splice(0,0,e),(!n.includes(r)||n.length===1)&&n.push(r),n.sort((o,i)=>o-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const r=this.getDataTimestamps(),n=this.getLabelTimestamps();return r.length&&n.length?e=this.normalize(r.concat(n)):e=r.length?r:n,e=this._cache.all=e,e}getDecimalForValue(e){return(Lo(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const r=this._offsets,n=this.getDecimalForPixel(e)/r.factor-r.end;return Lo(this._table,n*this._tableRange+this._minPos,!0)}}te(Ic,"id","timeseries"),te(Ic,"defaults",Io.defaults);const Lc="label";function Fc(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Sb(t,e){const r=t.options;r&&e&&Object.assign(r,e)}function zc(t,e){t.labels=e}function Bc(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Lc;const n=[];t.datasets=e.map(o=>{const i=t.datasets.find(s=>s[r]===o[r]);return!i||!o.data||n.includes(i)?{...o}:(n.push(i),Object.assign(i,o),i)})}function Eb(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Lc;const r={labels:[],datasets:[]};return zc(r,t.labels),Bc(r,t.datasets,e),r}function Ob(t,e){const{height:r=150,width:n=300,redraw:o=!1,datasetIdKey:i,type:s,data:a,options:l,plugins:c=[],fallbackContent:d,updateMode:u,...f}=t,h=k.useRef(null),p=k.useRef(null),m=()=>{h.current&&(p.current=new Mo(h.current,{type:s,data:Eb(a,i),options:l&&{...l},plugins:c}),Fc(e,p.current))},b=()=>{Fc(e,null),p.current&&(p.current.destroy(),p.current=null)};return k.useEffect(()=>{!o&&p.current&&l&&Sb(p.current,l)},[o,l]),k.useEffect(()=>{!o&&p.current&&zc(p.current.config.data,a.labels)},[o,a.labels]),k.useEffect(()=>{!o&&p.current&&a.datasets&&Bc(p.current.config.data,a.datasets,i)},[o,a.datasets]),k.useEffect(()=>{p.current&&(o?(b(),setTimeout(m)):p.current.update(u))},[o,l,a.labels,a.datasets,u]),k.useEffect(()=>{p.current&&(b(),setTimeout(m))},[s]),k.useEffect(()=>(m(),()=>b()),[]),k.createElement("canvas",{ref:h,role:"img",height:r,width:n,...f},d)}const Tb=k.forwardRef(Ob);function Nb(t,e){return Mo.register(e),k.forwardRef((r,n)=>k.createElement(Tb,{...r,ref:n,type:t}))}const Mb=Nb("doughnut",gn);Mo.register(kn,wb,hb);const Pb=()=>{const t={labels:["Planeado","Ejecutado"],datasets:[{label:"Presupuesto",data:[14.7,11.6],backgroundColor:["#EBE1FF","#9873e8"],borderColor:["#EBE1F9","#9873e1"],borderWidth:1,circumference:180,rotation:-90}]},e={responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:!0,text:"PRESUPUESTO"},legend:{position:"right"},tooltip:{enabled:!0},doughnutLabel:{labels:[{text:"Total",font:{size:"16",weight:"bold"}},{text:`${t.datasets[0].data.reduce((n,o)=>n+o,0).toFixed(1)}`,font:{size:"20"}}]}}},r={id:"textCenter",beforeDraw(n){const{ctx:o,chartArea:{top:i,width:s,height:a}}=n,l="Total",c=t.datasets[0].data.reduce((u,f)=>u+f,0).toFixed(1),d=i+a*.75;o.save(),o.font="16px Arial",o.fillStyle="black",o.textAlign="center",o.fillText(l,s/2,d-15),o.font="bold 20px Arial",o.fillText(c,s/2,d+15),o.restore()}};return g.jsx("div",{className:"size-full min-h-[200px]",children:g.jsx(Mb,{data:t,options:e,plugins:[r]})})},fs={overlay:"modal-module__overlay__cc2Es",modal:"modal-module__modal__WAkuU",closeButton:"modal-module__closeButton__1lo1j"};function Ab(t){return me({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm52.7 283.3L256 278.6l-52.7 52.7c-6.2 6.2-16.4 6.2-22.6 0-3.1-3.1-4.7-7.2-4.7-11.3 0-4.1 1.6-8.2 4.7-11.3l52.7-52.7-52.7-52.7c-3.1-3.1-4.7-7.2-4.7-11.3 0-4.1 1.6-8.2 4.7-11.3 6.2-6.2 16.4-6.2 22.6 0l52.7 52.7 52.7-52.7c6.2-6.2 16.4-6.2 22.6 0 6.2 6.2 6.2 16.4 0 22.6L278.6 256l52.7 52.7c6.2 6.2 6.2 16.4 0 22.6-6.2 6.3-16.4 6.3-22.6 0z"},child:[]}]})(t)}function Db(t){return me({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M144 136v107h179.9l-47.2-47.9c-5-5.1-5-13.3.1-18.4 5.1-5 13.3-5 18.4.1l69 70c2.4 2.5 3.7 5.8 3.7 9.1 0 1.7-.3 3.4-1 5-.6 1.5-1.6 2.9-2.7 4.1l-69 70c-5 5.1-13.3 5.2-18.4.1-5.1-5-5.2-13.3-.1-18.4l47.2-47.9H144v107c0 22 18 40 40 40h240c22 0 40-18 40-40V136c0-22-18-40-40-40H184c-22 0-40 18-40 40zM61 243c-7.2 0-13 5.8-13 13s5.8 13 13 13h83v-26H61z"},child:[]}]})(t)}const Dr=k.forwardRef(({isOpen:t,onClose:e,children:r,width:n="auto"},o)=>t?g.jsx("div",{className:fs.overlay,children:g.jsxs("div",{ref:o,className:fs.modal,style:{width:n},children:[g.jsx("button",{onClick:e,className:fs.closeButton,children:g.jsx(Ab,{})}),r]})}):null);/*! *****************************************************************************
|
|
19
19
|
Copyright (c) Microsoft Corporation.
|
|
20
20
|
|
|
21
21
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -28,33 +28,33 @@
|
|
|
28
28
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
29
29
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
30
30
|
PERFORMANCE OF THIS SOFTWARE.
|
|
31
|
-
***************************************************************************** */var rt=function(){return rt=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},rt.apply(this,arguments)};function hr(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}function
|
|
32
|
-
`+n+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!i}if(this.isSpeedy){var s=Pb(o);try{s.insertRule(n,s.cssRules.length)}catch(a){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(n)&&console.error('There was a problem inserting the following rule: "'+n+'"',a)}}else o.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},t}(),Ye="-ms-",Fo="-moz-",se="-webkit-",fs="comm",hs="rule",gs="decl",Ib="@import",Fc="@keyframes",Lb=Math.abs,zo=String.fromCharCode,Fb=Object.assign;function zb(t,e){return Be(t,0)^45?(((e<<2^Be(t,0))<<2^Be(t,1))<<2^Be(t,2))<<2^Be(t,3):0}function zc(t){return t.trim()}function Bb(t,e){return(t=e.exec(t))?t[0]:t}function ce(t,e,r){return t.replace(e,r)}function ps(t,e){return t.indexOf(e)}function Be(t,e){return t.charCodeAt(e)|0}function _n(t,e,r){return t.slice(e,r)}function Ct(t){return t.length}function ms(t){return t.length}function Bo(t,e){return e.push(t),t}function $b(t,e){return t.map(e).join("")}var $o=1,Ir=1,Bc=0,Je=0,Se=0,Lr="";function jo(t,e,r,n,o,i,s){return{value:t,root:e,parent:r,type:n,props:o,children:i,line:$o,column:Ir,length:s,return:""}}function Sn(t,e){return Fb(jo("",null,null,"",null,null,0),t,{length:-t.length},e)}function jb(){return Se}function Wb(){return Se=Je>0?Be(Lr,--Je):0,Ir--,Se===10&&(Ir=1,$o--),Se}function nt(){return Se=Je<Bc?Be(Lr,Je++):0,Ir++,Se===10&&(Ir=1,$o++),Se}function _t(){return Be(Lr,Je)}function Wo(){return Je}function En(t,e){return _n(Lr,t,e)}function On(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $c(t){return $o=Ir=1,Bc=Ct(Lr=t),Je=0,[]}function jc(t){return Lr="",t}function Ho(t){return zc(En(Je-1,bs(t===91?t+2:t===40?t+1:t)))}function Hb(t){for(;(Se=_t())&&Se<33;)nt();return On(t)>2||On(Se)>3?"":" "}function Rb(t,e){for(;--e&&nt()&&!(Se<48||Se>102||Se>57&&Se<65||Se>70&&Se<97););return En(t,Wo()+(e<6&&_t()==32&&nt()==32))}function bs(t){for(;nt();)switch(Se){case t:return Je;case 34:case 39:t!==34&&t!==39&&bs(Se);break;case 40:t===41&&bs(t);break;case 92:nt();break}return Je}function Vb(t,e){for(;nt()&&t+Se!==57;)if(t+Se===84&&_t()===47)break;return"/*"+En(e,Je-1)+"*"+zo(t===47?t:nt())}function Yb(t){for(;!On(_t());)nt();return En(t,Je)}function Wc(t){return jc(Ro("",null,null,null,[""],t=$c(t),0,[0],t))}function Ro(t,e,r,n,o,i,s,a,l){for(var c=0,d=0,u=s,f=0,h=0,g=0,m=1,b=1,v=1,y=0,_="",x=o,w=i,S=n,T=_;b;)switch(g=y,y=nt()){case 40:if(g!=108&&Be(T,u-1)==58){ps(T+=ce(Ho(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:T+=Ho(y);break;case 9:case 10:case 13:case 32:T+=Hb(g);break;case 92:T+=Rb(Wo()-1,7);continue;case 47:switch(_t()){case 42:case 47:Bo(Ub(Vb(nt(),Wo()),e,r),l);break;default:T+="/"}break;case 123*m:a[c++]=Ct(T)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:b=0;case 59+d:h>0&&Ct(T)-u&&Bo(h>32?Rc(T+";",n,r,u-1):Rc(ce(T," ","")+";",n,r,u-2),l);break;case 59:T+=";";default:if(Bo(S=Hc(T,e,r,c,d,o,a,_,x=[],w=[],u),i),y===123)if(d===0)Ro(T,e,S,S,x,i,u,a,w);else switch(f===99&&Be(T,3)===110?100:f){case 100:case 109:case 115:Ro(t,S,S,n&&Bo(Hc(t,S,S,0,0,o,a,_,o,x=[],u),w),o,w,u,a,n?x:w);break;default:Ro(T,S,S,S,[""],w,0,a,w)}}c=d=h=0,m=v=1,_=T="",u=s;break;case 58:u=1+Ct(T),h=g;default:if(m<1){if(y==123)--m;else if(y==125&&m++==0&&Wb()==125)continue}switch(T+=zo(y),y*m){case 38:v=d>0?1:(T+="\f",-1);break;case 44:a[c++]=(Ct(T)-1)*v,v=1;break;case 64:_t()===45&&(T+=Ho(nt())),f=_t(),d=u=Ct(_=T+=Yb(Wo())),y++;break;case 45:g===45&&Ct(T)==2&&(m=0)}}return i}function Hc(t,e,r,n,o,i,s,a,l,c,d){for(var u=o-1,f=o===0?i:[""],h=ms(f),g=0,m=0,b=0;g<n;++g)for(var v=0,y=_n(t,u+1,u=Lb(m=s[g])),_=t;v<h;++v)(_=zc(m>0?f[v]+" "+y:ce(y,/&\f/g,f[v])))&&(l[b++]=_);return jo(t,e,r,o===0?hs:a,l,c,d)}function Ub(t,e,r){return jo(t,e,r,fs,zo(jb()),_n(t,2,-2),0)}function Rc(t,e,r,n){return jo(t,e,r,gs,_n(t,0,n),_n(t,n+1,-1),n)}function gr(t,e){for(var r="",n=ms(t),o=0;o<n;o++)r+=e(t[o],o,t,e)||"";return r}function Vc(t,e,r,n){switch(t.type){case Ib:case gs:return t.return=t.return||t.value;case fs:return"";case Fc:return t.return=t.value+"{"+gr(t.children,n)+"}";case hs:t.value=t.props.join(",")}return Ct(r=gr(t.children,n))?t.return=t.value+"{"+r+"}":""}function Yc(t){var e=ms(t);return function(r,n,o,i){for(var s="",a=0;a<e;a++)s+=t[a](r,n,o,i)||"";return s}}function qb(t){return function(e){e.root||(e=e.return)&&t(e)}}var Kb=function(e){var r=new WeakMap;return function(n){if(r.has(n))return r.get(n);var o=e(n);return r.set(n,o),o}},Gb=function(e,r,n){for(var o=0,i=0;o=i,i=_t(),o===38&&i===12&&(r[n]=1),!On(i);)nt();return En(e,Je)},Xb=function(e,r){var n=-1,o=44;do switch(On(o)){case 0:o===38&&_t()===12&&(r[n]=1),e[n]+=Gb(Je-1,r,n);break;case 2:e[n]+=Ho(o);break;case 4:if(o===44){e[++n]=_t()===58?"&\f":"",r[n]=e[n].length;break}default:e[n]+=zo(o)}while(o=nt());return e},Jb=function(e,r){return jc(Xb($c(e),r))},Uc=new WeakMap,Zb=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!Uc.get(n))&&!o){Uc.set(e,!0);for(var i=[],s=Jb(r,i),a=n.props,l=0,c=0;l<s.length;l++)for(var d=0;d<a.length;d++,c++)e.props[c]=i[l]?s[l].replace(/&\f/g,a[d]):a[d]+" "+s[l]}}},Qb=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}},ey="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",ty=function(e){return e.type==="comm"&&e.children.indexOf(ey)>-1},ry=function(e){return function(r,n,o){if(!(r.type!=="rule"||e.compat)){var i=r.value.match(/(:first|:nth|:nth-last)-child/g);if(i){for(var s=r.parent===o[0],a=s?o[0].children:o,l=a.length-1;l>=0;l--){var c=a[l];if(c.line<r.line)break;if(c.column<r.column){if(ty(c))return;break}}i.forEach(function(d){console.error('The pseudo class "'+d+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+d.split("-child")[0]+'-of-type".')})}}}},qc=function(e){return e.type.charCodeAt(1)===105&&e.type.charCodeAt(0)===64},ny=function(e,r){for(var n=e-1;n>=0;n--)if(!qc(r[n]))return!0;return!1},Kc=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},oy=function(e,r,n){qc(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),Kc(e)):ny(r,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),Kc(e)))};function Gc(t,e){switch(zb(t,e)){case 5103:return se+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return se+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return se+t+Fo+t+Ye+t+t;case 6828:case 4268:return se+t+Ye+t+t;case 6165:return se+t+Ye+"flex-"+t+t;case 5187:return se+t+ce(t,/(\w+).+(:[^]+)/,se+"box-$1$2"+Ye+"flex-$1$2")+t;case 5443:return se+t+Ye+"flex-item-"+ce(t,/flex-|-self/,"")+t;case 4675:return se+t+Ye+"flex-line-pack"+ce(t,/align-content|flex-|-self/,"")+t;case 5548:return se+t+Ye+ce(t,"shrink","negative")+t;case 5292:return se+t+Ye+ce(t,"basis","preferred-size")+t;case 6060:return se+"box-"+ce(t,"-grow","")+se+t+Ye+ce(t,"grow","positive")+t;case 4554:return se+ce(t,/([^-])(transform)/g,"$1"+se+"$2")+t;case 6187:return ce(ce(ce(t,/(zoom-|grab)/,se+"$1"),/(image-set)/,se+"$1"),t,"")+t;case 5495:case 3959:return ce(t,/(image-set\([^]*)/,se+"$1$`$1");case 4968:return ce(ce(t,/(.+:)(flex-)?(.*)/,se+"box-pack:$3"+Ye+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+se+t+t;case 4095:case 3583:case 4068:case 2532:return ce(t,/(.+)-inline(.+)/,se+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ct(t)-1-e>6)switch(Be(t,e+1)){case 109:if(Be(t,e+4)!==45)break;case 102:return ce(t,/(.+:)(.+)-([^]+)/,"$1"+se+"$2-$3$1"+Fo+(Be(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~ps(t,"stretch")?Gc(ce(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Be(t,e+1)!==115)break;case 6444:switch(Be(t,Ct(t)-3-(~ps(t,"!important")&&10))){case 107:return ce(t,":",":"+se)+t;case 101:return ce(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+se+(Be(t,14)===45?"inline-":"")+"box$3$1"+se+"$2$3$1"+Ye+"$2box$3")+t}break;case 5936:switch(Be(t,e+11)){case 114:return se+t+Ye+ce(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return se+t+Ye+ce(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return se+t+Ye+ce(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return se+t+Ye+t+t}return t}var iy=function(e,r,n,o){if(e.length>-1&&!e.return)switch(e.type){case gs:e.return=Gc(e.value,e.length);break;case Fc:return gr([Sn(e,{value:ce(e.value,"@","@"+se)})],o);case hs:if(e.length)return $b(e.props,function(i){switch(Bb(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return gr([Sn(e,{props:[ce(i,/:(read-\w+)/,":"+Fo+"$1")]})],o);case"::placeholder":return gr([Sn(e,{props:[ce(i,/:(plac\w+)/,":"+se+"input-$1")]}),Sn(e,{props:[ce(i,/:(plac\w+)/,":"+Fo+"$1")]}),Sn(e,{props:[ce(i,/:(plac\w+)/,Ye+"input-$1")]})],o)}return""})}},Vo=typeof document<"u",sy=Vo?void 0:Kb(function(){return Lo(function(){var t={};return function(e){return t[e]}})}),ay=[iy],Xc=function(e){var r=e.key;if(process.env.NODE_ENV!=="production"&&!r)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
|
|
33
|
-
If multiple caches share the same key they might "fight" for each other's style elements.`);if(
|
|
31
|
+
***************************************************************************** */var rt=function(){return rt=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},rt.apply(this,arguments)};function hr(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}function Re(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function hs(){return hs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},hs.apply(this,arguments)}function Fo(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var Ib=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Lb=Fo(function(t){return Ib.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function Fb(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function zb(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var Bb=function(){function t(r){var n=this;this._insertTag=function(o){var i;n.tags.length===0?n.insertionPoint?i=n.insertionPoint.nextSibling:n.prepend?i=n.container.firstChild:i=n.before:i=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,i),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?process.env.NODE_ENV==="production":r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(zb(this));var o=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var i=n.charCodeAt(0)===64&&n.charCodeAt(1)===105;i&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
|
|
32
|
+
`+n+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!i}if(this.isSpeedy){var s=Fb(o);try{s.insertRule(n,s.cssRules.length)}catch(a){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(n)&&console.error('There was a problem inserting the following rule: "'+n+'"',a)}}else o.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},t}(),Ye="-ms-",zo="-moz-",ae="-webkit-",gs="comm",ps="rule",ms="decl",$b="@import",$c="@keyframes",jb=Math.abs,Bo=String.fromCharCode,Wb=Object.assign;function Hb(t,e){return Be(t,0)^45?(((e<<2^Be(t,0))<<2^Be(t,1))<<2^Be(t,2))<<2^Be(t,3):0}function jc(t){return t.trim()}function Vb(t,e){return(t=e.exec(t))?t[0]:t}function de(t,e,r){return t.replace(e,r)}function bs(t,e){return t.indexOf(e)}function Be(t,e){return t.charCodeAt(e)|0}function _n(t,e,r){return t.slice(e,r)}function Ct(t){return t.length}function ys(t){return t.length}function $o(t,e){return e.push(t),t}function Rb(t,e){return t.map(e).join("")}var jo=1,Ir=1,Wc=0,Ze=0,Se=0,Lr="";function Wo(t,e,r,n,o,i,s){return{value:t,root:e,parent:r,type:n,props:o,children:i,line:jo,column:Ir,length:s,return:""}}function Sn(t,e){return Wb(Wo("",null,null,"",null,null,0),t,{length:-t.length},e)}function Yb(){return Se}function Ub(){return Se=Ze>0?Be(Lr,--Ze):0,Ir--,Se===10&&(Ir=1,jo--),Se}function nt(){return Se=Ze<Wc?Be(Lr,Ze++):0,Ir++,Se===10&&(Ir=1,jo++),Se}function _t(){return Be(Lr,Ze)}function Ho(){return Ze}function En(t,e){return _n(Lr,t,e)}function On(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Hc(t){return jo=Ir=1,Wc=Ct(Lr=t),Ze=0,[]}function Vc(t){return Lr="",t}function Vo(t){return jc(En(Ze-1,vs(t===91?t+2:t===40?t+1:t)))}function qb(t){for(;(Se=_t())&&Se<33;)nt();return On(t)>2||On(Se)>3?"":" "}function Kb(t,e){for(;--e&&nt()&&!(Se<48||Se>102||Se>57&&Se<65||Se>70&&Se<97););return En(t,Ho()+(e<6&&_t()==32&&nt()==32))}function vs(t){for(;nt();)switch(Se){case t:return Ze;case 34:case 39:t!==34&&t!==39&&vs(Se);break;case 40:t===41&&vs(t);break;case 92:nt();break}return Ze}function Gb(t,e){for(;nt()&&t+Se!==57;)if(t+Se===84&&_t()===47)break;return"/*"+En(e,Ze-1)+"*"+Bo(t===47?t:nt())}function Xb(t){for(;!On(_t());)nt();return En(t,Ze)}function Rc(t){return Vc(Ro("",null,null,null,[""],t=Hc(t),0,[0],t))}function Ro(t,e,r,n,o,i,s,a,l){for(var c=0,d=0,u=s,f=0,h=0,p=0,m=1,b=1,v=1,y=0,_="",x=o,w=i,S=n,T=_;b;)switch(p=y,y=nt()){case 40:if(p!=108&&Be(T,u-1)==58){bs(T+=de(Vo(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:T+=Vo(y);break;case 9:case 10:case 13:case 32:T+=qb(p);break;case 92:T+=Kb(Ho()-1,7);continue;case 47:switch(_t()){case 42:case 47:$o(Zb(Gb(nt(),Ho()),e,r),l);break;default:T+="/"}break;case 123*m:a[c++]=Ct(T)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:b=0;case 59+d:h>0&&Ct(T)-u&&$o(h>32?Uc(T+";",n,r,u-1):Uc(de(T," ","")+";",n,r,u-2),l);break;case 59:T+=";";default:if($o(S=Yc(T,e,r,c,d,o,a,_,x=[],w=[],u),i),y===123)if(d===0)Ro(T,e,S,S,x,i,u,a,w);else switch(f===99&&Be(T,3)===110?100:f){case 100:case 109:case 115:Ro(t,S,S,n&&$o(Yc(t,S,S,0,0,o,a,_,o,x=[],u),w),o,w,u,a,n?x:w);break;default:Ro(T,S,S,S,[""],w,0,a,w)}}c=d=h=0,m=v=1,_=T="",u=s;break;case 58:u=1+Ct(T),h=p;default:if(m<1){if(y==123)--m;else if(y==125&&m++==0&&Ub()==125)continue}switch(T+=Bo(y),y*m){case 38:v=d>0?1:(T+="\f",-1);break;case 44:a[c++]=(Ct(T)-1)*v,v=1;break;case 64:_t()===45&&(T+=Vo(nt())),f=_t(),d=u=Ct(_=T+=Xb(Ho())),y++;break;case 45:p===45&&Ct(T)==2&&(m=0)}}return i}function Yc(t,e,r,n,o,i,s,a,l,c,d){for(var u=o-1,f=o===0?i:[""],h=ys(f),p=0,m=0,b=0;p<n;++p)for(var v=0,y=_n(t,u+1,u=jb(m=s[p])),_=t;v<h;++v)(_=jc(m>0?f[v]+" "+y:de(y,/&\f/g,f[v])))&&(l[b++]=_);return Wo(t,e,r,o===0?ps:a,l,c,d)}function Zb(t,e,r){return Wo(t,e,r,gs,Bo(Yb()),_n(t,2,-2),0)}function Uc(t,e,r,n){return Wo(t,e,r,ms,_n(t,0,n),_n(t,n+1,-1),n)}function gr(t,e){for(var r="",n=ys(t),o=0;o<n;o++)r+=e(t[o],o,t,e)||"";return r}function qc(t,e,r,n){switch(t.type){case $b:case ms:return t.return=t.return||t.value;case gs:return"";case $c:return t.return=t.value+"{"+gr(t.children,n)+"}";case ps:t.value=t.props.join(",")}return Ct(r=gr(t.children,n))?t.return=t.value+"{"+r+"}":""}function Kc(t){var e=ys(t);return function(r,n,o,i){for(var s="",a=0;a<e;a++)s+=t[a](r,n,o,i)||"";return s}}function Jb(t){return function(e){e.root||(e=e.return)&&t(e)}}var Qb=function(e){var r=new WeakMap;return function(n){if(r.has(n))return r.get(n);var o=e(n);return r.set(n,o),o}},ey=function(e,r,n){for(var o=0,i=0;o=i,i=_t(),o===38&&i===12&&(r[n]=1),!On(i);)nt();return En(e,Ze)},ty=function(e,r){var n=-1,o=44;do switch(On(o)){case 0:o===38&&_t()===12&&(r[n]=1),e[n]+=ey(Ze-1,r,n);break;case 2:e[n]+=Vo(o);break;case 4:if(o===44){e[++n]=_t()===58?"&\f":"",r[n]=e[n].length;break}default:e[n]+=Bo(o)}while(o=nt());return e},ry=function(e,r){return Vc(ty(Hc(e),r))},Gc=new WeakMap,ny=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!Gc.get(n))&&!o){Gc.set(e,!0);for(var i=[],s=ry(r,i),a=n.props,l=0,c=0;l<s.length;l++)for(var d=0;d<a.length;d++,c++)e.props[c]=i[l]?s[l].replace(/&\f/g,a[d]):a[d]+" "+s[l]}}},oy=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}},iy="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",sy=function(e){return e.type==="comm"&&e.children.indexOf(iy)>-1},ay=function(e){return function(r,n,o){if(!(r.type!=="rule"||e.compat)){var i=r.value.match(/(:first|:nth|:nth-last)-child/g);if(i){for(var s=r.parent===o[0],a=s?o[0].children:o,l=a.length-1;l>=0;l--){var c=a[l];if(c.line<r.line)break;if(c.column<r.column){if(sy(c))return;break}}i.forEach(function(d){console.error('The pseudo class "'+d+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+d.split("-child")[0]+'-of-type".')})}}}},Xc=function(e){return e.type.charCodeAt(1)===105&&e.type.charCodeAt(0)===64},ly=function(e,r){for(var n=e-1;n>=0;n--)if(!Xc(r[n]))return!0;return!1},Zc=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},cy=function(e,r,n){Xc(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),Zc(e)):ly(r,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),Zc(e)))};function Jc(t,e){switch(Hb(t,e)){case 5103:return ae+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ae+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return ae+t+zo+t+Ye+t+t;case 6828:case 4268:return ae+t+Ye+t+t;case 6165:return ae+t+Ye+"flex-"+t+t;case 5187:return ae+t+de(t,/(\w+).+(:[^]+)/,ae+"box-$1$2"+Ye+"flex-$1$2")+t;case 5443:return ae+t+Ye+"flex-item-"+de(t,/flex-|-self/,"")+t;case 4675:return ae+t+Ye+"flex-line-pack"+de(t,/align-content|flex-|-self/,"")+t;case 5548:return ae+t+Ye+de(t,"shrink","negative")+t;case 5292:return ae+t+Ye+de(t,"basis","preferred-size")+t;case 6060:return ae+"box-"+de(t,"-grow","")+ae+t+Ye+de(t,"grow","positive")+t;case 4554:return ae+de(t,/([^-])(transform)/g,"$1"+ae+"$2")+t;case 6187:return de(de(de(t,/(zoom-|grab)/,ae+"$1"),/(image-set)/,ae+"$1"),t,"")+t;case 5495:case 3959:return de(t,/(image-set\([^]*)/,ae+"$1$`$1");case 4968:return de(de(t,/(.+:)(flex-)?(.*)/,ae+"box-pack:$3"+Ye+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ae+t+t;case 4095:case 3583:case 4068:case 2532:return de(t,/(.+)-inline(.+)/,ae+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ct(t)-1-e>6)switch(Be(t,e+1)){case 109:if(Be(t,e+4)!==45)break;case 102:return de(t,/(.+:)(.+)-([^]+)/,"$1"+ae+"$2-$3$1"+zo+(Be(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~bs(t,"stretch")?Jc(de(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Be(t,e+1)!==115)break;case 6444:switch(Be(t,Ct(t)-3-(~bs(t,"!important")&&10))){case 107:return de(t,":",":"+ae)+t;case 101:return de(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ae+(Be(t,14)===45?"inline-":"")+"box$3$1"+ae+"$2$3$1"+Ye+"$2box$3")+t}break;case 5936:switch(Be(t,e+11)){case 114:return ae+t+Ye+de(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return ae+t+Ye+de(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return ae+t+Ye+de(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return ae+t+Ye+t+t}return t}var dy=function(e,r,n,o){if(e.length>-1&&!e.return)switch(e.type){case ms:e.return=Jc(e.value,e.length);break;case $c:return gr([Sn(e,{value:de(e.value,"@","@"+ae)})],o);case ps:if(e.length)return Rb(e.props,function(i){switch(Vb(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return gr([Sn(e,{props:[de(i,/:(read-\w+)/,":"+zo+"$1")]})],o);case"::placeholder":return gr([Sn(e,{props:[de(i,/:(plac\w+)/,":"+ae+"input-$1")]}),Sn(e,{props:[de(i,/:(plac\w+)/,":"+zo+"$1")]}),Sn(e,{props:[de(i,/:(plac\w+)/,Ye+"input-$1")]})],o)}return""})}},Yo=typeof document<"u",uy=Yo?void 0:Qb(function(){return Fo(function(){var t={};return function(e){return t[e]}})}),fy=[dy],Qc=function(e){var r=e.key;if(process.env.NODE_ENV!=="production"&&!r)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
|
|
33
|
+
If multiple caches share the same key they might "fight" for each other's style elements.`);if(Yo&&r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(x){var w=x.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var o=e.stylisPlugins||fy;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(r))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+r+'" was passed');var i={},s,a=[];Yo&&(s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(x){for(var w=x.getAttribute("data-emotion").split(" "),S=1;S<w.length;S++)i[w[S]]=!0;a.push(x)}));var l,c=[ny,oy];if(process.env.NODE_ENV!=="production"&&c.push(ay({get compat(){return _.compat}}),cy),Yo){var d,u=[qc,process.env.NODE_ENV!=="production"?function(x){x.root||(x.return?d.insert(x.return):x.value&&x.type!==gs&&d.insert(x.value+"{}"))}:Jb(function(x){d.insert(x)})],f=Kc(c.concat(o,u)),h=function(w){return gr(Rc(w),f)};l=function(w,S,T,M){d=T,process.env.NODE_ENV!=="production"&&S.map!==void 0&&(d={insert:function(E){T.insert(E+S.map)}}),h(w?w+"{"+S.styles+"}":S.styles),M&&(_.inserted[S.name]=!0)}}else{var p=[qc],m=Kc(c.concat(o,p)),b=function(w){return gr(Rc(w),m)},v=uy(o)(r),y=function(w,S){var T=S.name;return v[T]===void 0&&(v[T]=b(w?w+"{"+S.styles+"}":S.styles)),v[T]};l=function(w,S,T,M){var N=S.name,E=y(w,S);if(_.compat===void 0)return M&&(_.inserted[N]=!0),process.env.NODE_ENV==="development"&&S.map!==void 0?E+S.map:E;if(M)_.inserted[N]=E;else return E}}var _={key:r,sheet:new Bb({key:r,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:l};return _.sheet.hydrate(a),_},xs=typeof document<"u";function hy(t,e,r){var n="";return r.split(" ").forEach(function(o){t[o]!==void 0?e.push(t[o]+";"):n+=o+" "}),n}var ed=function(e,r,n){var o=e.key+"-"+r.name;(n===!1||xs===!1&&e.compat!==void 0)&&e.registered[o]===void 0&&(e.registered[o]=r.styles)},gy=function(e,r,n){ed(e,r,n);var o=e.key+"-"+r.name;if(e.inserted[r.name]===void 0){var i="",s=r;do{var a=e.insert(r===s?"."+o:"",s,e.sheet,!0);!xs&&a!==void 0&&(i+=a),s=s.next}while(s!==void 0);if(!xs&&i.length!==0)return i}};function py(t){for(var e=0,r,n=0,o=t.length;o>=4;++n,o-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var my={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},td=`You have illegal escape sequence in your template literal, most likely inside content's property value.
|
|
34
34
|
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
|
|
35
35
|
You can read more about this here:
|
|
36
|
-
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,
|
|
36
|
+
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,by="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",yy=/[A-Z]|^ms/g,rd=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ws=function(e){return e.charCodeAt(1)===45},nd=function(e){return e!=null&&typeof e!="boolean"},ks=Fo(function(t){return ws(t)?t:t.replace(yy,"-$&").toLowerCase()}),Uo=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(rd,function(n,o,i){return pt={name:o,styles:i,next:pt},o})}return my[e]!==1&&!ws(e)&&typeof r=="number"&&r!==0?r+"px":r};if(process.env.NODE_ENV!=="production"){var vy=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,xy=["normal","none","initial","inherit","unset"],wy=Uo,ky=/^-ms-/,Cy=/-(.)/g,od={};Uo=function(e,r){if(e==="content"&&(typeof r!="string"||xy.indexOf(r)===-1&&!vy.test(r)&&(r.charAt(0)!==r.charAt(r.length-1)||r.charAt(0)!=='"'&&r.charAt(0)!=="'")))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+r+"\"'`");var n=wy(e,r);return n!==""&&!ws(e)&&e.indexOf("-")!==-1&&od[e]===void 0&&(od[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+e.replace(ky,"ms-").replace(Cy,function(o,i){return i.toUpperCase()})+"?")),n}}var id="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Tn(t,e,r){if(r==null)return"";if(r.__emotion_styles!==void 0){if(process.env.NODE_ENV!=="production"&&r.toString()==="NO_COMPONENT_SELECTOR")throw new Error(id);return r}switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return pt={name:r.name,styles:r.styles,next:pt},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)pt={name:n.name,styles:n.styles,next:pt},n=n.next;var o=r.styles+";";return process.env.NODE_ENV!=="production"&&r.map!==void 0&&(o+=r.map),o}return _y(t,e,r)}case"function":{if(t!==void 0){var i=pt,s=r(t);return pt=i,Tn(t,e,s)}else process.env.NODE_ENV!=="production"&&console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break}case"string":if(process.env.NODE_ENV!=="production"){var a=[],l=r.replace(rd,function(c,d,u){var f="animation"+a.length;return a.push("const "+f+" = keyframes`"+u.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+f+"}"});a.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(a,["`"+l+"`"]).join(`
|
|
37
37
|
`)+`
|
|
38
38
|
|
|
39
39
|
You should wrap it with \`css\` like this:
|
|
40
40
|
|
|
41
|
-
`+("css`"+l+"`"))}break}return r}function
|
|
41
|
+
`+("css`"+l+"`"))}break}return r}function _y(t,e,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Tn(t,e,r[o])+";";else for(var i in r){var s=r[i];if(typeof s!="object")nd(s)&&(n+=ks(i)+":"+Uo(i,s)+";");else{if(i==="NO_COMPONENT_SELECTOR"&&process.env.NODE_ENV!=="production")throw new Error(id);if(Array.isArray(s)&&typeof s[0]=="string"&&e==null)for(var a=0;a<s.length;a++)nd(s[a])&&(n+=ks(i)+":"+Uo(i,s[a])+";");else{var l=Tn(t,e,s);switch(i){case"animation":case"animationName":{n+=ks(i)+":"+l+";";break}default:process.env.NODE_ENV!=="production"&&i==="undefined"&&console.error(by),n+=i+"{"+l+"}"}}}}return n}var sd=/label:\s*([^\s;\n{]+)\s*(;|$)/g,ad;process.env.NODE_ENV!=="production"&&(ad=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);var pt,ld=function(e,r,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,i="";pt=void 0;var s=e[0];s==null||s.raw===void 0?(o=!1,i+=Tn(n,r,s)):(process.env.NODE_ENV!=="production"&&s[0]===void 0&&console.error(td),i+=s[0]);for(var a=1;a<e.length;a++)i+=Tn(n,r,e[a]),o&&(process.env.NODE_ENV!=="production"&&s[a]===void 0&&console.error(td),i+=s[a]);var l;process.env.NODE_ENV!=="production"&&(i=i.replace(ad,function(f){return l=f,""})),sd.lastIndex=0;for(var c="",d;(d=sd.exec(i))!==null;)c+="-"+d[1];var u=py(i)+c;return process.env.NODE_ENV!=="production"?{name:u,styles:i,map:l,next:pt,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}:{name:u,styles:i,next:pt}},Sy=typeof document<"u",cd=function(e){return e()},Ey=C.useInsertionEffect?C.useInsertionEffect:!1,dd=Sy&&Ey||cd,ud=typeof document<"u",Oy={}.hasOwnProperty,Nn=k.createContext(typeof HTMLElement<"u"?Qc({key:"css"}):null);process.env.NODE_ENV!=="production"&&(Nn.displayName="EmotionCacheContext"),Nn.Provider;var Cs=function(e){return k.forwardRef(function(r,n){var o=k.useContext(Nn);return e(r,o,n)})};ud||(Cs=function(e){return function(r){var n=k.useContext(Nn);return n===null?(n=Qc({key:"css"}),k.createElement(Nn.Provider,{value:n},e(r,n))):e(r,n)}});var _s=k.createContext({});process.env.NODE_ENV!=="production"&&(_s.displayName="EmotionThemeContext");var fd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",hd="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",Ty=function(e){var r=e.cache,n=e.serialized,o=e.isStringTag;ed(r,n,o);var i=dd(function(){return gy(r,n,o)});if(!ud&&i!==void 0){for(var s,a=n.name,l=n.next;l!==void 0;)a+=" "+l.name,l=l.next;return k.createElement("style",(s={},s["data-emotion"]=r.key+" "+a,s.dangerouslySetInnerHTML={__html:i},s.nonce=r.sheet.nonce,s))}return null},Ny=Cs(function(t,e,r){var n=t.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var o=t[fd],i=[n],s="";typeof t.className=="string"?s=hy(e.registered,i,t.className):t.className!=null&&(s=t.className+" ");var a=ld(i,void 0,k.useContext(_s));if(process.env.NODE_ENV!=="production"&&a.name.indexOf("-")===-1){var l=t[hd];l&&(a=ld([a,"label:"+l+";"]))}s+=e.key+"-"+a.name;var c={};for(var d in t)Oy.call(t,d)&&d!=="css"&&d!==fd&&(process.env.NODE_ENV==="production"||d!==hd)&&(c[d]=t[d]);return c.ref=r,c.className=s,k.createElement(k.Fragment,null,k.createElement(Ty,{cache:e,serialized:a,isStringTag:typeof o=="string"}),k.createElement(o,c))});process.env.NODE_ENV!=="production"&&(Ny.displayName="EmotionCssPropInternal");var Ss=typeof document<"u";function My(t,e,r){var n="";return r.split(" ").forEach(function(o){t[o]!==void 0?e.push(t[o]+";"):n+=o+" "}),n}var gd=function(e,r,n){var o=e.key+"-"+r.name;(n===!1||Ss===!1&&e.compat!==void 0)&&e.registered[o]===void 0&&(e.registered[o]=r.styles)},Py=function(e,r,n){gd(e,r,n);var o=e.key+"-"+r.name;if(e.inserted[r.name]===void 0){var i="",s=r;do{var a=e.insert(r===s?"."+o:"",s,e.sheet,!0);!Ss&&a!==void 0&&(i+=a),s=s.next}while(s!==void 0);if(!Ss&&i.length!==0)return i}};function Ay(t){for(var e=0,r,n=0,o=t.length;o>=4;++n,o-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Dy={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},pd=`You have illegal escape sequence in your template literal, most likely inside content's property value.
|
|
42
42
|
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
|
|
43
43
|
You can read more about this here:
|
|
44
|
-
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,
|
|
44
|
+
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,Iy="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",Ly=/[A-Z]|^ms/g,md=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Es=function(e){return e.charCodeAt(1)===45},bd=function(e){return e!=null&&typeof e!="boolean"},Os=Fo(function(t){return Es(t)?t:t.replace(Ly,"-$&").toLowerCase()}),qo=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(md,function(n,o,i){return mt={name:o,styles:i,next:mt},o})}return Dy[e]!==1&&!Es(e)&&typeof r=="number"&&r!==0?r+"px":r};if(process.env.NODE_ENV!=="production"){var Fy=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,zy=["normal","none","initial","inherit","unset"],By=qo,$y=/^-ms-/,jy=/-(.)/g,yd={};qo=function(e,r){if(e==="content"&&(typeof r!="string"||zy.indexOf(r)===-1&&!Fy.test(r)&&(r.charAt(0)!==r.charAt(r.length-1)||r.charAt(0)!=='"'&&r.charAt(0)!=="'")))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+r+"\"'`");var n=By(e,r);return n!==""&&!Es(e)&&e.indexOf("-")!==-1&&yd[e]===void 0&&(yd[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+e.replace($y,"ms-").replace(jy,function(o,i){return i.toUpperCase()})+"?")),n}}var vd="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Mn(t,e,r){if(r==null)return"";if(r.__emotion_styles!==void 0){if(process.env.NODE_ENV!=="production"&&r.toString()==="NO_COMPONENT_SELECTOR")throw new Error(vd);return r}switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return mt={name:r.name,styles:r.styles,next:mt},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)mt={name:n.name,styles:n.styles,next:mt},n=n.next;var o=r.styles+";";return process.env.NODE_ENV!=="production"&&r.map!==void 0&&(o+=r.map),o}return Wy(t,e,r)}case"function":{if(t!==void 0){var i=mt,s=r(t);return mt=i,Mn(t,e,s)}else process.env.NODE_ENV!=="production"&&console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break}case"string":if(process.env.NODE_ENV!=="production"){var a=[],l=r.replace(md,function(d,u,f){var h="animation"+a.length;return a.push("const "+h+" = keyframes`"+f.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+h+"}"});a.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(a,["`"+l+"`"]).join(`
|
|
45
45
|
`)+`
|
|
46
46
|
|
|
47
47
|
You should wrap it with \`css\` like this:
|
|
48
48
|
|
|
49
|
-
`+("css`"+l+"`"))}break}if(e==null)return r;var c=e[r];return c!==void 0?c:r}function
|
|
49
|
+
`+("css`"+l+"`"))}break}if(e==null)return r;var c=e[r];return c!==void 0?c:r}function Wy(t,e,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Mn(t,e,r[o])+";";else for(var i in r){var s=r[i];if(typeof s!="object")e!=null&&e[s]!==void 0?n+=i+"{"+e[s]+"}":bd(s)&&(n+=Os(i)+":"+qo(i,s)+";");else{if(i==="NO_COMPONENT_SELECTOR"&&process.env.NODE_ENV!=="production")throw new Error(vd);if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var a=0;a<s.length;a++)bd(s[a])&&(n+=Os(i)+":"+qo(i,s[a])+";");else{var l=Mn(t,e,s);switch(i){case"animation":case"animationName":{n+=Os(i)+":"+l+";";break}default:process.env.NODE_ENV!=="production"&&i==="undefined"&&console.error(Iy),n+=i+"{"+l+"}"}}}}return n}var xd=/label:\s*([^\s;\n{]+)\s*(;|$)/g,wd;process.env.NODE_ENV!=="production"&&(wd=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);var mt,Hy=function(e,r,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,i="";mt=void 0;var s=e[0];s==null||s.raw===void 0?(o=!1,i+=Mn(n,r,s)):(process.env.NODE_ENV!=="production"&&s[0]===void 0&&console.error(pd),i+=s[0]);for(var a=1;a<e.length;a++)i+=Mn(n,r,e[a]),o&&(process.env.NODE_ENV!=="production"&&s[a]===void 0&&console.error(pd),i+=s[a]);var l;process.env.NODE_ENV!=="production"&&(i=i.replace(wd,function(f){return l=f,""})),xd.lastIndex=0;for(var c="",d;(d=xd.exec(i))!==null;)c+="-"+d[1];var u=Ay(i)+c;return process.env.NODE_ENV!=="production"?{name:u,styles:i,map:l,next:mt,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}:{name:u,styles:i,next:mt}},Vy=Lb,Ry=function(e){return e!=="theme"},kd=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?Vy:Ry},Cd=function(e,r,n){var o;if(r){var i=r.shouldForwardProp;o=e.__emotion_forwardProp&&i?function(s){return e.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&n&&(o=e.__emotion_forwardProp),o},_d=`You have illegal escape sequence in your template literal, most likely inside content's property value.
|
|
50
50
|
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
|
|
51
51
|
You can read more about this here:
|
|
52
|
-
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,
|
|
53
|
-
You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emotion_base||e,i,s;r!==void 0&&(i=r.label,s=r.target);var a=
|
|
52
|
+
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,Yy=typeof document<"u",Uy=function(e){var r=e.cache,n=e.serialized,o=e.isStringTag;gd(r,n,o);var i=dd(function(){return Py(r,n,o)});if(!Yy&&i!==void 0){for(var s,a=n.name,l=n.next;l!==void 0;)a+=" "+l.name,l=l.next;return k.createElement("style",(s={},s["data-emotion"]=r.key+" "+a,s.dangerouslySetInnerHTML={__html:i},s.nonce=r.sheet.nonce,s))}return null},qy=function t(e,r){if(process.env.NODE_ENV!=="production"&&e===void 0)throw new Error(`You are trying to create a styled element with an undefined component.
|
|
53
|
+
You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emotion_base||e,i,s;r!==void 0&&(i=r.label,s=r.target);var a=Cd(e,r,n),l=a||kd(o),c=!l("as");return function(){var d=arguments,u=n&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(i!==void 0&&u.push("label:"+i+";"),d[0]==null||d[0].raw===void 0)u.push.apply(u,d);else{process.env.NODE_ENV!=="production"&&d[0][0]===void 0&&console.error(_d),u.push(d[0][0]);for(var f=d.length,h=1;h<f;h++)process.env.NODE_ENV!=="production"&&d[0][h]===void 0&&console.error(_d),u.push(d[h],d[0][h])}var p=Cs(function(m,b,v){var y=c&&m.as||o,_="",x=[],w=m;if(m.theme==null){w={};for(var S in m)w[S]=m[S];w.theme=k.useContext(_s)}typeof m.className=="string"?_=My(b.registered,x,m.className):m.className!=null&&(_=m.className+" ");var T=Hy(u.concat(x),b.registered,w);_+=b.key+"-"+T.name,s!==void 0&&(_+=" "+s);var M=c&&a===void 0?kd(y):l,N={};for(var E in m)c&&E==="as"||M(E)&&(N[E]=m[E]);return N.className=_,N.ref=v,k.createElement(k.Fragment,null,k.createElement(Uy,{cache:b,serialized:T,isStringTag:typeof y=="string"}),k.createElement(y,N))});return p.displayName=i!==void 0?i:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",p.defaultProps=e.defaultProps,p.__emotion_real=p,p.__emotion_base=o,p.__emotion_styles=u,p.__emotion_forwardProp=a,Object.defineProperty(p,"toString",{value:function(){return s===void 0&&process.env.NODE_ENV!=="production"?"NO_COMPONENT_SELECTOR":"."+s}}),p.withComponent=function(m,b){return t(m,hs({},r,b,{shouldForwardProp:Cd(p,b,!0)})).apply(void 0,u)},p}},Ky=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Ie=qy.bind();Ky.forEach(function(t){Ie[t]=Ie(t)});var Sd={exports:{}};/*!
|
|
54
54
|
Copyright (c) 2018 Jed Watson.
|
|
55
55
|
Licensed under the MIT License (MIT), see
|
|
56
56
|
http://jedwatson.github.io/classnames
|
|
57
|
-
*/(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var a=r.apply(null,i);a&&n.push(a)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var l in i)e.call(i,l)&&i[l]&&n.push(l)}}}return n.join(" ")}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(
|
|
57
|
+
*/(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var a=r.apply(null,i);a&&n.push(a)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var l in i)e.call(i,l)&&i[l]&&n.push(l)}}}return n.join(" ")}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(Sd);var Me=Sd.exports,Gy=k.createContext(void 0),Xy=function(){var t=k.useContext(Gy);return t},Zy=function(t){var e=k.useState(!!t&&typeof window<"u"&&window.matchMedia(t).matches),r=e[0],n=e[1];return k.useEffect(function(){if(t){var o=window.matchMedia(t),i=function(){o.matches!==r&&n(o.matches)};return i(),o.addEventListener("change",i),function(){return o.removeEventListener("change",i)}}},[r,t]),r},we={root:"ps-sidebar-root",container:"ps-sidebar-container",image:"ps-sidebar-image",backdrop:"ps-sidebar-backdrop",collapsed:"ps-collapsed",toggled:"ps-toggled",rtl:"ps-rtl",broken:"ps-broken"},le={root:"ps-menu-root",menuItemRoot:"ps-menuitem-root",subMenuRoot:"ps-submenu-root",button:"ps-menu-button",prefix:"ps-menu-prefix",suffix:"ps-menu-suffix",label:"ps-menu-label",icon:"ps-menu-icon",subMenuContent:"ps-submenu-content",SubMenuExpandIcon:"ps-submenu-expand-icon",disabled:"ps-disabled",active:"ps-active",open:"ps-open"},Jy=Ie.div(Ed||(Ed=Re([`
|
|
58
58
|
position: fixed;
|
|
59
59
|
top: 0px;
|
|
60
60
|
right: 0px;
|
|
@@ -70,7 +70,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
70
70
|
left: 0px;
|
|
71
71
|
z-index: 1;
|
|
72
72
|
background-color: rgb(0, 0, 0, 0.3);
|
|
73
|
-
`]))),
|
|
73
|
+
`]))),Ed,Qy={xs:"480px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1600px",always:"always",all:"all"},ev=Ie.aside(Od||(Od=Re([`
|
|
74
74
|
position: relative;
|
|
75
75
|
border-right-width: 1px;
|
|
76
76
|
border-right-style: solid;
|
|
@@ -178,7 +178,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
`,`
|
|
181
|
-
`])),function(t){var e=t.transitionDuration;return"width, left, right, ".concat(e,"ms")},function(t){var e=t.width;return e},function(t){var e=t.width;return e},we.collapsed,function(t){var e=t.collapsedWidth;return e},function(t){var e=t.collapsedWidth;return e},we.rtl,we.broken,function(t){var e=t.rtl,r=t.width;return e?"":"left: -".concat(r,";")},we.collapsed,function(t){var e=t.rtl,r=t.collapsedWidth;return e?"":"left: -".concat(r,"; ")},we.toggled,function(t){var e=t.rtl;return e?"":"left: 0;"},we.rtl,function(t){var e=t.width;return e},we.collapsed,function(t){var e=t.collapsedWidth;return e},we.toggled,function(t){var e=t.rootStyles;return e}),
|
|
181
|
+
`])),function(t){var e=t.transitionDuration;return"width, left, right, ".concat(e,"ms")},function(t){var e=t.width;return e},function(t){var e=t.width;return e},we.collapsed,function(t){var e=t.collapsedWidth;return e},function(t){var e=t.collapsedWidth;return e},we.rtl,we.broken,function(t){var e=t.rtl,r=t.width;return e?"":"left: -".concat(r,";")},we.collapsed,function(t){var e=t.rtl,r=t.collapsedWidth;return e?"":"left: -".concat(r,"; ")},we.toggled,function(t){var e=t.rtl;return e?"":"left: 0;"},we.rtl,function(t){var e=t.width;return e},we.collapsed,function(t){var e=t.collapsedWidth;return e},we.toggled,function(t){var e=t.rootStyles;return e}),tv=Ie.div(Td||(Td=Re([`
|
|
182
182
|
position: relative;
|
|
183
183
|
height: 100%;
|
|
184
184
|
overflow-y: auto;
|
|
@@ -194,7 +194,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
194
194
|
z-index: 3;
|
|
195
195
|
|
|
196
196
|
`,`
|
|
197
|
-
`])),function(t){var e=t.backgroundColor;return e?"background-color:".concat(e,";"):""}),
|
|
197
|
+
`])),function(t){var e=t.backgroundColor;return e?"background-color:".concat(e,";"):""}),rv=Ie.img(Nd||(Nd=Re([`
|
|
198
198
|
&.`,` {
|
|
199
199
|
width: 100%;
|
|
200
200
|
height: 100%;
|
|
@@ -216,7 +216,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
216
216
|
top: 0;
|
|
217
217
|
z-index: 2;
|
|
218
218
|
}
|
|
219
|
-
`])),we.image),
|
|
219
|
+
`])),we.image),Ko=k.createContext({collapsed:!1,toggled:!1,rtl:!1,transitionDuration:300}),nv=k.forwardRef(function(t,e){var r,n=t.collapsed,o=t.toggled,i=t.onBackdropClick,s=t.onBreakPoint,a=t.width,l=a===void 0?"250px":a,c=t.collapsedWidth,d=c===void 0?"80px":c,u=t.defaultCollapsed,f=t.className,h=t.children,p=t.breakPoint,m=t.customBreakPoint,b=t.backgroundColor,v=b===void 0?"rgb(249, 249, 249, 0.7)":b,y=t.transitionDuration,_=y===void 0?300:y,x=t.image,w=t.rtl,S=t.rootStyles,T=hr(t,["collapsed","toggled","onBackdropClick","onBreakPoint","width","collapsedWidth","defaultCollapsed","className","children","breakPoint","customBreakPoint","backgroundColor","transitionDuration","image","rtl","rootStyles"]),M=function(){if(m)return"(max-width: ".concat(m,")");if(p)return["xs","sm","md","lg","xl","xxl"].includes(p)?"(max-width: ".concat(Qy[p],")"):p==="always"||p==="all"?(p==="always"&&console.warn('The "always" breakPoint is deprecated and will be removed in future release. Please use the "all" breakPoint instead.'),"screen"):"(max-width: ".concat(p,")")},N=k.useRef();N.current=function(B){s==null||s(B)};var E=Zy(M()),I=k.useState(!1),A=I[0],D=I[1],O=Xy(),P=n??(!A&&u?!0:O==null?void 0:O.collapsed),L=o??(O==null?void 0:O.toggled),z=function(){i==null||i(),O==null||O.updateSidebarState({toggled:!1})};return k.useEffect(function(){var B;(B=N.current)===null||B===void 0||B.call(N,E)},[E]),k.useEffect(function(){O==null||O.updateSidebarState({broken:E,rtl:w,transitionDuration:_})},[E,O==null?void 0:O.updateSidebarState,w,_]),k.useEffect(function(){A||(O==null||O.updateSidebarState({collapsed:u}),D(!0))},[u,A,O==null?void 0:O.updateSidebarState]),k.createElement(Ko.Provider,{value:{collapsed:P,toggled:L,rtl:w,transitionDuration:_}},k.createElement(ev,rt({ref:e,"data-testid":"".concat(we.root,"-test-id"),rtl:w,rootStyles:S,width:l,collapsedWidth:d,transitionDuration:_,className:Me(we.root,(r={},r[we.collapsed]=P,r[we.toggled]=L,r[we.broken]=E,r[we.rtl]=w,r),f)},T),k.createElement(tv,{"data-testid":"".concat(we.container,"-test-id"),className:we.container,backgroundColor:v},h),x&&k.createElement(rv,{"data-testid":"".concat(we.image,"-test-id"),src:x,alt:"sidebar background",className:we.image}),E&&L&&k.createElement(Jy,{"data-testid":"".concat(we.backdrop,"-test-id"),role:"button",tabIndex:0,"aria-label":"backdrop",onClick:z,onKeyPress:z,className:we.backdrop})))}),Od,Td,Nd,Md=Ie.ul(Pd||(Pd=Re([`
|
|
220
220
|
list-style-type: none;
|
|
221
221
|
padding: 0;
|
|
222
222
|
margin: 0;
|
|
@@ -224,7 +224,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
224
224
|
list-style-type: none;
|
|
225
225
|
padding: 0;
|
|
226
226
|
margin: 0;
|
|
227
|
-
`]))),
|
|
227
|
+
`]))),Pd,ov=Ie.nav(Dd||(Dd=Re([`
|
|
228
228
|
&.`,` {
|
|
229
229
|
`,`
|
|
230
230
|
}
|
|
@@ -232,7 +232,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
232
232
|
&.`,` {
|
|
233
233
|
`,`
|
|
234
234
|
}
|
|
235
|
-
`])),
|
|
235
|
+
`])),le.root,function(t){var e=t.rootStyles;return e}),Ad=k.createContext(void 0),Go=k.createContext(0),iv=function(t,e){var r=t.children,n=t.className,o=t.transitionDuration,i=o===void 0?300:o,s=t.closeOnClick,a=s===void 0?!1:s,l=t.rootStyles,c=t.menuItemStyles,d=t.renderExpandIcon,u=hr(t,["children","className","transitionDuration","closeOnClick","rootStyles","menuItemStyles","renderExpandIcon"]),f=k.useMemo(function(){return{transitionDuration:i,closeOnClick:a,menuItemStyles:c,renderExpandIcon:d}},[i,a,c,d]);return k.createElement(Ad.Provider,{value:f},k.createElement(Go.Provider,{value:0},k.createElement(ov,rt({ref:e,className:Me(le.root,n),rootStyles:l},u),k.createElement(Md,null,r))))},sv=k.forwardRef(iv),Dd,Ts=function(){var t=k.useContext(Ad);if(t===void 0)throw new Error("Menu Component is required!");return t},av=Ie.div(Id||(Id=Re([`
|
|
236
236
|
height: 0px;
|
|
237
237
|
overflow: hidden;
|
|
238
238
|
z-index: 999;
|
|
@@ -277,7 +277,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
277
277
|
`):`
|
|
278
278
|
position: static!important;
|
|
279
279
|
transform: none!important;
|
|
280
|
-
`},function(t){var e=t.rootStyles;return e}),
|
|
280
|
+
`},function(t){var e=t.rootStyles;return e}),lv=function(t,e){var r=t.children,n=t.open,o=t.openWhenCollapsed,i=t.firstLevel,s=t.collapsed,a=t.defaultOpen,l=hr(t,["children","open","openWhenCollapsed","firstLevel","collapsed","defaultOpen"]),c=Ts().transitionDuration,d=k.useState(a)[0];return k.createElement(av,rt({"data-testid":"".concat(le.subMenuContent,"-test-id"),ref:e,firstLevel:i,collapsed:s,open:n,openWhenCollapsed:o,transitionDuration:c,defaultOpen:d},l),k.createElement(Md,null,r))},cv=k.forwardRef(lv),Id,Ld=Ie.span(Fd||(Fd=Re([`
|
|
281
281
|
flex-grow: 1;
|
|
282
282
|
overflow: hidden;
|
|
283
283
|
text-overflow: ellipsis;
|
|
@@ -291,7 +291,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
291
291
|
white-space: nowrap;
|
|
292
292
|
|
|
293
293
|
`,`;
|
|
294
|
-
`])),function(t){var e=t.rootStyles;return e}),
|
|
294
|
+
`])),function(t){var e=t.rootStyles;return e}),Fd,zd=Ie.span(Bd||(Bd=Re([`
|
|
295
295
|
width: 35px;
|
|
296
296
|
min-width: 35px;
|
|
297
297
|
height: 35px;
|
|
@@ -321,7 +321,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
321
321
|
`,`
|
|
322
322
|
|
|
323
323
|
`,`;
|
|
324
|
-
`])),function(t){var e=t.rtl;return e?"margin-left: 10px;":"margin-right: 10px;"},function(t){var e=t.rootStyles;return e}),
|
|
324
|
+
`])),function(t){var e=t.rtl;return e?"margin-left: 10px;":"margin-right: 10px;"},function(t){var e=t.rootStyles;return e}),Bd,$d=Ie.span(jd||(jd=Re([`
|
|
325
325
|
`,`
|
|
326
326
|
opacity: `,`;
|
|
327
327
|
transition: opacity `,`ms;
|
|
@@ -333,7 +333,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
333
333
|
transition: opacity `,`ms;
|
|
334
334
|
|
|
335
335
|
`,`;
|
|
336
|
-
`])),function(t){var e=t.rtl;return e?"margin-left: 5px;":"margin-right: 5px;"},function(t){var e=t.firstLevel,r=t.collapsed;return e&&r?"0":"1"},function(t){var e=t.transitionDuration;return e},function(t){var e=t.rootStyles;return e}),
|
|
336
|
+
`])),function(t){var e=t.rtl;return e?"margin-left: 5px;":"margin-right: 5px;"},function(t){var e=t.firstLevel,r=t.collapsed;return e&&r?"0":"1"},function(t){var e=t.transitionDuration;return e},function(t){var e=t.rootStyles;return e}),jd,Wd=Ie.span(Hd||(Hd=Re([`
|
|
337
337
|
margin-right: 5px;
|
|
338
338
|
margin-left: 5px;
|
|
339
339
|
opacity: `,`;
|
|
@@ -347,7 +347,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
347
347
|
transition: opacity `,`ms;
|
|
348
348
|
|
|
349
349
|
`,`;
|
|
350
|
-
`])),function(t){var e=t.firstLevel,r=t.collapsed;return e&&r?"0":"1"},function(t){var e=t.transitionDuration;return e},function(t){var e=t.rootStyles;return e})
|
|
350
|
+
`])),function(t){var e=t.firstLevel,r=t.collapsed;return e&&r?"0":"1"},function(t){var e=t.transitionDuration;return e},function(t){var e=t.rootStyles;return e}),Hd,dv=Ie.span(Vd||(Vd=Re([`
|
|
351
351
|
`,`
|
|
352
352
|
|
|
353
353
|
`,`;
|
|
@@ -361,7 +361,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
361
361
|
top: 50%;
|
|
362
362
|
transform: translateY(-50%);
|
|
363
363
|
|
|
364
|
-
`)},function(t){var e=t.rootStyles;return e}),
|
|
364
|
+
`)},function(t){var e=t.rootStyles;return e}),uv=Ie.span(Rd||(Rd=Re([`
|
|
365
365
|
display: inline-block;
|
|
366
366
|
transition: transform 0.3s;
|
|
367
367
|
`,`
|
|
@@ -382,7 +382,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
382
382
|
border-top: 2px solid currentcolor;
|
|
383
383
|
`:` border-right: 2px solid currentcolor;
|
|
384
384
|
border-bottom: 2px solid currentcolor;
|
|
385
|
-
`},function(t){var e=t.open,r=t.rtl;return e?r?"-135deg":"45deg":"-45deg"}),
|
|
385
|
+
`},function(t){var e=t.open,r=t.rtl;return e?r?"-135deg":"45deg":"-45deg"}),fv=Ie.span(Yd||(Yd=Re([`
|
|
386
386
|
width: 5px;
|
|
387
387
|
height: 5px;
|
|
388
388
|
background-color: currentcolor;
|
|
@@ -394,11 +394,11 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
394
394
|
background-color: currentcolor;
|
|
395
395
|
border-radius: 50%;
|
|
396
396
|
display: inline-block;
|
|
397
|
-
`]))),
|
|
397
|
+
`]))),Vd,Rd,Yd,Je="top",ct="bottom",dt="right",Qe="left",Xo="auto",Pn=[Je,ct,dt,Qe],Fr="start",An="end",hv="clippingParents",Ud="viewport",Dn="popper",gv="reference",qd=Pn.reduce(function(t,e){return t.concat([e+"-"+Fr,e+"-"+An])},[]),Kd=[].concat(Pn,[Xo]).reduce(function(t,e){return t.concat([e,e+"-"+Fr,e+"-"+An])},[]),pv="beforeRead",mv="read",bv="afterRead",yv="beforeMain",vv="main",xv="afterMain",wv="beforeWrite",kv="write",Cv="afterWrite",Ns=[pv,mv,bv,yv,vv,xv,wv,kv,Cv];function St(t){return t?(t.nodeName||"").toLowerCase():null}function ut(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function pr(t){var e=ut(t).Element;return t instanceof e||t instanceof Element}function ot(t){var e=ut(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Ms(t){if(typeof ShadowRoot>"u")return!1;var e=ut(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function _v(t){var e=t.state;Object.keys(e.elements).forEach(function(r){var n=e.styles[r]||{},o=e.attributes[r]||{},i=e.elements[r];!ot(i)||!St(i)||(Object.assign(i.style,n),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function Sv(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach(function(n){var o=e.elements[n],i=e.attributes[n]||{},s=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),a=s.reduce(function(l,c){return l[c]="",l},{});!ot(o)||!St(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}var Ev={name:"applyStyles",enabled:!0,phase:"write",fn:_v,effect:Sv,requires:["computeStyles"]};function bt(t){return t.split("-")[0]}var mr=Math.max,Zo=Math.min,zr=Math.round;function Ps(){var t=navigator.userAgentData;return t!=null&&t.brands?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Gd(){return!/^((?!chrome|android).)*safari/i.test(Ps())}function Br(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);var n=t.getBoundingClientRect(),o=1,i=1;e&&ot(t)&&(o=t.offsetWidth>0&&zr(n.width)/t.offsetWidth||1,i=t.offsetHeight>0&&zr(n.height)/t.offsetHeight||1);var s=pr(t)?ut(t):window,a=s.visualViewport,l=!Gd()&&r,c=(n.left+(l&&a?a.offsetLeft:0))/o,d=(n.top+(l&&a?a.offsetTop:0))/i,u=n.width/o,f=n.height/i;return{width:u,height:f,top:d,right:c+u,bottom:d+f,left:c,x:c,y:d}}function As(t){var e=Br(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function Xd(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&Ms(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function yt(t){return ut(t).getComputedStyle(t)}function Ov(t){return["table","td","th"].indexOf(St(t))>=0}function Gt(t){return((pr(t)?t.ownerDocument:t.document)||window.document).documentElement}function Jo(t){return St(t)==="html"?t:t.assignedSlot||t.parentNode||(Ms(t)?t.host:null)||Gt(t)}function Zd(t){return!ot(t)||yt(t).position==="fixed"?null:t.offsetParent}function Tv(t){var e=/firefox/i.test(Ps()),r=/Trident/i.test(Ps());if(r&&ot(t)){var n=yt(t);if(n.position==="fixed")return null}var o=Jo(t);for(Ms(o)&&(o=o.host);ot(o)&&["html","body"].indexOf(St(o))<0;){var i=yt(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function In(t){for(var e=ut(t),r=Zd(t);r&&Ov(r)&&yt(r).position==="static";)r=Zd(r);return r&&(St(r)==="html"||St(r)==="body"&&yt(r).position==="static")?e:r||Tv(t)||e}function Ds(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ln(t,e,r){return mr(t,Zo(e,r))}function Nv(t,e,r){var n=Ln(t,e,r);return n>r?r:n}function Jd(){return{top:0,right:0,bottom:0,left:0}}function Qd(t){return Object.assign({},Jd(),t)}function eu(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var Mv=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,Qd(typeof e!="number"?e:eu(e,Pn))};function Pv(t){var e,r=t.state,n=t.name,o=t.options,i=r.elements.arrow,s=r.modifiersData.popperOffsets,a=bt(r.placement),l=Ds(a),c=[Qe,dt].indexOf(a)>=0,d=c?"height":"width";if(!(!i||!s)){var u=Mv(o.padding,r),f=As(i),h=l==="y"?Je:Qe,p=l==="y"?ct:dt,m=r.rects.reference[d]+r.rects.reference[l]-s[l]-r.rects.popper[d],b=s[l]-r.rects.reference[l],v=In(i),y=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,_=m/2-b/2,x=u[h],w=y-f[d]-u[p],S=y/2-f[d]/2+_,T=Ln(x,S,w),M=l;r.modifiersData[n]=(e={},e[M]=T,e.centerOffset=T-S,e)}}function Av(t){var e=t.state,r=t.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;if(o!=null&&!(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o))){if(process.env.NODE_ENV!=="production"&&(ot(o)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),!Xd(e.elements.popper,o)){process.env.NODE_ENV!=="production"&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}e.elements.arrow=o}}var Dv={name:"arrow",enabled:!0,phase:"main",fn:Pv,effect:Av,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $r(t){return t.split("-")[1]}var Iv={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Lv(t){var e=t.x,r=t.y,n=window,o=n.devicePixelRatio||1;return{x:zr(e*o)/o||0,y:zr(r*o)/o||0}}function tu(t){var e,r=t.popper,n=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,u=t.isFixed,f=s.x,h=f===void 0?0:f,p=s.y,m=p===void 0?0:p,b=typeof d=="function"?d({x:h,y:m}):{x:h,y:m};h=b.x,m=b.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),_=Qe,x=Je,w=window;if(c){var S=In(r),T="clientHeight",M="clientWidth";if(S===ut(r)&&(S=Gt(r),yt(S).position!=="static"&&a==="absolute"&&(T="scrollHeight",M="scrollWidth")),S=S,o===Je||(o===Qe||o===dt)&&i===An){x=ct;var N=u&&S===w&&w.visualViewport?w.visualViewport.height:S[T];m-=N-n.height,m*=l?1:-1}if(o===Qe||(o===Je||o===ct)&&i===An){_=dt;var E=u&&S===w&&w.visualViewport?w.visualViewport.width:S[M];h-=E-n.width,h*=l?1:-1}}var I=Object.assign({position:a},c&&Iv),A=d===!0?Lv({x:h,y:m}):{x:h,y:m};if(h=A.x,m=A.y,l){var D;return Object.assign({},I,(D={},D[x]=y?"0":"",D[_]=v?"0":"",D.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",D))}return Object.assign({},I,(e={},e[x]=y?m+"px":"",e[_]=v?h+"px":"",e.transform="",e))}function Fv(t){var e=t.state,r=t.options,n=r.gpuAcceleration,o=n===void 0?!0:n,i=r.adaptive,s=i===void 0?!0:i,a=r.roundOffsets,l=a===void 0?!0:a;if(process.env.NODE_ENV!=="production"){var c=yt(e.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some(function(u){return c.indexOf(u)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
|
|
398
398
|
|
|
399
399
|
`,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
|
|
400
400
|
|
|
401
|
-
`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var d={placement:bt(e.placement),variation:$r(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Zd(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Zd(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Av={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pv,data:{}},Zo={passive:!0};function Dv(t){var e=t.state,r=t.instance,n=t.options,o=n.scroll,i=o===void 0?!0:o,s=n.resize,a=s===void 0?!0:s,l=ut(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(d){d.addEventListener("scroll",r.update,Zo)}),a&&l.addEventListener("resize",r.update,Zo),function(){i&&c.forEach(function(d){d.removeEventListener("scroll",r.update,Zo)}),a&&l.removeEventListener("resize",r.update,Zo)}}var Iv={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Dv,data:{}},Lv={left:"right",right:"left",bottom:"top",top:"bottom"};function Qo(t){return t.replace(/left|right|bottom|top/g,function(e){return Lv[e]})}var Fv={start:"end",end:"start"};function Qd(t){return t.replace(/start|end/g,function(e){return Fv[e]})}function As(t){var e=ut(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Ds(t){return Br(Gt(t)).left+As(t).scrollLeft}function zv(t,e){var r=ut(t),n=Gt(t),o=r.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var c=Ud();(c||!c&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+Ds(t),y:l}}function Bv(t){var e,r=Gt(t),n=As(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=mr(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=mr(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+Ds(t),l=-n.scrollTop;return yt(o||r).direction==="rtl"&&(a+=mr(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function Is(t){var e=yt(t),r=e.overflow,n=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function eu(t){return["html","body","#document"].indexOf(St(t))>=0?t.ownerDocument.body:ot(t)&&Is(t)?t:eu(Jo(t))}function Fn(t,e){var r;e===void 0&&(e=[]);var n=eu(t),o=n===((r=t.ownerDocument)==null?void 0:r.body),i=ut(n),s=o?[i].concat(i.visualViewport||[],Is(n)?n:[]):n,a=e.concat(s);return o?a:a.concat(Fn(Jo(s)))}function Ls(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function $v(t,e){var r=Br(t,!1,e==="fixed");return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}function tu(t,e,r){return e===Rd?Ls(zv(t,r)):pr(e)?$v(e,r):Ls(Bv(Gt(t)))}function jv(t){var e=Fn(Jo(t)),r=["absolute","fixed"].indexOf(yt(t).position)>=0,n=r&&ot(t)?In(t):t;return pr(n)?e.filter(function(o){return pr(o)&&qd(o,n)&&St(o)!=="body"}):[]}function Wv(t,e,r,n){var o=e==="clippingParents"?jv(t):[].concat(e),i=[].concat(o,[r]),s=i[0],a=i.reduce(function(l,c){var d=tu(t,c,n);return l.top=mr(d.top,l.top),l.right=Xo(d.right,l.right),l.bottom=Xo(d.bottom,l.bottom),l.left=mr(d.left,l.left),l},tu(t,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ru(t){var e=t.reference,r=t.element,n=t.placement,o=n?bt(n):null,i=n?$r(n):null,s=e.x+e.width/2-r.width/2,a=e.y+e.height/2-r.height/2,l;switch(o){case Ze:l={x:s,y:e.y-r.height};break;case ct:l={x:s,y:e.y+e.height};break;case dt:l={x:e.x+e.width,y:a};break;case Qe:l={x:e.x-r.width,y:a};break;default:l={x:e.x,y:e.y}}var c=o?Ps(o):null;if(c!=null){var d=c==="y"?"height":"width";switch(i){case Fr:l[c]=l[c]-(e[d]/2-r[d]/2);break;case An:l[c]=l[c]+(e[d]/2-r[d]/2);break}}return l}function zn(t,e){e===void 0&&(e={});var r=e,n=r.placement,o=n===void 0?t.placement:n,i=r.strategy,s=i===void 0?t.strategy:i,a=r.boundary,l=a===void 0?lv:a,c=r.rootBoundary,d=c===void 0?Rd:c,u=r.elementContext,f=u===void 0?Dn:u,h=r.altBoundary,g=h===void 0?!1:h,m=r.padding,b=m===void 0?0:m,v=Xd(typeof b!="number"?b:Jd(b,Pn)),y=f===Dn?cv:Dn,_=t.rects.popper,x=t.elements[g?y:f],w=Wv(pr(x)?x:x.contextElement||Gt(t.elements.popper),l,d,s),S=Br(t.elements.reference),T=ru({reference:S,element:_,placement:o}),N=Ls(Object.assign({},_,T)),M=f===Dn?N:S,E={top:w.top-M.top+v.top,bottom:M.bottom-w.bottom+v.bottom,left:w.left-M.left+v.left,right:M.right-w.right+v.right},I=t.modifiersData.offset;if(f===Dn&&I){var A=I[o];Object.keys(E).forEach(function(D){var O=[dt,ct].indexOf(D)>=0?1:-1,P=[Ze,ct].indexOf(D)>=0?"y":"x";E[D]+=A[P]*O})}return E}function Hv(t,e){e===void 0&&(e={});var r=e,n=r.placement,o=r.boundary,i=r.rootBoundary,s=r.padding,a=r.flipVariations,l=r.allowedAutoPlacements,c=l===void 0?Yd:l,d=$r(n),u=d?a?Vd:Vd.filter(function(g){return $r(g)===d}):Pn,f=u.filter(function(g){return c.indexOf(g)>=0});f.length===0&&(f=u,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var h=f.reduce(function(g,m){return g[m]=zn(t,{placement:m,boundary:o,rootBoundary:i,padding:s})[bt(m)],g},{});return Object.keys(h).sort(function(g,m){return h[g]-h[m]})}function Rv(t){if(bt(t)===Go)return[];var e=Qo(t);return[Qd(t),e,Qd(e)]}function Vv(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var o=r.mainAxis,i=o===void 0?!0:o,s=r.altAxis,a=s===void 0?!0:s,l=r.fallbackPlacements,c=r.padding,d=r.boundary,u=r.rootBoundary,f=r.altBoundary,h=r.flipVariations,g=h===void 0?!0:h,m=r.allowedAutoPlacements,b=e.options.placement,v=bt(b),y=v===b,_=l||(y||!g?[Qo(b)]:Rv(b)),x=[b].concat(_).reduce(function(U,q){return U.concat(bt(q)===Go?Hv(e,{placement:q,boundary:d,rootBoundary:u,padding:c,flipVariations:g,allowedAutoPlacements:m}):q)},[]),w=e.rects.reference,S=e.rects.popper,T=new Map,N=!0,M=x[0],E=0;E<x.length;E++){var I=x[E],A=bt(I),D=$r(I)===Fr,O=[Ze,ct].indexOf(A)>=0,P=O?"width":"height",L=zn(e,{placement:I,boundary:d,rootBoundary:u,altBoundary:f,padding:c}),z=O?D?dt:Qe:D?ct:Ze;w[P]>S[P]&&(z=Qo(z));var B=Qo(z),j=[];if(i&&j.push(L[A]<=0),a&&j.push(L[z]<=0,L[B]<=0),j.every(function(U){return U})){M=I,N=!1;break}T.set(I,j)}if(N)for(var $=g?3:1,H=function(q){var G=x.find(function(de){var X=T.get(de);if(X)return X.slice(0,q).every(function(oe){return oe})});if(G)return M=G,"break"},R=$;R>0;R--){var Y=H(R);if(Y==="break")break}e.placement!==M&&(e.modifiersData[n]._skip=!0,e.placement=M,e.reset=!0)}}var Yv={name:"flip",enabled:!0,phase:"main",fn:Vv,requiresIfExists:["offset"],data:{_skip:!1}};function nu(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function ou(t){return[Ze,dt,ct,Qe].some(function(e){return t[e]>=0})}function Uv(t){var e=t.state,r=t.name,n=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=zn(e,{elementContext:"reference"}),a=zn(e,{altBoundary:!0}),l=nu(s,n),c=nu(a,o,i),d=ou(l),u=ou(c);e.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}var qv={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Uv};function Kv(t,e,r){var n=bt(t),o=[Qe,Ze].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Qe,dt].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function Gv(t){var e=t.state,r=t.options,n=t.name,o=r.offset,i=o===void 0?[0,0]:o,s=Yd.reduce(function(d,u){return d[u]=Kv(u,e.rects,i),d},{}),a=s[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}var Xv={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Gv};function Jv(t){var e=t.state,r=t.name;e.modifiersData[r]=ru({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}var Zv={name:"popperOffsets",enabled:!0,phase:"read",fn:Jv,data:{}};function Qv(t){return t==="x"?"y":"x"}function ex(t){var e=t.state,r=t.options,n=t.name,o=r.mainAxis,i=o===void 0?!0:o,s=r.altAxis,a=s===void 0?!1:s,l=r.boundary,c=r.rootBoundary,d=r.altBoundary,u=r.padding,f=r.tether,h=f===void 0?!0:f,g=r.tetherOffset,m=g===void 0?0:g,b=zn(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),v=bt(e.placement),y=$r(e.placement),_=!y,x=Ps(v),w=Qv(x),S=e.modifiersData.popperOffsets,T=e.rects.reference,N=e.rects.popper,M=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,E=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),I=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,A={x:0,y:0};if(S){if(i){var D,O=x==="y"?Ze:Qe,P=x==="y"?ct:dt,L=x==="y"?"height":"width",z=S[x],B=z+b[O],j=z-b[P],$=h?-N[L]/2:0,H=y===Fr?T[L]:N[L],R=y===Fr?-N[L]:-T[L],Y=e.elements.arrow,U=h&&Y?Ns(Y):{width:0,height:0},q=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Gd(),G=q[O],de=q[P],X=Ln(0,T[L],U[L]),oe=_?T[L]/2-$-X-G-E.mainAxis:H-X-G-E.mainAxis,Le=_?-T[L]/2+$+X+de+E.mainAxis:R+X+de+E.mainAxis,He=e.elements.arrow&&In(e.elements.arrow),Z=He?x==="y"?He.clientTop||0:He.clientLeft||0:0,Oe=(D=I==null?void 0:I[x])!=null?D:0,le=z+oe-Oe-Z,re=z+Le-Oe,ge=Ln(h?Xo(B,le):B,z,h?mr(j,re):j);S[x]=ge,A[x]=ge-z}if(a){var Q,V=x==="x"?Ze:Qe,Te=x==="x"?ct:dt,ie=S[w],Ce=w==="y"?"height":"width",Fe=ie+b[V],Ae=ie-b[Te],ht=[Ze,Qe].indexOf(v)!==-1,vt=(Q=I==null?void 0:I[w])!=null?Q:0,it=ht?Fe:ie-T[Ce]-N[Ce]-vt+E.altAxis,or=ht?ie+T[Ce]+N[Ce]-vt-E.altAxis:Ae,st=h&&ht?_v(it,ie,or):Ln(h?it:Fe,ie,h?or:Ae);S[w]=st,A[w]=st-ie}e.modifiersData[n]=A}}var tx={name:"preventOverflow",enabled:!0,phase:"main",fn:ex,requiresIfExists:["offset"]};function rx(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function nx(t){return t===ut(t)||!ot(t)?As(t):rx(t)}function ox(t){var e=t.getBoundingClientRect(),r=zr(e.width)/t.offsetWidth||1,n=zr(e.height)/t.offsetHeight||1;return r!==1||n!==1}function ix(t,e,r){r===void 0&&(r=!1);var n=ot(e),o=ot(e)&&ox(e),i=Gt(e),s=Br(t,o,r),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((St(e)!=="body"||Is(i))&&(a=nx(e)),ot(e)?(l=Br(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=Ds(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function sx(t){var e=new Map,r=new Set,n=[];t.forEach(function(i){e.set(i.name,i)});function o(i){r.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!r.has(a)){var l=e.get(a);l&&o(l)}}),n.push(i)}return t.forEach(function(i){r.has(i.name)||o(i)}),n}function ax(t){var e=sx(t);return Os.reduce(function(r,n){return r.concat(e.filter(function(o){return o.phase===n}))},[])}function lx(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function Xt(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return[].concat(r).reduce(function(o,i){return o.replace(/%s/,i)},t)}var br='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',cx='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',iu=["name","enabled","phase","fn","effect","requires","options"];function dx(t){t.forEach(function(e){[].concat(Object.keys(e),iu).filter(function(r,n,o){return o.indexOf(r)===n}).forEach(function(r){switch(r){case"name":typeof e.name!="string"&&console.error(Xt(br,String(e.name),'"name"','"string"','"'+String(e.name)+'"'));break;case"enabled":typeof e.enabled!="boolean"&&console.error(Xt(br,e.name,'"enabled"','"boolean"','"'+String(e.enabled)+'"'));break;case"phase":Os.indexOf(e.phase)<0&&console.error(Xt(br,e.name,'"phase"',"either "+Os.join(", "),'"'+String(e.phase)+'"'));break;case"fn":typeof e.fn!="function"&&console.error(Xt(br,e.name,'"fn"','"function"','"'+String(e.fn)+'"'));break;case"effect":e.effect!=null&&typeof e.effect!="function"&&console.error(Xt(br,e.name,'"effect"','"function"','"'+String(e.fn)+'"'));break;case"requires":e.requires!=null&&!Array.isArray(e.requires)&&console.error(Xt(br,e.name,'"requires"','"array"','"'+String(e.requires)+'"'));break;case"requiresIfExists":Array.isArray(e.requiresIfExists)||console.error(Xt(br,e.name,'"requiresIfExists"','"array"','"'+String(e.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+e.name+'" modifier, valid properties are '+iu.map(function(n){return'"'+n+'"'}).join(", ")+'; but "'+r+'" was provided.')}e.requires&&e.requires.forEach(function(n){t.find(function(o){return o.name===n})==null&&console.error(Xt(cx,String(e.name),n,n))})})})}function ux(t,e){var r=new Set;return t.filter(function(n){var o=e(n);if(!r.has(o))return r.add(o),!0})}function fx(t){var e=t.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var su="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",hx="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",au={placement:"bottom",modifiers:[],strategy:"absolute"};function lu(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function gx(t){t===void 0&&(t={});var e=t,r=e.defaultModifiers,n=r===void 0?[]:r,o=e.defaultOptions,i=o===void 0?au:o;return function(a,l,c){c===void 0&&(c=i);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},au,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},u=[],f=!1,h={state:d,setOptions:function(v){var y=typeof v=="function"?v(d.options):v;m(),d.options=Object.assign({},i,d.options,y),d.scrollParents={reference:pr(a)?Fn(a):a.contextElement?Fn(a.contextElement):[],popper:Fn(l)};var _=ax(fx([].concat(n,d.options.modifiers)));if(d.orderedModifiers=_.filter(function(I){return I.enabled}),process.env.NODE_ENV!=="production"){var x=ux([].concat(_,d.options.modifiers),function(I){var A=I.name;return A});if(dx(x),bt(d.options.placement)===Go){var w=d.orderedModifiers.find(function(I){var A=I.name;return A==="flip"});w||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var S=yt(l),T=S.marginTop,N=S.marginRight,M=S.marginBottom,E=S.marginLeft;[T,N,M,E].some(function(I){return parseFloat(I)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return g(),h.update()},forceUpdate:function(){if(!f){var v=d.elements,y=v.reference,_=v.popper;if(!lu(y,_)){process.env.NODE_ENV!=="production"&&console.error(su);return}d.rects={reference:ix(y,In(_),d.options.strategy==="fixed"),popper:Ns(_)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(I){return d.modifiersData[I.name]=Object.assign({},I.data)});for(var x=0,w=0;w<d.orderedModifiers.length;w++){if(process.env.NODE_ENV!=="production"&&(x+=1,x>100)){console.error(hx);break}if(d.reset===!0){d.reset=!1,w=-1;continue}var S=d.orderedModifiers[w],T=S.fn,N=S.options,M=N===void 0?{}:N,E=S.name;typeof T=="function"&&(d=T({state:d,options:M,name:E,instance:h})||d)}}},update:lx(function(){return new Promise(function(b){h.forceUpdate(),b(d)})}),destroy:function(){m(),f=!0}};if(!lu(a,l))return process.env.NODE_ENV!=="production"&&console.error(su),h;h.setOptions(c).then(function(b){!f&&c.onFirstUpdate&&c.onFirstUpdate(b)});function g(){d.orderedModifiers.forEach(function(b){var v=b.name,y=b.options,_=y===void 0?{}:y,x=b.effect;if(typeof x=="function"){var w=x({state:d,name:v,instance:h,options:_}),S=function(){};u.push(w||S)}})}function m(){u.forEach(function(b){return b()}),u=[]}return h}}var px=[Iv,Zv,Av,wv,Xv,Yv,tx,Tv,qv],mx=gx({defaultModifiers:px}),bx=function(t){var e=t.level,r=t.buttonRef,n=t.contentRef,o=k.useContext(qo),i=o.collapsed,s=o.toggled,a=o.transitionDuration,l=k.useRef();return k.useEffect(function(){return e===0&&i&&n.current&&r.current&&(l.current=mx(r.current,n.current,{placement:"right",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]})),function(){var c;return(c=l.current)===null||c===void 0?void 0:c.destroy()}},[e,i,n,r]),k.useEffect(function(){if(n.current&&r.current){var c=new ResizeObserver(function(){var d;(d=l.current)===null||d===void 0||d.update()});c.observe(n.current),c.observe(r.current)}setTimeout(function(){var d;(d=l.current)===null||d===void 0||d.update()},a)},[a,s,n,r]),{popperInstance:l.current}},cu=function(t){var e=t.rtl,r=t.level,n=t.collapsed,o=t.disabled,i=t.active;return`
|
|
401
|
+
`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var d={placement:bt(e.placement),variation:$r(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,tu(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,tu(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var zv={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fv,data:{}},Qo={passive:!0};function Bv(t){var e=t.state,r=t.instance,n=t.options,o=n.scroll,i=o===void 0?!0:o,s=n.resize,a=s===void 0?!0:s,l=ut(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(d){d.addEventListener("scroll",r.update,Qo)}),a&&l.addEventListener("resize",r.update,Qo),function(){i&&c.forEach(function(d){d.removeEventListener("scroll",r.update,Qo)}),a&&l.removeEventListener("resize",r.update,Qo)}}var $v={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Bv,data:{}},jv={left:"right",right:"left",bottom:"top",top:"bottom"};function ei(t){return t.replace(/left|right|bottom|top/g,function(e){return jv[e]})}var Wv={start:"end",end:"start"};function ru(t){return t.replace(/start|end/g,function(e){return Wv[e]})}function Is(t){var e=ut(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Ls(t){return Br(Gt(t)).left+Is(t).scrollLeft}function Hv(t,e){var r=ut(t),n=Gt(t),o=r.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var c=Gd();(c||!c&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+Ls(t),y:l}}function Vv(t){var e,r=Gt(t),n=Is(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=mr(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=mr(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+Ls(t),l=-n.scrollTop;return yt(o||r).direction==="rtl"&&(a+=mr(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function Fs(t){var e=yt(t),r=e.overflow,n=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function nu(t){return["html","body","#document"].indexOf(St(t))>=0?t.ownerDocument.body:ot(t)&&Fs(t)?t:nu(Jo(t))}function Fn(t,e){var r;e===void 0&&(e=[]);var n=nu(t),o=n===((r=t.ownerDocument)==null?void 0:r.body),i=ut(n),s=o?[i].concat(i.visualViewport||[],Fs(n)?n:[]):n,a=e.concat(s);return o?a:a.concat(Fn(Jo(s)))}function zs(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Rv(t,e){var r=Br(t,!1,e==="fixed");return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}function ou(t,e,r){return e===Ud?zs(Hv(t,r)):pr(e)?Rv(e,r):zs(Vv(Gt(t)))}function Yv(t){var e=Fn(Jo(t)),r=["absolute","fixed"].indexOf(yt(t).position)>=0,n=r&&ot(t)?In(t):t;return pr(n)?e.filter(function(o){return pr(o)&&Xd(o,n)&&St(o)!=="body"}):[]}function Uv(t,e,r,n){var o=e==="clippingParents"?Yv(t):[].concat(e),i=[].concat(o,[r]),s=i[0],a=i.reduce(function(l,c){var d=ou(t,c,n);return l.top=mr(d.top,l.top),l.right=Zo(d.right,l.right),l.bottom=Zo(d.bottom,l.bottom),l.left=mr(d.left,l.left),l},ou(t,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function iu(t){var e=t.reference,r=t.element,n=t.placement,o=n?bt(n):null,i=n?$r(n):null,s=e.x+e.width/2-r.width/2,a=e.y+e.height/2-r.height/2,l;switch(o){case Je:l={x:s,y:e.y-r.height};break;case ct:l={x:s,y:e.y+e.height};break;case dt:l={x:e.x+e.width,y:a};break;case Qe:l={x:e.x-r.width,y:a};break;default:l={x:e.x,y:e.y}}var c=o?Ds(o):null;if(c!=null){var d=c==="y"?"height":"width";switch(i){case Fr:l[c]=l[c]-(e[d]/2-r[d]/2);break;case An:l[c]=l[c]+(e[d]/2-r[d]/2);break}}return l}function zn(t,e){e===void 0&&(e={});var r=e,n=r.placement,o=n===void 0?t.placement:n,i=r.strategy,s=i===void 0?t.strategy:i,a=r.boundary,l=a===void 0?hv:a,c=r.rootBoundary,d=c===void 0?Ud:c,u=r.elementContext,f=u===void 0?Dn:u,h=r.altBoundary,p=h===void 0?!1:h,m=r.padding,b=m===void 0?0:m,v=Qd(typeof b!="number"?b:eu(b,Pn)),y=f===Dn?gv:Dn,_=t.rects.popper,x=t.elements[p?y:f],w=Uv(pr(x)?x:x.contextElement||Gt(t.elements.popper),l,d,s),S=Br(t.elements.reference),T=iu({reference:S,element:_,placement:o}),M=zs(Object.assign({},_,T)),N=f===Dn?M:S,E={top:w.top-N.top+v.top,bottom:N.bottom-w.bottom+v.bottom,left:w.left-N.left+v.left,right:N.right-w.right+v.right},I=t.modifiersData.offset;if(f===Dn&&I){var A=I[o];Object.keys(E).forEach(function(D){var O=[dt,ct].indexOf(D)>=0?1:-1,P=[Je,ct].indexOf(D)>=0?"y":"x";E[D]+=A[P]*O})}return E}function qv(t,e){e===void 0&&(e={});var r=e,n=r.placement,o=r.boundary,i=r.rootBoundary,s=r.padding,a=r.flipVariations,l=r.allowedAutoPlacements,c=l===void 0?Kd:l,d=$r(n),u=d?a?qd:qd.filter(function(p){return $r(p)===d}):Pn,f=u.filter(function(p){return c.indexOf(p)>=0});f.length===0&&(f=u,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var h=f.reduce(function(p,m){return p[m]=zn(t,{placement:m,boundary:o,rootBoundary:i,padding:s})[bt(m)],p},{});return Object.keys(h).sort(function(p,m){return h[p]-h[m]})}function Kv(t){if(bt(t)===Xo)return[];var e=ei(t);return[ru(t),e,ru(e)]}function Gv(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var o=r.mainAxis,i=o===void 0?!0:o,s=r.altAxis,a=s===void 0?!0:s,l=r.fallbackPlacements,c=r.padding,d=r.boundary,u=r.rootBoundary,f=r.altBoundary,h=r.flipVariations,p=h===void 0?!0:h,m=r.allowedAutoPlacements,b=e.options.placement,v=bt(b),y=v===b,_=l||(y||!p?[ei(b)]:Kv(b)),x=[b].concat(_).reduce(function(U,q){return U.concat(bt(q)===Xo?qv(e,{placement:q,boundary:d,rootBoundary:u,padding:c,flipVariations:p,allowedAutoPlacements:m}):q)},[]),w=e.rects.reference,S=e.rects.popper,T=new Map,M=!0,N=x[0],E=0;E<x.length;E++){var I=x[E],A=bt(I),D=$r(I)===Fr,O=[Je,ct].indexOf(A)>=0,P=O?"width":"height",L=zn(e,{placement:I,boundary:d,rootBoundary:u,altBoundary:f,padding:c}),z=O?D?dt:Qe:D?ct:Je;w[P]>S[P]&&(z=ei(z));var B=ei(z),j=[];if(i&&j.push(L[A]<=0),a&&j.push(L[z]<=0,L[B]<=0),j.every(function(U){return U})){N=I,M=!1;break}T.set(I,j)}if(M)for(var $=p?3:1,H=function(q){var G=x.find(function(ue){var X=T.get(ue);if(X)return X.slice(0,q).every(function(ie){return ie})});if(G)return N=G,"break"},V=$;V>0;V--){var Y=H(V);if(Y==="break")break}e.placement!==N&&(e.modifiersData[n]._skip=!0,e.placement=N,e.reset=!0)}}var Xv={name:"flip",enabled:!0,phase:"main",fn:Gv,requiresIfExists:["offset"],data:{_skip:!1}};function su(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function au(t){return[Je,dt,ct,Qe].some(function(e){return t[e]>=0})}function Zv(t){var e=t.state,r=t.name,n=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=zn(e,{elementContext:"reference"}),a=zn(e,{altBoundary:!0}),l=su(s,n),c=su(a,o,i),d=au(l),u=au(c);e.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}var Jv={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zv};function Qv(t,e,r){var n=bt(t),o=[Qe,Je].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Qe,dt].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}function ex(t){var e=t.state,r=t.options,n=t.name,o=r.offset,i=o===void 0?[0,0]:o,s=Kd.reduce(function(d,u){return d[u]=Qv(u,e.rects,i),d},{}),a=s[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}var tx={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ex};function rx(t){var e=t.state,r=t.name;e.modifiersData[r]=iu({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}var nx={name:"popperOffsets",enabled:!0,phase:"read",fn:rx,data:{}};function ox(t){return t==="x"?"y":"x"}function ix(t){var e=t.state,r=t.options,n=t.name,o=r.mainAxis,i=o===void 0?!0:o,s=r.altAxis,a=s===void 0?!1:s,l=r.boundary,c=r.rootBoundary,d=r.altBoundary,u=r.padding,f=r.tether,h=f===void 0?!0:f,p=r.tetherOffset,m=p===void 0?0:p,b=zn(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),v=bt(e.placement),y=$r(e.placement),_=!y,x=Ds(v),w=ox(x),S=e.modifiersData.popperOffsets,T=e.rects.reference,M=e.rects.popper,N=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,E=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),I=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,A={x:0,y:0};if(S){if(i){var D,O=x==="y"?Je:Qe,P=x==="y"?ct:dt,L=x==="y"?"height":"width",z=S[x],B=z+b[O],j=z-b[P],$=h?-M[L]/2:0,H=y===Fr?T[L]:M[L],V=y===Fr?-M[L]:-T[L],Y=e.elements.arrow,U=h&&Y?As(Y):{width:0,height:0},q=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Jd(),G=q[O],ue=q[P],X=Ln(0,T[L],U[L]),ie=_?T[L]/2-$-X-G-E.mainAxis:H-X-G-E.mainAxis,Le=_?-T[L]/2+$+X+ue+E.mainAxis:V+X+ue+E.mainAxis,He=e.elements.arrow&&In(e.elements.arrow),J=He?x==="y"?He.clientTop||0:He.clientLeft||0:0,Oe=(D=I==null?void 0:I[x])!=null?D:0,ce=z+ie-Oe-J,re=z+Le-Oe,ge=Ln(h?Zo(B,ce):B,z,h?mr(j,re):j);S[x]=ge,A[x]=ge-z}if(a){var Q,R=x==="x"?Je:Qe,Te=x==="x"?ct:dt,se=S[w],Ce=w==="y"?"height":"width",Fe=se+b[R],Ae=se-b[Te],ht=[Je,Qe].indexOf(v)!==-1,vt=(Q=I==null?void 0:I[w])!=null?Q:0,it=ht?Fe:se-T[Ce]-M[Ce]-vt+E.altAxis,or=ht?se+T[Ce]+M[Ce]-vt-E.altAxis:Ae,st=h&&ht?Nv(it,se,or):Ln(h?it:Fe,se,h?or:Ae);S[w]=st,A[w]=st-se}e.modifiersData[n]=A}}var sx={name:"preventOverflow",enabled:!0,phase:"main",fn:ix,requiresIfExists:["offset"]};function ax(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function lx(t){return t===ut(t)||!ot(t)?Is(t):ax(t)}function cx(t){var e=t.getBoundingClientRect(),r=zr(e.width)/t.offsetWidth||1,n=zr(e.height)/t.offsetHeight||1;return r!==1||n!==1}function dx(t,e,r){r===void 0&&(r=!1);var n=ot(e),o=ot(e)&&cx(e),i=Gt(e),s=Br(t,o,r),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((St(e)!=="body"||Fs(i))&&(a=lx(e)),ot(e)?(l=Br(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=Ls(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function ux(t){var e=new Map,r=new Set,n=[];t.forEach(function(i){e.set(i.name,i)});function o(i){r.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!r.has(a)){var l=e.get(a);l&&o(l)}}),n.push(i)}return t.forEach(function(i){r.has(i.name)||o(i)}),n}function fx(t){var e=ux(t);return Ns.reduce(function(r,n){return r.concat(e.filter(function(o){return o.phase===n}))},[])}function hx(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function Xt(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return[].concat(r).reduce(function(o,i){return o.replace(/%s/,i)},t)}var br='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',gx='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',lu=["name","enabled","phase","fn","effect","requires","options"];function px(t){t.forEach(function(e){[].concat(Object.keys(e),lu).filter(function(r,n,o){return o.indexOf(r)===n}).forEach(function(r){switch(r){case"name":typeof e.name!="string"&&console.error(Xt(br,String(e.name),'"name"','"string"','"'+String(e.name)+'"'));break;case"enabled":typeof e.enabled!="boolean"&&console.error(Xt(br,e.name,'"enabled"','"boolean"','"'+String(e.enabled)+'"'));break;case"phase":Ns.indexOf(e.phase)<0&&console.error(Xt(br,e.name,'"phase"',"either "+Ns.join(", "),'"'+String(e.phase)+'"'));break;case"fn":typeof e.fn!="function"&&console.error(Xt(br,e.name,'"fn"','"function"','"'+String(e.fn)+'"'));break;case"effect":e.effect!=null&&typeof e.effect!="function"&&console.error(Xt(br,e.name,'"effect"','"function"','"'+String(e.fn)+'"'));break;case"requires":e.requires!=null&&!Array.isArray(e.requires)&&console.error(Xt(br,e.name,'"requires"','"array"','"'+String(e.requires)+'"'));break;case"requiresIfExists":Array.isArray(e.requiresIfExists)||console.error(Xt(br,e.name,'"requiresIfExists"','"array"','"'+String(e.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+e.name+'" modifier, valid properties are '+lu.map(function(n){return'"'+n+'"'}).join(", ")+'; but "'+r+'" was provided.')}e.requires&&e.requires.forEach(function(n){t.find(function(o){return o.name===n})==null&&console.error(Xt(gx,String(e.name),n,n))})})})}function mx(t,e){var r=new Set;return t.filter(function(n){var o=e(n);if(!r.has(o))return r.add(o),!0})}function bx(t){var e=t.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var cu="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",yx="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",du={placement:"bottom",modifiers:[],strategy:"absolute"};function uu(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function vx(t){t===void 0&&(t={});var e=t,r=e.defaultModifiers,n=r===void 0?[]:r,o=e.defaultOptions,i=o===void 0?du:o;return function(a,l,c){c===void 0&&(c=i);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},du,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},u=[],f=!1,h={state:d,setOptions:function(v){var y=typeof v=="function"?v(d.options):v;m(),d.options=Object.assign({},i,d.options,y),d.scrollParents={reference:pr(a)?Fn(a):a.contextElement?Fn(a.contextElement):[],popper:Fn(l)};var _=fx(bx([].concat(n,d.options.modifiers)));if(d.orderedModifiers=_.filter(function(I){return I.enabled}),process.env.NODE_ENV!=="production"){var x=mx([].concat(_,d.options.modifiers),function(I){var A=I.name;return A});if(px(x),bt(d.options.placement)===Xo){var w=d.orderedModifiers.find(function(I){var A=I.name;return A==="flip"});w||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var S=yt(l),T=S.marginTop,M=S.marginRight,N=S.marginBottom,E=S.marginLeft;[T,M,N,E].some(function(I){return parseFloat(I)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return p(),h.update()},forceUpdate:function(){if(!f){var v=d.elements,y=v.reference,_=v.popper;if(!uu(y,_)){process.env.NODE_ENV!=="production"&&console.error(cu);return}d.rects={reference:dx(y,In(_),d.options.strategy==="fixed"),popper:As(_)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(I){return d.modifiersData[I.name]=Object.assign({},I.data)});for(var x=0,w=0;w<d.orderedModifiers.length;w++){if(process.env.NODE_ENV!=="production"&&(x+=1,x>100)){console.error(yx);break}if(d.reset===!0){d.reset=!1,w=-1;continue}var S=d.orderedModifiers[w],T=S.fn,M=S.options,N=M===void 0?{}:M,E=S.name;typeof T=="function"&&(d=T({state:d,options:N,name:E,instance:h})||d)}}},update:hx(function(){return new Promise(function(b){h.forceUpdate(),b(d)})}),destroy:function(){m(),f=!0}};if(!uu(a,l))return process.env.NODE_ENV!=="production"&&console.error(cu),h;h.setOptions(c).then(function(b){!f&&c.onFirstUpdate&&c.onFirstUpdate(b)});function p(){d.orderedModifiers.forEach(function(b){var v=b.name,y=b.options,_=y===void 0?{}:y,x=b.effect;if(typeof x=="function"){var w=x({state:d,name:v,instance:h,options:_}),S=function(){};u.push(w||S)}})}function m(){u.forEach(function(b){return b()}),u=[]}return h}}var xx=[$v,nx,zv,Ev,tx,Xv,sx,Dv,Jv],wx=vx({defaultModifiers:xx}),kx=function(t){var e=t.level,r=t.buttonRef,n=t.contentRef,o=k.useContext(Ko),i=o.collapsed,s=o.toggled,a=o.transitionDuration,l=k.useRef();return k.useEffect(function(){return e===0&&i&&n.current&&r.current&&(l.current=wx(r.current,n.current,{placement:"right",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]})),function(){var c;return(c=l.current)===null||c===void 0?void 0:c.destroy()}},[e,i,n,r]),k.useEffect(function(){if(n.current&&r.current){var c=new ResizeObserver(function(){var d;(d=l.current)===null||d===void 0||d.update()});c.observe(n.current),c.observe(r.current)}setTimeout(function(){var d;(d=l.current)===null||d===void 0||d.update()},a)},[a,s,n,r]),{popperInstance:l.current}},fu=function(t){var e=t.rtl,r=t.level,n=t.collapsed,o=t.disabled,i=t.active;return`
|
|
402
402
|
display: flex;
|
|
403
403
|
align-items: center;
|
|
404
404
|
height: 50px;
|
|
@@ -425,7 +425,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
425
425
|
|
|
426
426
|
`).concat(i&&"background-color: #e2eef9;",`
|
|
427
427
|
|
|
428
|
-
`)},
|
|
428
|
+
`)},Cx=function(t,e){var r=t.className,n=t.component,o=t.children,i=hr(t,["className","component","children"]);if(n){if(typeof n=="string")return k.createElement(n,rt(rt({className:Me(r)},i),{ref:e}),o);var s=n.props,a=s.className,l=hr(s,["className"]);return k.cloneElement(n,rt(rt(rt({className:Me(r,a)},i),l),{ref:e}),o)}else return k.createElement("a",rt({ref:e,className:Me(r)},i),o)},hu=k.forwardRef(Cx),_x=Ie.li(gu||(gu=Re([`
|
|
429
429
|
position: relative;
|
|
430
430
|
width: 100%;
|
|
431
431
|
|
|
@@ -451,7 +451,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
451
451
|
|
|
452
452
|
`,`;
|
|
453
453
|
}
|
|
454
|
-
`])),function(t){var e=t.menuItemStyles;return e},function(t){var e=t.rootStyles;return e},
|
|
454
|
+
`])),function(t){var e=t.menuItemStyles;return e},function(t){var e=t.rootStyles;return e},le.button,function(t){var e=t.level,r=t.disabled,n=t.active,o=t.collapsed,i=t.rtl;return fu({level:e,disabled:r,active:n,collapsed:o,rtl:i})},function(t){var e=t.buttonStyles;return e}),Sx=function(t,e){var r,n=t.children,o=t.className,i=t.label,s=t.icon,a=t.title,l=t.prefix,c=t.suffix,d=t.open,u=t.defaultOpen,f=t.active,h=f===void 0?!1:f,p=t.disabled,m=p===void 0?!1:p,b=t.rootStyles,v=t.component,y=t.onOpenChange,_=t.onClick,x=t.onKeyUp,w=hr(t,["children","className","label","icon","title","prefix","suffix","open","defaultOpen","active","disabled","rootStyles","component","onOpenChange","onClick","onKeyUp"]),S=k.useContext(Go),T=k.useContext(Ko),M=T.collapsed,N=T.rtl,E=T.transitionDuration,I=Ts(),A=I.renderExpandIcon,D=I.closeOnClick,O=I.menuItemStyles,P=I.transitionDuration,L=k.useState(!!u),z=L[0],B=L[1],j=k.useState(!1),$=j[0],H=j[1],V=k.useState(!1),Y=V[0],U=V[1],q=k.useRef(null),G=k.useRef(null),ue=k.useRef(),X=kx({level:S,buttonRef:q,contentRef:G}).popperInstance,ie=k.useCallback(function(){var ge,Q=G.current;if(Q){var R=(ge=Q==null?void 0:Q.querySelector(".".concat(le.subMenuContent," > ul")))===null||ge===void 0?void 0:ge.clientHeight;Q.style.overflow="hidden",Q.style.height="".concat(R,"px"),ue.current=setTimeout(function(){Q.style.overflow="auto",Q.style.height="auto"},P)}},[P]),Le=function(){var ge,Q=G.current;if(Q){var R=(ge=Q==null?void 0:Q.querySelector(".".concat(le.subMenuContent," > ul")))===null||ge===void 0?void 0:ge.clientHeight;Q.style.overflow="hidden",Q.style.height="".concat(R,"px"),Q.offsetHeight,Q.style.height="0px"}},He=function(){S===0&&M||(typeof d>"u"?(clearTimeout(Number(ue.current)),z?Le():ie(),y==null||y(!z),B(!z)):y==null||y(!d))};k.useEffect(function(){!(S===0&&M)&&typeof d<"u"&&Y&&(clearTimeout(Number(ue.current)),d?ie():Le())},[M,ie,i,S,y,d]);var J=function(ge){_==null||_(ge),He()},Oe=function(ge){x==null||x(ge),ge.key==="Enter"&&He()},ce=function(ge){if(O){var Q={level:S,disabled:m,active:h,isSubmenu:!0,open:d??z},R=O.root,Te=O.button,se=O.label,Ce=O.icon,Fe=O.prefix,Ae=O.suffix,ht=O.subMenuContent,vt=O.SubMenuExpandIcon;switch(ge){case"root":return typeof R=="function"?R(Q):R;case"button":return typeof Te=="function"?Te(Q):Te;case"label":return typeof se=="function"?se(Q):se;case"icon":return typeof Ce=="function"?Ce(Q):Ce;case"prefix":return typeof Fe=="function"?Fe(Q):Fe;case"suffix":return typeof Ae=="function"?Ae(Q):Ae;case"SubMenuExpandIcon":return typeof vt=="function"?vt(Q):vt;case"subMenuContent":return typeof ht=="function"?ht(Q):ht;default:return}}};k.useEffect(function(){setTimeout(function(){return X==null?void 0:X.update()},E),M&&S===0&&H(!1)},[M,S,N,E,X]),k.useEffect(function(){var ge=function(se){var Ce,Fe,Ae;!$&&(!((Ce=q.current)===null||Ce===void 0)&&Ce.contains(se))?H(!0):(D&&!(!((Fe=se.closest(".".concat(le.menuItemRoot)))===null||Fe===void 0)&&Fe.classList.contains(le.subMenuRoot))||!(!((Ae=G.current)===null||Ae===void 0)&&Ae.contains(se))&&$)&&H(!1)},Q=function(se){ge(se.target)},R=function(se){se.key==="Enter"?ge(se.target):se.key==="Escape"&&H(!1)},Te=function(){document.removeEventListener("click",Q),document.removeEventListener("keyup",R)};return Te(),M&&S===0&&(document.addEventListener("click",Q,!1),document.addEventListener("keyup",R,!1)),function(){Te()}},[M,S,D,$]),k.useEffect(function(){U(!0)},[]);var re=(r={},r[le.active]=h,r[le.disabled]=m,r[le.open]=d??z,r);return k.createElement(_x,{ref:e,className:Me(le.menuItemRoot,le.subMenuRoot,re,o),menuItemStyles:ce("root"),level:S,collapsed:M,rtl:N,disabled:m,active:h,buttonStyles:ce("button"),rootStyles:b},k.createElement(hu,rt({"data-testid":"".concat(le.button,"-test-id"),ref:q,title:a,className:Me(le.button,re),onClick:J,onKeyUp:Oe,component:v,tabIndex:0},w),s&&k.createElement(zd,{rtl:N,className:Me(le.icon,re),rootStyles:ce("icon")},s),l&&k.createElement($d,{collapsed:M,transitionDuration:E,firstLevel:S===0,className:Me(le.prefix,re),rtl:N,rootStyles:ce("prefix")},l),k.createElement(Ld,{className:Me(le.label,re),rootStyles:ce("label")},i),c&&k.createElement(Wd,{collapsed:M,transitionDuration:E,firstLevel:S===0,className:Me(le.suffix,re),rootStyles:ce("suffix")},c),k.createElement(dv,{rtl:N,className:Me(le.SubMenuExpandIcon,re),collapsed:M,level:S,rootStyles:ce("SubMenuExpandIcon")},A?A({level:S,disabled:m,active:h,open:d??z}):M&&S===0?k.createElement(fv,null):k.createElement(uv,{rtl:N,open:d??z}))),k.createElement(cv,{ref:G,openWhenCollapsed:$,open:d??z,firstLevel:S===0,collapsed:M,defaultOpen:d&&!Y||u,className:Me(le.subMenuContent,re),rootStyles:ce("subMenuContent")},k.createElement(Go.Provider,{value:S+1},n)))};k.forwardRef(Sx);var gu,Ex=Ie.li(pu||(pu=Re([`
|
|
455
455
|
width: 100%;
|
|
456
456
|
position: relative;
|
|
457
457
|
|
|
@@ -477,7 +477,7 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
477
477
|
|
|
478
478
|
`,`;
|
|
479
479
|
}
|
|
480
|
-
`])),function(t){var e=t.menuItemStyles;return e},function(t){var e=t.rootStyles;return e},
|
|
480
|
+
`])),function(t){var e=t.menuItemStyles;return e},function(t){var e=t.rootStyles;return e},le.button,function(t){var e=t.level,r=t.disabled,n=t.active,o=t.collapsed,i=t.rtl;return fu({level:e,disabled:r,active:n,collapsed:o,rtl:i})},function(t){var e=t.buttonStyles;return e}),Ox=function(t,e){var r,n=t.children,o=t.icon,i=t.className,s=t.prefix,a=t.suffix,l=t.active,c=l===void 0?!1:l,d=t.disabled,u=d===void 0?!1:d,f=t.component,h=t.rootStyles,p=hr(t,["children","icon","className","prefix","suffix","active","disabled","component","rootStyles"]),m=k.useContext(Go),b=k.useContext(Ko),v=b.collapsed,y=b.rtl,_=b.transitionDuration,x=Ts().menuItemStyles,w=function(T){if(x){var M={level:m,disabled:u,active:c,isSubmenu:!1},N=x.root,E=x.button,I=x.label,A=x.icon,D=x.prefix,O=x.suffix;switch(T){case"root":return typeof N=="function"?N(M):N;case"button":return typeof E=="function"?E(M):E;case"label":return typeof I=="function"?I(M):I;case"icon":return typeof A=="function"?A(M):A;case"prefix":return typeof D=="function"?D(M):D;case"suffix":return typeof O=="function"?O(M):O;default:return}}},S=(r={},r[le.active]=c,r[le.disabled]=u,r);return k.createElement(Ex,{ref:e,className:Me(le.menuItemRoot,S,i),menuItemStyles:w("root"),level:m,collapsed:v,rtl:y,disabled:u,active:c,buttonStyles:w("button"),rootStyles:h},k.createElement(hu,rt({className:Me(le.button,S),"data-testid":"".concat(le.button,"-test-id"),component:f,tabIndex:0},p),o&&k.createElement(zd,{rtl:y,className:Me(le.icon,S),rootStyles:w("icon")},o),s&&k.createElement($d,{collapsed:v,transitionDuration:_,firstLevel:m===0,className:Me(le.prefix,S),rtl:y,rootStyles:w("prefix")},s),k.createElement(Ld,{className:Me(le.label,S),rootStyles:w("label")},n),a&&k.createElement(Wd,{collapsed:v,transitionDuration:_,firstLevel:m===0,className:Me(le.suffix,S),rootStyles:w("suffix")},a)))},jr=k.forwardRef(Ox),pu;const Tx=no(),Bs=k.forwardRef((t,e)=>{const{image:r,title:n,description:o}=t;return g.jsxs("div",{className:"border px-3.5 py-7 cursor-pointer",ref:e,children:[g.jsx(Or,{classIm:"mx-auto",src:`${Tx}/public/assets/images/${r}.svg`,alt:"Logo Mathilde ads",width:74,height:74}),g.jsx("h3",{className:"my-3 font-bold",children:n}),g.jsx("p",{children:o})]})});function Nx(t){return me({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M15.528 2.973a.75.75 0 0 1 .472.696v8.662a.75.75 0 0 1-.472.696l-7.25 2.9a.75.75 0 0 1-.557 0l-7.25-2.9A.75.75 0 0 1 0 12.331V3.669a.75.75 0 0 1 .471-.696L7.443.184l.01-.003.268-.108a.75.75 0 0 1 .558 0l.269.108.01.003 6.97 2.789ZM10.404 2 4.25 4.461 1.846 3.5 1 3.839v.4l6.5 2.6v7.922l.5.2.5-.2V6.84l6.5-2.6v-.4l-.846-.339L8 5.961 5.596 5l6.154-2.461L10.404 2Z"},child:[]}]})(t)}function Mx(t){return me({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M12 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM5 4h6a.5.5 0 0 1 0 1H5a.5.5 0 0 1 0-1zm-.5 2.5A.5.5 0 0 1 5 6h6a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zM5 8h6a.5.5 0 0 1 0 1H5a.5.5 0 0 1 0-1zm0 2h3a.5.5 0 0 1 0 1H5a.5.5 0 0 1 0-1z"},child:[]}]})(t)}function Px(t){return me({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M863.1 518.5H505.5V160.9c0-4.4-3.6-8-8-8h-26a398.57 398.57 0 0 0-282.5 117 397.47 397.47 0 0 0-85.6 127C82.6 446.2 72 498.5 72 552.5S82.6 658.7 103.4 708c20.1 47.5 48.9 90.3 85.6 127 36.7 36.7 79.4 65.5 127 85.6a396.64 396.64 0 0 0 155.6 31.5 398.57 398.57 0 0 0 282.5-117c36.7-36.7 65.5-79.4 85.6-127a396.64 396.64 0 0 0 31.5-155.6v-26c-.1-4.4-3.7-8-8.1-8zM951 463l-2.6-28.2c-8.5-92-49.3-178.8-115.1-244.3A398.5 398.5 0 0 0 588.4 75.6L560.1 73c-4.7-.4-8.7 3.2-8.7 7.9v383.7c0 4.4 3.6 8 8 8l383.6-1c4.7-.1 8.4-4 8-8.6z"},child:[]}]})(t)}function Ax(t){return me({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 176a80 80 0 1 0 80 80 80.24 80.24 0 0 0-80-80zm172.72 80a165.53 165.53 0 0 1-1.64 22.34l48.69 38.12a11.59 11.59 0 0 1 2.63 14.78l-46.06 79.52a11.64 11.64 0 0 1-14.14 4.93l-57.25-23a176.56 176.56 0 0 1-38.82 22.67l-8.56 60.78a11.93 11.93 0 0 1-11.51 9.86h-92.12a12 12 0 0 1-11.51-9.53l-8.56-60.78A169.3 169.3 0 0 1 151.05 393L93.8 416a11.64 11.64 0 0 1-14.14-4.92L33.6 331.57a11.59 11.59 0 0 1 2.63-14.78l48.69-38.12A174.58 174.58 0 0 1 83.28 256a165.53 165.53 0 0 1 1.64-22.34l-48.69-38.12a11.59 11.59 0 0 1-2.63-14.78l46.06-79.52a11.64 11.64 0 0 1 14.14-4.93l57.25 23a176.56 176.56 0 0 1 38.82-22.67l8.56-60.78A11.93 11.93 0 0 1 209.94 26h92.12a12 12 0 0 1 11.51 9.53l8.56 60.78A169.3 169.3 0 0 1 361 119l57.2-23a11.64 11.64 0 0 1 14.14 4.92l46.06 79.52a11.59 11.59 0 0 1-2.63 14.78l-48.69 38.12a174.58 174.58 0 0 1 1.64 22.66z"},child:[]}]})(t)}function mu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $s={};Object.defineProperty($s,"__esModule",{value:!0}),$s.parse=$x,$s.serialize=jx;const Dx=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,Ix=/^[\u0021-\u003A\u003C-\u007E]*$/,Lx=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Fx=/^[\u0020-\u003A\u003D-\u007E]*$/,zx=Object.prototype.toString,Bx=(()=>{const t=function(){};return t.prototype=Object.create(null),t})();function $x(t,e){const r=new Bx,n=t.length;if(n<2)return r;const o=(e==null?void 0:e.decode)||Wx;let i=0;do{const s=t.indexOf("=",i);if(s===-1)break;const a=t.indexOf(";",i),l=a===-1?n:a;if(s>l){i=t.lastIndexOf(";",s-1)+1;continue}const c=bu(t,i,s),d=yu(t,s,c),u=t.slice(c,d);if(r[u]===void 0){let f=bu(t,s+1,l),h=yu(t,l,f);const p=o(t.slice(f,h));r[u]=p}i=l+1}while(i<n);return r}function bu(t,e,r){do{const n=t.charCodeAt(e);if(n!==32&&n!==9)return e}while(++e<r);return r}function yu(t,e,r){for(;e>r;){const n=t.charCodeAt(--e);if(n!==32&&n!==9)return e+1}return r}function jx(t,e,r){const n=(r==null?void 0:r.encode)||encodeURIComponent;if(!Dx.test(t))throw new TypeError(`argument name is invalid: ${t}`);const o=n(e);if(!Ix.test(o))throw new TypeError(`argument val is invalid: ${e}`);let i=t+"="+o;if(!r)return i;if(r.maxAge!==void 0){if(!Number.isInteger(r.maxAge))throw new TypeError(`option maxAge is invalid: ${r.maxAge}`);i+="; Max-Age="+r.maxAge}if(r.domain){if(!Lx.test(r.domain))throw new TypeError(`option domain is invalid: ${r.domain}`);i+="; Domain="+r.domain}if(r.path){if(!Fx.test(r.path))throw new TypeError(`option path is invalid: ${r.path}`);i+="; Path="+r.path}if(r.expires){if(!Hx(r.expires)||!Number.isFinite(r.expires.valueOf()))throw new TypeError(`option expires is invalid: ${r.expires}`);i+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.partitioned&&(i+="; Partitioned"),r.priority)switch(typeof r.priority=="string"?r.priority.toLowerCase():void 0){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${r.priority}`)}if(r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:case"strict":i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"none":i+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${r.sameSite}`)}return i}function Wx(t){if(t.indexOf("%")===-1)return t;try{return decodeURIComponent(t)}catch{return t}}function Hx(t){return zx.call(t)==="[object Date]"}/**
|
|
481
481
|
* react-router v7.4.0
|
|
482
482
|
*
|
|
483
483
|
* Copyright (c) Remix Software Inc.
|
|
@@ -486,13 +486,18 @@ You may have forgotten to import it.`);var n=e.__emotion_real===e,o=n&&e.__emoti
|
|
|
486
486
|
* LICENSE.md file in the root directory of this source tree.
|
|
487
487
|
*
|
|
488
488
|
* @license MIT
|
|
489
|
-
*/function $e(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function zt(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function
|
|
489
|
+
*/function $e(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function zt(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function js({pathname:t="/",search:e="",hash:r=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ws(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substring(n),t=t.substring(0,n)),t&&(e.pathname=t)}return e}function vu(t,e,r="/"){return Vx(t,e,r,!1)}function Vx(t,e,r,n){let o=typeof e=="string"?Ws(e):e,i=Zt(o.pathname||"/",r);if(i==null)return null;let s=xu(t);Rx(s);let a=null;for(let l=0;a==null&&l<s.length;++l){let c=tw(i);a=Qx(s[l],c,n)}return a}function xu(t,e=[],r=[],n=""){let o=(i,s,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&($e(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length));let c=Bt([n,l.relativePath]),d=r.concat(l);i.children&&i.children.length>0&&($e(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),xu(i.children,e,d,c)),!(i.path==null&&!i.index)&&e.push({path:c,score:Zx(c,i.index),routesMeta:d})};return t.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of wu(i.path))o(i,s,l)}),e}function wu(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let s=wu(n.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function Rx(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Jx(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var Yx=/^:[\w-]+$/,Ux=3,qx=2,Kx=1,Gx=10,Xx=-2,ku=t=>t==="*";function Zx(t,e){let r=t.split("/"),n=r.length;return r.some(ku)&&(n+=Xx),e&&(n+=qx),r.filter(o=>!ku(o)).reduce((o,i)=>o+(Yx.test(i)?Ux:i===""?Kx:Gx),n)}function Jx(t,e){return t.length===e.length&&t.slice(0,-1).every((n,o)=>n===e[o])?t[t.length-1]-e[e.length-1]:0}function Qx(t,e,r=!1){let{routesMeta:n}=t,o={},i="/",s=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,d=i==="/"?e:e.slice(i.length)||"/",u=ti({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),f=l.route;if(!u&&c&&r&&!n[n.length-1].route.index&&(u=ti({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!u)return null;Object.assign(o,u.params),s.push({params:o,pathname:Bt([i,u.pathname]),pathnameBase:iw(Bt([i,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(i=Bt([i,u.pathnameBase]))}return s}function ti(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=ew(t.path,t.caseSensitive,t.end),o=e.match(r);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:n.reduce((c,{paramName:d,isOptional:u},f)=>{if(d==="*"){let p=a[f]||"";s=i.slice(0,i.length-p.length).replace(/(.)\/+$/,"$1")}const h=a[f];return u&&!h?c[d]=void 0:c[d]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:t}}function ew(t,e=!1,r=!0){zt(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let n=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,e?void 0:"i"),n]}function tw(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return zt(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Zt(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function rw(t,e="/"){let{pathname:r,search:n="",hash:o=""}=typeof t=="string"?Ws(t):t;return{pathname:r?r.startsWith("/")?r:nw(r,e):e,search:sw(n),hash:aw(o)}}function nw(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Hs(t,e,r,n){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ow(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Cu(t){let e=ow(t);return e.map((r,n)=>n===e.length-1?r.pathname:r.pathnameBase)}function _u(t,e,r,n=!1){let o;typeof t=="string"?o=Ws(t):(o={...t},$e(!o.pathname||!o.pathname.includes("?"),Hs("?","pathname","search",o)),$e(!o.pathname||!o.pathname.includes("#"),Hs("#","pathname","hash",o)),$e(!o.search||!o.search.includes("#"),Hs("#","search","hash",o)));let i=t===""||o.pathname==="",s=i?"/":o.pathname,a;if(s==null)a=r;else{let u=e.length-1;if(!n&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),u-=1;o.pathname=f.join("/")}a=u>=0?e[u]:"/"}let l=rw(o,a),c=s&&s!=="/"&&s.endsWith("/"),d=(i||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}var Bt=t=>t.join("/").replace(/\/\/+/g,"/"),iw=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),sw=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,aw=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function lw(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var Su=["POST","PUT","PATCH","DELETE"];new Set(Su);var cw=["GET",...Su];new Set(cw);var Wr=C.createContext(null);Wr.displayName="DataRouter";var ri=C.createContext(null);ri.displayName="DataRouterState";var Eu=C.createContext({isTransitioning:!1});Eu.displayName="ViewTransition";var dw=C.createContext(new Map);dw.displayName="Fetchers";var uw=C.createContext(null);uw.displayName="Await";var $t=C.createContext(null);$t.displayName="Navigation";var Vs=C.createContext(null);Vs.displayName="Location";var jt=C.createContext({outlet:null,matches:[],isDataRoute:!1});jt.displayName="Route";var Rs=C.createContext(null);Rs.displayName="RouteError";function fw(t,{relative:e}={}){$e(ni(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=C.useContext($t),{hash:o,pathname:i,search:s}=Bn(t,{relative:e}),a=i;return r!=="/"&&(a=i==="/"?r:Bt([r,i])),n.createHref({pathname:a,search:s,hash:o})}function ni(){return C.useContext(Vs)!=null}function yr(){return $e(ni(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(Vs).location}var Ou="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Tu(t){C.useContext($t).static||C.useLayoutEffect(t)}function hw(){let{isDataRoute:t}=C.useContext(jt);return t?Ew():gw()}function gw(){$e(ni(),"useNavigate() may be used only in the context of a <Router> component.");let t=C.useContext(Wr),{basename:e,navigator:r}=C.useContext($t),{matches:n}=C.useContext(jt),{pathname:o}=yr(),i=JSON.stringify(Cu(n)),s=C.useRef(!1);return Tu(()=>{s.current=!0}),C.useCallback((l,c={})=>{if(zt(s.current,Ou),!s.current)return;if(typeof l=="number"){r.go(l);return}let d=_u(l,JSON.parse(i),o,c.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:Bt([e,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[e,r,i,o,t])}C.createContext(null);function Bn(t,{relative:e}={}){let{matches:r}=C.useContext(jt),{pathname:n}=yr(),o=JSON.stringify(Cu(r));return C.useMemo(()=>_u(t,JSON.parse(o),n,e==="path"),[t,o,n,e])}function pw(t,e,r,n){$e(ni(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o,static:i}=C.useContext($t),{matches:s}=C.useContext(jt),a=s[s.length-1],l=a?a.params:{},c=a?a.pathname:"/",d=a?a.pathnameBase:"/",u=a&&a.route;{let y=u&&u.path||"";Mu(c,!u||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
490
490
|
|
|
491
|
-
Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let f=yr(),h;h=f;let g=h.pathname||"/",m=g;if(d!=="/"){let y=d.replace(/^\//,"").split("/");m="/"+g.replace(/^\//,"").split("/").slice(y.length).join("/")}let b=!i&&r&&r.matches&&r.matches.length>0?r.matches:yu(t,{pathname:m});return zt(u||b!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),zt(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),mw(b&&b.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:Bt([d,o.encodeLocation?o.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?d:Bt([d,o.encodeLocation?o.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),s,r,n)}function fw(){let t=ww(),e=ow(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:i},"ErrorBoundary")," or"," ",C.createElement("code",{style:i},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},e),r?C.createElement("pre",{style:o},r):null,s)}var hw=C.createElement(fw,null),gw=class extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error!==void 0?C.createElement(jt.Provider,{value:this.props.routeContext},C.createElement(Ws.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function pw({routeContext:t,match:e,children:r}){let n=C.useContext(Wr);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),C.createElement(jt.Provider,{value:t},r)}function mw(t,e=[],r=null,n=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,i=r==null?void 0:r.errors;if(i!=null){let l=o.findIndex(c=>c.route.id&&(i==null?void 0:i[c.route.id])!==void 0);$e(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let s=!1,a=-1;if(r)for(let l=0;l<o.length;l++){let c=o[l];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(a=l),c.route.id){let{loaderData:d,errors:u}=r,f=c.route.loader&&!d.hasOwnProperty(c.route.id)&&(!u||u[c.route.id]===void 0);if(c.route.lazy||f){s=!0,a>=0?o=o.slice(0,a+1):o=[o[0]];break}}}return o.reduceRight((l,c,d)=>{let u,f=!1,h=null,g=null;r&&(u=i&&c.route.id?i[c.route.id]:void 0,h=c.route.errorElement||hw,s&&(a<0&&d===0?(Mu("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,g=null):a===d&&(f=!0,g=c.route.hydrateFallbackElement||null)));let m=e.concat(o.slice(0,d+1)),b=()=>{let v;return u?v=h:f?v=g:c.route.Component?v=C.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=l,C.createElement(pw,{match:c,routeContext:{outlet:l,matches:m,isDataRoute:r!=null},children:v})};return r&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?C.createElement(gw,{location:r.location,revalidation:r.revalidation,component:h,error:u,children:b(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):b()},null)}function Hs(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function bw(t){let e=C.useContext(Wr);return $e(e,Hs(t)),e}function yw(t){let e=C.useContext(ti);return $e(e,Hs(t)),e}function vw(t){let e=C.useContext(jt);return $e(e,Hs(t)),e}function Rs(t){let e=vw(t),r=e.matches[e.matches.length-1];return $e(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function xw(){return Rs("useRouteId")}function ww(){var n;let t=C.useContext(Ws),e=yw("useRouteError"),r=Rs("useRouteError");return t!==void 0?t:(n=e.errors)==null?void 0:n[r]}function kw(){let{router:t}=bw("useNavigate"),e=Rs("useNavigate"),r=C.useRef(!1);return Ou(()=>{r.current=!0}),C.useCallback(async(o,i={})=>{zt(r.current,Eu),r.current&&(typeof o=="number"?t.navigate(o):await t.navigate(o,{fromRouteId:e,...i}))},[t,e])}var Tu={};function Mu(t,e,r){!e&&!Tu[t]&&(Tu[t]=!0,zt(!1,r))}C.memo(Cw);function Cw({routes:t,future:e,state:r}){return uw(t,void 0,r,e)}var ni="get",oi="application/x-www-form-urlencoded";function ii(t){return t!=null&&typeof t.tagName=="string"}function _w(t){return ii(t)&&t.tagName.toLowerCase()==="button"}function Sw(t){return ii(t)&&t.tagName.toLowerCase()==="form"}function Ew(t){return ii(t)&&t.tagName.toLowerCase()==="input"}function Ow(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Tw(t,e){return t.button===0&&(!e||e==="_self")&&!Ow(t)}var si=null;function Mw(){if(si===null)try{new FormData(document.createElement("form"),0),si=!1}catch{si=!0}return si}var Nw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Vs(t){return t!=null&&!Nw.has(t)?(zt(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${oi}"`),null):t}function Pw(t,e){let r,n,o,i,s;if(Sw(t)){let a=t.getAttribute("action");n=a?Jt(a,e):null,r=t.getAttribute("method")||ni,o=Vs(t.getAttribute("enctype"))||oi,i=new FormData(t)}else if(_w(t)||Ew(t)&&(t.type==="submit"||t.type==="image")){let a=t.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=t.getAttribute("formaction")||a.getAttribute("action");if(n=l?Jt(l,e):null,r=t.getAttribute("formmethod")||a.getAttribute("method")||ni,o=Vs(t.getAttribute("formenctype"))||Vs(a.getAttribute("enctype"))||oi,i=new FormData(a,t),!Mw()){let{name:c,type:d,value:u}=t;if(d==="image"){let f=c?`${c}.`:"";i.append(`${f}x`,"0"),i.append(`${f}y`,"0")}else c&&i.append(c,u)}}else{if(ii(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ni,n=null,o=oi,s=t}return i&&o==="text/plain"&&(s=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:s}}function Ys(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}async function Aw(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Dw(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Iw(t,e,r){let n=await Promise.all(t.map(async o=>{let i=e.routes[o.route.id];if(i){let s=await Aw(i,r);return s.links?s.links():[]}return[]}));return Bw(n.flat(1).filter(Dw).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Nu(t,e,r,n,o,i){let s=(l,c)=>r[c]?l.route.id!==r[c].route.id:!0,a=(l,c)=>{var d;return r[c].pathname!==l.pathname||((d=r[c].route.path)==null?void 0:d.endsWith("*"))&&r[c].params["*"]!==l.params["*"]};return i==="assets"?e.filter((l,c)=>s(l,c)||a(l,c)):i==="data"?e.filter((l,c)=>{var u;let d=n.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(s(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((u=r[0])==null?void 0:u.params)||{},nextUrl:new URL(t,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function Lw(t,e,{includeHydrateFallback:r}={}){return Fw(t.map(n=>{let o=e.routes[n.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function Fw(t){return[...new Set(t)]}function zw(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function Bw(t,e){let r=new Set;return new Set(e),t.reduce((n,o)=>{let i=JSON.stringify(zw(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}function $w(t,e){let r=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r.pathname==="/"?r.pathname="_root.data":e&&Jt(r.pathname,e)==="/"?r.pathname=`${e.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Pu(){let t=C.useContext(Wr);return Ys(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function jw(){let t=C.useContext(ti);return Ys(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Us=C.createContext(void 0);Us.displayName="FrameworkContext";function Au(){let t=C.useContext(Us);return Ys(t,"You must render this element inside a <HydratedRouter> element"),t}function Ww(t,e){let r=C.useContext(Us),[n,o]=C.useState(!1),[i,s]=C.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:d,onTouchStart:u}=e,f=C.useRef(null);C.useEffect(()=>{if(t==="render"&&s(!0),t==="viewport"){let m=v=>{v.forEach(y=>{s(y.isIntersecting)})},b=new IntersectionObserver(m,{threshold:.5});return f.current&&b.observe(f.current),()=>{b.disconnect()}}},[t]),C.useEffect(()=>{if(n){let m=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(m)}}},[n]);let h=()=>{o(!0)},g=()=>{o(!1),s(!1)};return r?t!=="intent"?[i,f,{}]:[i,f,{onFocus:$n(a,h),onBlur:$n(l,g),onMouseEnter:$n(c,h),onMouseLeave:$n(d,g),onTouchStart:$n(u,h)}]:[!1,f,{}]}function $n(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function Hw({page:t,...e}){let{router:r}=Pu(),n=C.useMemo(()=>yu(r.routes,t,r.basename),[r.routes,t,r.basename]);return n?C.createElement(Vw,{page:t,matches:n,...e}):null}function Rw(t){let{manifest:e,routeModules:r}=Au(),[n,o]=C.useState([]);return C.useEffect(()=>{let i=!1;return Iw(t,e,r).then(s=>{i||o(s)}),()=>{i=!0}},[t,e,r]),n}function Vw({page:t,matches:e,...r}){let n=yr(),{manifest:o,routeModules:i}=Au(),{basename:s}=Pu(),{loaderData:a,matches:l}=jw(),c=C.useMemo(()=>Nu(t,e,l,o,n,"data"),[t,e,l,o,n]),d=C.useMemo(()=>Nu(t,e,l,o,n,"assets"),[t,e,l,o,n]),u=C.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let g=new Set,m=!1;if(e.forEach(v=>{var _;let y=o.routes[v.route.id];!y||!y.hasLoader||(!c.some(x=>x.route.id===v.route.id)&&v.route.id in a&&((_=i[v.route.id])!=null&&_.shouldRevalidate)||y.hasClientLoader?m=!0:g.add(v.route.id))}),g.size===0)return[];let b=$w(t,s);return m&&g.size>0&&b.searchParams.set("_routes",e.filter(v=>g.has(v.route.id)).map(v=>v.route.id).join(",")),[b.pathname+b.search]},[s,a,n,o,c,e,t,i]),f=C.useMemo(()=>Lw(d,o),[d,o]),h=Rw(d);return C.createElement(C.Fragment,null,u.map(g=>C.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...r})),f.map(g=>C.createElement("link",{key:g,rel:"modulepreload",href:g,...r})),h.map(({key:g,link:m})=>C.createElement("link",{key:g,...m})))}function Yw(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var Du=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Du&&(window.__reactRouterVersion="7.4.0")}catch{}var Iu=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hr=C.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:o,reloadDocument:i,replace:s,state:a,target:l,to:c,preventScrollReset:d,viewTransition:u,...f},h){let{basename:g}=C.useContext($t),m=typeof c=="string"&&Iu.test(c),b,v=!1;if(typeof c=="string"&&m&&(b=c,Du))try{let M=new URL(window.location.href),E=c.startsWith("//")?new URL(M.protocol+c):new URL(c),I=Jt(E.pathname,g);E.origin===M.origin&&I!=null?c=I+E.search+E.hash:v=!0}catch{zt(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let y=lw(c,{relative:o}),[_,x,w]=Ww(n,f),S=Gw(c,{replace:s,state:a,target:l,preventScrollReset:d,relative:o,viewTransition:u});function T(M){e&&e(M),M.defaultPrevented||S(M)}let N=C.createElement("a",{...f,...w,href:b||y,onClick:v||i?e:T,ref:Yw(h,x),target:l,"data-discover":!m&&r==="render"?"true":void 0});return _&&!m?C.createElement(C.Fragment,null,N,C.createElement(Hw,{page:y})):N});Hr.displayName="Link";var Uw=C.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:o=!1,style:i,to:s,viewTransition:a,children:l,...c},d){let u=Bn(s,{relative:c.relative}),f=yr(),h=C.useContext(ti),{navigator:g,basename:m}=C.useContext($t),b=h!=null&&e1(u)&&a===!0,v=g.encodeLocation?g.encodeLocation(u).pathname:u.pathname,y=f.pathname,_=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(y=y.toLowerCase(),_=_?_.toLowerCase():null,v=v.toLowerCase()),_&&m&&(_=Jt(_,m)||_);const x=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let w=y===v||!o&&y.startsWith(v)&&y.charAt(x)==="/",S=_!=null&&(_===v||!o&&_.startsWith(v)&&_.charAt(v.length)==="/"),T={isActive:w,isPending:S,isTransitioning:b},N=w?e:void 0,M;typeof n=="function"?M=n(T):M=[n,w?"active":null,S?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let E=typeof i=="function"?i(T):i;return C.createElement(Hr,{...c,"aria-current":N,className:M,ref:d,style:E,to:s,viewTransition:a},typeof l=="function"?l(T):l)});Uw.displayName="NavLink";var qw=C.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:o,state:i,method:s=ni,action:a,onSubmit:l,relative:c,preventScrollReset:d,viewTransition:u,...f},h)=>{let g=Zw(),m=Qw(a,{relative:c}),b=s.toLowerCase()==="get"?"get":"post",v=typeof a=="string"&&Iu.test(a),y=_=>{if(l&&l(_),_.defaultPrevented)return;_.preventDefault();let x=_.nativeEvent.submitter,w=(x==null?void 0:x.getAttribute("formmethod"))||s;g(x||_.currentTarget,{fetcherKey:e,method:w,navigate:r,replace:o,state:i,relative:c,preventScrollReset:d,viewTransition:u})};return C.createElement("form",{ref:h,method:b,action:m,onSubmit:n?l:y,...f,"data-discover":!v&&t==="render"?"true":void 0})});qw.displayName="Form";function Kw(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Lu(t){let e=C.useContext(Wr);return $e(e,Kw(t)),e}function Gw(t,{target:e,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:s}={}){let a=cw(),l=yr(),c=Bn(t,{relative:i});return C.useCallback(d=>{if(Tw(d,e)){d.preventDefault();let u=r!==void 0?r:zs(l)===zs(c);a(t,{replace:u,state:n,preventScrollReset:o,relative:i,viewTransition:s})}},[l,a,c,r,n,e,t,o,i,s])}var Xw=0,Jw=()=>`__${String(++Xw)}__`;function Zw(){let{router:t}=Lu("useSubmit"),{basename:e}=C.useContext($t),r=xw();return C.useCallback(async(n,o={})=>{let{action:i,method:s,encType:a,formData:l,body:c}=Pw(n,e);if(o.navigate===!1){let d=o.fetcherKey||Jw();await t.fetch(d,r,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||s,formEncType:o.encType||a,flushSync:o.flushSync})}else await t.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||s,formEncType:o.encType||a,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[t,e,r])}function Qw(t,{relative:e}={}){let{basename:r}=C.useContext($t),n=C.useContext(jt);$e(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Bn(t||".",{relative:e})},s=yr();if(t==null){i.search=s.search;let a=new URLSearchParams(i.search),l=a.getAll("index");if(l.some(d=>d==="")){a.delete("index"),l.filter(u=>u).forEach(u=>a.append("index",u));let d=a.toString();i.search=d?`?${d}`:""}}return(!t||t===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Bt([r,i.pathname])),zs(i)}function e1(t,e={}){let r=C.useContext(Su);$e(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Lu("useViewTransitionState"),o=Bn(t,{relative:e.relative});if(!r.isTransitioning)return!1;let i=Jt(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=Jt(r.nextLocation.pathname,n)||r.nextLocation.pathname;return ei(o.pathname,s)!=null||ei(o.pathname,i)!=null}new TextEncoder;const t1=void 0,r1=()=>{const[t,e]=k.useState(!0),[r,n]=k.useState(null),o=()=>{r||e(!1)},i=()=>{r||e(!0)},s=a=>{n(r===a?null:a)};return p.jsx("div",{className:"fixed top-0 left-0 h-full z-40",children:p.jsxs("div",{className:"flex flex-col",onMouseEnter:o,onMouseLeave:i,children:[p.jsxs(Zy,{collapsed:t,rootStyles:{[`.${we.container}`]:{backgroundColor:"#483FFF",color:"#483FFF",height:"100vh",display:"flex",flexDirection:"column"}},children:[p.jsx(Hr,{to:"/dashboard",children:p.jsx("div",{children:p.jsx(Or,{classIm:"mx-auto",src:`${t1}/assets/images/logo mathilde.png`,alt:"Logo Mathilde ads",width:74,height:74})})}),p.jsxs(tv,{children:[p.jsx(jr,{icon:p.jsx(Qg,{className:"text-2xl"}),onClick:()=>s("campanas"),className:"bg-white my-1 mx-2 rounded-lg hover:bg-opacity-90",rootStyles:{button:{width:t?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:t?"0 0.25rem":"0 0.5rem",color:"#483FFF","&:hover":{color:"#483FFF"}}},children:" Campañas "}),p.jsx(Hr,{to:"https://dsp.mathilde-ads.com/login",children:p.jsx(jr,{icon:p.jsx(Sx,{className:"text-xl"}),className:"bg-white my-1 mx-2 rounded-lg hover:bg-opacity-90",rootStyles:{button:{width:t?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:t?"0 0.25rem":"0 0.5rem",color:"#483FFF","&:hover":{color:"#483FFF"}}},children:" Medios "})}),p.jsx(jr,{icon:p.jsx(ep,{className:"text-xl"}),onClick:()=>s("audiencias"),className:"bg-white my-1 mx-2 rounded-lg hover:bg-opacity-90",rootStyles:{button:{width:t?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:t?"0 0.25rem":"0 0.5rem",color:"#483FFF","&:hover":{color:"#483FFF"}}},children:" Audiencias "}),p.jsx(jr,{icon:p.jsx(Ox,{className:"text-xl"}),onClick:()=>s("reportes"),className:"bg-white my-1 mx-2 rounded-lg hover:bg-opacity-90",rootStyles:{button:{width:t?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:t?"0 0.25rem":"0 0.5rem",color:"#483FFF","&:hover":{color:"#483FFF"}}},children:" Reportes "}),p.jsx(jr,{icon:p.jsx(Ex,{className:"text-xl"}),onClick:()=>s("facturacion"),className:"bg-white my-1 mx-2 rounded-lg hover:bg-opacity-90",rootStyles:{button:{width:t?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:t?"0 0.25rem":"0 0.5rem",color:"#483FFF","&:hover":{color:"#483FFF"}}},children:" Facturación "}),p.jsx(Hr,{to:"/settings",children:p.jsx(jr,{icon:p.jsx(Tx,{className:"text-xl"}),className:"bg-white my-1 mx-2 rounded-lg hover:bg-opacity-90",rootStyles:{button:{width:t?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:t?"0 0.25rem":"0 0.5rem",color:"#483FFF","&:hover":{color:"#483FFF"}}},children:" Configuración "})})]}),p.jsx("div",{className:"mt-auto self-end p-4",children:p.jsx(gu,{})})]}),p.jsx(Dr,{width:"40%",isOpen:r==="campanas",onClose:()=>n(null),children:p.jsxs("div",{className:"flex flex-col p-10",children:[p.jsx("h2",{className:"text-center font-bold mb-3",children:"Selecciona el tipo de campaña que quieres crear"}),p.jsxs("div",{className:"flex",children:[p.jsx("div",{className:"w-3/6 p-2",children:p.jsx(hu,{image:"medios-propios",title:"Medios Propios",description:"Crea y administra campañas a los usuarios que ingresan a tus canales."})}),p.jsx("div",{className:"w-3/6 p-2",children:p.jsx(Hr,{to:"/thirdPartyCampaign",children:p.jsx(hu,{image:"medios-pagos",title:"Medios Pagos",description:"Activa campañas de Marketing Digital usando inventario de Redes Sociales y Google."})})})]})]})}),p.jsx(Dr,{isOpen:r==="audiencias",onClose:()=>n(null),children:p.jsx("h2",{children:"Audiencias"})}),p.jsx(Dr,{isOpen:r==="reportes",onClose:()=>n(null),children:p.jsx("h2",{children:"Reportes"})}),p.jsx(Dr,{isOpen:r==="facturacion",onClose:()=>n(null),children:p.jsx("h2",{children:"Facturación"})}),p.jsx(Dr,{isOpen:r==="configuracion",onClose:()=>n(null),children:p.jsx("h2",{children:"Configuración"})})]})})};function n1(t){return xe({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"},child:[]}]})(t)}function o1(t){return xe({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"},child:[]}]})(t)}function i1(t){return xe({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"},child:[]}]})(t)}function Fu(t){return xe({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"},child:[]}]})(t)}function s1(t){return xe({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"},child:[]}]})(t)}function a1(t){return xe({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"},child:[]}]})(t)}function l1(t){return xe({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"},child:[]}]})(t)}function c1(t){return xe({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"},child:[]}]})(t)}function zu(t){return xe({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"},child:[]}]})(t)}function d1(t){return xe({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"},child:[]}]})(t)}function Bu(t){return xe({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"},child:[]}]})(t)}function u1(t){return xe({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"},child:[]}]})(t)}function f1(t){return xe({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"},child:[]}]})(t)}const qs="-";function h1(t){const e=p1(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;function o(s){const a=s.split(qs);return a[0]===""&&a.length!==1&&a.shift(),$u(a,e)||g1(s)}function i(s,a){const l=r[s]||[];return a&&n[s]?[...l,...n[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function $u(t,e){var s;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),o=n?$u(t.slice(1),n):void 0;if(o)return o;if(e.validators.length===0)return;const i=t.join(qs);return(s=e.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const ju=/^\[(.+)\]$/;function g1(t){if(ju.test(t)){const e=ju.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}}function p1(t){const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return b1(Object.entries(t.classGroups),r).forEach(([i,s])=>{Ks(s,n,i,e)}),n}function Ks(t,e,r,n){t.forEach(o=>{if(typeof o=="string"){const i=o===""?e:Wu(e,o);i.classGroupId=r;return}if(typeof o=="function"){if(m1(o)){Ks(o(n),e,r,n);return}e.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([i,s])=>{Ks(s,Wu(e,i),r,n)})})}function Wu(t,e){let r=t;return e.split(qs).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function m1(t){return t.isThemeGetter}function b1(t,e){return e?t.map(([r,n])=>{const o=n.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[e+s,a])):i);return[r,o]}):t}function y1(t){if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;function o(i,s){r.set(i,s),e++,e>t&&(e=0,n=r,r=new Map)}return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return o(i,s),s},set(i,s){r.has(i)?r.set(i,s):o(i,s)}}}const Hu="!";function v1(t){const e=t.separator,r=e.length===1,n=e[0],o=e.length;return function(s){const a=[];let l=0,c=0,d;for(let m=0;m<s.length;m++){let b=s[m];if(l===0){if(b===n&&(r||s.slice(m,m+o)===e)){a.push(s.slice(c,m)),c=m+o;continue}if(b==="/"){d=m;continue}}b==="["?l++:b==="]"&&l--}const u=a.length===0?s:s.substring(c),f=u.startsWith(Hu),h=f?u.substring(1):u,g=d&&d>c?d-c:void 0;return{modifiers:a,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:g}}}function x1(t){if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e}function w1(t){return{cache:y1(t.cacheSize),splitModifiers:v1(t),...h1(t)}}const k1=/\s+/;function C1(t,e){const{splitModifiers:r,getClassGroupId:n,getConflictingClassGroupIds:o}=e,i=new Set;return t.trim().split(k1).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:d}=r(s);let u=n(d?c.substring(0,d):c),f=!!d;if(!u){if(!d)return{isTailwindClass:!1,originalClassName:s};if(u=n(c),!u)return{isTailwindClass:!1,originalClassName:s};f=!1}const h=x1(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Hu:h,classGroupId:u,originalClassName:s,hasPostfixModifier:f}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,d=a+l;return i.has(d)?!1:(i.add(d),o(l,c).forEach(u=>i.add(a+u)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function _1(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=Ru(e))&&(n&&(n+=" "),n+=r);return n}function Ru(t){if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=Ru(t[n]))&&(r&&(r+=" "),r+=e);return r}function S1(t,...e){let r,n,o,i=s;function s(l){const c=e.reduce((d,u)=>u(d),t());return r=w1(c),n=r.cache.get,o=r.cache.set,i=a,a(l)}function a(l){const c=n(l);if(c)return c;const d=C1(l,r);return o(l,d),d}return function(){return i(_1.apply(null,arguments))}}function ye(t){const e=r=>r[t]||[];return e.isThemeGetter=!0,e}const Vu=/^\[(?:([a-z-]+):)?(.+)\]$/i,E1=/^\d+\/\d+$/,O1=new Set(["px","full","screen"]),T1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,M1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,N1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,P1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,A1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Wt(t){return vr(t)||O1.has(t)||E1.test(t)}function Zt(t){return Rr(t,"length",j1)}function vr(t){return!!t&&!Number.isNaN(Number(t))}function ai(t){return Rr(t,"number",vr)}function jn(t){return!!t&&Number.isInteger(Number(t))}function D1(t){return t.endsWith("%")&&vr(t.slice(0,-1))}function J(t){return Vu.test(t)}function Qt(t){return T1.test(t)}const I1=new Set(["length","size","percentage"]);function L1(t){return Rr(t,I1,Yu)}function F1(t){return Rr(t,"position",Yu)}const z1=new Set(["image","url"]);function B1(t){return Rr(t,z1,H1)}function $1(t){return Rr(t,"",W1)}function Wn(){return!0}function Rr(t,e,r){const n=Vu.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1}function j1(t){return M1.test(t)&&!N1.test(t)}function Yu(){return!1}function W1(t){return P1.test(t)}function H1(t){return A1.test(t)}function R1(){const t=ye("colors"),e=ye("spacing"),r=ye("blur"),n=ye("brightness"),o=ye("borderColor"),i=ye("borderRadius"),s=ye("borderSpacing"),a=ye("borderWidth"),l=ye("contrast"),c=ye("grayscale"),d=ye("hueRotate"),u=ye("invert"),f=ye("gap"),h=ye("gradientColorStops"),g=ye("gradientColorStopPositions"),m=ye("inset"),b=ye("margin"),v=ye("opacity"),y=ye("padding"),_=ye("saturate"),x=ye("scale"),w=ye("sepia"),S=ye("skew"),T=ye("space"),N=ye("translate"),M=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",J,e],A=()=>[J,e],D=()=>["",Wt,Zt],O=()=>["auto",vr,J],P=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],B=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",J],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[vr,ai],R=()=>[vr,J];return{cacheSize:500,separator:":",theme:{colors:[Wn],spacing:[Wt,Zt],blur:["none","",Qt,J],brightness:H(),borderColor:[t],borderRadius:["none","","full",Qt,J],borderSpacing:A(),borderWidth:D(),contrast:H(),grayscale:j(),hueRotate:R(),invert:j(),gap:A(),gradientColorStops:[t],gradientColorStopPositions:[D1,Zt],inset:I(),margin:I(),opacity:H(),padding:A(),saturate:H(),scale:H(),sepia:j(),skew:R(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[Qt]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...P(),J]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",jn,J]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",jn,J]}],"grid-cols":[{"grid-cols":[Wn]}],"col-start-end":[{col:["auto",{span:["full",jn,J]},J]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[Wn]}],"row-start-end":[{row:["auto",{span:[jn,J]},J]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J,e]}],"min-w":[{"min-w":[J,e,"min","max","fit"]}],"max-w":[{"max-w":[J,e,"none","full","min","max","fit","prose",{screen:[Qt]},Qt]}],h:[{h:[J,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Qt,Zt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ai]}],"font-family":[{font:[Wn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",J]}],"line-clamp":[{"line-clamp":["none",vr,ai]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wt,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wt,Zt]}],"underline-offset":[{"underline-offset":["auto",Wt,J]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...P(),F1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",L1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},B1]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:L()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[Wt,J]}],"outline-w":[{outline:[Wt,Zt]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Wt,Zt]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Qt,$1]}],"shadow-color":[{shadow:[Wn]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":z()}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Qt,J]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[_]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",J]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[jn,J]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",J]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",J]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Wt,Zt,ai]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const F=S1(R1);function xr(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function Hn(t){if(!xr(t))return t;const e={};for(const r in t)e[r]=Hn(t[r]);return e}function W(t,e){if(xr(e)&&Object.keys(e).length===0)return Hn({...t,...e});const r={...t,...e};if(xr(e)&&xr(t))for(const n in e)xr(e[n])&&n in t&&xr(t[n])?r[n]=W(t[n],e[n]):r[n]=xr(e[n])?Hn(e[n]):e[n];return r}function A5(t){return t}const V1={root:{base:"divide-y divide-gray-200 border-gray-200 dark:divide-gray-700 dark:border-gray-700",flush:{off:"rounded-lg border",on:"border-b"}},content:{base:"p-5 first:rounded-t-lg last:rounded-b-lg dark:bg-gray-900"},title:{arrow:{base:"h-6 w-6 shrink-0",open:{off:"",on:"rotate-180"}},base:"flex w-full items-center justify-between p-5 text-left font-medium text-gray-500 first:rounded-t-lg last:rounded-b-lg dark:text-gray-400",flush:{off:"hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 dark:hover:bg-gray-800 dark:focus:ring-gray-800",on:"bg-transparent dark:bg-transparent"},heading:"",open:{off:"",on:"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white"}}},Y1={base:"flex flex-col gap-2 p-4 text-sm",borderAccent:"border-t-4",closeButton:{base:"-m-1.5 ml-auto inline-flex h-8 w-8 rounded-lg p-1.5 focus:ring-2",icon:"h-5 w-5",color:{info:"bg-cyan-100 text-cyan-500 hover:bg-cyan-200 focus:ring-cyan-400 dark:bg-cyan-200 dark:text-cyan-600 dark:hover:bg-cyan-300",gray:"bg-gray-100 text-gray-500 hover:bg-gray-200 focus:ring-gray-400 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-white",failure:"bg-red-100 text-red-500 hover:bg-red-200 focus:ring-red-400 dark:bg-red-200 dark:text-red-600 dark:hover:bg-red-300",success:"bg-green-100 text-green-500 hover:bg-green-200 focus:ring-green-400 dark:bg-green-200 dark:text-green-600 dark:hover:bg-green-300",warning:"bg-yellow-100 text-yellow-500 hover:bg-yellow-200 focus:ring-yellow-400 dark:bg-yellow-200 dark:text-yellow-600 dark:hover:bg-yellow-300",red:"bg-red-100 text-red-500 hover:bg-red-200 focus:ring-red-400 dark:bg-red-200 dark:text-red-600 dark:hover:bg-red-300",green:"bg-green-100 text-green-500 hover:bg-green-200 focus:ring-green-400 dark:bg-green-200 dark:text-green-600 dark:hover:bg-green-300",yellow:"bg-yellow-100 text-yellow-500 hover:bg-yellow-200 focus:ring-yellow-400 dark:bg-yellow-200 dark:text-yellow-600 dark:hover:bg-yellow-300",blue:"bg-blue-100 text-blue-500 hover:bg-blue-200 focus:ring-blue-400 dark:bg-blue-200 dark:text-blue-600 dark:hover:bg-blue-300",cyan:"bg-cyan-100 text-cyan-500 hover:bg-cyan-200 focus:ring-cyan-400 dark:bg-cyan-200 dark:text-cyan-600 dark:hover:bg-cyan-300",pink:"bg-pink-100 text-pink-500 hover:bg-pink-200 focus:ring-pink-400 dark:bg-pink-200 dark:text-pink-600 dark:hover:bg-pink-300",lime:"bg-lime-100 text-lime-500 hover:bg-lime-200 focus:ring-lime-400 dark:bg-lime-200 dark:text-lime-600 dark:hover:bg-lime-300",dark:"bg-gray-100 text-gray-500 hover:bg-gray-200 focus:ring-gray-400 dark:bg-gray-200 dark:text-gray-600 dark:hover:bg-gray-300",indigo:"bg-indigo-100 text-indigo-500 hover:bg-indigo-200 focus:ring-indigo-400 dark:bg-indigo-200 dark:text-indigo-600 dark:hover:bg-indigo-300",purple:"bg-purple-100 text-purple-500 hover:bg-purple-200 focus:ring-purple-400 dark:bg-purple-200 dark:text-purple-600 dark:hover:bg-purple-300",teal:"bg-teal-100 text-teal-500 hover:bg-teal-200 focus:ring-teal-400 dark:bg-teal-200 dark:text-teal-600 dark:hover:bg-teal-300",light:"bg-gray-50 text-gray-500 hover:bg-gray-100 focus:ring-gray-200 dark:bg-gray-600 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white"}},color:{info:"border-cyan-500 bg-cyan-100 text-cyan-700 dark:bg-cyan-200 dark:text-cyan-800",gray:"border-gray-500 bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300",failure:"border-red-500 bg-red-100 text-red-700 dark:bg-red-200 dark:text-red-800",success:"border-green-500 bg-green-100 text-green-700 dark:bg-green-200 dark:text-green-800",warning:"border-yellow-500 bg-yellow-100 text-yellow-700 dark:bg-yellow-200 dark:text-yellow-800",red:"border-red-500 bg-red-100 text-red-700 dark:bg-red-200 dark:text-red-800",green:"border-green-500 bg-green-100 text-green-700 dark:bg-green-200 dark:text-green-800",yellow:"border-yellow-500 bg-yellow-100 text-yellow-700 dark:bg-yellow-200 dark:text-yellow-800",blue:"border-blue-500 bg-blue-100 text-blue-700 dark:bg-blue-200 dark:text-blue-800",cyan:"border-cyan-500 bg-cyan-100 text-cyan-700 dark:bg-cyan-200 dark:text-cyan-800",pink:"border-pink-500 bg-pink-100 text-pink-700 dark:bg-pink-200 dark:text-pink-800",lime:"border-lime-500 bg-lime-100 text-lime-700 dark:bg-lime-200 dark:text-lime-800",dark:"border-gray-600 bg-gray-800 text-gray-200 dark:bg-gray-900 dark:text-gray-300",indigo:"border-indigo-500 bg-indigo-100 text-indigo-700 dark:bg-indigo-200 dark:text-indigo-800",purple:"border-purple-500 bg-purple-100 text-purple-700 dark:bg-purple-200 dark:text-purple-800",teal:"border-teal-500 bg-teal-100 text-teal-700 dark:bg-teal-200 dark:text-teal-800",light:"border-gray-400 bg-gray-50 text-gray-600 dark:bg-gray-500 dark:text-gray-200"},icon:"mr-3 inline h-5 w-5 flex-shrink-0",rounded:"rounded-lg",wrapper:"flex items-center"},U1={root:{base:"flex items-center justify-center space-x-4 rounded",bordered:"p-1 ring-2",rounded:"rounded-full",color:{dark:"ring-gray-800 dark:ring-gray-800",failure:"ring-red-500 dark:ring-red-700",gray:"ring-gray-500 dark:ring-gray-400",info:"ring-cyan-400 dark:ring-cyan-800",light:"ring-gray-300 dark:ring-gray-500",purple:"ring-purple-500 dark:ring-purple-600",success:"ring-green-500 dark:ring-green-500",warning:"ring-yellow-300 dark:ring-yellow-500",pink:"ring-pink-500 dark:ring-pink-500"},img:{base:"rounded",off:"relative overflow-hidden bg-gray-100 dark:bg-gray-600",on:"",placeholder:"absolute -bottom-1 h-auto w-auto text-gray-400"},size:{xs:"h-6 w-6",sm:"h-8 w-8",md:"h-10 w-10",lg:"h-20 w-20",xl:"h-36 w-36"},stacked:"ring-2 ring-gray-300 dark:ring-gray-500",statusPosition:{"bottom-left":"-bottom-1 -left-1","bottom-center":"-bottom-1","bottom-right":"-bottom-1 -right-1","top-left":"-left-1 -top-1","top-center":"-top-1","top-right":"-right-1 -top-1","center-right":"-right-1",center:"","center-left":"-left-1"},status:{away:"bg-yellow-400",base:"absolute h-3.5 w-3.5 rounded-full border-2 border-white dark:border-gray-800",busy:"bg-red-400",offline:"bg-gray-400",online:"bg-green-400"},initials:{text:"font-medium text-gray-600 dark:text-gray-300",base:"relative inline-flex items-center justify-center overflow-hidden bg-gray-100 dark:bg-gray-600"}},group:{base:"flex -space-x-4"},groupCounter:{base:"relative flex h-10 w-10 items-center justify-center rounded-full bg-gray-700 text-xs font-medium text-white ring-2 ring-gray-300 hover:bg-gray-600 dark:ring-gray-500"}},q1={root:{base:"flex h-fit items-center gap-1 font-semibold",color:{info:"bg-cyan-100 text-cyan-800 group-hover:bg-cyan-200 dark:bg-cyan-200 dark:text-cyan-800 dark:group-hover:bg-cyan-300",gray:"bg-gray-100 text-gray-800 group-hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:group-hover:bg-gray-600",failure:"bg-red-100 text-red-800 group-hover:bg-red-200 dark:bg-red-200 dark:text-red-900 dark:group-hover:bg-red-300",success:"bg-green-100 text-green-800 group-hover:bg-green-200 dark:bg-green-200 dark:text-green-900 dark:group-hover:bg-green-300",warning:"bg-yellow-100 text-yellow-800 group-hover:bg-yellow-200 dark:bg-yellow-200 dark:text-yellow-900 dark:group-hover:bg-yellow-300",indigo:"bg-indigo-100 text-indigo-800 group-hover:bg-indigo-200 dark:bg-indigo-200 dark:text-indigo-900 dark:group-hover:bg-indigo-300",purple:"bg-purple-100 text-purple-800 group-hover:bg-purple-200 dark:bg-purple-200 dark:text-purple-900 dark:group-hover:bg-purple-300",pink:"bg-pink-100 text-pink-800 group-hover:bg-pink-200 dark:bg-pink-200 dark:text-pink-900 dark:group-hover:bg-pink-300",blue:"bg-blue-100 text-blue-800 group-hover:bg-blue-200 dark:bg-blue-200 dark:text-blue-900 dark:group-hover:bg-blue-300",cyan:"bg-cyan-100 text-cyan-800 group-hover:bg-cyan-200 dark:bg-cyan-200 dark:text-cyan-900 dark:group-hover:bg-cyan-300",dark:"bg-gray-600 text-gray-100 group-hover:bg-gray-500 dark:bg-gray-900 dark:text-gray-200 dark:group-hover:bg-gray-700",light:"bg-gray-200 text-gray-800 group-hover:bg-gray-300 dark:bg-gray-400 dark:text-gray-900 dark:group-hover:bg-gray-500",green:"bg-green-100 text-green-800 group-hover:bg-green-200 dark:bg-green-200 dark:text-green-900 dark:group-hover:bg-green-300",lime:"bg-lime-100 text-lime-800 group-hover:bg-lime-200 dark:bg-lime-200 dark:text-lime-900 dark:group-hover:bg-lime-300",red:"bg-red-100 text-red-800 group-hover:bg-red-200 dark:bg-red-200 dark:text-red-900 dark:group-hover:bg-red-300",teal:"bg-teal-100 text-teal-800 group-hover:bg-teal-200 dark:bg-teal-200 dark:text-teal-900 dark:group-hover:bg-teal-300",yellow:"bg-yellow-100 text-yellow-800 group-hover:bg-yellow-200 dark:bg-yellow-200 dark:text-yellow-900 dark:group-hover:bg-yellow-300"},href:"group",size:{xs:"p-1 text-xs",sm:"p-1.5 text-sm"}},icon:{off:"rounded px-2 py-0.5",on:"rounded-full p-1.5",size:{xs:"h-3 w-3",sm:"h-3.5 w-3.5"}}},K1={root:{base:"text-xl font-semibold italic text-gray-900 dark:text-white"}},G1={root:{base:"",list:"flex items-center"},item:{base:"group flex items-center",chevron:"mx-1 h-4 w-4 text-gray-400 group-first:hidden md:mx-2",href:{off:"flex items-center text-sm font-medium text-gray-500 dark:text-gray-400",on:"flex items-center text-sm font-medium text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white"},icon:"mr-2 h-4 w-4"}},X1={base:"group relative flex items-stretch justify-center p-0.5 text-center font-medium transition-[color,background-color,border-color,text-decoration-color,fill,stroke,box-shadow] focus:z-10 focus:outline-none",fullSized:"w-full",color:{dark:"border border-transparent bg-gray-800 text-white focus:ring-4 focus:ring-gray-300 enabled:hover:bg-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:focus:ring-gray-800 dark:enabled:hover:bg-gray-700",failure:"border border-transparent bg-red-700 text-white focus:ring-4 focus:ring-red-300 enabled:hover:bg-red-800 dark:bg-red-600 dark:focus:ring-red-900 dark:enabled:hover:bg-red-700",gray:":ring-cyan-700 border border-gray-200 bg-white text-gray-900 focus:text-cyan-700 focus:ring-4 enabled:hover:bg-gray-100 enabled:hover:text-cyan-700 dark:border-gray-600 dark:bg-transparent dark:text-gray-400 dark:enabled:hover:bg-gray-700 dark:enabled:hover:text-white",info:"border border-transparent bg-cyan-700 text-white focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-cyan-800 dark:bg-cyan-600 dark:focus:ring-cyan-800 dark:enabled:hover:bg-cyan-700",light:"border border-gray-300 bg-white text-gray-900 focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-600 dark:text-white dark:focus:ring-gray-700 dark:enabled:hover:border-gray-700 dark:enabled:hover:bg-gray-700",purple:"border border-transparent bg-purple-700 text-white focus:ring-4 focus:ring-purple-300 enabled:hover:bg-purple-800 dark:bg-purple-600 dark:focus:ring-purple-900 dark:enabled:hover:bg-purple-700",success:"border border-transparent bg-green-700 text-white focus:ring-4 focus:ring-green-300 enabled:hover:bg-green-800 dark:bg-green-600 dark:focus:ring-green-800 dark:enabled:hover:bg-green-700",warning:"border border-transparent bg-yellow-400 text-white focus:ring-4 focus:ring-yellow-300 enabled:hover:bg-yellow-500 dark:focus:ring-yellow-900",blue:"border border-transparent bg-blue-700 text-white focus:ring-4 focus:ring-blue-300 enabled:hover:bg-blue-800 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",cyan:"border border-cyan-300 bg-white text-cyan-900 focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-cyan-100 dark:border-cyan-600 dark:bg-cyan-600 dark:text-white dark:focus:ring-cyan-700 dark:enabled:hover:border-cyan-700 dark:enabled:hover:bg-cyan-700",green:"border border-green-300 bg-white text-green-900 focus:ring-4 focus:ring-green-300 enabled:hover:bg-green-100 dark:border-green-600 dark:bg-green-600 dark:text-white dark:focus:ring-green-700 dark:enabled:hover:border-green-700 dark:enabled:hover:bg-green-700",indigo:"border border-indigo-300 bg-white text-indigo-900 focus:ring-4 focus:ring-indigo-300 enabled:hover:bg-indigo-100 dark:border-indigo-600 dark:bg-indigo-600 dark:text-white dark:focus:ring-indigo-700 dark:enabled:hover:border-indigo-700 dark:enabled:hover:bg-indigo-700",lime:"border border-lime-300 bg-white text-lime-900 focus:ring-4 focus:ring-lime-300 enabled:hover:bg-lime-100 dark:border-lime-600 dark:bg-lime-600 dark:text-white dark:focus:ring-lime-700 dark:enabled:hover:border-lime-700 dark:enabled:hover:bg-lime-700",pink:"border border-pink-300 bg-white text-pink-900 focus:ring-4 focus:ring-pink-300 enabled:hover:bg-pink-100 dark:border-pink-600 dark:bg-pink-600 dark:text-white dark:focus:ring-pink-700 dark:enabled:hover:border-pink-700 dark:enabled:hover:bg-pink-700",red:"border border-red-300 bg-white text-red-900 focus:ring-4 focus:ring-red-300 enabled:hover:bg-red-100 dark:border-red-600 dark:bg-red-600 dark:text-white dark:focus:ring-red-700 dark:enabled:hover:border-red-700 dark:enabled:hover:bg-red-700",teal:"border border-teal-300 bg-white text-teal-900 focus:ring-4 focus:ring-teal-300 enabled:hover:bg-teal-100 dark:border-teal-600 dark:bg-teal-600 dark:text-white dark:focus:ring-teal-700 dark:enabled:hover:border-teal-700 dark:enabled:hover:bg-teal-700",yellow:"border border-yellow-300 bg-white text-yellow-900 focus:ring-4 focus:ring-yellow-300 enabled:hover:bg-yellow-100 dark:border-yellow-600 dark:bg-yellow-600 dark:text-white dark:focus:ring-yellow-700 dark:enabled:hover:border-yellow-700 dark:enabled:hover:bg-yellow-700"},disabled:"cursor-not-allowed opacity-50",isProcessing:"cursor-wait",spinnerSlot:"absolute top-0 flex h-full items-center",spinnerLeftPosition:{xs:"left-2",sm:"left-3",md:"left-4",lg:"left-5",xl:"left-6"},gradient:{cyan:"bg-gradient-to-r from-cyan-400 via-cyan-500 to-cyan-600 text-white focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-gradient-to-br dark:focus:ring-cyan-800",failure:"bg-gradient-to-r from-red-400 via-red-500 to-red-600 text-white focus:ring-4 focus:ring-red-300 enabled:hover:bg-gradient-to-br dark:focus:ring-red-800",info:"bg-gradient-to-r from-cyan-500 via-cyan-600 to-cyan-700 text-white focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-gradient-to-br dark:focus:ring-cyan-800 ",lime:"bg-gradient-to-r from-lime-200 via-lime-400 to-lime-500 text-gray-900 focus:ring-4 focus:ring-lime-300 enabled:hover:bg-gradient-to-br dark:focus:ring-lime-800",pink:"bg-gradient-to-r from-pink-400 via-pink-500 to-pink-600 text-white focus:ring-4 focus:ring-pink-300 enabled:hover:bg-gradient-to-br dark:focus:ring-pink-800",purple:"bg-gradient-to-r from-purple-500 via-purple-600 to-purple-700 text-white focus:ring-4 focus:ring-purple-300 enabled:hover:bg-gradient-to-br dark:focus:ring-purple-800",success:"bg-gradient-to-r from-green-400 via-green-500 to-green-600 text-white focus:ring-4 focus:ring-green-300 enabled:hover:bg-gradient-to-br dark:focus:ring-green-800",teal:"bg-gradient-to-r from-teal-400 via-teal-500 to-teal-600 text-white focus:ring-4 focus:ring-teal-300 enabled:hover:bg-gradient-to-br dark:focus:ring-teal-800"},gradientDuoTone:{cyanToBlue:"bg-gradient-to-r from-cyan-500 to-cyan-500 text-white focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-gradient-to-bl dark:focus:ring-cyan-800",greenToBlue:"bg-gradient-to-br from-green-400 to-cyan-600 text-white focus:ring-4 focus:ring-green-200 enabled:hover:bg-gradient-to-bl dark:focus:ring-green-800",pinkToOrange:"bg-gradient-to-br from-pink-500 to-orange-400 text-white focus:ring-4 focus:ring-pink-200 enabled:hover:bg-gradient-to-bl dark:focus:ring-pink-800",purpleToBlue:"bg-gradient-to-br from-purple-600 to-cyan-500 text-white focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-gradient-to-bl dark:focus:ring-cyan-800",purpleToPink:"bg-gradient-to-r from-purple-500 to-pink-500 text-white focus:ring-4 focus:ring-purple-200 enabled:hover:bg-gradient-to-l dark:focus:ring-purple-800",redToYellow:"bg-gradient-to-r from-red-200 via-red-300 to-yellow-200 text-gray-900 focus:ring-4 focus:ring-red-100 enabled:hover:bg-gradient-to-bl dark:focus:ring-red-400",tealToLime:"bg-gradient-to-r from-teal-200 to-lime-200 text-gray-900 focus:ring-4 focus:ring-lime-200 enabled:hover:bg-gradient-to-l enabled:hover:from-teal-200 enabled:hover:to-lime-200 enabled:hover:text-gray-900 dark:focus:ring-teal-700"},inner:{base:"flex items-stretch transition-all duration-200",position:{none:"",start:"rounded-r-none",middle:"rounded-none",end:"rounded-l-none"},outline:"border border-transparent",isProcessingPadding:{xs:"pl-8",sm:"pl-10",md:"pl-12",lg:"pl-16",xl:"pl-20"}},label:"ml-2 inline-flex h-4 w-4 items-center justify-center rounded-full bg-cyan-200 text-xs font-semibold text-cyan-800",outline:{color:{gray:"border border-gray-900 dark:border-white",default:"border-0",light:""},off:"",on:"flex w-full justify-center bg-white text-gray-900 transition-all duration-75 ease-in group-enabled:group-hover:bg-opacity-0 group-enabled:group-hover:text-inherit dark:bg-gray-900 dark:text-white",pill:{off:"rounded-md",on:"rounded-full"}},pill:{off:"rounded-lg",on:"rounded-full"},size:{xs:"px-2 py-1 text-xs",sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-sm",lg:"px-5 py-2.5 text-base",xl:"px-6 py-3 text-base"}},J1={base:"inline-flex",position:{none:"",start:"rounded-r-none focus:ring-2",middle:"rounded-none border-l-0 pl-0 focus:ring-2",end:"rounded-l-none border-l-0 pl-0 focus:ring-2"}},Z1={root:{base:"flex rounded-lg border border-gray-200 bg-white shadow-md dark:border-gray-700 dark:bg-gray-800",children:"flex h-full flex-col justify-center gap-4 p-6",horizontal:{off:"flex-col",on:"flex-col md:max-w-xl md:flex-row"},href:"hover:bg-gray-100 dark:hover:bg-gray-700"},img:{base:"",horizontal:{off:"rounded-t-lg",on:"h-96 w-full rounded-t-lg object-cover md:h-auto md:w-48 md:rounded-none md:rounded-l-lg"}}},Q1={root:{base:"relative h-full w-full",leftControl:"absolute left-0 top-0 flex h-full items-center justify-center px-4 focus:outline-none",rightControl:"absolute right-0 top-0 flex h-full items-center justify-center px-4 focus:outline-none"},indicators:{active:{off:"bg-white/50 hover:bg-white dark:bg-gray-800/50 dark:hover:bg-gray-800",on:"bg-white dark:bg-gray-800"},base:"h-3 w-3 rounded-full",wrapper:"absolute bottom-5 left-1/2 flex -translate-x-1/2 space-x-3"},item:{base:"absolute left-1/2 top-1/2 block w-full -translate-x-1/2 -translate-y-1/2",wrapper:{off:"w-full flex-shrink-0 transform cursor-default snap-center",on:"w-full flex-shrink-0 transform cursor-grab snap-center"}},control:{base:"inline-flex h-8 w-8 items-center justify-center rounded-full bg-white/30 group-hover:bg-white/50 group-focus:outline-none group-focus:ring-4 group-focus:ring-white dark:bg-gray-800/30 dark:group-hover:bg-gray-800/60 dark:group-focus:ring-gray-800/70 sm:h-10 sm:w-10",icon:"h-5 w-5 text-white dark:text-gray-800 sm:h-6 sm:w-6"},scrollContainer:{base:"flex h-full snap-mandatory overflow-y-hidden overflow-x-scroll scroll-smooth rounded-lg",snap:"snap-x"}},ek={root:{base:"h-4 w-4 rounded border border-gray-300 bg-gray-100 focus:ring-2 dark:border-gray-600 dark:bg-gray-700",color:{default:"text-cyan-600 focus:ring-cyan-600 dark:ring-offset-gray-800 dark:focus:ring-cyan-600",dark:"text-gray-800 focus:ring-gray-800 dark:ring-offset-gray-800 dark:focus:ring-gray-800",failure:"text-red-900 focus:ring-red-900 dark:ring-offset-red-900 dark:focus:ring-red-900",gray:"text-gray-900 focus:ring-gray-900 dark:ring-offset-gray-900 dark:focus:ring-gray-900",info:"text-cyan-800 focus:ring-cyan-800 dark:ring-offset-gray-800 dark:focus:ring-cyan-800",light:"text-gray-900 focus:ring-gray-900 dark:ring-offset-gray-900 dark:focus:ring-gray-900",purple:"text-purple-600 focus:ring-purple-600 dark:ring-offset-purple-600 dark:focus:ring-purple-600",success:"text-green-800 focus:ring-green-800 dark:ring-offset-green-800 dark:focus:ring-green-800",warning:"text-yellow-400 focus:ring-yellow-400 dark:ring-offset-yellow-400 dark:focus:ring-yellow-400",blue:"text-blue-700 focus:ring-blue-600 dark:ring-offset-blue-700 dark:focus:ring-blue-700",cyan:"text-cyan-600 focus:ring-cyan-600 dark:ring-offset-cyan-600 dark:focus:ring-cyan-600",green:"text-green-600 focus:ring-green-600 dark:ring-offset-green-600 dark:focus:ring-green-600",indigo:"text-indigo-700 focus:ring-indigo-700 dark:ring-offset-indigo-700 dark:focus:ring-indigo-700",lime:"text-lime-700 focus:ring-lime-700 dark:ring-offset-lime-700 dark:focus:ring-lime-700",pink:"text-pink-600 focus:ring-pink-600 dark:ring-offset-pink-600 dark:focus:ring-pink-600",red:"text-red-600 focus:ring-red-600 dark:ring-offset-red-600 dark:focus:ring-red-600",teal:"text-teal-600 focus:ring-teal-600 dark:ring-offset-teal-600 dark:focus:ring-teal-600",yellow:"text-yellow-400 focus:ring-yellow-400 dark:ring-offset-yellow-400 dark:focus:ring-yellow-400"}}},tk={root:{base:"rounded-lg p-2.5 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-700",icon:"h-5 w-5"}},rk={root:{base:"relative"},popup:{root:{base:"absolute top-10 z-50 block pt-2",inline:"relative top-0 z-auto",inner:"inline-block rounded-lg bg-white p-4 shadow-lg dark:bg-gray-700"},header:{base:"",title:"px-2 py-3 text-center font-semibold text-gray-900 dark:text-white",selectors:{base:"mb-2 flex justify-between",button:{base:"rounded-lg bg-white px-5 py-2.5 text-sm font-semibold text-gray-900 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600",prev:"",next:"",view:""}}},view:{base:"p-1"},footer:{base:"mt-2 flex space-x-2",button:{base:"w-full rounded-lg px-5 py-2 text-center text-sm font-medium focus:ring-4 focus:ring-cyan-300",today:"bg-cyan-700 text-white hover:bg-cyan-800 dark:bg-cyan-600 dark:hover:bg-cyan-700",clear:"border border-gray-300 bg-white text-gray-900 hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600"}}},views:{days:{header:{base:"mb-1 grid grid-cols-7",title:"h-6 text-center text-sm font-medium leading-6 text-gray-500 dark:text-gray-400"},items:{base:"grid w-64 grid-cols-7",item:{base:"block flex-1 cursor-pointer rounded-lg border-0 text-center text-sm font-semibold leading-9 text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600 ",selected:"bg-cyan-700 text-white hover:bg-cyan-600",disabled:"text-gray-500"}}},months:{items:{base:"grid w-64 grid-cols-4",item:{base:"block flex-1 cursor-pointer rounded-lg border-0 text-center text-sm font-semibold leading-9 text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600",selected:"bg-cyan-700 text-white hover:bg-cyan-600",disabled:"text-gray-500"}}},years:{items:{base:"grid w-64 grid-cols-4",item:{base:"block flex-1 cursor-pointer rounded-lg border-0 text-center text-sm font-semibold leading-9 text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600",selected:"bg-cyan-700 text-white hover:bg-cyan-600",disabled:"text-gray-500"}}},decades:{items:{base:"grid w-64 grid-cols-4",item:{base:"block flex-1 cursor-pointer rounded-lg border-0 text-center text-sm font-semibold leading-9 text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600",selected:"bg-cyan-700 text-white hover:bg-cyan-600",disabled:"text-gray-500"}}}}},nk={arrowIcon:"ml-2 h-4 w-4",content:"py-1 focus:outline-none",floating:{animation:"transition-opacity",arrow:{base:"absolute z-10 h-2 w-2 rotate-45",style:{dark:"bg-gray-900 dark:bg-gray-700",light:"bg-white",auto:"bg-white dark:bg-gray-700"},placement:"-4px"},base:"z-10 w-fit divide-y divide-gray-100 rounded shadow focus:outline-none",content:"py-1 text-sm text-gray-700 dark:text-gray-200",divider:"my-1 h-px bg-gray-100 dark:bg-gray-600",header:"block px-4 py-2 text-sm text-gray-700 dark:text-gray-200",hidden:"invisible opacity-0",item:{container:"",base:"flex w-full cursor-pointer items-center justify-start px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 focus:bg-gray-100 focus:outline-none dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white dark:focus:bg-gray-600 dark:focus:text-white",icon:"mr-2 h-4 w-4"},style:{dark:"bg-gray-900 text-white dark:bg-gray-700",light:"border border-gray-200 bg-white text-gray-900",auto:"border border-gray-200 bg-white text-gray-900 dark:border-none dark:bg-gray-700 dark:text-white"},target:"w-fit"},inlineWrapper:"flex items-center"},ok={root:{base:"flex"},field:{base:"relative w-full",input:{base:"block w-full overflow-hidden rounded-lg border disabled:cursor-not-allowed disabled:opacity-50",sizes:{sm:"sm:text-xs",md:"text-sm",lg:"sm:text-base"},colors:{gray:"border-gray-300 bg-gray-50 text-gray-900 focus:border-cyan-500 focus:ring-cyan-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",info:"border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 focus:border-cyan-500 focus:ring-cyan-500 dark:border-cyan-400 dark:bg-cyan-100 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",failure:"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:bg-red-100 dark:focus:border-red-500 dark:focus:ring-red-500",warning:"border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 focus:border-yellow-500 focus:ring-yellow-500 dark:border-yellow-400 dark:bg-yellow-100 dark:focus:border-yellow-500 dark:focus:ring-yellow-500",success:"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:bg-green-100 dark:focus:border-green-500 dark:focus:ring-green-500"}}}},ik={input:{default:{filled:{sm:"peer block w-full appearance-none rounded-t-lg border-0 border-b-2 border-gray-300 bg-gray-50 px-2.5 pb-2.5 pt-5 text-xs text-gray-900 focus:border-blue-600 focus:outline-none focus:ring-0 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:focus:border-blue-500",md:"peer block w-full appearance-none rounded-t-lg border-0 border-b-2 border-gray-300 bg-gray-50 px-2.5 pb-2.5 pt-5 text-sm text-gray-900 focus:border-blue-600 focus:outline-none focus:ring-0 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:focus:border-blue-500"},outlined:{sm:"peer block w-full appearance-none rounded-lg border border-gray-300 bg-transparent px-2.5 pb-2.5 pt-4 text-xs text-gray-900 focus:border-blue-600 focus:outline-none focus:ring-0 dark:border-gray-600 dark:text-white dark:focus:border-blue-500",md:"peer block w-full appearance-none rounded-lg border border-gray-300 bg-transparent px-2.5 pb-2.5 pt-4 text-sm text-gray-900 focus:border-blue-600 focus:outline-none focus:ring-0 dark:border-gray-600 dark:text-white dark:focus:border-blue-500"},standard:{sm:"peer block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-xs text-gray-900 focus:border-blue-600 focus:outline-none focus:ring-0 dark:border-gray-600 dark:text-white dark:focus:border-blue-500",md:"peer block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-sm text-gray-900 focus:border-blue-600 focus:outline-none focus:ring-0 dark:border-gray-600 dark:text-white dark:focus:border-blue-500"}},success:{filled:{sm:"peer block w-full appearance-none rounded-t-lg border-0 border-b-2 border-green-600 bg-gray-50 px-2.5 pb-2.5 pt-5 text-xs text-gray-900 focus:border-green-600 focus:outline-none focus:ring-0 dark:border-green-500 dark:bg-gray-700 dark:text-white dark:focus:border-green-500",md:"peer block w-full appearance-none rounded-t-lg border-0 border-b-2 border-green-600 bg-gray-50 px-2.5 pb-2.5 pt-5 text-sm text-gray-900 focus:border-green-600 focus:outline-none focus:ring-0 dark:border-green-500 dark:bg-gray-700 dark:text-white dark:focus:border-green-500"},outlined:{sm:"peer block w-full appearance-none rounded-lg border border-green-600 bg-transparent px-2.5 pb-2.5 pt-4 text-xs text-gray-900 focus:border-green-600 focus:outline-none focus:ring-0 dark:border-green-500 dark:text-white dark:focus:border-green-500",md:"peer block w-full appearance-none rounded-lg border border-green-600 bg-transparent px-2.5 pb-2.5 pt-4 text-sm text-gray-900 focus:border-green-600 focus:outline-none focus:ring-0 dark:border-green-500 dark:text-white dark:focus:border-green-500"},standard:{sm:"peer block w-full appearance-none border-0 border-b-2 border-green-600 bg-transparent px-0 py-2.5 text-xs text-gray-900 focus:border-green-600 focus:outline-none focus:ring-0 dark:border-green-500 dark:text-white dark:focus:border-green-500",md:"peer block w-full appearance-none border-0 border-b-2 border-green-600 bg-transparent px-0 py-2.5 text-sm text-gray-900 focus:border-green-600 focus:outline-none focus:ring-0 dark:border-green-500 dark:text-white dark:focus:border-green-500"}},error:{filled:{sm:"peer block w-full appearance-none rounded-t-lg border-0 border-b-2 border-red-600 bg-gray-50 px-2.5 pb-2.5 pt-5 text-xs text-gray-900 focus:border-red-600 focus:outline-none focus:ring-0 dark:border-red-500 dark:bg-gray-700 dark:text-white dark:focus:border-red-500",md:"peer block w-full appearance-none rounded-t-lg border-0 border-b-2 border-red-600 bg-gray-50 px-2.5 pb-2.5 pt-5 text-sm text-gray-900 focus:border-red-600 focus:outline-none focus:ring-0 dark:border-red-500 dark:bg-gray-700 dark:text-white dark:focus:border-red-500"},outlined:{sm:"peer block w-full appearance-none rounded-lg border border-red-600 bg-transparent px-2.5 pb-2.5 pt-4 text-xs text-gray-900 focus:border-red-600 focus:outline-none focus:ring-0 dark:border-red-500 dark:text-white dark:focus:border-red-500",md:"peer block w-full appearance-none rounded-lg border border-red-600 bg-transparent px-2.5 pb-2.5 pt-4 text-sm text-gray-900 focus:border-red-600 focus:outline-none focus:ring-0 dark:border-red-500 dark:text-white dark:focus:border-red-500"},standard:{sm:"peer block w-full appearance-none border-0 border-b-2 border-red-600 bg-transparent px-0 py-2.5 text-xs text-gray-900 focus:border-red-600 focus:outline-none focus:ring-0 dark:border-red-500 dark:text-white dark:focus:border-red-500",md:"peer block w-full appearance-none border-0 border-b-2 border-red-600 bg-transparent px-0 py-2.5 text-sm text-gray-900 focus:border-red-600 focus:outline-none focus:ring-0 dark:border-red-500 dark:text-white dark:focus:border-red-500"}}},label:{default:{filled:{sm:"absolute left-2.5 top-4 z-10 origin-[0] -translate-y-4 scale-75 text-xs text-gray-500 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:text-blue-600 dark:text-gray-400 peer-focus:dark:text-blue-500",md:"absolute left-2.5 top-4 z-10 origin-[0] -translate-y-4 scale-75 text-sm text-gray-500 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:text-blue-600 dark:text-gray-400 peer-focus:dark:text-blue-500"},outlined:{sm:"absolute left-1 top-2 z-10 origin-[0] -translate-y-4 scale-75 bg-white px-2 text-xs text-gray-500 transition-transform duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 peer-focus:text-blue-600 dark:bg-gray-900 dark:text-gray-400 peer-focus:dark:text-blue-500",md:"absolute left-1 top-2 z-10 origin-[0] -translate-y-4 scale-75 bg-white px-2 text-sm text-gray-500 transition-transform duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 peer-focus:text-blue-600 dark:bg-gray-900 dark:text-gray-400 peer-focus:dark:text-blue-500"},standard:{sm:"absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 text-xs text-gray-500 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:text-blue-600 dark:text-gray-400 peer-focus:dark:text-blue-500",md:"absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 text-sm text-gray-500 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:text-blue-600 dark:text-gray-400 peer-focus:dark:text-blue-500"}},success:{filled:{sm:"absolute left-2.5 top-4 z-10 origin-[0] -translate-y-4 scale-75 text-sm text-green-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:-translate-y-4 peer-focus:scale-75 dark:text-green-500",md:"absolute left-2.5 top-4 z-10 origin-[0] -translate-y-4 scale-75 text-sm text-green-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:-translate-y-4 peer-focus:scale-75 dark:text-green-500"},outlined:{sm:"absolute left-1 top-2 z-10 origin-[0] -translate-y-4 scale-75 bg-white px-2 text-sm text-green-600 transition-transform duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 dark:bg-gray-900 dark:text-green-500",md:"absolute left-1 top-2 z-10 origin-[0] -translate-y-4 scale-75 bg-white px-2 text-sm text-green-600 transition-transform duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 dark:bg-gray-900 dark:text-green-500"},standard:{sm:"absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 text-xs text-green-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 dark:text-green-500",md:"absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 text-sm text-green-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 dark:text-green-500"}},error:{filled:{sm:"absolute left-2.5 top-4 z-10 origin-[0] -translate-y-4 scale-75 text-xs text-red-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:-translate-y-4 peer-focus:scale-75 dark:text-red-500",md:"absolute left-2.5 top-4 z-10 origin-[0] -translate-y-4 scale-75 text-xs text-red-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:-translate-y-4 peer-focus:scale-75 dark:text-red-500"},outlined:{sm:"absolute left-1 top-2 z-10 origin-[0] -translate-y-4 scale-75 bg-white px-2 text-xs text-red-600 transition-transform duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 dark:bg-gray-900 dark:text-red-500",md:"absolute left-1 top-2 z-10 origin-[0] -translate-y-4 scale-75 bg-white px-2 text-xs text-red-600 transition-transform duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 dark:bg-gray-900 dark:text-red-500"},standard:{sm:"absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 text-xs text-red-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 dark:text-red-500",md:"absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 text-sm text-red-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 dark:text-red-500"}}},helperText:{default:"mt-2 text-xs text-gray-600 dark:text-gray-400",success:"mt-2 text-xs text-green-600 dark:text-green-400",error:"mt-2 text-xs text-red-600 dark:text-red-400"}},sk={root:{base:"w-full rounded-lg bg-white shadow dark:bg-gray-800 md:flex md:items-center md:justify-between",container:"w-full p-6",bgDark:"bg-gray-800"},groupLink:{base:"flex flex-wrap text-sm text-gray-500 dark:text-white",link:{base:"me-4 last:mr-0 md:mr-6",href:"hover:underline"},col:"flex-col space-y-4"},icon:{base:"text-gray-500 dark:hover:text-white",size:"h-5 w-5"},title:{base:"mb-6 text-sm font-semibold uppercase text-gray-500 dark:text-white"},divider:{base:"my-6 w-full border-gray-200 dark:border-gray-700 sm:mx-auto lg:my-8"},copyright:{base:"text-sm text-gray-500 dark:text-gray-400 sm:text-center",href:"ml-1 hover:underline",span:"ml-1"},brand:{base:"mb-4 flex items-center sm:mb-0",img:"mr-3 h-8",span:"self-center whitespace-nowrap text-2xl font-semibold text-gray-800 dark:text-white"}},ak={root:{base:"mt-2 text-sm",colors:{gray:"text-gray-500 dark:text-gray-400",info:"text-cyan-700 dark:text-cyan-800",success:"text-green-600 dark:text-green-500",failure:"text-red-600 dark:text-red-500",warning:"text-yellow-500 dark:text-yellow-600"}}},lk={root:{base:"rounded-lg border border-gray-200 bg-gray-100 px-2 py-1.5 text-xs font-semibold text-gray-800 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-100",icon:"inline-block"}},ck={root:{base:"text-sm font-medium",disabled:"opacity-50",colors:{default:"text-gray-900 dark:text-white",info:"text-cyan-500 dark:text-cyan-600",failure:"text-red-700 dark:text-red-500",warning:"text-yellow-500 dark:text-yellow-600",success:"text-green-700 dark:text-green-500"}}},dk={root:{base:"list-inside space-y-1 text-gray-500 dark:text-gray-400",ordered:{off:"list-disc",on:"list-decimal"},horizontal:"flex list-none flex-wrap items-center justify-center space-x-4 space-y-0",unstyled:"list-none",nested:"mt-2 ps-5"},item:{withIcon:{off:"",on:"flex items-center"},icon:"me-2 h-3.5 w-3.5 flex-shrink-0"}},uk={root:{base:"list-none rounded-lg border border-gray-200 bg-white text-left text-sm font-medium text-gray-900 dark:border-gray-600 dark:bg-gray-700 dark:text-white"},item:{base:"[&>*]:first:rounded-t-lg [&>*]:last:rounded-b-lg [&>*]:last:border-b-0",link:{base:"flex w-full items-center border-b border-gray-200 px-4 py-2 dark:border-gray-600",active:{off:"hover:bg-gray-100 hover:text-cyan-700 focus:text-cyan-700 focus:outline-none focus:ring-2 focus:ring-cyan-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:text-white dark:focus:text-white dark:focus:ring-gray-500",on:"bg-cyan-700 text-white dark:bg-gray-800"},disabled:{off:"",on:"cursor-not-allowed bg-gray-100 text-gray-900 hover:bg-gray-100 hover:text-gray-900 focus:text-gray-900"},href:{off:"",on:""},icon:"mr-2 h-4 w-4 fill-current"}}},fk={root:{base:"fixed inset-x-0 top-0 z-50 h-screen overflow-y-auto overflow-x-hidden md:inset-0 md:h-full",show:{on:"flex bg-gray-900 bg-opacity-50 dark:bg-opacity-80",off:"hidden"},sizes:{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl"},positions:{"top-left":"items-start justify-start","top-center":"items-start justify-center","top-right":"items-start justify-end","center-left":"items-center justify-start",center:"items-center justify-center","center-right":"items-center justify-end","bottom-right":"items-end justify-end","bottom-center":"items-end justify-center","bottom-left":"items-end justify-start"}},content:{base:"relative h-full w-full p-4 md:h-auto",inner:"relative flex max-h-[90dvh] flex-col rounded-lg bg-white shadow dark:bg-gray-700"},body:{base:"flex-1 overflow-auto p-6",popup:"pt-0"},header:{base:"flex items-start justify-between rounded-t border-b p-5 dark:border-gray-600",popup:"border-b-0 p-2",title:"text-xl font-medium text-gray-900 dark:text-white",close:{base:"ml-auto inline-flex items-center rounded-lg bg-transparent p-1.5 text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white",icon:"h-5 w-5"}},footer:{base:"flex items-center space-x-2 rounded-b border-gray-200 p-6 dark:border-gray-600",popup:"border-t"}},hk={root:{base:"bg-white px-2 py-2.5 dark:border-gray-700 dark:bg-gray-800 sm:px-4",rounded:{on:"rounded",off:""},bordered:{on:"border",off:""},inner:{base:"mx-auto flex flex-wrap items-center justify-between",fluid:{on:"",off:"container"}}},brand:{base:"flex items-center"},collapse:{base:"w-full md:block md:w-auto",list:"mt-4 flex flex-col md:mt-0 md:flex-row md:space-x-8 md:text-sm md:font-medium",hidden:{on:"hidden",off:""}},link:{base:"block py-2 pl-3 pr-4 md:p-0",active:{on:"bg-cyan-700 text-white dark:text-white md:bg-transparent md:text-cyan-700",off:"border-b border-gray-100 text-gray-700 hover:bg-gray-50 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white md:border-0 md:hover:bg-transparent md:hover:text-cyan-700 md:dark:hover:bg-transparent md:dark:hover:text-white"},disabled:{on:"text-gray-400 hover:cursor-not-allowed dark:text-gray-600",off:""}},toggle:{base:"inline-flex items-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600 md:hidden",icon:"h-6 w-6 shrink-0"}},gk={base:"",layout:{table:{base:"text-sm text-gray-700 dark:text-gray-400",span:"font-semibold text-gray-900 dark:text-white"}},pages:{base:"xs:mt-0 mt-2 inline-flex items-center -space-x-px",showIcon:"inline-flex",previous:{base:"ml-0 rounded-l-lg border border-gray-300 bg-white px-3 py-2 leading-tight text-gray-500 enabled:hover:bg-gray-100 enabled:hover:text-gray-700 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 enabled:dark:hover:bg-gray-700 enabled:dark:hover:text-white",icon:"h-5 w-5"},next:{base:"rounded-r-lg border border-gray-300 bg-white px-3 py-2 leading-tight text-gray-500 enabled:hover:bg-gray-100 enabled:hover:text-gray-700 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 enabled:dark:hover:bg-gray-700 enabled:dark:hover:text-white",icon:"h-5 w-5"},selector:{base:"w-12 border border-gray-300 bg-white py-2 leading-tight text-gray-500 enabled:hover:bg-gray-100 enabled:hover:text-gray-700 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 enabled:dark:hover:bg-gray-700 enabled:dark:hover:text-white",active:"bg-cyan-50 text-cyan-600 hover:bg-cyan-100 hover:text-cyan-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white",disabled:"cursor-not-allowed opacity-50"}}},pk={base:"absolute z-20 inline-block w-max max-w-[100vw] bg-white outline-none border border-gray-200 rounded-lg shadow-sm dark:border-gray-600 dark:bg-gray-800",content:"z-10 overflow-hidden rounded-[7px]",arrow:{base:"absolute h-2 w-2 z-0 rotate-45 mix-blend-lighten bg-white border border-gray-200 dark:border-gray-600 dark:bg-gray-800 dark:mix-blend-color",placement:"-4px"}},mk={base:"w-full overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700",label:"mb-1 flex justify-between font-medium dark:text-white",bar:"space-x-2 rounded-full text-center font-medium leading-none text-cyan-300 dark:text-cyan-100",color:{dark:"bg-gray-600 dark:bg-gray-300",blue:"bg-blue-600",red:"bg-red-600 dark:bg-red-500",green:"bg-green-600 dark:bg-green-500",yellow:"bg-yellow-400",indigo:"bg-indigo-600 dark:bg-indigo-500",purple:"bg-purple-600 dark:bg-purple-500",cyan:"bg-cyan-600",gray:"bg-gray-500",lime:"bg-lime-600",pink:"bg-pink-500",teal:"bg-teal-600"},size:{sm:"h-1.5",md:"h-2.5",lg:"h-4",xl:"h-6"}},bk={root:{base:"h-4 w-4 border border-gray-300 text-cyan-600 focus:ring-2 focus:ring-cyan-500 dark:border-gray-600 dark:bg-gray-700 dark:focus:bg-cyan-600 dark:focus:ring-cyan-600"}},yk={root:{base:"flex"},field:{base:"relative w-full",input:{base:"w-full cursor-pointer appearance-none rounded-lg bg-gray-200 dark:bg-gray-700",sizes:{sm:"h-1",md:"h-2",lg:"h-3"}}}},vk={root:{base:"flex items-center"},star:{empty:"text-gray-300 dark:text-gray-500",filled:"text-yellow-400",sizes:{sm:"h-5 w-5",md:"h-7 w-7",lg:"h-10 w-10"}}},xk={base:"flex items-center",label:"text-sm font-medium text-cyan-600 dark:text-cyan-500",progress:{base:"mx-4 h-5 w-2/4 rounded bg-gray-200 dark:bg-gray-700",fill:"h-5 rounded bg-yellow-400",label:"text-sm font-medium text-cyan-600 dark:text-cyan-500"}},wk={base:"flex",addon:"inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-200 px-3 text-sm text-gray-900 dark:border-gray-600 dark:bg-gray-600 dark:text-gray-400",field:{base:"relative w-full",icon:{base:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",svg:"h-5 w-5 text-gray-500 dark:text-gray-400"},select:{base:"block w-full border disabled:cursor-not-allowed disabled:opacity-50",withIcon:{on:"pl-10",off:""},withAddon:{on:"rounded-r-lg",off:"rounded-lg"},withShadow:{on:"shadow-sm dark:shadow-sm-light",off:""},sizes:{sm:"p-2 sm:text-xs",md:"p-2.5 text-sm",lg:"p-4 sm:text-base"},colors:{gray:"border-gray-300 bg-gray-50 text-gray-900 focus:border-cyan-500 focus:ring-cyan-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",info:"border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 focus:border-cyan-500 focus:ring-cyan-500 dark:border-cyan-400 dark:bg-cyan-100 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",failure:"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:bg-red-100 dark:focus:border-red-500 dark:focus:ring-red-500",warning:"border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 focus:border-yellow-500 focus:ring-yellow-500 dark:border-yellow-400 dark:bg-yellow-100 dark:focus:border-yellow-500 dark:focus:ring-yellow-500",success:"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:bg-green-100 dark:focus:border-green-500 dark:focus:ring-green-500"}}}},kk={root:{base:"h-full",collapsed:{on:"w-16",off:"w-64"},inner:"h-full overflow-y-auto overflow-x-hidden rounded bg-gray-50 px-3 py-4 dark:bg-gray-800"},collapse:{button:"group flex w-full items-center rounded-lg p-2 text-base font-normal text-gray-900 transition duration-75 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700",icon:{base:"h-6 w-6 text-gray-500 transition duration-75 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-white",open:{off:"",on:"text-gray-900"}},label:{base:"ml-3 flex-1 whitespace-nowrap text-left",icon:{base:"h-6 w-6 transition delay-0 ease-in-out",open:{on:"rotate-180",off:""}}},list:"space-y-2 py-2"},cta:{base:"mt-6 rounded-lg bg-gray-100 p-4 dark:bg-gray-700",color:{blue:"bg-cyan-50 dark:bg-cyan-900",dark:"bg-dark-50 dark:bg-dark-900",failure:"bg-red-50 dark:bg-red-900",gray:"bg-alternative-50 dark:bg-alternative-900",green:"bg-green-50 dark:bg-green-900",light:"bg-light-50 dark:bg-light-900",red:"bg-red-50 dark:bg-red-900",purple:"bg-purple-50 dark:bg-purple-900",success:"bg-green-50 dark:bg-green-900",yellow:"bg-yellow-50 dark:bg-yellow-900",warning:"bg-yellow-50 dark:bg-yellow-900"}},item:{base:"flex items-center justify-center rounded-lg p-2 text-base font-normal text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700",active:"bg-gray-100 dark:bg-gray-700",collapsed:{insideCollapse:"group w-full pl-8 transition duration-75",noIcon:"font-bold"},content:{base:"flex-1 whitespace-nowrap px-3"},icon:{base:"h-6 w-6 flex-shrink-0 text-gray-500 transition duration-75 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-white",active:"text-gray-700 dark:text-gray-100"},label:"",listItem:""},items:{base:""},itemGroup:{base:"mt-4 space-y-2 border-t border-gray-200 pt-4 first:mt-0 first:border-t-0 first:pt-0 dark:border-gray-700"},logo:{base:"mb-5 flex items-center pl-2.5",collapsed:{on:"hidden",off:"self-center whitespace-nowrap text-xl font-semibold dark:text-white"},img:"mr-3 h-6 sm:h-7"}},Ck={base:"inline animate-spin text-gray-200",color:{failure:"fill-red-600",gray:"fill-gray-600",info:"fill-cyan-600",pink:"fill-pink-600",purple:"fill-purple-600",success:"fill-green-500",warning:"fill-yellow-400"},light:{off:{base:"dark:text-gray-600",color:{failure:"",gray:"dark:fill-gray-300",info:"",pink:"",purple:"",success:"",warning:""}},on:{base:"",color:{failure:"",gray:"",info:"",pink:"",purple:"",success:"",warning:""}}},size:{xs:"h-3 w-3",sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8",xl:"h-10 w-10"}},_k={root:{base:"w-full text-left text-sm text-gray-500 dark:text-gray-400",shadow:"absolute left-0 top-0 -z-10 h-full w-full rounded-lg bg-white drop-shadow-md dark:bg-black",wrapper:"relative"},body:{base:"group/body",cell:{base:"px-6 py-4 group-first/body:group-first/row:first:rounded-tl-lg group-first/body:group-first/row:last:rounded-tr-lg group-last/body:group-last/row:first:rounded-bl-lg group-last/body:group-last/row:last:rounded-br-lg"}},head:{base:"group/head text-xs uppercase text-gray-700 dark:text-gray-400",cell:{base:"bg-gray-50 px-6 py-3 group-first/head:first:rounded-tl-lg group-first/head:last:rounded-tr-lg dark:bg-gray-700"}},row:{base:"group/row",hovered:"hover:bg-gray-50 dark:hover:bg-gray-600",striped:"odd:bg-white even:bg-gray-50 odd:dark:bg-gray-800 even:dark:bg-gray-700"}},Sk={base:"flex flex-col gap-2",tablist:{base:"flex text-center",styles:{default:"flex-wrap border-b border-gray-200 dark:border-gray-700",underline:"-mb-px flex-wrap border-b border-gray-200 dark:border-gray-700",pills:"flex-wrap space-x-2 text-sm font-medium text-gray-500 dark:text-gray-400",fullWidth:"grid w-full grid-flow-col divide-x divide-gray-200 rounded-none text-sm font-medium shadow dark:divide-gray-700 dark:text-gray-400"},tabitem:{base:"flex items-center justify-center rounded-t-lg p-4 text-sm font-medium first:ml-0 focus:outline-none focus:ring-4 focus:ring-cyan-300 disabled:cursor-not-allowed disabled:text-gray-400 disabled:dark:text-gray-500",styles:{default:{base:"rounded-t-lg",active:{on:"bg-gray-100 text-cyan-600 dark:bg-gray-800 dark:text-cyan-500",off:"text-gray-500 hover:bg-gray-50 hover:text-gray-600 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300"}},underline:{base:"rounded-t-lg",active:{on:"active rounded-t-lg border-b-2 border-cyan-600 text-cyan-600 dark:border-cyan-500 dark:text-cyan-500",off:"border-b-2 border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300"}},pills:{base:"",active:{on:"rounded-lg bg-cyan-600 text-white",off:"rounded-lg hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-white"}},fullWidth:{base:"ml-0 flex w-full rounded-none first:ml-0",active:{on:"active rounded-none bg-gray-100 p-4 text-gray-900 dark:bg-gray-700 dark:text-white",off:"rounded-none bg-white hover:bg-gray-50 hover:text-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700 dark:hover:text-white"}}},icon:"mr-2 h-5 w-5"}},tabitemcontainer:{base:"",styles:{default:"",underline:"",pills:"",fullWidth:""}},tabpanel:"py-3"},Ek={base:"block w-full rounded-lg border text-sm disabled:cursor-not-allowed disabled:opacity-50",colors:{gray:"border-gray-300 bg-gray-50 text-gray-900 focus:border-cyan-500 focus:ring-cyan-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",info:"border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 focus:border-cyan-500 focus:ring-cyan-500 dark:border-cyan-400 dark:bg-cyan-100 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",failure:"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:bg-red-100 dark:focus:border-red-500 dark:focus:ring-red-500",warning:"border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 focus:border-yellow-500 focus:ring-yellow-500 dark:border-yellow-400 dark:bg-yellow-100 dark:focus:border-yellow-500 dark:focus:ring-yellow-500",success:"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:bg-green-100 dark:focus:border-green-500 dark:focus:ring-green-500"},withShadow:{on:"shadow-sm dark:shadow-sm-light",off:""}},Ok={base:"flex",addon:"inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-200 px-3 text-sm text-gray-900 dark:border-gray-600 dark:bg-gray-600 dark:text-gray-400",field:{base:"relative w-full",icon:{base:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",svg:"h-5 w-5 text-gray-500 dark:text-gray-400"},rightIcon:{base:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",svg:"h-5 w-5 text-gray-500 dark:text-gray-400"},input:{base:"block w-full border disabled:cursor-not-allowed disabled:opacity-50",sizes:{sm:"p-2 sm:text-xs",md:"p-2.5 text-sm",lg:"p-4 sm:text-base"},colors:{gray:"border-gray-300 bg-gray-50 text-gray-900 focus:border-cyan-500 focus:ring-cyan-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",info:"border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 focus:border-cyan-500 focus:ring-cyan-500 dark:border-cyan-400 dark:bg-cyan-100 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",failure:"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:bg-red-100 dark:focus:border-red-500 dark:focus:ring-red-500",warning:"border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 focus:border-yellow-500 focus:ring-yellow-500 dark:border-yellow-400 dark:bg-yellow-100 dark:focus:border-yellow-500 dark:focus:ring-yellow-500",success:"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:bg-green-100 dark:focus:border-green-500 dark:focus:ring-green-500"},withRightIcon:{on:"pr-10",off:""},withIcon:{on:"pl-10",off:""},withAddon:{on:"rounded-r-lg",off:"rounded-lg"},withShadow:{on:"shadow-sm dark:shadow-sm-light",off:""}}}},Tk={root:{direction:{horizontal:"sm:flex",vertical:"relative border-l border-gray-200 dark:border-gray-700"}},item:{root:{horizontal:"relative mb-6 sm:mb-0",vertical:"mb-10 ml-6"},content:{root:{base:"mt-3 sm:pr-8"},body:{base:"mb-4 text-base font-normal text-gray-500 dark:text-gray-400"},time:{base:"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500"},title:{base:"text-lg font-semibold text-gray-900 dark:text-white"}},point:{horizontal:"flex items-center",line:"hidden h-0.5 w-full bg-gray-200 dark:bg-gray-700 sm:flex",marker:{base:{horizontal:"absolute -left-1.5 h-3 w-3 rounded-full border border-white bg-gray-200 dark:border-gray-900 dark:bg-gray-700",vertical:"absolute -left-1.5 mt-1.5 h-3 w-3 rounded-full border border-white bg-gray-200 dark:border-gray-900 dark:bg-gray-700"},icon:{base:"h-3 w-3 text-cyan-600 dark:text-cyan-300",wrapper:"absolute -left-3 flex h-6 w-6 items-center justify-center rounded-full bg-cyan-200 ring-8 ring-white dark:bg-cyan-900 dark:ring-gray-900"}},vertical:""}}},Mk={root:{base:"flex w-full max-w-xs items-center rounded-lg bg-white p-4 text-gray-500 shadow dark:bg-gray-800 dark:text-gray-400",closed:"opacity-0 ease-out"},toggle:{base:"-m-1.5 ml-auto inline-flex h-8 w-8 rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white",icon:"h-5 w-5 shrink-0"}},Nk={root:{base:"group relative flex items-center rounded-lg focus:outline-none",active:{on:"cursor-pointer",off:"cursor-not-allowed opacity-50"},label:"ml-3 text-sm font-medium text-gray-900 dark:text-gray-300"},toggle:{base:"rounded-full border group-focus:ring-4 group-focus:ring-cyan-500/25",checked:{on:"after:translate-x-full after:border-white",off:"border-gray-200 bg-gray-200 dark:border-gray-600 dark:bg-gray-700",color:{blue:"border-cyan-700 bg-cyan-700",dark:"bg-dark-700 border-dark-900",failure:"border-red-900 bg-red-700",gray:"border-gray-600 bg-gray-500",green:"border-green-700 bg-green-600",light:"bg-light-700 border-light-900",red:"border-red-900 bg-red-700",purple:"border-purple-900 bg-purple-700",success:"border-green-500 bg-green-500",yellow:"border-yellow-400 bg-yellow-400",warning:"border-yellow-600 bg-yellow-600",cyan:"border-cyan-500 bg-cyan-500",lime:"border-lime-400 bg-lime-400",indigo:"border-indigo-400 bg-indigo-400",teal:"bg-gradient-to-r from-teal-400 via-teal-500 to-teal-600 hover:bg-gradient-to-br focus:ring-4",info:"border-cyan-600 bg-cyan-600",pink:"border-pink-600 bg-pink-600"}},sizes:{sm:"h-5 w-9 after:absolute after:left-[2px] after:top-[2px] after:h-4 after:w-4",md:"h-6 w-11 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5",lg:"h-7 w-14 after:absolute after:left-[4px] after:top-0.5 after:h-6 after:w-6"}}},Pk={target:"w-fit",animation:"transition-opacity",arrow:{base:"absolute z-10 h-2 w-2 rotate-45",style:{dark:"bg-gray-900 dark:bg-gray-700",light:"bg-white",auto:"bg-white dark:bg-gray-700"},placement:"-4px"},base:"absolute z-10 inline-block rounded-lg px-3 py-2 text-sm font-medium shadow-sm",hidden:"invisible opacity-0",style:{dark:"bg-gray-900 text-white dark:bg-gray-700",light:"border border-gray-200 bg-white text-gray-900",auto:"border border-gray-200 bg-white text-gray-900 dark:border-none dark:bg-gray-700 dark:text-white"},content:"relative z-20"},Ak={theme:Hn({accordion:V1,alert:Y1,avatar:U1,badge:q1,blockquote:K1,breadcrumb:G1,button:X1,buttonGroup:J1,card:Z1,carousel:Q1,checkbox:ek,datepicker:rk,darkThemeToggle:tk,dropdown:nk,fileInput:ok,floatingLabel:ik,footer:sk,helperText:ak,kbd:lk,label:ck,listGroup:uk,list:dk,modal:fk,navbar:hk,pagination:gk,popover:pk,progress:mk,radio:bk,rangeSlider:yk,rating:vk,ratingAdvanced:xk,select:wk,textInput:Ok,textarea:Ek,toggleSwitch:Nk,sidebar:kk,spinner:Ck,table:_k,tabs:Sk,timeline:Tk,toast:Mk,tooltip:Pk})};function K(){return Hn(Ak.theme)}const Uu=k.createContext(void 0);function qu(){const t=k.useContext(Uu);if(!t)throw new Error("useAccordionContext should be used within the AccordionPanelContext provider!");return t}const Ku=({children:t,className:e,theme:r={},...n})=>{const{isOpen:o}=qu(),i=W(K().accordion.content,r);return p.jsx("div",{className:F(i.base,e),"data-testid":"flowbite-accordion-content",hidden:!o,...n,children:t})},Gu=({children:t,...e})=>{const{alwaysOpen:r}=e,[n,o]=k.useState(e.isOpen),i=r?{...e,isOpen:n,setOpen:()=>o(!n)}:e;return p.jsx(Uu.Provider,{value:i,children:t})},Xu=({as:t="h2",children:e,className:r,theme:n={},...o})=>{const{arrowIcon:i,flush:s,isOpen:a,setOpen:l}=qu(),c=()=>typeof l<"u"&&l(),d=W(K().accordion.title,n);return p.jsxs("button",{className:F(d.base,d.flush[s?"on":"off"],d.open[a?"on":"off"],r),onClick:c,type:"button",...o,children:[p.jsx(t,{className:d.heading,"data-testid":"flowbite-accordion-heading",children:e}),i&&p.jsx(i,{"aria-hidden":!0,className:F(d.arrow.base,d.arrow.open[a?"on":"off"]),"data-testid":"flowbite-accordion-arrow"})]})},Ju=({alwaysOpen:t=!1,arrowIcon:e=Fu,children:r,flush:n=!1,collapseAll:o=!1,className:i,theme:s={},...a})=>{const[l,c]=k.useState(o?-1:0),d=k.useMemo(()=>k.Children.map(r,(f,h)=>k.cloneElement(f,{alwaysOpen:t,arrowIcon:e,flush:n,isOpen:l===h,setOpen:()=>c(l===h?-1:h)})),[t,e,r,n,l]),u=W(K().accordion.root,s);return p.jsx("div",{className:F(u.base,u.flush[n?"on":"off"],i),"data-testid":"flowbite-accordion",...a,children:d})};Ju.displayName="Accordion",Gu.displayName="Accordion.Panel",Xu.displayName="Accordion.Title",Ku.displayName="Accordion.Content",Object.assign(Ju,{Panel:Gu,Title:Xu,Content:Ku});const Zu=({children:t,className:e,theme:r={},...n})=>{const o=W(K().avatar.group,r);return p.jsx("div",{"data-testid":"avatar-group-element",className:F(o.base,e),...n,children:t})};Zu.displayName="Avatar.Group";const Qu=({className:t,href:e,theme:r={},total:n,...o})=>{const i=W(K().avatar.groupCounter,r);return p.jsxs("a",{href:e,className:F(i.base,t),...o,children:["+",n]})};Qu.displayName="Avatar.GroupCounter";const ef=({alt:t="",bordered:e=!1,children:r,className:n,color:o="light",img:i,placeholderInitials:s="",rounded:a=!1,size:l="md",stacked:c=!1,status:d,statusPosition:u="top-left",theme:f={},...h})=>{const g=W(K().avatar,f),m=F(g.root.img.base,e&&g.root.bordered,e&&g.root.color[o],a&&g.root.rounded,c&&g.root.stacked,g.root.img.on,g.root.size[l]),b={className:F(m,g.root.img.on),"data-testid":"flowbite-avatar-img"};return p.jsxs("div",{className:F(g.root.base,n),"data-testid":"flowbite-avatar",...h,children:[p.jsxs("div",{className:"relative",children:[i?typeof i=="string"?p.jsx("img",{alt:t,src:i,...b}):i({alt:t,...b}):s?p.jsx("div",{className:F(g.root.img.off,g.root.initials.base,c&&g.root.stacked,e&&g.root.bordered,e&&g.root.color[o],g.root.size[l],a&&g.root.rounded),"data-testid":"flowbite-avatar-initials-placeholder",children:p.jsx("span",{className:F(g.root.initials.text),"data-testid":"flowbite-avatar-initials-placeholder-text",children:s})}):p.jsx("div",{className:F(m,g.root.img.off),"data-testid":"flowbite-avatar-img",children:p.jsx("svg",{className:g.root.img.placeholder,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})})}),d&&p.jsx("span",{"data-testid":"flowbite-avatar-status",className:F(g.root.status.base,g.root.status[d],g.root.statusPosition[u])})]}),r&&p.jsx("div",{children:r})]})};ef.displayName="Avatar",Object.assign(ef,{Group:Zu,Counter:Qu});const tf=({children:t,color:e="info",href:r,icon:n,size:o="xs",className:i,theme:s={},...a})=>{const l=W(K().badge,s),c=()=>p.jsxs("span",{className:F(l.root.base,l.root.color[e],l.root.size[o],l.icon[n?"on":"off"],i),"data-testid":"flowbite-badge",...a,children:[n&&p.jsx(n,{"aria-hidden":!0,className:l.icon.size[o],"data-testid":"flowbite-badge-icon"}),t&&p.jsx("span",{children:t})]});return r?p.jsx("a",{className:l.root.href,href:r,children:p.jsx(c,{})}):p.jsx(c,{})};tf.displayName="Badge";const rf=({className:t,color:e="info",light:r,size:n="md",theme:o={},...i})=>{const s=W(K().spinner,o);return p.jsx("span",{role:"status",...i,children:p.jsxs("svg",{fill:"none",viewBox:"0 0 100 101",className:F(s.base,s.color[e],s.light[r?"on":"off"].base,s.light[r?"on":"off"].color[e],s.size[n],t),children:[p.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),p.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})};rf.displayName="Spinner";const Gs=k.forwardRef(({children:t,as:e,href:r,type:n="button",...o},i)=>{const s=e||(r?"a":"button");return k.createElement(s,{ref:i,href:r,type:n,...o},t)});Gs.displayName="ButtonBaseComponent";const nf=(t,e,r)=>k.Children.map(t,(n,o)=>k.isValidElement(n)?n.props.children?k.cloneElement(n,{...n.props,children:nf(n.props.children,e,r),positionInGroup:of(o,k.Children.count(t))}):k.cloneElement(n,{outline:e,pill:r,positionInGroup:of(o,k.Children.count(t))}):n),of=(t,e)=>t===0?"start":t===e-1?"end":"middle",sf=({children:t,className:e,outline:r,pill:n,theme:o={},...i})=>{const s=k.useMemo(()=>nf(t,r,n),[t,r,n]),a=W(K().buttonGroup,o);return p.jsx("div",{className:F(a.base,e),role:"group",...i,children:s})};sf.displayName="Button.Group";const af=k.forwardRef(({children:t,className:e,color:r="info",disabled:n,fullSized:o,isProcessing:i=!1,processingLabel:s="Loading...",processingSpinner:a,gradientDuoTone:l,gradientMonochrome:c,label:d,outline:u=!1,pill:f=!1,positionInGroup:h="none",size:g="md",theme:m={},...b},v)=>{const{buttonGroup:y,button:_}=K(),x=W(_,m),w=b;return p.jsx(Gs,{ref:v,disabled:n,className:F(x.base,n&&x.disabled,!l&&!c&&x.color[r],l&&!c&&x.gradientDuoTone[l],!l&&c&&x.gradient[c],u&&(x.outline.color[r]??x.outline.color.default),x.pill[f?"on":"off"],o&&x.fullSized,y.position[h],e),...w,children:p.jsx("span",{className:F(x.inner.base,x.outline[u?"on":"off"],x.outline.pill[u&&f?"on":"off"],x.size[g],u&&!x.outline.color[r]&&x.inner.outline,i&&x.isProcessing,i&&x.inner.isProcessingPadding[g],x.inner.position[h]),children:p.jsxs(p.Fragment,{children:[i&&p.jsx("span",{className:F(x.spinnerSlot,x.spinnerLeftPosition[g]),children:a||p.jsx(rf,{size:g})}),typeof t<"u"?t:p.jsx("span",{"data-testid":"flowbite-button-label",className:F(x.label),children:i?s:d})]})})})});af.displayName="Button";const lf=Object.assign(af,{Group:sf}),cf=({children:t,...e})=>{const r=n=>{const i=n.target.closest('[role="banner"]');i==null||i.remove()};return p.jsx(lf,{onClick:r,...e,children:t})};cf.displayName="Banner.CollapseButton";const df=({children:t,...e})=>p.jsx("div",{"data-testid":"flowbite-banner",role:"banner",tabIndex:-1,...e,children:t});df.displayName="Banner",Object.assign(df,{CollapseButton:cf});const uf=k.forwardRef(({children:t,className:e,href:r,icon:n,theme:o={},...i},s)=>{const a=typeof r<"u",l=a?"a":"span",c=W(K().breadcrumb.item,o);return p.jsxs("li",{className:F(c.base,e),...i,children:[p.jsx(Bu,{"aria-hidden":!0,className:c.chevron,"data-testid":"flowbite-breadcrumb-separator"}),p.jsxs(l,{ref:s,className:c.href[a?"on":"off"],"data-testid":"flowbite-breadcrumb-item",href:r,children:[n&&p.jsx(n,{"aria-hidden":!0,className:c.icon}),t]})]})});uf.displayName="Breadcrumb.Item";const ff=({children:t,className:e,theme:r={},...n})=>{const o=W(K().breadcrumb.root,r);return p.jsx("nav",{"aria-label":"Breadcrumb",className:F(o.base,e),...n,children:p.jsx("ol",{className:o.list,children:t})})};ff.displayName="Breadcrumb",Object.assign(ff,{Item:uf});var hf={exports:{}};/*!
|
|
491
|
+
Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let f=yr(),h;h=f;let p=h.pathname||"/",m=p;if(d!=="/"){let y=d.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(y.length).join("/")}let b=!i&&r&&r.matches&&r.matches.length>0?r.matches:vu(t,{pathname:m});return zt(u||b!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),zt(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),xw(b&&b.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:Bt([d,o.encodeLocation?o.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?d:Bt([d,o.encodeLocation?o.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),s,r,n)}function mw(){let t=Sw(),e=lw(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:i},"ErrorBoundary")," or"," ",C.createElement("code",{style:i},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},e),r?C.createElement("pre",{style:o},r):null,s)}var bw=C.createElement(mw,null),yw=class extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error!==void 0?C.createElement(jt.Provider,{value:this.props.routeContext},C.createElement(Rs.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function vw({routeContext:t,match:e,children:r}){let n=C.useContext(Wr);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),C.createElement(jt.Provider,{value:t},r)}function xw(t,e=[],r=null,n=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,i=r==null?void 0:r.errors;if(i!=null){let l=o.findIndex(c=>c.route.id&&(i==null?void 0:i[c.route.id])!==void 0);$e(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let s=!1,a=-1;if(r)for(let l=0;l<o.length;l++){let c=o[l];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(a=l),c.route.id){let{loaderData:d,errors:u}=r,f=c.route.loader&&!d.hasOwnProperty(c.route.id)&&(!u||u[c.route.id]===void 0);if(c.route.lazy||f){s=!0,a>=0?o=o.slice(0,a+1):o=[o[0]];break}}}return o.reduceRight((l,c,d)=>{let u,f=!1,h=null,p=null;r&&(u=i&&c.route.id?i[c.route.id]:void 0,h=c.route.errorElement||bw,s&&(a<0&&d===0?(Mu("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,p=null):a===d&&(f=!0,p=c.route.hydrateFallbackElement||null)));let m=e.concat(o.slice(0,d+1)),b=()=>{let v;return u?v=h:f?v=p:c.route.Component?v=C.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=l,C.createElement(vw,{match:c,routeContext:{outlet:l,matches:m,isDataRoute:r!=null},children:v})};return r&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?C.createElement(yw,{location:r.location,revalidation:r.revalidation,component:h,error:u,children:b(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):b()},null)}function Ys(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ww(t){let e=C.useContext(Wr);return $e(e,Ys(t)),e}function kw(t){let e=C.useContext(ri);return $e(e,Ys(t)),e}function Cw(t){let e=C.useContext(jt);return $e(e,Ys(t)),e}function Us(t){let e=Cw(t),r=e.matches[e.matches.length-1];return $e(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function _w(){return Us("useRouteId")}function Sw(){var n;let t=C.useContext(Rs),e=kw("useRouteError"),r=Us("useRouteError");return t!==void 0?t:(n=e.errors)==null?void 0:n[r]}function Ew(){let{router:t}=ww("useNavigate"),e=Us("useNavigate"),r=C.useRef(!1);return Tu(()=>{r.current=!0}),C.useCallback(async(o,i={})=>{zt(r.current,Ou),r.current&&(typeof o=="number"?t.navigate(o):await t.navigate(o,{fromRouteId:e,...i}))},[t,e])}var Nu={};function Mu(t,e,r){!e&&!Nu[t]&&(Nu[t]=!0,zt(!1,r))}C.memo(Ow);function Ow({routes:t,future:e,state:r}){return pw(t,void 0,r,e)}var oi="get",ii="application/x-www-form-urlencoded";function si(t){return t!=null&&typeof t.tagName=="string"}function Tw(t){return si(t)&&t.tagName.toLowerCase()==="button"}function Nw(t){return si(t)&&t.tagName.toLowerCase()==="form"}function Mw(t){return si(t)&&t.tagName.toLowerCase()==="input"}function Pw(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Aw(t,e){return t.button===0&&(!e||e==="_self")&&!Pw(t)}var ai=null;function Dw(){if(ai===null)try{new FormData(document.createElement("form"),0),ai=!1}catch{ai=!0}return ai}var Iw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function qs(t){return t!=null&&!Iw.has(t)?(zt(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ii}"`),null):t}function Lw(t,e){let r,n,o,i,s;if(Nw(t)){let a=t.getAttribute("action");n=a?Zt(a,e):null,r=t.getAttribute("method")||oi,o=qs(t.getAttribute("enctype"))||ii,i=new FormData(t)}else if(Tw(t)||Mw(t)&&(t.type==="submit"||t.type==="image")){let a=t.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=t.getAttribute("formaction")||a.getAttribute("action");if(n=l?Zt(l,e):null,r=t.getAttribute("formmethod")||a.getAttribute("method")||oi,o=qs(t.getAttribute("formenctype"))||qs(a.getAttribute("enctype"))||ii,i=new FormData(a,t),!Dw()){let{name:c,type:d,value:u}=t;if(d==="image"){let f=c?`${c}.`:"";i.append(`${f}x`,"0"),i.append(`${f}y`,"0")}else c&&i.append(c,u)}}else{if(si(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=oi,n=null,o=ii,s=t}return i&&o==="text/plain"&&(s=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:s}}function Ks(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}async function Fw(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function zw(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Bw(t,e,r){let n=await Promise.all(t.map(async o=>{let i=e.routes[o.route.id];if(i){let s=await Fw(i,r);return s.links?s.links():[]}return[]}));return Hw(n.flat(1).filter(zw).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Pu(t,e,r,n,o,i){let s=(l,c)=>r[c]?l.route.id!==r[c].route.id:!0,a=(l,c)=>{var d;return r[c].pathname!==l.pathname||((d=r[c].route.path)==null?void 0:d.endsWith("*"))&&r[c].params["*"]!==l.params["*"]};return i==="assets"?e.filter((l,c)=>s(l,c)||a(l,c)):i==="data"?e.filter((l,c)=>{var u;let d=n.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(s(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((u=r[0])==null?void 0:u.params)||{},nextUrl:new URL(t,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function $w(t,e,{includeHydrateFallback:r}={}){return jw(t.map(n=>{let o=e.routes[n.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function jw(t){return[...new Set(t)]}function Ww(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function Hw(t,e){let r=new Set;return new Set(e),t.reduce((n,o)=>{let i=JSON.stringify(Ww(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}function Vw(t,e){let r=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r.pathname==="/"?r.pathname="_root.data":e&&Zt(r.pathname,e)==="/"?r.pathname=`${e.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Au(){let t=C.useContext(Wr);return Ks(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function Rw(){let t=C.useContext(ri);return Ks(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Gs=C.createContext(void 0);Gs.displayName="FrameworkContext";function Du(){let t=C.useContext(Gs);return Ks(t,"You must render this element inside a <HydratedRouter> element"),t}function Yw(t,e){let r=C.useContext(Gs),[n,o]=C.useState(!1),[i,s]=C.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:d,onTouchStart:u}=e,f=C.useRef(null);C.useEffect(()=>{if(t==="render"&&s(!0),t==="viewport"){let m=v=>{v.forEach(y=>{s(y.isIntersecting)})},b=new IntersectionObserver(m,{threshold:.5});return f.current&&b.observe(f.current),()=>{b.disconnect()}}},[t]),C.useEffect(()=>{if(n){let m=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(m)}}},[n]);let h=()=>{o(!0)},p=()=>{o(!1),s(!1)};return r?t!=="intent"?[i,f,{}]:[i,f,{onFocus:$n(a,h),onBlur:$n(l,p),onMouseEnter:$n(c,h),onMouseLeave:$n(d,p),onTouchStart:$n(u,h)}]:[!1,f,{}]}function $n(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function Uw({page:t,...e}){let{router:r}=Au(),n=C.useMemo(()=>vu(r.routes,t,r.basename),[r.routes,t,r.basename]);return n?C.createElement(Kw,{page:t,matches:n,...e}):null}function qw(t){let{manifest:e,routeModules:r}=Du(),[n,o]=C.useState([]);return C.useEffect(()=>{let i=!1;return Bw(t,e,r).then(s=>{i||o(s)}),()=>{i=!0}},[t,e,r]),n}function Kw({page:t,matches:e,...r}){let n=yr(),{manifest:o,routeModules:i}=Du(),{basename:s}=Au(),{loaderData:a,matches:l}=Rw(),c=C.useMemo(()=>Pu(t,e,l,o,n,"data"),[t,e,l,o,n]),d=C.useMemo(()=>Pu(t,e,l,o,n,"assets"),[t,e,l,o,n]),u=C.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let p=new Set,m=!1;if(e.forEach(v=>{var _;let y=o.routes[v.route.id];!y||!y.hasLoader||(!c.some(x=>x.route.id===v.route.id)&&v.route.id in a&&((_=i[v.route.id])!=null&&_.shouldRevalidate)||y.hasClientLoader?m=!0:p.add(v.route.id))}),p.size===0)return[];let b=Vw(t,s);return m&&p.size>0&&b.searchParams.set("_routes",e.filter(v=>p.has(v.route.id)).map(v=>v.route.id).join(",")),[b.pathname+b.search]},[s,a,n,o,c,e,t,i]),f=C.useMemo(()=>$w(d,o),[d,o]),h=qw(d);return C.createElement(C.Fragment,null,u.map(p=>C.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...r})),f.map(p=>C.createElement("link",{key:p,rel:"modulepreload",href:p,...r})),h.map(({key:p,link:m})=>C.createElement("link",{key:p,...m})))}function Gw(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var Iu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Iu&&(window.__reactRouterVersion="7.4.0")}catch{}var Lu=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hr=C.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:o,reloadDocument:i,replace:s,state:a,target:l,to:c,preventScrollReset:d,viewTransition:u,...f},h){let{basename:p}=C.useContext($t),m=typeof c=="string"&&Lu.test(c),b,v=!1;if(typeof c=="string"&&m&&(b=c,Iu))try{let N=new URL(window.location.href),E=c.startsWith("//")?new URL(N.protocol+c):new URL(c),I=Zt(E.pathname,p);E.origin===N.origin&&I!=null?c=I+E.search+E.hash:v=!0}catch{zt(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let y=fw(c,{relative:o}),[_,x,w]=Yw(n,f),S=Qw(c,{replace:s,state:a,target:l,preventScrollReset:d,relative:o,viewTransition:u});function T(N){e&&e(N),N.defaultPrevented||S(N)}let M=C.createElement("a",{...f,...w,href:b||y,onClick:v||i?e:T,ref:Gw(h,x),target:l,"data-discover":!m&&r==="render"?"true":void 0});return _&&!m?C.createElement(C.Fragment,null,M,C.createElement(Uw,{page:y})):M});Hr.displayName="Link";var Xw=C.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:o=!1,style:i,to:s,viewTransition:a,children:l,...c},d){let u=Bn(s,{relative:c.relative}),f=yr(),h=C.useContext(ri),{navigator:p,basename:m}=C.useContext($t),b=h!=null&&o1(u)&&a===!0,v=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,y=f.pathname,_=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(y=y.toLowerCase(),_=_?_.toLowerCase():null,v=v.toLowerCase()),_&&m&&(_=Zt(_,m)||_);const x=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let w=y===v||!o&&y.startsWith(v)&&y.charAt(x)==="/",S=_!=null&&(_===v||!o&&_.startsWith(v)&&_.charAt(v.length)==="/"),T={isActive:w,isPending:S,isTransitioning:b},M=w?e:void 0,N;typeof n=="function"?N=n(T):N=[n,w?"active":null,S?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let E=typeof i=="function"?i(T):i;return C.createElement(Hr,{...c,"aria-current":M,className:N,ref:d,style:E,to:s,viewTransition:a},typeof l=="function"?l(T):l)});Xw.displayName="NavLink";var Zw=C.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:o,state:i,method:s=oi,action:a,onSubmit:l,relative:c,preventScrollReset:d,viewTransition:u,...f},h)=>{let p=r1(),m=n1(a,{relative:c}),b=s.toLowerCase()==="get"?"get":"post",v=typeof a=="string"&&Lu.test(a),y=_=>{if(l&&l(_),_.defaultPrevented)return;_.preventDefault();let x=_.nativeEvent.submitter,w=(x==null?void 0:x.getAttribute("formmethod"))||s;p(x||_.currentTarget,{fetcherKey:e,method:w,navigate:r,replace:o,state:i,relative:c,preventScrollReset:d,viewTransition:u})};return C.createElement("form",{ref:h,method:b,action:m,onSubmit:n?l:y,...f,"data-discover":!v&&t==="render"?"true":void 0})});Zw.displayName="Form";function Jw(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fu(t){let e=C.useContext(Wr);return $e(e,Jw(t)),e}function Qw(t,{target:e,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:s}={}){let a=hw(),l=yr(),c=Bn(t,{relative:i});return C.useCallback(d=>{if(Aw(d,e)){d.preventDefault();let u=r!==void 0?r:js(l)===js(c);a(t,{replace:u,state:n,preventScrollReset:o,relative:i,viewTransition:s})}},[l,a,c,r,n,e,t,o,i,s])}var e1=0,t1=()=>`__${String(++e1)}__`;function r1(){let{router:t}=Fu("useSubmit"),{basename:e}=C.useContext($t),r=_w();return C.useCallback(async(n,o={})=>{let{action:i,method:s,encType:a,formData:l,body:c}=Lw(n,e);if(o.navigate===!1){let d=o.fetcherKey||t1();await t.fetch(d,r,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||s,formEncType:o.encType||a,flushSync:o.flushSync})}else await t.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||s,formEncType:o.encType||a,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[t,e,r])}function n1(t,{relative:e}={}){let{basename:r}=C.useContext($t),n=C.useContext(jt);$e(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Bn(t||".",{relative:e})},s=yr();if(t==null){i.search=s.search;let a=new URLSearchParams(i.search),l=a.getAll("index");if(l.some(d=>d==="")){a.delete("index"),l.filter(u=>u).forEach(u=>a.append("index",u));let d=a.toString();i.search=d?`?${d}`:""}}return(!t||t===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Bt([r,i.pathname])),js(i)}function o1(t,e={}){let r=C.useContext(Eu);$e(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Fu("useViewTransitionState"),o=Bn(t,{relative:e.relative});if(!r.isTransitioning)return!1;let i=Zt(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=Zt(r.nextLocation.pathname,n)||r.nextLocation.pathname;return ti(o.pathname,s)!=null||ti(o.pathname,i)!=null}new TextEncoder;const i1=no(),s1=()=>{const[t,e]=k.useState(!0),[r,n]=k.useState(null),o=()=>{r||e(!1)},i=()=>{r||e(!0)},s=a=>{n(r===a?null:a)};return g.jsx("div",{className:"fixed top-0 left-0 h-full z-40",children:g.jsxs("div",{className:"flex flex-col",onMouseEnter:o,onMouseLeave:i,children:[g.jsxs(nv,{collapsed:t,rootStyles:{[`.${we.container}`]:{backgroundColor:"#483FFF",color:"#483FFF",height:"100vh",display:"flex",flexDirection:"column"}},children:[g.jsx(Hr,{to:"/dashboard",children:g.jsx("div",{children:g.jsx(Or,{classIm:"mx-auto",src:`${i1}/public/assets/images/logo mathilde.png`,alt:"Logo Mathilde ads",width:74,height:74})})}),g.jsxs(sv,{children:[g.jsx(jr,{icon:g.jsx(np,{className:"text-2xl"}),onClick:()=>s("campanas"),className:"bg-white my-1 mx-2 rounded-lg hover:bg-opacity-90",rootStyles:{button:{width:t?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:t?"0 0.25rem":"0 0.5rem",color:"#483FFF","&:hover":{color:"#483FFF"}}},children:" Campañas "}),g.jsx(Hr,{to:"https://dsp.mathilde-ads.com/login",children:g.jsx(jr,{icon:g.jsx(Nx,{className:"text-xl"}),className:"bg-white my-1 mx-2 rounded-lg hover:bg-opacity-90",rootStyles:{button:{width:t?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:t?"0 0.25rem":"0 0.5rem",color:"#483FFF","&:hover":{color:"#483FFF"}}},children:" Medios "})}),g.jsx(jr,{icon:g.jsx(op,{className:"text-xl"}),onClick:()=>s("audiencias"),className:"bg-white my-1 mx-2 rounded-lg hover:bg-opacity-90",rootStyles:{button:{width:t?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:t?"0 0.25rem":"0 0.5rem",color:"#483FFF","&:hover":{color:"#483FFF"}}},children:" Audiencias "}),g.jsx(jr,{icon:g.jsx(Px,{className:"text-xl"}),onClick:()=>s("reportes"),className:"bg-white my-1 mx-2 rounded-lg hover:bg-opacity-90",rootStyles:{button:{width:t?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:t?"0 0.25rem":"0 0.5rem",color:"#483FFF","&:hover":{color:"#483FFF"}}},children:" Reportes "}),g.jsx(jr,{icon:g.jsx(Mx,{className:"text-xl"}),onClick:()=>s("facturacion"),className:"bg-white my-1 mx-2 rounded-lg hover:bg-opacity-90",rootStyles:{button:{width:t?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:t?"0 0.25rem":"0 0.5rem",color:"#483FFF","&:hover":{color:"#483FFF"}}},children:" Facturación "}),g.jsx(Hr,{to:"/settings",children:g.jsx(jr,{icon:g.jsx(Ax,{className:"text-xl"}),className:"bg-white my-1 mx-2 rounded-lg hover:bg-opacity-90",rootStyles:{button:{width:t?"calc(100% - 0.5rem)":"calc(100% - 1rem)",margin:t?"0 0.25rem":"0 0.5rem",color:"#483FFF","&:hover":{color:"#483FFF"}}},children:" Configuración "})})]}),g.jsx("div",{className:"mt-auto self-end p-4",children:g.jsx("div",{className:"flex justify-center bg-white rounded-lg p-2",children:g.jsx("button",{className:"cursor-pointer text-3xl",style:{color:"#483FFF"},children:g.jsx(Db,{})})})})]}),g.jsx(Dr,{width:"40%",isOpen:r==="campanas",onClose:()=>n(null),children:g.jsxs("div",{className:"flex flex-col p-10",children:[g.jsx("h2",{className:"text-center font-bold mb-3",children:"Selecciona el tipo de campaña que quieres crear"}),g.jsxs("div",{className:"flex",children:[g.jsx("div",{className:"w-3/6 p-2",children:g.jsx(Bs,{image:"medios-propios",title:"Medios Propios",description:"Crea y administra campañas a los usuarios que ingresan a tus canales."})}),g.jsx("div",{className:"w-3/6 p-2",children:g.jsx(Hr,{to:"/thirdPartyCampaign",children:g.jsx(Bs,{image:"medios-pagos",title:"Medios Pagos",description:"Activa campañas de Marketing Digital usando inventario de Redes Sociales y Google."})})})]})]})}),g.jsx(Dr,{isOpen:r==="audiencias",onClose:()=>n(null),children:g.jsx("h2",{children:"Audiencias"})}),g.jsx(Dr,{isOpen:r==="reportes",onClose:()=>n(null),children:g.jsx("h2",{children:"Reportes"})}),g.jsx(Dr,{isOpen:r==="facturacion",onClose:()=>n(null),children:g.jsx("h2",{children:"Facturación"})}),g.jsx(Dr,{isOpen:r==="configuracion",onClose:()=>n(null),children:g.jsx("h2",{children:"Configuración"})})]})})};function a1(t){return me({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"},child:[]}]})(t)}function l1(t){return me({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"},child:[]}]})(t)}function c1(t){return me({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"},child:[]}]})(t)}function zu(t){return me({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"},child:[]}]})(t)}function d1(t){return me({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"},child:[]}]})(t)}function u1(t){return me({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"},child:[]}]})(t)}function f1(t){return me({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"},child:[]}]})(t)}function h1(t){return me({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"},child:[]}]})(t)}function Bu(t){return me({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"},child:[]}]})(t)}function g1(t){return me({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"},child:[]}]})(t)}function $u(t){return me({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"},child:[]}]})(t)}function p1(t){return me({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"},child:[]}]})(t)}function m1(t){return me({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"},child:[]}]})(t)}const Xs="-";function b1(t){const e=v1(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;function o(s){const a=s.split(Xs);return a[0]===""&&a.length!==1&&a.shift(),ju(a,e)||y1(s)}function i(s,a){const l=r[s]||[];return a&&n[s]?[...l,...n[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function ju(t,e){var s;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),o=n?ju(t.slice(1),n):void 0;if(o)return o;if(e.validators.length===0)return;const i=t.join(Xs);return(s=e.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const Wu=/^\[(.+)\]$/;function y1(t){if(Wu.test(t)){const e=Wu.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}}function v1(t){const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return w1(Object.entries(t.classGroups),r).forEach(([i,s])=>{Zs(s,n,i,e)}),n}function Zs(t,e,r,n){t.forEach(o=>{if(typeof o=="string"){const i=o===""?e:Hu(e,o);i.classGroupId=r;return}if(typeof o=="function"){if(x1(o)){Zs(o(n),e,r,n);return}e.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([i,s])=>{Zs(s,Hu(e,i),r,n)})})}function Hu(t,e){let r=t;return e.split(Xs).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function x1(t){return t.isThemeGetter}function w1(t,e){return e?t.map(([r,n])=>{const o=n.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[e+s,a])):i);return[r,o]}):t}function k1(t){if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;function o(i,s){r.set(i,s),e++,e>t&&(e=0,n=r,r=new Map)}return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return o(i,s),s},set(i,s){r.has(i)?r.set(i,s):o(i,s)}}}const Vu="!";function C1(t){const e=t.separator,r=e.length===1,n=e[0],o=e.length;return function(s){const a=[];let l=0,c=0,d;for(let m=0;m<s.length;m++){let b=s[m];if(l===0){if(b===n&&(r||s.slice(m,m+o)===e)){a.push(s.slice(c,m)),c=m+o;continue}if(b==="/"){d=m;continue}}b==="["?l++:b==="]"&&l--}const u=a.length===0?s:s.substring(c),f=u.startsWith(Vu),h=f?u.substring(1):u,p=d&&d>c?d-c:void 0;return{modifiers:a,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}}}function _1(t){if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e}function S1(t){return{cache:k1(t.cacheSize),splitModifiers:C1(t),...b1(t)}}const E1=/\s+/;function O1(t,e){const{splitModifiers:r,getClassGroupId:n,getConflictingClassGroupIds:o}=e,i=new Set;return t.trim().split(E1).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:d}=r(s);let u=n(d?c.substring(0,d):c),f=!!d;if(!u){if(!d)return{isTailwindClass:!1,originalClassName:s};if(u=n(c),!u)return{isTailwindClass:!1,originalClassName:s};f=!1}const h=_1(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Vu:h,classGroupId:u,originalClassName:s,hasPostfixModifier:f}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,d=a+l;return i.has(d)?!1:(i.add(d),o(l,c).forEach(u=>i.add(a+u)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function T1(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=Ru(e))&&(n&&(n+=" "),n+=r);return n}function Ru(t){if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=Ru(t[n]))&&(r&&(r+=" "),r+=e);return r}function N1(t,...e){let r,n,o,i=s;function s(l){const c=e.reduce((d,u)=>u(d),t());return r=S1(c),n=r.cache.get,o=r.cache.set,i=a,a(l)}function a(l){const c=n(l);if(c)return c;const d=O1(l,r);return o(l,d),d}return function(){return i(T1.apply(null,arguments))}}function ve(t){const e=r=>r[t]||[];return e.isThemeGetter=!0,e}const Yu=/^\[(?:([a-z-]+):)?(.+)\]$/i,M1=/^\d+\/\d+$/,P1=new Set(["px","full","screen"]),A1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,D1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,I1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,L1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,F1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Wt(t){return vr(t)||P1.has(t)||M1.test(t)}function Jt(t){return Vr(t,"length",R1)}function vr(t){return!!t&&!Number.isNaN(Number(t))}function li(t){return Vr(t,"number",vr)}function jn(t){return!!t&&Number.isInteger(Number(t))}function z1(t){return t.endsWith("%")&&vr(t.slice(0,-1))}function Z(t){return Yu.test(t)}function Qt(t){return A1.test(t)}const B1=new Set(["length","size","percentage"]);function $1(t){return Vr(t,B1,Uu)}function j1(t){return Vr(t,"position",Uu)}const W1=new Set(["image","url"]);function H1(t){return Vr(t,W1,U1)}function V1(t){return Vr(t,"",Y1)}function Wn(){return!0}function Vr(t,e,r){const n=Yu.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1}function R1(t){return D1.test(t)&&!I1.test(t)}function Uu(){return!1}function Y1(t){return L1.test(t)}function U1(t){return F1.test(t)}function q1(){const t=ve("colors"),e=ve("spacing"),r=ve("blur"),n=ve("brightness"),o=ve("borderColor"),i=ve("borderRadius"),s=ve("borderSpacing"),a=ve("borderWidth"),l=ve("contrast"),c=ve("grayscale"),d=ve("hueRotate"),u=ve("invert"),f=ve("gap"),h=ve("gradientColorStops"),p=ve("gradientColorStopPositions"),m=ve("inset"),b=ve("margin"),v=ve("opacity"),y=ve("padding"),_=ve("saturate"),x=ve("scale"),w=ve("sepia"),S=ve("skew"),T=ve("space"),M=ve("translate"),N=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",Z,e],A=()=>[Z,e],D=()=>["",Wt,Jt],O=()=>["auto",vr,Z],P=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],B=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",Z],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[vr,li],V=()=>[vr,Z];return{cacheSize:500,separator:":",theme:{colors:[Wn],spacing:[Wt,Jt],blur:["none","",Qt,Z],brightness:H(),borderColor:[t],borderRadius:["none","","full",Qt,Z],borderSpacing:A(),borderWidth:D(),contrast:H(),grayscale:j(),hueRotate:V(),invert:j(),gap:A(),gradientColorStops:[t],gradientColorStopPositions:[z1,Jt],inset:I(),margin:I(),opacity:H(),padding:A(),saturate:H(),scale:H(),sepia:j(),skew:V(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",Z]}],container:["container"],columns:[{columns:[Qt]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...P(),Z]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",jn,Z]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Z]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",jn,Z]}],"grid-cols":[{"grid-cols":[Wn]}],"col-start-end":[{col:["auto",{span:["full",jn,Z]},Z]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[Wn]}],"row-start-end":[{row:["auto",{span:[jn,Z]},Z]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Z]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Z,e]}],"min-w":[{"min-w":[Z,e,"min","max","fit"]}],"max-w":[{"max-w":[Z,e,"none","full","min","max","fit","prose",{screen:[Qt]},Qt]}],h:[{h:[Z,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Z,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Z,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Z,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Qt,Jt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",li]}],"font-family":[{font:[Wn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Z]}],"line-clamp":[{"line-clamp":["none",vr,li]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wt,Z]}],"list-image":[{"list-image":["none",Z]}],"list-style-type":[{list:["none","disc","decimal",Z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wt,Jt]}],"underline-offset":[{"underline-offset":["auto",Wt,Z]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...P(),j1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},H1]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:L()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[Wt,Z]}],"outline-w":[{outline:[Wt,Jt]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Wt,Jt]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Qt,V1]}],"shadow-color":[{shadow:[Wn]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":z()}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Qt,Z]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[_]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Z]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Z]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[jn,Z]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Z]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Z]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Z]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Wt,Jt,li]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const F=N1(q1);function xr(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function Hn(t){if(!xr(t))return t;const e={};for(const r in t)e[r]=Hn(t[r]);return e}function W(t,e){if(xr(e)&&Object.keys(e).length===0)return Hn({...t,...e});const r={...t,...e};if(xr(e)&&xr(t))for(const n in e)xr(e[n])&&n in t&&xr(t[n])?r[n]=W(t[n],e[n]):r[n]=xr(e[n])?Hn(e[n]):e[n];return r}function $C(t){return t}const K1={root:{base:"divide-y divide-gray-200 border-gray-200 dark:divide-gray-700 dark:border-gray-700",flush:{off:"rounded-lg border",on:"border-b"}},content:{base:"p-5 first:rounded-t-lg last:rounded-b-lg dark:bg-gray-900"},title:{arrow:{base:"h-6 w-6 shrink-0",open:{off:"",on:"rotate-180"}},base:"flex w-full items-center justify-between p-5 text-left font-medium text-gray-500 first:rounded-t-lg last:rounded-b-lg dark:text-gray-400",flush:{off:"hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 dark:hover:bg-gray-800 dark:focus:ring-gray-800",on:"bg-transparent dark:bg-transparent"},heading:"",open:{off:"",on:"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white"}}},G1={base:"flex flex-col gap-2 p-4 text-sm",borderAccent:"border-t-4",closeButton:{base:"-m-1.5 ml-auto inline-flex h-8 w-8 rounded-lg p-1.5 focus:ring-2",icon:"h-5 w-5",color:{info:"bg-cyan-100 text-cyan-500 hover:bg-cyan-200 focus:ring-cyan-400 dark:bg-cyan-200 dark:text-cyan-600 dark:hover:bg-cyan-300",gray:"bg-gray-100 text-gray-500 hover:bg-gray-200 focus:ring-gray-400 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-white",failure:"bg-red-100 text-red-500 hover:bg-red-200 focus:ring-red-400 dark:bg-red-200 dark:text-red-600 dark:hover:bg-red-300",success:"bg-green-100 text-green-500 hover:bg-green-200 focus:ring-green-400 dark:bg-green-200 dark:text-green-600 dark:hover:bg-green-300",warning:"bg-yellow-100 text-yellow-500 hover:bg-yellow-200 focus:ring-yellow-400 dark:bg-yellow-200 dark:text-yellow-600 dark:hover:bg-yellow-300",red:"bg-red-100 text-red-500 hover:bg-red-200 focus:ring-red-400 dark:bg-red-200 dark:text-red-600 dark:hover:bg-red-300",green:"bg-green-100 text-green-500 hover:bg-green-200 focus:ring-green-400 dark:bg-green-200 dark:text-green-600 dark:hover:bg-green-300",yellow:"bg-yellow-100 text-yellow-500 hover:bg-yellow-200 focus:ring-yellow-400 dark:bg-yellow-200 dark:text-yellow-600 dark:hover:bg-yellow-300",blue:"bg-blue-100 text-blue-500 hover:bg-blue-200 focus:ring-blue-400 dark:bg-blue-200 dark:text-blue-600 dark:hover:bg-blue-300",cyan:"bg-cyan-100 text-cyan-500 hover:bg-cyan-200 focus:ring-cyan-400 dark:bg-cyan-200 dark:text-cyan-600 dark:hover:bg-cyan-300",pink:"bg-pink-100 text-pink-500 hover:bg-pink-200 focus:ring-pink-400 dark:bg-pink-200 dark:text-pink-600 dark:hover:bg-pink-300",lime:"bg-lime-100 text-lime-500 hover:bg-lime-200 focus:ring-lime-400 dark:bg-lime-200 dark:text-lime-600 dark:hover:bg-lime-300",dark:"bg-gray-100 text-gray-500 hover:bg-gray-200 focus:ring-gray-400 dark:bg-gray-200 dark:text-gray-600 dark:hover:bg-gray-300",indigo:"bg-indigo-100 text-indigo-500 hover:bg-indigo-200 focus:ring-indigo-400 dark:bg-indigo-200 dark:text-indigo-600 dark:hover:bg-indigo-300",purple:"bg-purple-100 text-purple-500 hover:bg-purple-200 focus:ring-purple-400 dark:bg-purple-200 dark:text-purple-600 dark:hover:bg-purple-300",teal:"bg-teal-100 text-teal-500 hover:bg-teal-200 focus:ring-teal-400 dark:bg-teal-200 dark:text-teal-600 dark:hover:bg-teal-300",light:"bg-gray-50 text-gray-500 hover:bg-gray-100 focus:ring-gray-200 dark:bg-gray-600 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white"}},color:{info:"border-cyan-500 bg-cyan-100 text-cyan-700 dark:bg-cyan-200 dark:text-cyan-800",gray:"border-gray-500 bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300",failure:"border-red-500 bg-red-100 text-red-700 dark:bg-red-200 dark:text-red-800",success:"border-green-500 bg-green-100 text-green-700 dark:bg-green-200 dark:text-green-800",warning:"border-yellow-500 bg-yellow-100 text-yellow-700 dark:bg-yellow-200 dark:text-yellow-800",red:"border-red-500 bg-red-100 text-red-700 dark:bg-red-200 dark:text-red-800",green:"border-green-500 bg-green-100 text-green-700 dark:bg-green-200 dark:text-green-800",yellow:"border-yellow-500 bg-yellow-100 text-yellow-700 dark:bg-yellow-200 dark:text-yellow-800",blue:"border-blue-500 bg-blue-100 text-blue-700 dark:bg-blue-200 dark:text-blue-800",cyan:"border-cyan-500 bg-cyan-100 text-cyan-700 dark:bg-cyan-200 dark:text-cyan-800",pink:"border-pink-500 bg-pink-100 text-pink-700 dark:bg-pink-200 dark:text-pink-800",lime:"border-lime-500 bg-lime-100 text-lime-700 dark:bg-lime-200 dark:text-lime-800",dark:"border-gray-600 bg-gray-800 text-gray-200 dark:bg-gray-900 dark:text-gray-300",indigo:"border-indigo-500 bg-indigo-100 text-indigo-700 dark:bg-indigo-200 dark:text-indigo-800",purple:"border-purple-500 bg-purple-100 text-purple-700 dark:bg-purple-200 dark:text-purple-800",teal:"border-teal-500 bg-teal-100 text-teal-700 dark:bg-teal-200 dark:text-teal-800",light:"border-gray-400 bg-gray-50 text-gray-600 dark:bg-gray-500 dark:text-gray-200"},icon:"mr-3 inline h-5 w-5 flex-shrink-0",rounded:"rounded-lg",wrapper:"flex items-center"},X1={root:{base:"flex items-center justify-center space-x-4 rounded",bordered:"p-1 ring-2",rounded:"rounded-full",color:{dark:"ring-gray-800 dark:ring-gray-800",failure:"ring-red-500 dark:ring-red-700",gray:"ring-gray-500 dark:ring-gray-400",info:"ring-cyan-400 dark:ring-cyan-800",light:"ring-gray-300 dark:ring-gray-500",purple:"ring-purple-500 dark:ring-purple-600",success:"ring-green-500 dark:ring-green-500",warning:"ring-yellow-300 dark:ring-yellow-500",pink:"ring-pink-500 dark:ring-pink-500"},img:{base:"rounded",off:"relative overflow-hidden bg-gray-100 dark:bg-gray-600",on:"",placeholder:"absolute -bottom-1 h-auto w-auto text-gray-400"},size:{xs:"h-6 w-6",sm:"h-8 w-8",md:"h-10 w-10",lg:"h-20 w-20",xl:"h-36 w-36"},stacked:"ring-2 ring-gray-300 dark:ring-gray-500",statusPosition:{"bottom-left":"-bottom-1 -left-1","bottom-center":"-bottom-1","bottom-right":"-bottom-1 -right-1","top-left":"-left-1 -top-1","top-center":"-top-1","top-right":"-right-1 -top-1","center-right":"-right-1",center:"","center-left":"-left-1"},status:{away:"bg-yellow-400",base:"absolute h-3.5 w-3.5 rounded-full border-2 border-white dark:border-gray-800",busy:"bg-red-400",offline:"bg-gray-400",online:"bg-green-400"},initials:{text:"font-medium text-gray-600 dark:text-gray-300",base:"relative inline-flex items-center justify-center overflow-hidden bg-gray-100 dark:bg-gray-600"}},group:{base:"flex -space-x-4"},groupCounter:{base:"relative flex h-10 w-10 items-center justify-center rounded-full bg-gray-700 text-xs font-medium text-white ring-2 ring-gray-300 hover:bg-gray-600 dark:ring-gray-500"}},Z1={root:{base:"flex h-fit items-center gap-1 font-semibold",color:{info:"bg-cyan-100 text-cyan-800 group-hover:bg-cyan-200 dark:bg-cyan-200 dark:text-cyan-800 dark:group-hover:bg-cyan-300",gray:"bg-gray-100 text-gray-800 group-hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:group-hover:bg-gray-600",failure:"bg-red-100 text-red-800 group-hover:bg-red-200 dark:bg-red-200 dark:text-red-900 dark:group-hover:bg-red-300",success:"bg-green-100 text-green-800 group-hover:bg-green-200 dark:bg-green-200 dark:text-green-900 dark:group-hover:bg-green-300",warning:"bg-yellow-100 text-yellow-800 group-hover:bg-yellow-200 dark:bg-yellow-200 dark:text-yellow-900 dark:group-hover:bg-yellow-300",indigo:"bg-indigo-100 text-indigo-800 group-hover:bg-indigo-200 dark:bg-indigo-200 dark:text-indigo-900 dark:group-hover:bg-indigo-300",purple:"bg-purple-100 text-purple-800 group-hover:bg-purple-200 dark:bg-purple-200 dark:text-purple-900 dark:group-hover:bg-purple-300",pink:"bg-pink-100 text-pink-800 group-hover:bg-pink-200 dark:bg-pink-200 dark:text-pink-900 dark:group-hover:bg-pink-300",blue:"bg-blue-100 text-blue-800 group-hover:bg-blue-200 dark:bg-blue-200 dark:text-blue-900 dark:group-hover:bg-blue-300",cyan:"bg-cyan-100 text-cyan-800 group-hover:bg-cyan-200 dark:bg-cyan-200 dark:text-cyan-900 dark:group-hover:bg-cyan-300",dark:"bg-gray-600 text-gray-100 group-hover:bg-gray-500 dark:bg-gray-900 dark:text-gray-200 dark:group-hover:bg-gray-700",light:"bg-gray-200 text-gray-800 group-hover:bg-gray-300 dark:bg-gray-400 dark:text-gray-900 dark:group-hover:bg-gray-500",green:"bg-green-100 text-green-800 group-hover:bg-green-200 dark:bg-green-200 dark:text-green-900 dark:group-hover:bg-green-300",lime:"bg-lime-100 text-lime-800 group-hover:bg-lime-200 dark:bg-lime-200 dark:text-lime-900 dark:group-hover:bg-lime-300",red:"bg-red-100 text-red-800 group-hover:bg-red-200 dark:bg-red-200 dark:text-red-900 dark:group-hover:bg-red-300",teal:"bg-teal-100 text-teal-800 group-hover:bg-teal-200 dark:bg-teal-200 dark:text-teal-900 dark:group-hover:bg-teal-300",yellow:"bg-yellow-100 text-yellow-800 group-hover:bg-yellow-200 dark:bg-yellow-200 dark:text-yellow-900 dark:group-hover:bg-yellow-300"},href:"group",size:{xs:"p-1 text-xs",sm:"p-1.5 text-sm"}},icon:{off:"rounded px-2 py-0.5",on:"rounded-full p-1.5",size:{xs:"h-3 w-3",sm:"h-3.5 w-3.5"}}},J1={root:{base:"text-xl font-semibold italic text-gray-900 dark:text-white"}},Q1={root:{base:"",list:"flex items-center"},item:{base:"group flex items-center",chevron:"mx-1 h-4 w-4 text-gray-400 group-first:hidden md:mx-2",href:{off:"flex items-center text-sm font-medium text-gray-500 dark:text-gray-400",on:"flex items-center text-sm font-medium text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white"},icon:"mr-2 h-4 w-4"}},ek={base:"group relative flex items-stretch justify-center p-0.5 text-center font-medium transition-[color,background-color,border-color,text-decoration-color,fill,stroke,box-shadow] focus:z-10 focus:outline-none",fullSized:"w-full",color:{dark:"border border-transparent bg-gray-800 text-white focus:ring-4 focus:ring-gray-300 enabled:hover:bg-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:focus:ring-gray-800 dark:enabled:hover:bg-gray-700",failure:"border border-transparent bg-red-700 text-white focus:ring-4 focus:ring-red-300 enabled:hover:bg-red-800 dark:bg-red-600 dark:focus:ring-red-900 dark:enabled:hover:bg-red-700",gray:":ring-cyan-700 border border-gray-200 bg-white text-gray-900 focus:text-cyan-700 focus:ring-4 enabled:hover:bg-gray-100 enabled:hover:text-cyan-700 dark:border-gray-600 dark:bg-transparent dark:text-gray-400 dark:enabled:hover:bg-gray-700 dark:enabled:hover:text-white",info:"border border-transparent bg-cyan-700 text-white focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-cyan-800 dark:bg-cyan-600 dark:focus:ring-cyan-800 dark:enabled:hover:bg-cyan-700",light:"border border-gray-300 bg-white text-gray-900 focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-600 dark:text-white dark:focus:ring-gray-700 dark:enabled:hover:border-gray-700 dark:enabled:hover:bg-gray-700",purple:"border border-transparent bg-purple-700 text-white focus:ring-4 focus:ring-purple-300 enabled:hover:bg-purple-800 dark:bg-purple-600 dark:focus:ring-purple-900 dark:enabled:hover:bg-purple-700",success:"border border-transparent bg-green-700 text-white focus:ring-4 focus:ring-green-300 enabled:hover:bg-green-800 dark:bg-green-600 dark:focus:ring-green-800 dark:enabled:hover:bg-green-700",warning:"border border-transparent bg-yellow-400 text-white focus:ring-4 focus:ring-yellow-300 enabled:hover:bg-yellow-500 dark:focus:ring-yellow-900",blue:"border border-transparent bg-blue-700 text-white focus:ring-4 focus:ring-blue-300 enabled:hover:bg-blue-800 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",cyan:"border border-cyan-300 bg-white text-cyan-900 focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-cyan-100 dark:border-cyan-600 dark:bg-cyan-600 dark:text-white dark:focus:ring-cyan-700 dark:enabled:hover:border-cyan-700 dark:enabled:hover:bg-cyan-700",green:"border border-green-300 bg-white text-green-900 focus:ring-4 focus:ring-green-300 enabled:hover:bg-green-100 dark:border-green-600 dark:bg-green-600 dark:text-white dark:focus:ring-green-700 dark:enabled:hover:border-green-700 dark:enabled:hover:bg-green-700",indigo:"border border-indigo-300 bg-white text-indigo-900 focus:ring-4 focus:ring-indigo-300 enabled:hover:bg-indigo-100 dark:border-indigo-600 dark:bg-indigo-600 dark:text-white dark:focus:ring-indigo-700 dark:enabled:hover:border-indigo-700 dark:enabled:hover:bg-indigo-700",lime:"border border-lime-300 bg-white text-lime-900 focus:ring-4 focus:ring-lime-300 enabled:hover:bg-lime-100 dark:border-lime-600 dark:bg-lime-600 dark:text-white dark:focus:ring-lime-700 dark:enabled:hover:border-lime-700 dark:enabled:hover:bg-lime-700",pink:"border border-pink-300 bg-white text-pink-900 focus:ring-4 focus:ring-pink-300 enabled:hover:bg-pink-100 dark:border-pink-600 dark:bg-pink-600 dark:text-white dark:focus:ring-pink-700 dark:enabled:hover:border-pink-700 dark:enabled:hover:bg-pink-700",red:"border border-red-300 bg-white text-red-900 focus:ring-4 focus:ring-red-300 enabled:hover:bg-red-100 dark:border-red-600 dark:bg-red-600 dark:text-white dark:focus:ring-red-700 dark:enabled:hover:border-red-700 dark:enabled:hover:bg-red-700",teal:"border border-teal-300 bg-white text-teal-900 focus:ring-4 focus:ring-teal-300 enabled:hover:bg-teal-100 dark:border-teal-600 dark:bg-teal-600 dark:text-white dark:focus:ring-teal-700 dark:enabled:hover:border-teal-700 dark:enabled:hover:bg-teal-700",yellow:"border border-yellow-300 bg-white text-yellow-900 focus:ring-4 focus:ring-yellow-300 enabled:hover:bg-yellow-100 dark:border-yellow-600 dark:bg-yellow-600 dark:text-white dark:focus:ring-yellow-700 dark:enabled:hover:border-yellow-700 dark:enabled:hover:bg-yellow-700"},disabled:"cursor-not-allowed opacity-50",isProcessing:"cursor-wait",spinnerSlot:"absolute top-0 flex h-full items-center",spinnerLeftPosition:{xs:"left-2",sm:"left-3",md:"left-4",lg:"left-5",xl:"left-6"},gradient:{cyan:"bg-gradient-to-r from-cyan-400 via-cyan-500 to-cyan-600 text-white focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-gradient-to-br dark:focus:ring-cyan-800",failure:"bg-gradient-to-r from-red-400 via-red-500 to-red-600 text-white focus:ring-4 focus:ring-red-300 enabled:hover:bg-gradient-to-br dark:focus:ring-red-800",info:"bg-gradient-to-r from-cyan-500 via-cyan-600 to-cyan-700 text-white focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-gradient-to-br dark:focus:ring-cyan-800 ",lime:"bg-gradient-to-r from-lime-200 via-lime-400 to-lime-500 text-gray-900 focus:ring-4 focus:ring-lime-300 enabled:hover:bg-gradient-to-br dark:focus:ring-lime-800",pink:"bg-gradient-to-r from-pink-400 via-pink-500 to-pink-600 text-white focus:ring-4 focus:ring-pink-300 enabled:hover:bg-gradient-to-br dark:focus:ring-pink-800",purple:"bg-gradient-to-r from-purple-500 via-purple-600 to-purple-700 text-white focus:ring-4 focus:ring-purple-300 enabled:hover:bg-gradient-to-br dark:focus:ring-purple-800",success:"bg-gradient-to-r from-green-400 via-green-500 to-green-600 text-white focus:ring-4 focus:ring-green-300 enabled:hover:bg-gradient-to-br dark:focus:ring-green-800",teal:"bg-gradient-to-r from-teal-400 via-teal-500 to-teal-600 text-white focus:ring-4 focus:ring-teal-300 enabled:hover:bg-gradient-to-br dark:focus:ring-teal-800"},gradientDuoTone:{cyanToBlue:"bg-gradient-to-r from-cyan-500 to-cyan-500 text-white focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-gradient-to-bl dark:focus:ring-cyan-800",greenToBlue:"bg-gradient-to-br from-green-400 to-cyan-600 text-white focus:ring-4 focus:ring-green-200 enabled:hover:bg-gradient-to-bl dark:focus:ring-green-800",pinkToOrange:"bg-gradient-to-br from-pink-500 to-orange-400 text-white focus:ring-4 focus:ring-pink-200 enabled:hover:bg-gradient-to-bl dark:focus:ring-pink-800",purpleToBlue:"bg-gradient-to-br from-purple-600 to-cyan-500 text-white focus:ring-4 focus:ring-cyan-300 enabled:hover:bg-gradient-to-bl dark:focus:ring-cyan-800",purpleToPink:"bg-gradient-to-r from-purple-500 to-pink-500 text-white focus:ring-4 focus:ring-purple-200 enabled:hover:bg-gradient-to-l dark:focus:ring-purple-800",redToYellow:"bg-gradient-to-r from-red-200 via-red-300 to-yellow-200 text-gray-900 focus:ring-4 focus:ring-red-100 enabled:hover:bg-gradient-to-bl dark:focus:ring-red-400",tealToLime:"bg-gradient-to-r from-teal-200 to-lime-200 text-gray-900 focus:ring-4 focus:ring-lime-200 enabled:hover:bg-gradient-to-l enabled:hover:from-teal-200 enabled:hover:to-lime-200 enabled:hover:text-gray-900 dark:focus:ring-teal-700"},inner:{base:"flex items-stretch transition-all duration-200",position:{none:"",start:"rounded-r-none",middle:"rounded-none",end:"rounded-l-none"},outline:"border border-transparent",isProcessingPadding:{xs:"pl-8",sm:"pl-10",md:"pl-12",lg:"pl-16",xl:"pl-20"}},label:"ml-2 inline-flex h-4 w-4 items-center justify-center rounded-full bg-cyan-200 text-xs font-semibold text-cyan-800",outline:{color:{gray:"border border-gray-900 dark:border-white",default:"border-0",light:""},off:"",on:"flex w-full justify-center bg-white text-gray-900 transition-all duration-75 ease-in group-enabled:group-hover:bg-opacity-0 group-enabled:group-hover:text-inherit dark:bg-gray-900 dark:text-white",pill:{off:"rounded-md",on:"rounded-full"}},pill:{off:"rounded-lg",on:"rounded-full"},size:{xs:"px-2 py-1 text-xs",sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-sm",lg:"px-5 py-2.5 text-base",xl:"px-6 py-3 text-base"}},tk={base:"inline-flex",position:{none:"",start:"rounded-r-none focus:ring-2",middle:"rounded-none border-l-0 pl-0 focus:ring-2",end:"rounded-l-none border-l-0 pl-0 focus:ring-2"}},rk={root:{base:"flex rounded-lg border border-gray-200 bg-white shadow-md dark:border-gray-700 dark:bg-gray-800",children:"flex h-full flex-col justify-center gap-4 p-6",horizontal:{off:"flex-col",on:"flex-col md:max-w-xl md:flex-row"},href:"hover:bg-gray-100 dark:hover:bg-gray-700"},img:{base:"",horizontal:{off:"rounded-t-lg",on:"h-96 w-full rounded-t-lg object-cover md:h-auto md:w-48 md:rounded-none md:rounded-l-lg"}}},nk={root:{base:"relative h-full w-full",leftControl:"absolute left-0 top-0 flex h-full items-center justify-center px-4 focus:outline-none",rightControl:"absolute right-0 top-0 flex h-full items-center justify-center px-4 focus:outline-none"},indicators:{active:{off:"bg-white/50 hover:bg-white dark:bg-gray-800/50 dark:hover:bg-gray-800",on:"bg-white dark:bg-gray-800"},base:"h-3 w-3 rounded-full",wrapper:"absolute bottom-5 left-1/2 flex -translate-x-1/2 space-x-3"},item:{base:"absolute left-1/2 top-1/2 block w-full -translate-x-1/2 -translate-y-1/2",wrapper:{off:"w-full flex-shrink-0 transform cursor-default snap-center",on:"w-full flex-shrink-0 transform cursor-grab snap-center"}},control:{base:"inline-flex h-8 w-8 items-center justify-center rounded-full bg-white/30 group-hover:bg-white/50 group-focus:outline-none group-focus:ring-4 group-focus:ring-white dark:bg-gray-800/30 dark:group-hover:bg-gray-800/60 dark:group-focus:ring-gray-800/70 sm:h-10 sm:w-10",icon:"h-5 w-5 text-white dark:text-gray-800 sm:h-6 sm:w-6"},scrollContainer:{base:"flex h-full snap-mandatory overflow-y-hidden overflow-x-scroll scroll-smooth rounded-lg",snap:"snap-x"}},ok={root:{base:"h-4 w-4 rounded border border-gray-300 bg-gray-100 focus:ring-2 dark:border-gray-600 dark:bg-gray-700",color:{default:"text-cyan-600 focus:ring-cyan-600 dark:ring-offset-gray-800 dark:focus:ring-cyan-600",dark:"text-gray-800 focus:ring-gray-800 dark:ring-offset-gray-800 dark:focus:ring-gray-800",failure:"text-red-900 focus:ring-red-900 dark:ring-offset-red-900 dark:focus:ring-red-900",gray:"text-gray-900 focus:ring-gray-900 dark:ring-offset-gray-900 dark:focus:ring-gray-900",info:"text-cyan-800 focus:ring-cyan-800 dark:ring-offset-gray-800 dark:focus:ring-cyan-800",light:"text-gray-900 focus:ring-gray-900 dark:ring-offset-gray-900 dark:focus:ring-gray-900",purple:"text-purple-600 focus:ring-purple-600 dark:ring-offset-purple-600 dark:focus:ring-purple-600",success:"text-green-800 focus:ring-green-800 dark:ring-offset-green-800 dark:focus:ring-green-800",warning:"text-yellow-400 focus:ring-yellow-400 dark:ring-offset-yellow-400 dark:focus:ring-yellow-400",blue:"text-blue-700 focus:ring-blue-600 dark:ring-offset-blue-700 dark:focus:ring-blue-700",cyan:"text-cyan-600 focus:ring-cyan-600 dark:ring-offset-cyan-600 dark:focus:ring-cyan-600",green:"text-green-600 focus:ring-green-600 dark:ring-offset-green-600 dark:focus:ring-green-600",indigo:"text-indigo-700 focus:ring-indigo-700 dark:ring-offset-indigo-700 dark:focus:ring-indigo-700",lime:"text-lime-700 focus:ring-lime-700 dark:ring-offset-lime-700 dark:focus:ring-lime-700",pink:"text-pink-600 focus:ring-pink-600 dark:ring-offset-pink-600 dark:focus:ring-pink-600",red:"text-red-600 focus:ring-red-600 dark:ring-offset-red-600 dark:focus:ring-red-600",teal:"text-teal-600 focus:ring-teal-600 dark:ring-offset-teal-600 dark:focus:ring-teal-600",yellow:"text-yellow-400 focus:ring-yellow-400 dark:ring-offset-yellow-400 dark:focus:ring-yellow-400"}}},ik={root:{base:"rounded-lg p-2.5 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-700",icon:"h-5 w-5"}},sk={root:{base:"relative"},popup:{root:{base:"absolute top-10 z-50 block pt-2",inline:"relative top-0 z-auto",inner:"inline-block rounded-lg bg-white p-4 shadow-lg dark:bg-gray-700"},header:{base:"",title:"px-2 py-3 text-center font-semibold text-gray-900 dark:text-white",selectors:{base:"mb-2 flex justify-between",button:{base:"rounded-lg bg-white px-5 py-2.5 text-sm font-semibold text-gray-900 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600",prev:"",next:"",view:""}}},view:{base:"p-1"},footer:{base:"mt-2 flex space-x-2",button:{base:"w-full rounded-lg px-5 py-2 text-center text-sm font-medium focus:ring-4 focus:ring-cyan-300",today:"bg-cyan-700 text-white hover:bg-cyan-800 dark:bg-cyan-600 dark:hover:bg-cyan-700",clear:"border border-gray-300 bg-white text-gray-900 hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600"}}},views:{days:{header:{base:"mb-1 grid grid-cols-7",title:"h-6 text-center text-sm font-medium leading-6 text-gray-500 dark:text-gray-400"},items:{base:"grid w-64 grid-cols-7",item:{base:"block flex-1 cursor-pointer rounded-lg border-0 text-center text-sm font-semibold leading-9 text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600 ",selected:"bg-cyan-700 text-white hover:bg-cyan-600",disabled:"text-gray-500"}}},months:{items:{base:"grid w-64 grid-cols-4",item:{base:"block flex-1 cursor-pointer rounded-lg border-0 text-center text-sm font-semibold leading-9 text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600",selected:"bg-cyan-700 text-white hover:bg-cyan-600",disabled:"text-gray-500"}}},years:{items:{base:"grid w-64 grid-cols-4",item:{base:"block flex-1 cursor-pointer rounded-lg border-0 text-center text-sm font-semibold leading-9 text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600",selected:"bg-cyan-700 text-white hover:bg-cyan-600",disabled:"text-gray-500"}}},decades:{items:{base:"grid w-64 grid-cols-4",item:{base:"block flex-1 cursor-pointer rounded-lg border-0 text-center text-sm font-semibold leading-9 text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-600",selected:"bg-cyan-700 text-white hover:bg-cyan-600",disabled:"text-gray-500"}}}}},ak={arrowIcon:"ml-2 h-4 w-4",content:"py-1 focus:outline-none",floating:{animation:"transition-opacity",arrow:{base:"absolute z-10 h-2 w-2 rotate-45",style:{dark:"bg-gray-900 dark:bg-gray-700",light:"bg-white",auto:"bg-white dark:bg-gray-700"},placement:"-4px"},base:"z-10 w-fit divide-y divide-gray-100 rounded shadow focus:outline-none",content:"py-1 text-sm text-gray-700 dark:text-gray-200",divider:"my-1 h-px bg-gray-100 dark:bg-gray-600",header:"block px-4 py-2 text-sm text-gray-700 dark:text-gray-200",hidden:"invisible opacity-0",item:{container:"",base:"flex w-full cursor-pointer items-center justify-start px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 focus:bg-gray-100 focus:outline-none dark:text-gray-200 dark:hover:bg-gray-600 dark:hover:text-white dark:focus:bg-gray-600 dark:focus:text-white",icon:"mr-2 h-4 w-4"},style:{dark:"bg-gray-900 text-white dark:bg-gray-700",light:"border border-gray-200 bg-white text-gray-900",auto:"border border-gray-200 bg-white text-gray-900 dark:border-none dark:bg-gray-700 dark:text-white"},target:"w-fit"},inlineWrapper:"flex items-center"},lk={root:{base:"flex"},field:{base:"relative w-full",input:{base:"block w-full overflow-hidden rounded-lg border disabled:cursor-not-allowed disabled:opacity-50",sizes:{sm:"sm:text-xs",md:"text-sm",lg:"sm:text-base"},colors:{gray:"border-gray-300 bg-gray-50 text-gray-900 focus:border-cyan-500 focus:ring-cyan-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",info:"border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 focus:border-cyan-500 focus:ring-cyan-500 dark:border-cyan-400 dark:bg-cyan-100 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",failure:"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:bg-red-100 dark:focus:border-red-500 dark:focus:ring-red-500",warning:"border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 focus:border-yellow-500 focus:ring-yellow-500 dark:border-yellow-400 dark:bg-yellow-100 dark:focus:border-yellow-500 dark:focus:ring-yellow-500",success:"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:bg-green-100 dark:focus:border-green-500 dark:focus:ring-green-500"}}}},ck={input:{default:{filled:{sm:"peer block w-full appearance-none rounded-t-lg border-0 border-b-2 border-gray-300 bg-gray-50 px-2.5 pb-2.5 pt-5 text-xs text-gray-900 focus:border-blue-600 focus:outline-none focus:ring-0 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:focus:border-blue-500",md:"peer block w-full appearance-none rounded-t-lg border-0 border-b-2 border-gray-300 bg-gray-50 px-2.5 pb-2.5 pt-5 text-sm text-gray-900 focus:border-blue-600 focus:outline-none focus:ring-0 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:focus:border-blue-500"},outlined:{sm:"peer block w-full appearance-none rounded-lg border border-gray-300 bg-transparent px-2.5 pb-2.5 pt-4 text-xs text-gray-900 focus:border-blue-600 focus:outline-none focus:ring-0 dark:border-gray-600 dark:text-white dark:focus:border-blue-500",md:"peer block w-full appearance-none rounded-lg border border-gray-300 bg-transparent px-2.5 pb-2.5 pt-4 text-sm text-gray-900 focus:border-blue-600 focus:outline-none focus:ring-0 dark:border-gray-600 dark:text-white dark:focus:border-blue-500"},standard:{sm:"peer block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-xs text-gray-900 focus:border-blue-600 focus:outline-none focus:ring-0 dark:border-gray-600 dark:text-white dark:focus:border-blue-500",md:"peer block w-full appearance-none border-0 border-b-2 border-gray-300 bg-transparent px-0 py-2.5 text-sm text-gray-900 focus:border-blue-600 focus:outline-none focus:ring-0 dark:border-gray-600 dark:text-white dark:focus:border-blue-500"}},success:{filled:{sm:"peer block w-full appearance-none rounded-t-lg border-0 border-b-2 border-green-600 bg-gray-50 px-2.5 pb-2.5 pt-5 text-xs text-gray-900 focus:border-green-600 focus:outline-none focus:ring-0 dark:border-green-500 dark:bg-gray-700 dark:text-white dark:focus:border-green-500",md:"peer block w-full appearance-none rounded-t-lg border-0 border-b-2 border-green-600 bg-gray-50 px-2.5 pb-2.5 pt-5 text-sm text-gray-900 focus:border-green-600 focus:outline-none focus:ring-0 dark:border-green-500 dark:bg-gray-700 dark:text-white dark:focus:border-green-500"},outlined:{sm:"peer block w-full appearance-none rounded-lg border border-green-600 bg-transparent px-2.5 pb-2.5 pt-4 text-xs text-gray-900 focus:border-green-600 focus:outline-none focus:ring-0 dark:border-green-500 dark:text-white dark:focus:border-green-500",md:"peer block w-full appearance-none rounded-lg border border-green-600 bg-transparent px-2.5 pb-2.5 pt-4 text-sm text-gray-900 focus:border-green-600 focus:outline-none focus:ring-0 dark:border-green-500 dark:text-white dark:focus:border-green-500"},standard:{sm:"peer block w-full appearance-none border-0 border-b-2 border-green-600 bg-transparent px-0 py-2.5 text-xs text-gray-900 focus:border-green-600 focus:outline-none focus:ring-0 dark:border-green-500 dark:text-white dark:focus:border-green-500",md:"peer block w-full appearance-none border-0 border-b-2 border-green-600 bg-transparent px-0 py-2.5 text-sm text-gray-900 focus:border-green-600 focus:outline-none focus:ring-0 dark:border-green-500 dark:text-white dark:focus:border-green-500"}},error:{filled:{sm:"peer block w-full appearance-none rounded-t-lg border-0 border-b-2 border-red-600 bg-gray-50 px-2.5 pb-2.5 pt-5 text-xs text-gray-900 focus:border-red-600 focus:outline-none focus:ring-0 dark:border-red-500 dark:bg-gray-700 dark:text-white dark:focus:border-red-500",md:"peer block w-full appearance-none rounded-t-lg border-0 border-b-2 border-red-600 bg-gray-50 px-2.5 pb-2.5 pt-5 text-sm text-gray-900 focus:border-red-600 focus:outline-none focus:ring-0 dark:border-red-500 dark:bg-gray-700 dark:text-white dark:focus:border-red-500"},outlined:{sm:"peer block w-full appearance-none rounded-lg border border-red-600 bg-transparent px-2.5 pb-2.5 pt-4 text-xs text-gray-900 focus:border-red-600 focus:outline-none focus:ring-0 dark:border-red-500 dark:text-white dark:focus:border-red-500",md:"peer block w-full appearance-none rounded-lg border border-red-600 bg-transparent px-2.5 pb-2.5 pt-4 text-sm text-gray-900 focus:border-red-600 focus:outline-none focus:ring-0 dark:border-red-500 dark:text-white dark:focus:border-red-500"},standard:{sm:"peer block w-full appearance-none border-0 border-b-2 border-red-600 bg-transparent px-0 py-2.5 text-xs text-gray-900 focus:border-red-600 focus:outline-none focus:ring-0 dark:border-red-500 dark:text-white dark:focus:border-red-500",md:"peer block w-full appearance-none border-0 border-b-2 border-red-600 bg-transparent px-0 py-2.5 text-sm text-gray-900 focus:border-red-600 focus:outline-none focus:ring-0 dark:border-red-500 dark:text-white dark:focus:border-red-500"}}},label:{default:{filled:{sm:"absolute left-2.5 top-4 z-10 origin-[0] -translate-y-4 scale-75 text-xs text-gray-500 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:text-blue-600 dark:text-gray-400 peer-focus:dark:text-blue-500",md:"absolute left-2.5 top-4 z-10 origin-[0] -translate-y-4 scale-75 text-sm text-gray-500 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:text-blue-600 dark:text-gray-400 peer-focus:dark:text-blue-500"},outlined:{sm:"absolute left-1 top-2 z-10 origin-[0] -translate-y-4 scale-75 bg-white px-2 text-xs text-gray-500 transition-transform duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 peer-focus:text-blue-600 dark:bg-gray-900 dark:text-gray-400 peer-focus:dark:text-blue-500",md:"absolute left-1 top-2 z-10 origin-[0] -translate-y-4 scale-75 bg-white px-2 text-sm text-gray-500 transition-transform duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 peer-focus:text-blue-600 dark:bg-gray-900 dark:text-gray-400 peer-focus:dark:text-blue-500"},standard:{sm:"absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 text-xs text-gray-500 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:text-blue-600 dark:text-gray-400 peer-focus:dark:text-blue-500",md:"absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 text-sm text-gray-500 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 peer-focus:text-blue-600 dark:text-gray-400 peer-focus:dark:text-blue-500"}},success:{filled:{sm:"absolute left-2.5 top-4 z-10 origin-[0] -translate-y-4 scale-75 text-sm text-green-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:-translate-y-4 peer-focus:scale-75 dark:text-green-500",md:"absolute left-2.5 top-4 z-10 origin-[0] -translate-y-4 scale-75 text-sm text-green-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:-translate-y-4 peer-focus:scale-75 dark:text-green-500"},outlined:{sm:"absolute left-1 top-2 z-10 origin-[0] -translate-y-4 scale-75 bg-white px-2 text-sm text-green-600 transition-transform duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 dark:bg-gray-900 dark:text-green-500",md:"absolute left-1 top-2 z-10 origin-[0] -translate-y-4 scale-75 bg-white px-2 text-sm text-green-600 transition-transform duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 dark:bg-gray-900 dark:text-green-500"},standard:{sm:"absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 text-xs text-green-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 dark:text-green-500",md:"absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 text-sm text-green-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 dark:text-green-500"}},error:{filled:{sm:"absolute left-2.5 top-4 z-10 origin-[0] -translate-y-4 scale-75 text-xs text-red-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:-translate-y-4 peer-focus:scale-75 dark:text-red-500",md:"absolute left-2.5 top-4 z-10 origin-[0] -translate-y-4 scale-75 text-xs text-red-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:-translate-y-4 peer-focus:scale-75 dark:text-red-500"},outlined:{sm:"absolute left-1 top-2 z-10 origin-[0] -translate-y-4 scale-75 bg-white px-2 text-xs text-red-600 transition-transform duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 dark:bg-gray-900 dark:text-red-500",md:"absolute left-1 top-2 z-10 origin-[0] -translate-y-4 scale-75 bg-white px-2 text-xs text-red-600 transition-transform duration-300 peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:scale-100 peer-focus:top-2 peer-focus:-translate-y-4 peer-focus:scale-75 peer-focus:px-2 dark:bg-gray-900 dark:text-red-500"},standard:{sm:"absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 text-xs text-red-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 dark:text-red-500",md:"absolute top-3 -z-10 origin-[0] -translate-y-6 scale-75 text-sm text-red-600 transition-transform duration-300 peer-placeholder-shown:translate-y-0 peer-placeholder-shown:scale-100 peer-focus:left-0 peer-focus:-translate-y-6 peer-focus:scale-75 dark:text-red-500"}}},helperText:{default:"mt-2 text-xs text-gray-600 dark:text-gray-400",success:"mt-2 text-xs text-green-600 dark:text-green-400",error:"mt-2 text-xs text-red-600 dark:text-red-400"}},dk={root:{base:"w-full rounded-lg bg-white shadow dark:bg-gray-800 md:flex md:items-center md:justify-between",container:"w-full p-6",bgDark:"bg-gray-800"},groupLink:{base:"flex flex-wrap text-sm text-gray-500 dark:text-white",link:{base:"me-4 last:mr-0 md:mr-6",href:"hover:underline"},col:"flex-col space-y-4"},icon:{base:"text-gray-500 dark:hover:text-white",size:"h-5 w-5"},title:{base:"mb-6 text-sm font-semibold uppercase text-gray-500 dark:text-white"},divider:{base:"my-6 w-full border-gray-200 dark:border-gray-700 sm:mx-auto lg:my-8"},copyright:{base:"text-sm text-gray-500 dark:text-gray-400 sm:text-center",href:"ml-1 hover:underline",span:"ml-1"},brand:{base:"mb-4 flex items-center sm:mb-0",img:"mr-3 h-8",span:"self-center whitespace-nowrap text-2xl font-semibold text-gray-800 dark:text-white"}},uk={root:{base:"mt-2 text-sm",colors:{gray:"text-gray-500 dark:text-gray-400",info:"text-cyan-700 dark:text-cyan-800",success:"text-green-600 dark:text-green-500",failure:"text-red-600 dark:text-red-500",warning:"text-yellow-500 dark:text-yellow-600"}}},fk={root:{base:"rounded-lg border border-gray-200 bg-gray-100 px-2 py-1.5 text-xs font-semibold text-gray-800 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-100",icon:"inline-block"}},hk={root:{base:"text-sm font-medium",disabled:"opacity-50",colors:{default:"text-gray-900 dark:text-white",info:"text-cyan-500 dark:text-cyan-600",failure:"text-red-700 dark:text-red-500",warning:"text-yellow-500 dark:text-yellow-600",success:"text-green-700 dark:text-green-500"}}},gk={root:{base:"list-inside space-y-1 text-gray-500 dark:text-gray-400",ordered:{off:"list-disc",on:"list-decimal"},horizontal:"flex list-none flex-wrap items-center justify-center space-x-4 space-y-0",unstyled:"list-none",nested:"mt-2 ps-5"},item:{withIcon:{off:"",on:"flex items-center"},icon:"me-2 h-3.5 w-3.5 flex-shrink-0"}},pk={root:{base:"list-none rounded-lg border border-gray-200 bg-white text-left text-sm font-medium text-gray-900 dark:border-gray-600 dark:bg-gray-700 dark:text-white"},item:{base:"[&>*]:first:rounded-t-lg [&>*]:last:rounded-b-lg [&>*]:last:border-b-0",link:{base:"flex w-full items-center border-b border-gray-200 px-4 py-2 dark:border-gray-600",active:{off:"hover:bg-gray-100 hover:text-cyan-700 focus:text-cyan-700 focus:outline-none focus:ring-2 focus:ring-cyan-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:text-white dark:focus:text-white dark:focus:ring-gray-500",on:"bg-cyan-700 text-white dark:bg-gray-800"},disabled:{off:"",on:"cursor-not-allowed bg-gray-100 text-gray-900 hover:bg-gray-100 hover:text-gray-900 focus:text-gray-900"},href:{off:"",on:""},icon:"mr-2 h-4 w-4 fill-current"}}},mk={root:{base:"fixed inset-x-0 top-0 z-50 h-screen overflow-y-auto overflow-x-hidden md:inset-0 md:h-full",show:{on:"flex bg-gray-900 bg-opacity-50 dark:bg-opacity-80",off:"hidden"},sizes:{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl"},positions:{"top-left":"items-start justify-start","top-center":"items-start justify-center","top-right":"items-start justify-end","center-left":"items-center justify-start",center:"items-center justify-center","center-right":"items-center justify-end","bottom-right":"items-end justify-end","bottom-center":"items-end justify-center","bottom-left":"items-end justify-start"}},content:{base:"relative h-full w-full p-4 md:h-auto",inner:"relative flex max-h-[90dvh] flex-col rounded-lg bg-white shadow dark:bg-gray-700"},body:{base:"flex-1 overflow-auto p-6",popup:"pt-0"},header:{base:"flex items-start justify-between rounded-t border-b p-5 dark:border-gray-600",popup:"border-b-0 p-2",title:"text-xl font-medium text-gray-900 dark:text-white",close:{base:"ml-auto inline-flex items-center rounded-lg bg-transparent p-1.5 text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white",icon:"h-5 w-5"}},footer:{base:"flex items-center space-x-2 rounded-b border-gray-200 p-6 dark:border-gray-600",popup:"border-t"}},bk={root:{base:"bg-white px-2 py-2.5 dark:border-gray-700 dark:bg-gray-800 sm:px-4",rounded:{on:"rounded",off:""},bordered:{on:"border",off:""},inner:{base:"mx-auto flex flex-wrap items-center justify-between",fluid:{on:"",off:"container"}}},brand:{base:"flex items-center"},collapse:{base:"w-full md:block md:w-auto",list:"mt-4 flex flex-col md:mt-0 md:flex-row md:space-x-8 md:text-sm md:font-medium",hidden:{on:"hidden",off:""}},link:{base:"block py-2 pl-3 pr-4 md:p-0",active:{on:"bg-cyan-700 text-white dark:text-white md:bg-transparent md:text-cyan-700",off:"border-b border-gray-100 text-gray-700 hover:bg-gray-50 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white md:border-0 md:hover:bg-transparent md:hover:text-cyan-700 md:dark:hover:bg-transparent md:dark:hover:text-white"},disabled:{on:"text-gray-400 hover:cursor-not-allowed dark:text-gray-600",off:""}},toggle:{base:"inline-flex items-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600 md:hidden",icon:"h-6 w-6 shrink-0"}},yk={base:"",layout:{table:{base:"text-sm text-gray-700 dark:text-gray-400",span:"font-semibold text-gray-900 dark:text-white"}},pages:{base:"xs:mt-0 mt-2 inline-flex items-center -space-x-px",showIcon:"inline-flex",previous:{base:"ml-0 rounded-l-lg border border-gray-300 bg-white px-3 py-2 leading-tight text-gray-500 enabled:hover:bg-gray-100 enabled:hover:text-gray-700 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 enabled:dark:hover:bg-gray-700 enabled:dark:hover:text-white",icon:"h-5 w-5"},next:{base:"rounded-r-lg border border-gray-300 bg-white px-3 py-2 leading-tight text-gray-500 enabled:hover:bg-gray-100 enabled:hover:text-gray-700 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 enabled:dark:hover:bg-gray-700 enabled:dark:hover:text-white",icon:"h-5 w-5"},selector:{base:"w-12 border border-gray-300 bg-white py-2 leading-tight text-gray-500 enabled:hover:bg-gray-100 enabled:hover:text-gray-700 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 enabled:dark:hover:bg-gray-700 enabled:dark:hover:text-white",active:"bg-cyan-50 text-cyan-600 hover:bg-cyan-100 hover:text-cyan-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white",disabled:"cursor-not-allowed opacity-50"}}},vk={base:"absolute z-20 inline-block w-max max-w-[100vw] bg-white outline-none border border-gray-200 rounded-lg shadow-sm dark:border-gray-600 dark:bg-gray-800",content:"z-10 overflow-hidden rounded-[7px]",arrow:{base:"absolute h-2 w-2 z-0 rotate-45 mix-blend-lighten bg-white border border-gray-200 dark:border-gray-600 dark:bg-gray-800 dark:mix-blend-color",placement:"-4px"}},xk={base:"w-full overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700",label:"mb-1 flex justify-between font-medium dark:text-white",bar:"space-x-2 rounded-full text-center font-medium leading-none text-cyan-300 dark:text-cyan-100",color:{dark:"bg-gray-600 dark:bg-gray-300",blue:"bg-blue-600",red:"bg-red-600 dark:bg-red-500",green:"bg-green-600 dark:bg-green-500",yellow:"bg-yellow-400",indigo:"bg-indigo-600 dark:bg-indigo-500",purple:"bg-purple-600 dark:bg-purple-500",cyan:"bg-cyan-600",gray:"bg-gray-500",lime:"bg-lime-600",pink:"bg-pink-500",teal:"bg-teal-600"},size:{sm:"h-1.5",md:"h-2.5",lg:"h-4",xl:"h-6"}},wk={root:{base:"h-4 w-4 border border-gray-300 text-cyan-600 focus:ring-2 focus:ring-cyan-500 dark:border-gray-600 dark:bg-gray-700 dark:focus:bg-cyan-600 dark:focus:ring-cyan-600"}},kk={root:{base:"flex"},field:{base:"relative w-full",input:{base:"w-full cursor-pointer appearance-none rounded-lg bg-gray-200 dark:bg-gray-700",sizes:{sm:"h-1",md:"h-2",lg:"h-3"}}}},Ck={root:{base:"flex items-center"},star:{empty:"text-gray-300 dark:text-gray-500",filled:"text-yellow-400",sizes:{sm:"h-5 w-5",md:"h-7 w-7",lg:"h-10 w-10"}}},_k={base:"flex items-center",label:"text-sm font-medium text-cyan-600 dark:text-cyan-500",progress:{base:"mx-4 h-5 w-2/4 rounded bg-gray-200 dark:bg-gray-700",fill:"h-5 rounded bg-yellow-400",label:"text-sm font-medium text-cyan-600 dark:text-cyan-500"}},Sk={base:"flex",addon:"inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-200 px-3 text-sm text-gray-900 dark:border-gray-600 dark:bg-gray-600 dark:text-gray-400",field:{base:"relative w-full",icon:{base:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",svg:"h-5 w-5 text-gray-500 dark:text-gray-400"},select:{base:"block w-full border disabled:cursor-not-allowed disabled:opacity-50",withIcon:{on:"pl-10",off:""},withAddon:{on:"rounded-r-lg",off:"rounded-lg"},withShadow:{on:"shadow-sm dark:shadow-sm-light",off:""},sizes:{sm:"p-2 sm:text-xs",md:"p-2.5 text-sm",lg:"p-4 sm:text-base"},colors:{gray:"border-gray-300 bg-gray-50 text-gray-900 focus:border-cyan-500 focus:ring-cyan-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",info:"border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 focus:border-cyan-500 focus:ring-cyan-500 dark:border-cyan-400 dark:bg-cyan-100 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",failure:"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:bg-red-100 dark:focus:border-red-500 dark:focus:ring-red-500",warning:"border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 focus:border-yellow-500 focus:ring-yellow-500 dark:border-yellow-400 dark:bg-yellow-100 dark:focus:border-yellow-500 dark:focus:ring-yellow-500",success:"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:bg-green-100 dark:focus:border-green-500 dark:focus:ring-green-500"}}}},Ek={root:{base:"h-full",collapsed:{on:"w-16",off:"w-64"},inner:"h-full overflow-y-auto overflow-x-hidden rounded bg-gray-50 px-3 py-4 dark:bg-gray-800"},collapse:{button:"group flex w-full items-center rounded-lg p-2 text-base font-normal text-gray-900 transition duration-75 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700",icon:{base:"h-6 w-6 text-gray-500 transition duration-75 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-white",open:{off:"",on:"text-gray-900"}},label:{base:"ml-3 flex-1 whitespace-nowrap text-left",icon:{base:"h-6 w-6 transition delay-0 ease-in-out",open:{on:"rotate-180",off:""}}},list:"space-y-2 py-2"},cta:{base:"mt-6 rounded-lg bg-gray-100 p-4 dark:bg-gray-700",color:{blue:"bg-cyan-50 dark:bg-cyan-900",dark:"bg-dark-50 dark:bg-dark-900",failure:"bg-red-50 dark:bg-red-900",gray:"bg-alternative-50 dark:bg-alternative-900",green:"bg-green-50 dark:bg-green-900",light:"bg-light-50 dark:bg-light-900",red:"bg-red-50 dark:bg-red-900",purple:"bg-purple-50 dark:bg-purple-900",success:"bg-green-50 dark:bg-green-900",yellow:"bg-yellow-50 dark:bg-yellow-900",warning:"bg-yellow-50 dark:bg-yellow-900"}},item:{base:"flex items-center justify-center rounded-lg p-2 text-base font-normal text-gray-900 hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700",active:"bg-gray-100 dark:bg-gray-700",collapsed:{insideCollapse:"group w-full pl-8 transition duration-75",noIcon:"font-bold"},content:{base:"flex-1 whitespace-nowrap px-3"},icon:{base:"h-6 w-6 flex-shrink-0 text-gray-500 transition duration-75 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-white",active:"text-gray-700 dark:text-gray-100"},label:"",listItem:""},items:{base:""},itemGroup:{base:"mt-4 space-y-2 border-t border-gray-200 pt-4 first:mt-0 first:border-t-0 first:pt-0 dark:border-gray-700"},logo:{base:"mb-5 flex items-center pl-2.5",collapsed:{on:"hidden",off:"self-center whitespace-nowrap text-xl font-semibold dark:text-white"},img:"mr-3 h-6 sm:h-7"}},Ok={base:"inline animate-spin text-gray-200",color:{failure:"fill-red-600",gray:"fill-gray-600",info:"fill-cyan-600",pink:"fill-pink-600",purple:"fill-purple-600",success:"fill-green-500",warning:"fill-yellow-400"},light:{off:{base:"dark:text-gray-600",color:{failure:"",gray:"dark:fill-gray-300",info:"",pink:"",purple:"",success:"",warning:""}},on:{base:"",color:{failure:"",gray:"",info:"",pink:"",purple:"",success:"",warning:""}}},size:{xs:"h-3 w-3",sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8",xl:"h-10 w-10"}},Tk={root:{base:"w-full text-left text-sm text-gray-500 dark:text-gray-400",shadow:"absolute left-0 top-0 -z-10 h-full w-full rounded-lg bg-white drop-shadow-md dark:bg-black",wrapper:"relative"},body:{base:"group/body",cell:{base:"px-6 py-4 group-first/body:group-first/row:first:rounded-tl-lg group-first/body:group-first/row:last:rounded-tr-lg group-last/body:group-last/row:first:rounded-bl-lg group-last/body:group-last/row:last:rounded-br-lg"}},head:{base:"group/head text-xs uppercase text-gray-700 dark:text-gray-400",cell:{base:"bg-gray-50 px-6 py-3 group-first/head:first:rounded-tl-lg group-first/head:last:rounded-tr-lg dark:bg-gray-700"}},row:{base:"group/row",hovered:"hover:bg-gray-50 dark:hover:bg-gray-600",striped:"odd:bg-white even:bg-gray-50 odd:dark:bg-gray-800 even:dark:bg-gray-700"}},Nk={base:"flex flex-col gap-2",tablist:{base:"flex text-center",styles:{default:"flex-wrap border-b border-gray-200 dark:border-gray-700",underline:"-mb-px flex-wrap border-b border-gray-200 dark:border-gray-700",pills:"flex-wrap space-x-2 text-sm font-medium text-gray-500 dark:text-gray-400",fullWidth:"grid w-full grid-flow-col divide-x divide-gray-200 rounded-none text-sm font-medium shadow dark:divide-gray-700 dark:text-gray-400"},tabitem:{base:"flex items-center justify-center rounded-t-lg p-4 text-sm font-medium first:ml-0 focus:outline-none focus:ring-4 focus:ring-cyan-300 disabled:cursor-not-allowed disabled:text-gray-400 disabled:dark:text-gray-500",styles:{default:{base:"rounded-t-lg",active:{on:"bg-gray-100 text-cyan-600 dark:bg-gray-800 dark:text-cyan-500",off:"text-gray-500 hover:bg-gray-50 hover:text-gray-600 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300"}},underline:{base:"rounded-t-lg",active:{on:"active rounded-t-lg border-b-2 border-cyan-600 text-cyan-600 dark:border-cyan-500 dark:text-cyan-500",off:"border-b-2 border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300"}},pills:{base:"",active:{on:"rounded-lg bg-cyan-600 text-white",off:"rounded-lg hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-white"}},fullWidth:{base:"ml-0 flex w-full rounded-none first:ml-0",active:{on:"active rounded-none bg-gray-100 p-4 text-gray-900 dark:bg-gray-700 dark:text-white",off:"rounded-none bg-white hover:bg-gray-50 hover:text-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700 dark:hover:text-white"}}},icon:"mr-2 h-5 w-5"}},tabitemcontainer:{base:"",styles:{default:"",underline:"",pills:"",fullWidth:""}},tabpanel:"py-3"},Mk={base:"block w-full rounded-lg border text-sm disabled:cursor-not-allowed disabled:opacity-50",colors:{gray:"border-gray-300 bg-gray-50 text-gray-900 focus:border-cyan-500 focus:ring-cyan-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",info:"border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 focus:border-cyan-500 focus:ring-cyan-500 dark:border-cyan-400 dark:bg-cyan-100 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",failure:"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:bg-red-100 dark:focus:border-red-500 dark:focus:ring-red-500",warning:"border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 focus:border-yellow-500 focus:ring-yellow-500 dark:border-yellow-400 dark:bg-yellow-100 dark:focus:border-yellow-500 dark:focus:ring-yellow-500",success:"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:bg-green-100 dark:focus:border-green-500 dark:focus:ring-green-500"},withShadow:{on:"shadow-sm dark:shadow-sm-light",off:""}},Pk={base:"flex",addon:"inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-200 px-3 text-sm text-gray-900 dark:border-gray-600 dark:bg-gray-600 dark:text-gray-400",field:{base:"relative w-full",icon:{base:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",svg:"h-5 w-5 text-gray-500 dark:text-gray-400"},rightIcon:{base:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",svg:"h-5 w-5 text-gray-500 dark:text-gray-400"},input:{base:"block w-full border disabled:cursor-not-allowed disabled:opacity-50",sizes:{sm:"p-2 sm:text-xs",md:"p-2.5 text-sm",lg:"p-4 sm:text-base"},colors:{gray:"border-gray-300 bg-gray-50 text-gray-900 focus:border-cyan-500 focus:ring-cyan-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",info:"border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 focus:border-cyan-500 focus:ring-cyan-500 dark:border-cyan-400 dark:bg-cyan-100 dark:focus:border-cyan-500 dark:focus:ring-cyan-500",failure:"border-red-500 bg-red-50 text-red-900 placeholder-red-700 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:bg-red-100 dark:focus:border-red-500 dark:focus:ring-red-500",warning:"border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 focus:border-yellow-500 focus:ring-yellow-500 dark:border-yellow-400 dark:bg-yellow-100 dark:focus:border-yellow-500 dark:focus:ring-yellow-500",success:"border-green-500 bg-green-50 text-green-900 placeholder-green-700 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:bg-green-100 dark:focus:border-green-500 dark:focus:ring-green-500"},withRightIcon:{on:"pr-10",off:""},withIcon:{on:"pl-10",off:""},withAddon:{on:"rounded-r-lg",off:"rounded-lg"},withShadow:{on:"shadow-sm dark:shadow-sm-light",off:""}}}},Ak={root:{direction:{horizontal:"sm:flex",vertical:"relative border-l border-gray-200 dark:border-gray-700"}},item:{root:{horizontal:"relative mb-6 sm:mb-0",vertical:"mb-10 ml-6"},content:{root:{base:"mt-3 sm:pr-8"},body:{base:"mb-4 text-base font-normal text-gray-500 dark:text-gray-400"},time:{base:"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500"},title:{base:"text-lg font-semibold text-gray-900 dark:text-white"}},point:{horizontal:"flex items-center",line:"hidden h-0.5 w-full bg-gray-200 dark:bg-gray-700 sm:flex",marker:{base:{horizontal:"absolute -left-1.5 h-3 w-3 rounded-full border border-white bg-gray-200 dark:border-gray-900 dark:bg-gray-700",vertical:"absolute -left-1.5 mt-1.5 h-3 w-3 rounded-full border border-white bg-gray-200 dark:border-gray-900 dark:bg-gray-700"},icon:{base:"h-3 w-3 text-cyan-600 dark:text-cyan-300",wrapper:"absolute -left-3 flex h-6 w-6 items-center justify-center rounded-full bg-cyan-200 ring-8 ring-white dark:bg-cyan-900 dark:ring-gray-900"}},vertical:""}}},Dk={root:{base:"flex w-full max-w-xs items-center rounded-lg bg-white p-4 text-gray-500 shadow dark:bg-gray-800 dark:text-gray-400",closed:"opacity-0 ease-out"},toggle:{base:"-m-1.5 ml-auto inline-flex h-8 w-8 rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white",icon:"h-5 w-5 shrink-0"}},Ik={root:{base:"group relative flex items-center rounded-lg focus:outline-none",active:{on:"cursor-pointer",off:"cursor-not-allowed opacity-50"},label:"ml-3 text-sm font-medium text-gray-900 dark:text-gray-300"},toggle:{base:"rounded-full border group-focus:ring-4 group-focus:ring-cyan-500/25",checked:{on:"after:translate-x-full after:border-white",off:"border-gray-200 bg-gray-200 dark:border-gray-600 dark:bg-gray-700",color:{blue:"border-cyan-700 bg-cyan-700",dark:"bg-dark-700 border-dark-900",failure:"border-red-900 bg-red-700",gray:"border-gray-600 bg-gray-500",green:"border-green-700 bg-green-600",light:"bg-light-700 border-light-900",red:"border-red-900 bg-red-700",purple:"border-purple-900 bg-purple-700",success:"border-green-500 bg-green-500",yellow:"border-yellow-400 bg-yellow-400",warning:"border-yellow-600 bg-yellow-600",cyan:"border-cyan-500 bg-cyan-500",lime:"border-lime-400 bg-lime-400",indigo:"border-indigo-400 bg-indigo-400",teal:"bg-gradient-to-r from-teal-400 via-teal-500 to-teal-600 hover:bg-gradient-to-br focus:ring-4",info:"border-cyan-600 bg-cyan-600",pink:"border-pink-600 bg-pink-600"}},sizes:{sm:"h-5 w-9 after:absolute after:left-[2px] after:top-[2px] after:h-4 after:w-4",md:"h-6 w-11 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5",lg:"h-7 w-14 after:absolute after:left-[4px] after:top-0.5 after:h-6 after:w-6"}}},Lk={target:"w-fit",animation:"transition-opacity",arrow:{base:"absolute z-10 h-2 w-2 rotate-45",style:{dark:"bg-gray-900 dark:bg-gray-700",light:"bg-white",auto:"bg-white dark:bg-gray-700"},placement:"-4px"},base:"absolute z-10 inline-block rounded-lg px-3 py-2 text-sm font-medium shadow-sm",hidden:"invisible opacity-0",style:{dark:"bg-gray-900 text-white dark:bg-gray-700",light:"border border-gray-200 bg-white text-gray-900",auto:"border border-gray-200 bg-white text-gray-900 dark:border-none dark:bg-gray-700 dark:text-white"},content:"relative z-20"},Fk={theme:Hn({accordion:K1,alert:G1,avatar:X1,badge:Z1,blockquote:J1,breadcrumb:Q1,button:ek,buttonGroup:tk,card:rk,carousel:nk,checkbox:ok,datepicker:sk,darkThemeToggle:ik,dropdown:ak,fileInput:lk,floatingLabel:ck,footer:dk,helperText:uk,kbd:fk,label:hk,listGroup:pk,list:gk,modal:mk,navbar:bk,pagination:yk,popover:vk,progress:xk,radio:wk,rangeSlider:kk,rating:Ck,ratingAdvanced:_k,select:Sk,textInput:Pk,textarea:Mk,toggleSwitch:Ik,sidebar:Ek,spinner:Ok,table:Tk,tabs:Nk,timeline:Ak,toast:Dk,tooltip:Lk})};function K(){return Hn(Fk.theme)}const qu=k.createContext(void 0);function Ku(){const t=k.useContext(qu);if(!t)throw new Error("useAccordionContext should be used within the AccordionPanelContext provider!");return t}const Gu=({children:t,className:e,theme:r={},...n})=>{const{isOpen:o}=Ku(),i=W(K().accordion.content,r);return g.jsx("div",{className:F(i.base,e),"data-testid":"flowbite-accordion-content",hidden:!o,...n,children:t})},Xu=({children:t,...e})=>{const{alwaysOpen:r}=e,[n,o]=k.useState(e.isOpen),i=r?{...e,isOpen:n,setOpen:()=>o(!n)}:e;return g.jsx(qu.Provider,{value:i,children:t})},Zu=({as:t="h2",children:e,className:r,theme:n={},...o})=>{const{arrowIcon:i,flush:s,isOpen:a,setOpen:l}=Ku(),c=()=>typeof l<"u"&&l(),d=W(K().accordion.title,n);return g.jsxs("button",{className:F(d.base,d.flush[s?"on":"off"],d.open[a?"on":"off"],r),onClick:c,type:"button",...o,children:[g.jsx(t,{className:d.heading,"data-testid":"flowbite-accordion-heading",children:e}),i&&g.jsx(i,{"aria-hidden":!0,className:F(d.arrow.base,d.arrow.open[a?"on":"off"]),"data-testid":"flowbite-accordion-arrow"})]})},Ju=({alwaysOpen:t=!1,arrowIcon:e=zu,children:r,flush:n=!1,collapseAll:o=!1,className:i,theme:s={},...a})=>{const[l,c]=k.useState(o?-1:0),d=k.useMemo(()=>k.Children.map(r,(f,h)=>k.cloneElement(f,{alwaysOpen:t,arrowIcon:e,flush:n,isOpen:l===h,setOpen:()=>c(l===h?-1:h)})),[t,e,r,n,l]),u=W(K().accordion.root,s);return g.jsx("div",{className:F(u.base,u.flush[n?"on":"off"],i),"data-testid":"flowbite-accordion",...a,children:d})};Ju.displayName="Accordion",Xu.displayName="Accordion.Panel",Zu.displayName="Accordion.Title",Gu.displayName="Accordion.Content",Object.assign(Ju,{Panel:Xu,Title:Zu,Content:Gu});const Qu=({children:t,className:e,theme:r={},...n})=>{const o=W(K().avatar.group,r);return g.jsx("div",{"data-testid":"avatar-group-element",className:F(o.base,e),...n,children:t})};Qu.displayName="Avatar.Group";const ef=({className:t,href:e,theme:r={},total:n,...o})=>{const i=W(K().avatar.groupCounter,r);return g.jsxs("a",{href:e,className:F(i.base,t),...o,children:["+",n]})};ef.displayName="Avatar.GroupCounter";const tf=({alt:t="",bordered:e=!1,children:r,className:n,color:o="light",img:i,placeholderInitials:s="",rounded:a=!1,size:l="md",stacked:c=!1,status:d,statusPosition:u="top-left",theme:f={},...h})=>{const p=W(K().avatar,f),m=F(p.root.img.base,e&&p.root.bordered,e&&p.root.color[o],a&&p.root.rounded,c&&p.root.stacked,p.root.img.on,p.root.size[l]),b={className:F(m,p.root.img.on),"data-testid":"flowbite-avatar-img"};return g.jsxs("div",{className:F(p.root.base,n),"data-testid":"flowbite-avatar",...h,children:[g.jsxs("div",{className:"relative",children:[i?typeof i=="string"?g.jsx("img",{alt:t,src:i,...b}):i({alt:t,...b}):s?g.jsx("div",{className:F(p.root.img.off,p.root.initials.base,c&&p.root.stacked,e&&p.root.bordered,e&&p.root.color[o],p.root.size[l],a&&p.root.rounded),"data-testid":"flowbite-avatar-initials-placeholder",children:g.jsx("span",{className:F(p.root.initials.text),"data-testid":"flowbite-avatar-initials-placeholder-text",children:s})}):g.jsx("div",{className:F(m,p.root.img.off),"data-testid":"flowbite-avatar-img",children:g.jsx("svg",{className:p.root.img.placeholder,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})})}),d&&g.jsx("span",{"data-testid":"flowbite-avatar-status",className:F(p.root.status.base,p.root.status[d],p.root.statusPosition[u])})]}),r&&g.jsx("div",{children:r})]})};tf.displayName="Avatar",Object.assign(tf,{Group:Qu,Counter:ef});const rf=({children:t,color:e="info",href:r,icon:n,size:o="xs",className:i,theme:s={},...a})=>{const l=W(K().badge,s),c=()=>g.jsxs("span",{className:F(l.root.base,l.root.color[e],l.root.size[o],l.icon[n?"on":"off"],i),"data-testid":"flowbite-badge",...a,children:[n&&g.jsx(n,{"aria-hidden":!0,className:l.icon.size[o],"data-testid":"flowbite-badge-icon"}),t&&g.jsx("span",{children:t})]});return r?g.jsx("a",{className:l.root.href,href:r,children:g.jsx(c,{})}):g.jsx(c,{})};rf.displayName="Badge";const nf=({className:t,color:e="info",light:r,size:n="md",theme:o={},...i})=>{const s=W(K().spinner,o);return g.jsx("span",{role:"status",...i,children:g.jsxs("svg",{fill:"none",viewBox:"0 0 100 101",className:F(s.base,s.color[e],s.light[r?"on":"off"].base,s.light[r?"on":"off"].color[e],s.size[n],t),children:[g.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),g.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})};nf.displayName="Spinner";const Js=k.forwardRef(({children:t,as:e,href:r,type:n="button",...o},i)=>{const s=e||(r?"a":"button");return k.createElement(s,{ref:i,href:r,type:n,...o},t)});Js.displayName="ButtonBaseComponent";const of=(t,e,r)=>k.Children.map(t,(n,o)=>k.isValidElement(n)?n.props.children?k.cloneElement(n,{...n.props,children:of(n.props.children,e,r),positionInGroup:sf(o,k.Children.count(t))}):k.cloneElement(n,{outline:e,pill:r,positionInGroup:sf(o,k.Children.count(t))}):n),sf=(t,e)=>t===0?"start":t===e-1?"end":"middle",af=({children:t,className:e,outline:r,pill:n,theme:o={},...i})=>{const s=k.useMemo(()=>of(t,r,n),[t,r,n]),a=W(K().buttonGroup,o);return g.jsx("div",{className:F(a.base,e),role:"group",...i,children:s})};af.displayName="Button.Group";const lf=k.forwardRef(({children:t,className:e,color:r="info",disabled:n,fullSized:o,isProcessing:i=!1,processingLabel:s="Loading...",processingSpinner:a,gradientDuoTone:l,gradientMonochrome:c,label:d,outline:u=!1,pill:f=!1,positionInGroup:h="none",size:p="md",theme:m={},...b},v)=>{const{buttonGroup:y,button:_}=K(),x=W(_,m),w=b;return g.jsx(Js,{ref:v,disabled:n,className:F(x.base,n&&x.disabled,!l&&!c&&x.color[r],l&&!c&&x.gradientDuoTone[l],!l&&c&&x.gradient[c],u&&(x.outline.color[r]??x.outline.color.default),x.pill[f?"on":"off"],o&&x.fullSized,y.position[h],e),...w,children:g.jsx("span",{className:F(x.inner.base,x.outline[u?"on":"off"],x.outline.pill[u&&f?"on":"off"],x.size[p],u&&!x.outline.color[r]&&x.inner.outline,i&&x.isProcessing,i&&x.inner.isProcessingPadding[p],x.inner.position[h]),children:g.jsxs(g.Fragment,{children:[i&&g.jsx("span",{className:F(x.spinnerSlot,x.spinnerLeftPosition[p]),children:a||g.jsx(nf,{size:p})}),typeof t<"u"?t:g.jsx("span",{"data-testid":"flowbite-button-label",className:F(x.label),children:i?s:d})]})})})});lf.displayName="Button";const cf=Object.assign(lf,{Group:af}),df=({children:t,...e})=>{const r=n=>{const i=n.target.closest('[role="banner"]');i==null||i.remove()};return g.jsx(cf,{onClick:r,...e,children:t})};df.displayName="Banner.CollapseButton";const uf=({children:t,...e})=>g.jsx("div",{"data-testid":"flowbite-banner",role:"banner",tabIndex:-1,...e,children:t});uf.displayName="Banner",Object.assign(uf,{CollapseButton:df});const ff=k.forwardRef(({children:t,className:e,href:r,icon:n,theme:o={},...i},s)=>{const a=typeof r<"u",l=a?"a":"span",c=W(K().breadcrumb.item,o);return g.jsxs("li",{className:F(c.base,e),...i,children:[g.jsx($u,{"aria-hidden":!0,className:c.chevron,"data-testid":"flowbite-breadcrumb-separator"}),g.jsxs(l,{ref:s,className:c.href[a?"on":"off"],"data-testid":"flowbite-breadcrumb-item",href:r,children:[n&&g.jsx(n,{"aria-hidden":!0,className:c.icon}),t]})]})});ff.displayName="Breadcrumb.Item";const hf=({children:t,className:e,theme:r={},...n})=>{const o=W(K().breadcrumb.root,r);return g.jsx("nav",{"aria-label":"Breadcrumb",className:F(o.base,e),...n,children:g.jsx("ol",{className:o.list,children:t})})};hf.displayName="Breadcrumb",Object.assign(hf,{Item:ff});var gf={exports:{}};/*!
|
|
492
492
|
Copyright (c) 2018 Jed Watson.
|
|
493
493
|
Licensed under the MIT License (MIT), see
|
|
494
494
|
http://jedwatson.github.io/classnames
|
|
495
|
-
*/(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var i="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(i=o(i,n(a)))}return i}function n(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var s="";for(var a in i)e.call(i,a)&&i[a]&&(s=o(s,a));return s}function o(i,s){return s?i?i+" "+s:i+s:i}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(hf);var Dk=hf.exports;const Ik=pu(Dk);var Xs={exports:{}};function gf(t,e=100,r={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:n}=typeof r=="boolean"?{immediate:r}:r;let o,i,s,a,l;function c(){const u=Date.now()-a;if(u<e&&u>=0)s=setTimeout(c,e-u);else if(s=void 0,!n){const f=o,h=i;o=void 0,i=void 0,l=t.apply(f,h)}}const d=function(...u){if(o&&this!==o)throw new Error("Debounced method called with different contexts.");o=this,i=u,a=Date.now();const f=n&&!s;if(s||(s=setTimeout(c,e)),f){const h=o,g=i;o=void 0,i=void 0,l=t.apply(h,g)}return l};return d.clear=()=>{s&&(clearTimeout(s),s=void 0)},d.flush=()=>{if(!s)return;const u=o,f=i;o=void 0,i=void 0,l=t.apply(u,f),clearTimeout(s),s=void 0},d}Xs.exports.debounce=gf,Xs.exports=gf;var Lk=Xs.exports;const Fk=pu(Lk);var zk=Object.defineProperty,Bk=(t,e,r)=>e in t?zk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pe=(t,e,r)=>(Bk(t,typeof e!="symbol"?e+"":e,r),r);const $k=300,jk=0;class Wk extends k.PureComponent{constructor(e){super(e),Pe(this,"container"),Pe(this,"scrolling"),Pe(this,"started"),Pe(this,"pressed"),Pe(this,"isMobile",!1),Pe(this,"internal"),Pe(this,"scrollLeft"),Pe(this,"scrollTop"),Pe(this,"clientX"),Pe(this,"clientY"),Pe(this,"onEndScroll",()=>{this.scrolling=!1,!this.pressed&&this.started&&this.processEnd()}),Pe(this,"onScroll",()=>{const r=this.container.current;(r.scrollLeft!==this.scrollLeft||r.scrollTop!==this.scrollTop)&&(this.scrolling=!0,this.processScroll(),this.onEndScroll())}),Pe(this,"onTouchStart",r=>{const{nativeMobileScroll:n}=this.props;if(this.isDraggable(r.target))if(this.internal=!0,n&&this.scrolling)this.pressed=!0;else{const o=r.touches[0];this.processClick(o.clientX,o.clientY),!n&&this.props.stopPropagation&&r.stopPropagation()}}),Pe(this,"onTouchEnd",()=>{const{nativeMobileScroll:r}=this.props;this.pressed&&(this.started&&(!this.scrolling||!r)?this.processEnd():this.pressed=!1,this.forceUpdate())}),Pe(this,"onTouchMove",r=>{const{nativeMobileScroll:n}=this.props;if(this.pressed&&(!n||!this.isMobile)){const o=r.touches[0];o&&this.processMove(o.clientX,o.clientY),r.preventDefault(),this.props.stopPropagation&&r.stopPropagation()}}),Pe(this,"onMouseDown",r=>{var n,o;this.isDraggable(r.target)&&this.isScrollable()&&(this.internal=!0,((o=(n=this.props)==null?void 0:n.buttons)==null?void 0:o.indexOf(r.button))!==-1&&(this.processClick(r.clientX,r.clientY),r.preventDefault(),this.props.stopPropagation&&r.stopPropagation()))}),Pe(this,"onMouseMove",r=>{this.pressed&&(this.processMove(r.clientX,r.clientY),r.preventDefault(),this.props.stopPropagation&&r.stopPropagation())}),Pe(this,"onMouseUp",r=>{this.pressed&&(this.started?this.processEnd():(this.internal=!1,this.pressed=!1,this.forceUpdate(),this.props.onClick&&this.props.onClick(r)),r.preventDefault(),this.props.stopPropagation&&r.stopPropagation())}),this.container=k.createRef(),this.onEndScroll=Fk(this.onEndScroll,$k),this.scrolling=!1,this.started=!1,this.pressed=!1,this.internal=!1,this.getRef=this.getRef.bind(this)}componentDidMount(){const{nativeMobileScroll:e}=this.props,r=this.container.current;window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd),r.addEventListener("touchstart",this.onTouchStart,{passive:!1}),r.addEventListener("mousedown",this.onMouseDown,{passive:!1}),e&&(this.isMobile=this.isMobileDevice(),this.isMobile&&this.forceUpdate())}componentWillUnmount(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)}getElement(){return this.container.current}isMobileDevice(){return typeof window.orientation<"u"||navigator.userAgent.indexOf("IEMobile")!==-1}isDraggable(e){const r=this.props.ignoreElements;if(r){const n=e.closest(r);return n===null||n.contains(this.getElement())}else return!0}isScrollable(){const e=this.container.current;return e&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)}processClick(e,r){const n=this.container.current;this.scrollLeft=n==null?void 0:n.scrollLeft,this.scrollTop=n==null?void 0:n.scrollTop,this.clientX=e,this.clientY=r,this.pressed=!0}processStart(e=!0){const{onStartScroll:r}=this.props;this.started=!0,e&&document.body.classList.add("cursor-grab"),r&&r({external:!this.internal}),this.forceUpdate()}processScroll(){if(this.started){const{onScroll:e}=this.props;e&&e({external:!this.internal})}else this.processStart(!1)}processMove(e,r){const{horizontal:n,vertical:o,activationDistance:i,onScroll:s}=this.props,a=this.container.current;this.started?(n&&(a.scrollLeft-=e-this.clientX),o&&(a.scrollTop-=r-this.clientY),s&&s({external:!this.internal}),this.clientX=e,this.clientY=r,this.scrollLeft=a.scrollLeft,this.scrollTop=a.scrollTop):(n&&Math.abs(e-this.clientX)>i||o&&Math.abs(r-this.clientY)>i)&&(this.clientX=e,this.clientY=r,this.processStart())}processEnd(){const{onEndScroll:e}=this.props;this.container.current&&e&&e({external:!this.internal}),this.pressed=!1,this.started=!1,this.scrolling=!1,this.internal=!1,document.body.classList.remove("cursor-grab"),this.forceUpdate()}getRef(e){[this.container,this.props.innerRef].forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)})}render(){const{children:e,draggingClassName:r,className:n,style:o,hideScrollbars:i}=this.props;return p.jsx("div",{className:Ik(n,this.pressed&&r,{"!scroll-auto [&>*]:pointer-events-none [&>*]:cursor-grab":this.pressed,"overflow-auto":this.isMobile,"overflow-hidden !overflow-x-hidden [overflow:-moz-scrollbars-none] [scrollbar-width:none]":i,"[&::-webkit-scrollbar]:[-webkit-appearance:none !important] [&::-webkit-scrollbar]:!hidden [&::-webkit-scrollbar]:!h-0 [&::-webkit-scrollbar]:!w-0 [&::-webkit-scrollbar]:!bg-transparent":i}),style:o,ref:this.getRef,onScroll:this.onScroll,children:e})}}Pe(Wk,"defaultProps",{nativeMobileScroll:!0,hideScrollbars:!0,activationDistance:10,vertical:!0,horizontal:!0,stopPropagation:!1,style:{},buttons:[jk]});const Hk=k.forwardRef(({className:t,color:e="default",theme:r={},...n},o)=>{const i=W(K().checkbox,r);return p.jsx("input",{ref:o,type:"checkbox",className:F(i.root.base,i.root.color[e],t),...n})});Hk.displayName="Checkbox";const Rn=({children:t,className:e,color:r="default",theme:n={},value:o,...i})=>{const s=W(K().helperText,n);return p.jsx("p",{className:F(s.root.base,s.root.colors[r],e),...i,children:o??t??""})};Rn.displayName="HelperText";const pf=k.forwardRef(({addon:t,className:e,color:r="gray",helperText:n,icon:o,rightIcon:i,shadow:s,sizing:a="md",theme:l={},type:c="text",...d},u)=>{const f=W(K().textInput,l);return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:F(f.base,e),children:[t&&p.jsx("span",{className:f.addon,children:t}),p.jsxs("div",{className:f.field.base,children:[o&&p.jsx("div",{className:f.field.icon.base,children:p.jsx(o,{className:f.field.icon.svg})}),i&&p.jsx("div",{"data-testid":"right-icon",className:f.field.rightIcon.base,children:p.jsx(i,{className:f.field.rightIcon.svg})}),p.jsx("input",{className:F(f.field.input.base,f.field.input.colors[r],f.field.input.sizes[a],f.field.input.withIcon[o?"on":"off"],f.field.input.withRightIcon[i?"on":"off"],f.field.input.withAddon[t?"on":"off"],f.field.input.withShadow[s?"on":"off"]),type:c,...d,ref:u})]})]}),n&&p.jsx(Rn,{color:r,children:n})]})});pf.displayName="TextInput";const mf=k.createContext(void 0);function li(){const t=k.useContext(mf);if(!t)throw new Error("useDatePickerContext should be used within the DatePickerContext provider!");return t}var ve=(t=>(t[t.Days=0]="Days",t[t.Months=1]="Months",t[t.Years=2]="Years",t[t.Decades=3]="Decades",t))(ve||{}),bf=(t=>(t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday",t))(bf||{});const Vn=(t,e,r)=>{const n=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();if(e&&r){const o=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),i=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime();return n>=o&&n<=i}if(e){const o=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();return n>=o}if(r){const o=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime();return n<=o}return!0},ci=(t,e)=>(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),t.getTime()===e.getTime()),Rk=(t,e,r)=>(Vn(t,e,r)||(e&&t<e?t=e:r&&t>r&&(t=r)),t),Vk=(t,e)=>{const r=new Date(t.getFullYear(),t.getMonth(),1);let o=r.getDay()-e;return o<0&&(o+=7),Js(r,-o)},Yk=(t,e)=>{const r=[],n=new Date(0);n.setDate(n.getDate()-n.getDay()+e);const o=new Intl.DateTimeFormat(t,{weekday:"short"});for(let i=0;i<7;i++)r.push(o.format(Js(n,i)));return r},Js=(t,e)=>{const r=new Date(t);return r.setDate(r.getDate()+e),r},Uk=(t,e)=>{const r=new Date(t);return r.setMonth(r.getMonth()+e),r},Vr=(t,e)=>{const r=new Date(t);return r.setFullYear(r.getFullYear()+e),r},Yn=(t,e,r)=>{let n={day:"numeric",month:"long",year:"numeric"};return r&&(n=r),new Intl.DateTimeFormat(t,n).format(e)},Yr=(t,e)=>{const r=t.getFullYear();return Math.floor(r/e)*e},qk=(t,e)=>{const r=t.getFullYear(),n=e+9;return r>=e&&r<=n},Kk=({theme:t={}})=>{const{theme:e,weekStart:r,minDate:n,maxDate:o,viewDate:i,selectedDate:s,changeSelectedDate:a,language:l}=li(),c=W(e.views.days,t),d=Yk(l,r),u=Vk(i,r);return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:c.header.base,children:d.map((f,h)=>p.jsx("span",{className:c.header.title,children:f},h))}),p.jsx("div",{className:c.items.base,children:[...Array(42)].map((f,h)=>{const g=Js(u,h),m=Yn(l,g,{day:"numeric"}),b=ci(s,g),v=!Vn(g,n,o);return p.jsx("button",{disabled:v,type:"button",className:F(c.items.item.base,b&&c.items.item.selected,v&&c.items.item.disabled),onClick:()=>{v||a(g,!0)},children:m},h)})})]})},Gk=({theme:t={}})=>{const{theme:e,selectedDate:r,viewDate:n,setViewDate:o,setView:i}=li(),s=W(e.views.decades,t);return p.jsx("div",{className:s.items.base,children:[...Array(12)].map((a,l)=>{const d=Yr(n,100)-10+l*10,u=new Date(d,0,1),f=Vr(u,9),h=qk(n,d),g=!Vn(n,u,f);return p.jsx("button",{disabled:g,type:"button",className:F(s.items.item.base,h&&s.items.item.selected,g&&s.items.item.disabled),onClick:()=>{g||(o(Vr(n,d-r.getFullYear())),i(ve.Years))},children:d},l)})})},Xk=({theme:t={}})=>{const{theme:e,minDate:r,maxDate:n,selectedDate:o,viewDate:i,language:s,setViewDate:a,setView:l}=li(),c=W(e.views.months,t);return p.jsx("div",{className:c.items.base,children:[...Array(12)].map((d,u)=>{const f=new Date(i.getTime());f.setMonth(u);const h=Yn(s,f,{month:"short"}),g=ci(o,f),m=!Vn(f,r,n);return p.jsx("button",{disabled:m,type:"button",className:F(c.items.item.base,g&&c.items.item.selected,m&&c.items.item.disabled),onClick:()=>{m||(a(f),l(ve.Days))},children:h},u)})})},Jk=({theme:t={}})=>{const{theme:e,selectedDate:r,minDate:n,maxDate:o,viewDate:i,setViewDate:s,setView:a}=li(),l=W(e.views.years,t);return p.jsx("div",{className:l.items.base,children:[...Array(12)].map((c,d)=>{const f=Yr(i,10)-1+d*1,h=new Date(i.getTime());h.setFullYear(f);const g=ci(r,h),m=!Vn(h,n,o);return p.jsx("button",{disabled:m,type:"button",className:F(l.items.item.base,g&&l.items.item.selected,m&&l.items.item.disabled),onClick:()=>{m||(s(h),a(ve.Months))},children:f},d)})})},Zk=({title:t,open:e,inline:r=!1,autoHide:n=!0,showClearButton:o=!0,labelClearButton:i="Clear",showTodayButton:s=!0,labelTodayButton:a="Today",defaultDate:l=new Date,minDate:c,maxDate:d,language:u="en",weekStart:f=bf.Sunday,className:h,theme:g={},onSelectedDateChanged:m,...b},v)=>{const y=W(K().datepicker,g);l=Rk(l,c,d);const[_,x]=k.useState(e),[w,S]=k.useState(ve.Days),[T,N]=k.useState(l),[M,E]=k.useState(l),I=k.useRef(null),A=k.useRef(null),D=(j,$)=>{N(j),m&&m(j),n&&w===ve.Days&&$==!0&&!r&&x(!1)},O=()=>{D(l,!0),l&&E(l)};k.useImperativeHandle(v,()=>({focus(){var j;(j=I.current)==null||j.focus()},clear(){O()}}));const P=j=>{switch(j){case ve.Decades:return p.jsx(Gk,{theme:y.views.decades});case ve.Years:return p.jsx(Jk,{theme:y.views.years});case ve.Months:return p.jsx(Xk,{theme:y.views.months});case ve.Days:default:return p.jsx(Kk,{theme:y.views.days})}},L=()=>{switch(w){case ve.Days:return ve.Months;case ve.Months:return ve.Years;case ve.Years:return ve.Decades}return w},z=()=>{switch(w){case ve.Decades:return`${Yr(M,100)} - ${Yr(M,100)+90}`;case ve.Years:return`${Yr(M,10)} - ${Yr(M,10)+9}`;case ve.Months:return Yn(u,M,{year:"numeric"});case ve.Days:default:return Yn(u,M,{month:"long",year:"numeric"})}},B=(j,$,H)=>{switch(j){case ve.Days:return new Date(Uk($,H));case ve.Months:return new Date(Vr($,H));case ve.Years:return new Date(Vr($,H*10));case ve.Decades:return new Date(Vr($,H*100));default:return new Date(Vr($,H*10))}};return k.useEffect(()=>{const j=$=>{var Y,U;const H=(Y=A==null?void 0:A.current)==null?void 0:Y.contains($.target),R=(U=I==null?void 0:I.current)==null?void 0:U.contains($.target);!H&&!R&&x(!1)};return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[I,A,x]),p.jsx(mf.Provider,{value:{theme:y,language:u,minDate:c,maxDate:d,weekStart:f,isOpen:_,setIsOpen:x,view:w,setView:S,viewDate:M,setViewDate:E,selectedDate:T,setSelectedDate:N,changeSelectedDate:D},children:p.jsxs("div",{className:F(y.root.base,h),children:[!r&&p.jsx(pf,{theme:y.root.input,icon:i1,ref:I,onFocus:()=>{ci(M,T)||E(T),x(!0)},value:T&&Yn(u,T),readOnly:!0,...b}),(_||r)&&p.jsx("div",{ref:A,className:F(y.popup.root.base,r&&y.popup.root.inline),children:p.jsxs("div",{className:y.popup.root.inner,children:[p.jsxs("div",{className:y.popup.header.base,children:[t&&p.jsx("div",{className:y.popup.header.title,children:t}),p.jsxs("div",{className:y.popup.header.selectors.base,children:[p.jsx("button",{type:"button",className:F(y.popup.header.selectors.button.base,y.popup.header.selectors.button.prev),onClick:()=>E(B(w,M,-1)),children:p.jsx(n1,{})}),p.jsx("button",{type:"button",className:F(y.popup.header.selectors.button.base,y.popup.header.selectors.button.view),onClick:()=>S(L()),children:z()}),p.jsx("button",{type:"button",className:F(y.popup.header.selectors.button.base,y.popup.header.selectors.button.next),onClick:()=>E(B(w,M,1)),children:p.jsx(o1,{})})]})]}),p.jsx("div",{className:y.popup.view.base,children:P(w)}),(o||s)&&p.jsxs("div",{className:y.popup.footer.base,children:[s&&p.jsx("button",{type:"button",className:F(y.popup.footer.button.base,y.popup.footer.button.today),onClick:()=>{const j=new Date;D(j,!0),E(j)},children:a}),o&&p.jsx("button",{type:"button",className:F(y.popup.footer.button.base,y.popup.footer.button.clear),onClick:()=>{D(l,!0),l&&E(l)},children:i})]})]})})]})})},Qk=k.forwardRef(Zk);Qk.displayName="Datepicker";function di(){return typeof window<"u"}function wr(t){return yf(t)?(t.nodeName||"").toLowerCase():"#document"}function et(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Et(t){var e;return(e=(yf(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function yf(t){return di()?t instanceof Node||t instanceof et(t).Node:!1}function pe(t){return di()?t instanceof Element||t instanceof et(t).Element:!1}function je(t){return di()?t instanceof HTMLElement||t instanceof et(t).HTMLElement:!1}function Zs(t){return!di()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof et(t).ShadowRoot}function Un(t){const{overflow:e,overflowX:r,overflowY:n,display:o}=ft(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(o)}function e2(t){return["table","td","th"].includes(wr(t))}function ui(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Qs(t){const e=ea(),r=pe(t)?ft(t):t;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function t2(t){let e=Ht(t);for(;je(e)&&!er(e);){if(Qs(e))return e;if(ui(e))return null;e=Ht(e)}return null}function ea(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function er(t){return["html","body","#document"].includes(wr(t))}function ft(t){return et(t).getComputedStyle(t)}function fi(t){return pe(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ht(t){if(wr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Zs(t)&&t.host||Et(t);return Zs(e)?e.host:e}function vf(t){const e=Ht(t);return er(e)?t.ownerDocument?t.ownerDocument.body:t.body:je(e)&&Un(e)?e:vf(e)}function tr(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const o=vf(t),i=o===((n=t.ownerDocument)==null?void 0:n.body),s=et(o);if(i){const a=ta(s);return e.concat(s,s.visualViewport||[],Un(o)?o:[],a&&r?tr(a):[])}return e.concat(o,tr(o,[],r))}function ta(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ot(t){let e=t.activeElement;for(;((r=e)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;e=e.shadowRoot.activeElement}return e}function Ee(t,e){if(!t||!e)return!1;const r=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(r&&Zs(r)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function ra(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function xf(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:r,version:n}=e;return r+"/"+n}).join(" "):navigator.userAgent}function wf(t){return t.mozInputSource===0&&t.isTrusted?!0:ia()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function na(t){return r2()?!1:!ia()&&t.width===0&&t.height===0||ia()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function oa(){return/apple/i.test(navigator.vendor)}function ia(){const t=/android/i;return t.test(ra())||t.test(xf())}function kf(){return ra().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function r2(){return xf().includes("jsdom/")}function hi(t,e){const r=["mouse","pen"];return e||r.push("",void 0),r.includes(t)}function n2(t){return"nativeEvent"in t}function o2(t){return t.matches("html,body")}function qe(t){return(t==null?void 0:t.ownerDocument)||document}function sa(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const r=t;return r.target!=null&&e.contains(r.target)}function rr(t){return"composedPath"in t?t.composedPath()[0]:t.target}const i2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function aa(t){return je(t)&&t.matches(i2)}function We(t){t.preventDefault(),t.stopPropagation()}function Cf(t){return t?t.getAttribute("role")==="combobox"&&aa(t):!1}const s2=["top","right","bottom","left"],_f=["start","end"],Sf=s2.reduce((t,e)=>t.concat(e,e+"-"+_f[0],e+"-"+_f[1]),[]),Ur=Math.min,kr=Math.max,gi=Math.round,qr=Math.floor,Tt=t=>({x:t,y:t}),a2={left:"right",right:"left",bottom:"top",top:"bottom"},l2={start:"end",end:"start"};function la(t,e,r){return kr(t,Ur(e,r))}function Kr(t,e){return typeof t=="function"?t(e):t}function Rt(t){return t.split("-")[0]}function Mt(t){return t.split("-")[1]}function Ef(t){return t==="x"?"y":"x"}function ca(t){return t==="y"?"height":"width"}function pi(t){return["top","bottom"].includes(Rt(t))?"y":"x"}function da(t){return Ef(pi(t))}function Of(t,e,r){r===void 0&&(r=!1);const n=Mt(t),o=da(t),i=ca(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=bi(s)),[s,bi(s)]}function c2(t){const e=bi(t);return[mi(t),e,mi(e)]}function mi(t){return t.replace(/start|end/g,e=>l2[e])}function d2(t,e,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return r?e?o:n:e?n:o;case"left":case"right":return e?i:s;default:return[]}}function u2(t,e,r,n){const o=Mt(t);let i=d2(Rt(t),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),e&&(i=i.concat(i.map(mi)))),i}function bi(t){return t.replace(/left|right|bottom|top/g,e=>a2[e])}function f2(t){return{top:0,right:0,bottom:0,left:0,...t}}function Tf(t){return typeof t!="number"?f2(t):{top:t,right:t,bottom:t,left:t}}function yi(t){const{x:e,y:r,width:n,height:o}=t;return{width:n,height:o,top:r,left:e,right:e+n,bottom:r+o,x:e,y:r}}function Mf(t,e,r){let{reference:n,floating:o}=t;const i=pi(e),s=da(e),a=ca(s),l=Rt(e),c=i==="y",d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,f=n[a]/2-o[a]/2;let h;switch(l){case"top":h={x:d,y:n.y-o.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-o.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Mt(e)){case"start":h[s]-=f*(r&&c?-1:1);break;case"end":h[s]+=f*(r&&c?-1:1);break}return h}const h2=async(t,e,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:u}=Mf(c,n,l),f=n,h={},g=0;for(let m=0;m<a.length;m++){const{name:b,fn:v}=a[m],{x:y,y:_,data:x,reset:w}=await v({x:d,y:u,initialPlacement:n,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:t,floating:e}});d=y??d,u=_??u,h={...h,[b]:{...h[b],...x}},w&&g<=50&&(g++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(c=w.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):w.rects),{x:d,y:u}=Mf(c,f,l)),m=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:h}};async function ua(t,e){var r;e===void 0&&(e={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:h=0}=Kr(e,t),g=Tf(h),b=a[f?u==="floating"?"reference":"floating":u],v=yi(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),y=u==="floating"?{...s.floating,x:n,y:o}:s.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(_))?await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1}:{x:1,y:1},w=yi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:_,strategy:l}):y);return{top:(v.top-w.top+g.top)/x.y,bottom:(w.bottom-v.bottom+g.bottom)/x.y,left:(v.left-w.left+g.left)/x.x,right:(w.right-v.right+g.right)/x.x}}const g2=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:d=0}=Kr(t,e)||{};if(c==null)return{};const u=Tf(d),f={x:r,y:n},h=da(o),g=ca(h),m=await s.getDimensions(c),b=h==="y",v=b?"top":"left",y=b?"bottom":"right",_=b?"clientHeight":"clientWidth",x=i.reference[g]+i.reference[h]-f[h]-i.floating[g],w=f[h]-i.reference[h],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let T=S?S[_]:0;(!T||!await(s.isElement==null?void 0:s.isElement(S)))&&(T=a.floating[_]||i.floating[g]);const N=x/2-w/2,M=T/2-m[g]/2-1,E=Ur(u[v],M),I=Ur(u[y],M),A=E,D=T-m[g]-I,O=T/2-m[g]/2+N,P=la(A,O,D),L=!l.arrow&&Mt(o)!=null&&O!==P&&i.reference[g]/2-(O<A?E:I)-m[g]/2<0,z=L?O<A?O-A:O-D:0;return{[h]:f[h]+z,data:{[h]:P,centerOffset:O-P-z,...L&&{alignmentOffset:z}},reset:L}}});function p2(t,e,r){return(t?[...r.filter(o=>Mt(o)===t),...r.filter(o=>Mt(o)!==t)]:r.filter(o=>Rt(o)===o)).filter(o=>t?Mt(o)===t||(e?mi(o)!==o:!1):!0)}const m2=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,n,o;const{rects:i,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:f=Sf,autoAlignment:h=!0,...g}=Kr(t,e),m=u!==void 0||f===Sf?p2(u||null,h,f):f,b=await ua(e,g),v=((r=s.autoPlacement)==null?void 0:r.index)||0,y=m[v];if(y==null)return{};const _=Of(y,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==y)return{reset:{placement:m[0]}};const x=[b[Rt(y)],b[_[0]],b[_[1]]],w=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:y,overflows:x}],S=m[v+1];if(S)return{data:{index:v+1,overflows:w},reset:{placement:S}};const T=w.map(E=>{const I=Mt(E.placement);return[E.placement,I&&d?E.overflows.slice(0,2).reduce((A,D)=>A+D,0):E.overflows[0],E.overflows]}).sort((E,I)=>E[1]-I[1]),M=((o=T.filter(E=>E[2].slice(0,Mt(E[0])?2:3).every(I=>I<=0))[0])==null?void 0:o[0])||T[0][0];return M!==a?{data:{index:v+1,overflows:w},reset:{placement:M}}:{}}}},b2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...b}=Kr(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=Rt(o),y=Rt(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=f||(y||!m?[bi(a)]:c2(a));!f&&g!=="none"&&x.push(...u2(a,m,g,_));const w=[a,...x],S=await ua(e,b),T=[];let N=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&T.push(S[v]),u){const A=Of(o,s,_);T.push(S[A[0]],S[A[1]])}if(N=[...N,{placement:o,overflows:T}],!T.every(A=>A<=0)){var M,E;const A=(((M=i.flip)==null?void 0:M.index)||0)+1,D=w[A];if(D)return{data:{index:A,overflows:N},reset:{placement:D}};let O=(E=N.filter(P=>P.overflows[0]<=0).sort((P,L)=>P.overflows[1]-L.overflows[1])[0])==null?void 0:E.placement;if(!O)switch(h){case"bestFit":{var I;const P=(I=N.map(L=>[L.placement,L.overflows.filter(z=>z>0).reduce((z,B)=>z+B,0)]).sort((L,z)=>L[1]-z[1])[0])==null?void 0:I[0];P&&(O=P);break}case"initialPlacement":O=a;break}if(o!==O)return{reset:{placement:O}}}return{}}}};async function y2(t,e){const{placement:r,platform:n,elements:o}=t,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Rt(r),a=Mt(r),l=pi(r)==="y",c=["left","top"].includes(s)?-1:1,d=i&&l?-1:1,u=Kr(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*d,y:f*c}:{x:f*c,y:h*d}}const v2=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=e,l=await y2(e,t);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},x2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:o}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:b=>{let{x:v,y}=b;return{x:v,y}}},...l}=Kr(t,e),c={x:r,y:n},d=await ua(e,l),u=pi(Rt(o)),f=Ef(u);let h=c[f],g=c[u];if(i){const b=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+d[b],_=h-d[v];h=la(y,h,_)}if(s){const b=u==="y"?"top":"left",v=u==="y"?"bottom":"right",y=g+d[b],_=g-d[v];g=la(y,g,_)}const m=a.fn({...e,[f]:h,[u]:g});return{...m,data:{x:m.x-r,y:m.y-n}}}}};function Nf(t){const e=ft(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=je(t),i=o?t.offsetWidth:r,s=o?t.offsetHeight:n,a=gi(r)!==i||gi(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function fa(t){return pe(t)?t:t.contextElement}function Gr(t){const e=fa(t);if(!je(e))return Tt(1);const r=e.getBoundingClientRect(),{width:n,height:o,$:i}=Nf(e);let s=(i?gi(r.width):r.width)/n,a=(i?gi(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const w2=Tt(0);function Pf(t){const e=et(t);return!ea()||!e.visualViewport?w2:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function k2(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==et(t)?!1:e}function Cr(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const o=t.getBoundingClientRect(),i=fa(t);let s=Tt(1);e&&(n?pe(n)&&(s=Gr(n)):s=Gr(t));const a=k2(i,r,n)?Pf(i):Tt(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const f=et(i),h=n&&pe(n)?et(n):n;let g=f,m=ta(g);for(;m&&n&&h!==g;){const b=Gr(m),v=m.getBoundingClientRect(),y=ft(m),_=v.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,x=v.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,u*=b.y,l+=_,c+=x,g=et(m),m=ta(g)}}return yi({width:d,height:u,x:l,y:c})}function ha(t,e){const r=fi(t).scrollLeft;return e?e.left+r:Cr(Et(t)).left+r}function Af(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-(r?0:ha(t,n)),i=n.top+e.scrollTop;return{x:o,y:i}}function C2(t){let{elements:e,rect:r,offsetParent:n,strategy:o}=t;const i=o==="fixed",s=Et(n),a=e?ui(e.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Tt(1);const d=Tt(0),u=je(n);if((u||!u&&!i)&&((wr(n)!=="body"||Un(s))&&(l=fi(n)),je(n))){const h=Cr(n);c=Gr(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}const f=s&&!u&&!i?Af(s,l,!0):Tt(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-l.scrollTop*c.y+d.y+f.y}}function _2(t){return Array.from(t.getClientRects())}function S2(t){const e=Et(t),r=fi(t),n=t.ownerDocument.body,o=kr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=kr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+ha(t);const a=-r.scrollTop;return ft(n).direction==="rtl"&&(s+=kr(e.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}function E2(t,e){const r=et(t),n=Et(t),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=ea();(!c||c&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function O2(t,e){const r=Cr(t,!0,e==="fixed"),n=r.top+t.clientTop,o=r.left+t.clientLeft,i=je(t)?Gr(t):Tt(1),s=t.clientWidth*i.x,a=t.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:s,height:a,x:l,y:c}}function Df(t,e,r){let n;if(e==="viewport")n=E2(t,r);else if(e==="document")n=S2(Et(t));else if(pe(e))n=O2(e,r);else{const o=Pf(t);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return yi(n)}function If(t,e){const r=Ht(t);return r===e||!pe(r)||er(r)?!1:ft(r).position==="fixed"||If(r,e)}function T2(t,e){const r=e.get(t);if(r)return r;let n=tr(t,[],!1).filter(a=>pe(a)&&wr(a)!=="body"),o=null;const i=ft(t).position==="fixed";let s=i?Ht(t):t;for(;pe(s)&&!er(s);){const a=ft(s),l=Qs(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Un(s)&&!l&&If(t,s))?n=n.filter(d=>d!==s):o=a,s=Ht(s)}return e.set(t,n),n}function M2(t){let{element:e,boundary:r,rootBoundary:n,strategy:o}=t;const s=[...r==="clippingAncestors"?ui(e)?[]:T2(e,this._c):[].concat(r),n],a=s[0],l=s.reduce((c,d)=>{const u=Df(e,d,o);return c.top=kr(u.top,c.top),c.right=Ur(u.right,c.right),c.bottom=Ur(u.bottom,c.bottom),c.left=kr(u.left,c.left),c},Df(e,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function N2(t){const{width:e,height:r}=Nf(t);return{width:e,height:r}}function P2(t,e,r){const n=je(e),o=Et(e),i=r==="fixed",s=Cr(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Tt(0);if(n||!n&&!i)if((wr(e)!=="body"||Un(o))&&(a=fi(e)),n){const f=Cr(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else o&&(l.x=ha(o));const c=o&&!n&&!i?Af(o,a):Tt(0),d=s.left+a.scrollLeft-l.x-c.x,u=s.top+a.scrollTop-l.y-c.y;return{x:d,y:u,width:s.width,height:s.height}}function ga(t){return ft(t).position==="static"}function Lf(t,e){if(!je(t)||ft(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Et(t)===r&&(r=r.ownerDocument.body),r}function Ff(t,e){const r=et(t);if(ui(t))return r;if(!je(t)){let o=Ht(t);for(;o&&!er(o);){if(pe(o)&&!ga(o))return o;o=Ht(o)}return r}let n=Lf(t,e);for(;n&&e2(n)&&ga(n);)n=Lf(n,e);return n&&er(n)&&ga(n)&&!Qs(n)?r:n||t2(t)||r}const A2=async function(t){const e=this.getOffsetParent||Ff,r=this.getDimensions,n=await r(t.floating);return{reference:P2(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function D2(t){return ft(t).direction==="rtl"}const I2={convertOffsetParentRelativeRectToViewportRelativeRect:C2,getDocumentElement:Et,getClippingRect:M2,getOffsetParent:Ff,getElementRects:A2,getClientRects:_2,getDimensions:N2,getScale:Gr,isElement:pe,isRTL:D2};function zf(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function L2(t,e){let r=null,n;const o=Et(t);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=t.getBoundingClientRect(),{left:d,top:u,width:f,height:h}=c;if(a||e(),!f||!h)return;const g=qr(u),m=qr(o.clientWidth-(d+f)),b=qr(o.clientHeight-(u+h)),v=qr(d),_={rootMargin:-g+"px "+-m+"px "+-b+"px "+-v+"px",threshold:kr(0,Ur(1,l))||1};let x=!0;function w(S){const T=S[0].intersectionRatio;if(T!==l){if(!x)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!zf(c,t.getBoundingClientRect())&&s(),x=!1}try{r=new IntersectionObserver(w,{..._,root:o.ownerDocument})}catch{r=new IntersectionObserver(w,_)}r.observe(t)}return s(!0),i}function Bf(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=fa(t),d=o||i?[...c?tr(c):[],...tr(e)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const u=c&&a?L2(c,r):null;let f=-1,h=null;s&&(h=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var _;(_=h)==null||_.observe(e)})),r()}),c&&!l&&h.observe(c),h.observe(e));let g,m=l?Cr(t):null;l&&b();function b(){const v=Cr(t);m&&!zf(m,v)&&r(),m=v,g=requestAnimationFrame(b)}return r(),()=>{var v;d.forEach(y=>{o&&y.removeEventListener("scroll",r),i&&y.removeEventListener("resize",r)}),u==null||u(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const F2=v2,z2=m2,B2=x2,$2=b2,$f=g2,j2=(t,e,r)=>{const n=new Map,o={platform:I2,...r},i={...o.platform,_c:n};return h2(t,e,{...o,platform:i})};var vi=typeof document<"u"?k.useLayoutEffect:k.useEffect;function xi(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!xi(t[n],e[n]))return!1;return!0}if(o=Object.keys(t),r=o.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&t.$$typeof)&&!xi(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function jf(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Wf(t,e){const r=jf(t);return Math.round(e*r)/r}function pa(t){const e=C.useRef(t);return vi(()=>{e.current=t}),e}function W2(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[d,u]=C.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=C.useState(n);xi(f,n)||h(n);const[g,m]=C.useState(null),[b,v]=C.useState(null),y=C.useCallback(B=>{B!==S.current&&(S.current=B,m(B))},[]),_=C.useCallback(B=>{B!==T.current&&(T.current=B,v(B))},[]),x=i||g,w=s||b,S=C.useRef(null),T=C.useRef(null),N=C.useRef(d),M=l!=null,E=pa(l),I=pa(o),A=pa(c),D=C.useCallback(()=>{if(!S.current||!T.current)return;const B={placement:e,strategy:r,middleware:f};I.current&&(B.platform=I.current),j2(S.current,T.current,B).then(j=>{const $={...j,isPositioned:A.current!==!1};O.current&&!xi(N.current,$)&&(N.current=$,jg.flushSync(()=>{u($)}))})},[f,e,r,I,A]);vi(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,u(B=>({...B,isPositioned:!1})))},[c]);const O=C.useRef(!1);vi(()=>(O.current=!0,()=>{O.current=!1}),[]),vi(()=>{if(x&&(S.current=x),w&&(T.current=w),x&&w){if(E.current)return E.current(x,w,D);D()}},[x,w,D,E,M]);const P=C.useMemo(()=>({reference:S,floating:T,setReference:y,setFloating:_}),[y,_]),L=C.useMemo(()=>({reference:x,floating:w}),[x,w]),z=C.useMemo(()=>{const B={position:r,left:0,top:0};if(!L.floating)return B;const j=Wf(L.floating,d.x),$=Wf(L.floating,d.y);return a?{...B,transform:"translate("+j+"px, "+$+"px)",...jf(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:j,top:$}},[r,a,L.floating,d.x,d.y]);return C.useMemo(()=>({...d,update:D,refs:P,elements:L,floatingStyles:z}),[d,D,P,L,z])}const H2=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:o}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?$f({element:n.current,padding:o}).fn(r):{}:n?$f({element:n,padding:o}).fn(r):{}}}},R2=(t,e)=>({...F2(t),options:[t,e]}),V2=(t,e)=>({...B2(t),options:[t,e]}),Y2=(t,e)=>({...$2(t),options:[t,e]}),U2=(t,e)=>({...z2(t),options:[t,e]}),q2=(t,e)=>({...H2(t),options:[t,e]});/*!
|
|
495
|
+
*/(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var i="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(i=o(i,n(a)))}return i}function n(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var s="";for(var a in i)e.call(i,a)&&i[a]&&(s=o(s,a));return s}function o(i,s){return s?i?i+" "+s:i+s:i}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(gf);var zk=gf.exports;const Bk=mu(zk);var Qs={exports:{}};function pf(t,e=100,r={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:n}=typeof r=="boolean"?{immediate:r}:r;let o,i,s,a,l;function c(){const u=Date.now()-a;if(u<e&&u>=0)s=setTimeout(c,e-u);else if(s=void 0,!n){const f=o,h=i;o=void 0,i=void 0,l=t.apply(f,h)}}const d=function(...u){if(o&&this!==o)throw new Error("Debounced method called with different contexts.");o=this,i=u,a=Date.now();const f=n&&!s;if(s||(s=setTimeout(c,e)),f){const h=o,p=i;o=void 0,i=void 0,l=t.apply(h,p)}return l};return d.clear=()=>{s&&(clearTimeout(s),s=void 0)},d.flush=()=>{if(!s)return;const u=o,f=i;o=void 0,i=void 0,l=t.apply(u,f),clearTimeout(s),s=void 0},d}Qs.exports.debounce=pf,Qs.exports=pf;var $k=Qs.exports;const jk=mu($k);var Wk=Object.defineProperty,Hk=(t,e,r)=>e in t?Wk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Pe=(t,e,r)=>(Hk(t,typeof e!="symbol"?e+"":e,r),r);const Vk=300,Rk=0;class Yk extends k.PureComponent{constructor(e){super(e),Pe(this,"container"),Pe(this,"scrolling"),Pe(this,"started"),Pe(this,"pressed"),Pe(this,"isMobile",!1),Pe(this,"internal"),Pe(this,"scrollLeft"),Pe(this,"scrollTop"),Pe(this,"clientX"),Pe(this,"clientY"),Pe(this,"onEndScroll",()=>{this.scrolling=!1,!this.pressed&&this.started&&this.processEnd()}),Pe(this,"onScroll",()=>{const r=this.container.current;(r.scrollLeft!==this.scrollLeft||r.scrollTop!==this.scrollTop)&&(this.scrolling=!0,this.processScroll(),this.onEndScroll())}),Pe(this,"onTouchStart",r=>{const{nativeMobileScroll:n}=this.props;if(this.isDraggable(r.target))if(this.internal=!0,n&&this.scrolling)this.pressed=!0;else{const o=r.touches[0];this.processClick(o.clientX,o.clientY),!n&&this.props.stopPropagation&&r.stopPropagation()}}),Pe(this,"onTouchEnd",()=>{const{nativeMobileScroll:r}=this.props;this.pressed&&(this.started&&(!this.scrolling||!r)?this.processEnd():this.pressed=!1,this.forceUpdate())}),Pe(this,"onTouchMove",r=>{const{nativeMobileScroll:n}=this.props;if(this.pressed&&(!n||!this.isMobile)){const o=r.touches[0];o&&this.processMove(o.clientX,o.clientY),r.preventDefault(),this.props.stopPropagation&&r.stopPropagation()}}),Pe(this,"onMouseDown",r=>{var n,o;this.isDraggable(r.target)&&this.isScrollable()&&(this.internal=!0,((o=(n=this.props)==null?void 0:n.buttons)==null?void 0:o.indexOf(r.button))!==-1&&(this.processClick(r.clientX,r.clientY),r.preventDefault(),this.props.stopPropagation&&r.stopPropagation()))}),Pe(this,"onMouseMove",r=>{this.pressed&&(this.processMove(r.clientX,r.clientY),r.preventDefault(),this.props.stopPropagation&&r.stopPropagation())}),Pe(this,"onMouseUp",r=>{this.pressed&&(this.started?this.processEnd():(this.internal=!1,this.pressed=!1,this.forceUpdate(),this.props.onClick&&this.props.onClick(r)),r.preventDefault(),this.props.stopPropagation&&r.stopPropagation())}),this.container=k.createRef(),this.onEndScroll=jk(this.onEndScroll,Vk),this.scrolling=!1,this.started=!1,this.pressed=!1,this.internal=!1,this.getRef=this.getRef.bind(this)}componentDidMount(){const{nativeMobileScroll:e}=this.props,r=this.container.current;window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd),r.addEventListener("touchstart",this.onTouchStart,{passive:!1}),r.addEventListener("mousedown",this.onMouseDown,{passive:!1}),e&&(this.isMobile=this.isMobileDevice(),this.isMobile&&this.forceUpdate())}componentWillUnmount(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)}getElement(){return this.container.current}isMobileDevice(){return typeof window.orientation<"u"||navigator.userAgent.indexOf("IEMobile")!==-1}isDraggable(e){const r=this.props.ignoreElements;if(r){const n=e.closest(r);return n===null||n.contains(this.getElement())}else return!0}isScrollable(){const e=this.container.current;return e&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)}processClick(e,r){const n=this.container.current;this.scrollLeft=n==null?void 0:n.scrollLeft,this.scrollTop=n==null?void 0:n.scrollTop,this.clientX=e,this.clientY=r,this.pressed=!0}processStart(e=!0){const{onStartScroll:r}=this.props;this.started=!0,e&&document.body.classList.add("cursor-grab"),r&&r({external:!this.internal}),this.forceUpdate()}processScroll(){if(this.started){const{onScroll:e}=this.props;e&&e({external:!this.internal})}else this.processStart(!1)}processMove(e,r){const{horizontal:n,vertical:o,activationDistance:i,onScroll:s}=this.props,a=this.container.current;this.started?(n&&(a.scrollLeft-=e-this.clientX),o&&(a.scrollTop-=r-this.clientY),s&&s({external:!this.internal}),this.clientX=e,this.clientY=r,this.scrollLeft=a.scrollLeft,this.scrollTop=a.scrollTop):(n&&Math.abs(e-this.clientX)>i||o&&Math.abs(r-this.clientY)>i)&&(this.clientX=e,this.clientY=r,this.processStart())}processEnd(){const{onEndScroll:e}=this.props;this.container.current&&e&&e({external:!this.internal}),this.pressed=!1,this.started=!1,this.scrolling=!1,this.internal=!1,document.body.classList.remove("cursor-grab"),this.forceUpdate()}getRef(e){[this.container,this.props.innerRef].forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)})}render(){const{children:e,draggingClassName:r,className:n,style:o,hideScrollbars:i}=this.props;return g.jsx("div",{className:Bk(n,this.pressed&&r,{"!scroll-auto [&>*]:pointer-events-none [&>*]:cursor-grab":this.pressed,"overflow-auto":this.isMobile,"overflow-hidden !overflow-x-hidden [overflow:-moz-scrollbars-none] [scrollbar-width:none]":i,"[&::-webkit-scrollbar]:[-webkit-appearance:none !important] [&::-webkit-scrollbar]:!hidden [&::-webkit-scrollbar]:!h-0 [&::-webkit-scrollbar]:!w-0 [&::-webkit-scrollbar]:!bg-transparent":i}),style:o,ref:this.getRef,onScroll:this.onScroll,children:e})}}Pe(Yk,"defaultProps",{nativeMobileScroll:!0,hideScrollbars:!0,activationDistance:10,vertical:!0,horizontal:!0,stopPropagation:!1,style:{},buttons:[Rk]});const Uk=k.forwardRef(({className:t,color:e="default",theme:r={},...n},o)=>{const i=W(K().checkbox,r);return g.jsx("input",{ref:o,type:"checkbox",className:F(i.root.base,i.root.color[e],t),...n})});Uk.displayName="Checkbox";const Vn=({children:t,className:e,color:r="default",theme:n={},value:o,...i})=>{const s=W(K().helperText,n);return g.jsx("p",{className:F(s.root.base,s.root.colors[r],e),...i,children:o??t??""})};Vn.displayName="HelperText";const mf=k.forwardRef(({addon:t,className:e,color:r="gray",helperText:n,icon:o,rightIcon:i,shadow:s,sizing:a="md",theme:l={},type:c="text",...d},u)=>{const f=W(K().textInput,l);return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:F(f.base,e),children:[t&&g.jsx("span",{className:f.addon,children:t}),g.jsxs("div",{className:f.field.base,children:[o&&g.jsx("div",{className:f.field.icon.base,children:g.jsx(o,{className:f.field.icon.svg})}),i&&g.jsx("div",{"data-testid":"right-icon",className:f.field.rightIcon.base,children:g.jsx(i,{className:f.field.rightIcon.svg})}),g.jsx("input",{className:F(f.field.input.base,f.field.input.colors[r],f.field.input.sizes[a],f.field.input.withIcon[o?"on":"off"],f.field.input.withRightIcon[i?"on":"off"],f.field.input.withAddon[t?"on":"off"],f.field.input.withShadow[s?"on":"off"]),type:c,...d,ref:u})]})]}),n&&g.jsx(Vn,{color:r,children:n})]})});mf.displayName="TextInput";const bf=k.createContext(void 0);function ci(){const t=k.useContext(bf);if(!t)throw new Error("useDatePickerContext should be used within the DatePickerContext provider!");return t}var xe=(t=>(t[t.Days=0]="Days",t[t.Months=1]="Months",t[t.Years=2]="Years",t[t.Decades=3]="Decades",t))(xe||{}),yf=(t=>(t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday",t))(yf||{});const Rn=(t,e,r)=>{const n=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();if(e&&r){const o=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),i=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime();return n>=o&&n<=i}if(e){const o=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();return n>=o}if(r){const o=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime();return n<=o}return!0},di=(t,e)=>(t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),t.getTime()===e.getTime()),qk=(t,e,r)=>(Rn(t,e,r)||(e&&t<e?t=e:r&&t>r&&(t=r)),t),Kk=(t,e)=>{const r=new Date(t.getFullYear(),t.getMonth(),1);let o=r.getDay()-e;return o<0&&(o+=7),ea(r,-o)},Gk=(t,e)=>{const r=[],n=new Date(0);n.setDate(n.getDate()-n.getDay()+e);const o=new Intl.DateTimeFormat(t,{weekday:"short"});for(let i=0;i<7;i++)r.push(o.format(ea(n,i)));return r},ea=(t,e)=>{const r=new Date(t);return r.setDate(r.getDate()+e),r},Xk=(t,e)=>{const r=new Date(t);return r.setMonth(r.getMonth()+e),r},Rr=(t,e)=>{const r=new Date(t);return r.setFullYear(r.getFullYear()+e),r},Yn=(t,e,r)=>{let n={day:"numeric",month:"long",year:"numeric"};return r&&(n=r),new Intl.DateTimeFormat(t,n).format(e)},Yr=(t,e)=>{const r=t.getFullYear();return Math.floor(r/e)*e},Zk=(t,e)=>{const r=t.getFullYear(),n=e+9;return r>=e&&r<=n},Jk=({theme:t={}})=>{const{theme:e,weekStart:r,minDate:n,maxDate:o,viewDate:i,selectedDate:s,changeSelectedDate:a,language:l}=ci(),c=W(e.views.days,t),d=Gk(l,r),u=Kk(i,r);return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:c.header.base,children:d.map((f,h)=>g.jsx("span",{className:c.header.title,children:f},h))}),g.jsx("div",{className:c.items.base,children:[...Array(42)].map((f,h)=>{const p=ea(u,h),m=Yn(l,p,{day:"numeric"}),b=di(s,p),v=!Rn(p,n,o);return g.jsx("button",{disabled:v,type:"button",className:F(c.items.item.base,b&&c.items.item.selected,v&&c.items.item.disabled),onClick:()=>{v||a(p,!0)},children:m},h)})})]})},Qk=({theme:t={}})=>{const{theme:e,selectedDate:r,viewDate:n,setViewDate:o,setView:i}=ci(),s=W(e.views.decades,t);return g.jsx("div",{className:s.items.base,children:[...Array(12)].map((a,l)=>{const d=Yr(n,100)-10+l*10,u=new Date(d,0,1),f=Rr(u,9),h=Zk(n,d),p=!Rn(n,u,f);return g.jsx("button",{disabled:p,type:"button",className:F(s.items.item.base,h&&s.items.item.selected,p&&s.items.item.disabled),onClick:()=>{p||(o(Rr(n,d-r.getFullYear())),i(xe.Years))},children:d},l)})})},e2=({theme:t={}})=>{const{theme:e,minDate:r,maxDate:n,selectedDate:o,viewDate:i,language:s,setViewDate:a,setView:l}=ci(),c=W(e.views.months,t);return g.jsx("div",{className:c.items.base,children:[...Array(12)].map((d,u)=>{const f=new Date(i.getTime());f.setMonth(u);const h=Yn(s,f,{month:"short"}),p=di(o,f),m=!Rn(f,r,n);return g.jsx("button",{disabled:m,type:"button",className:F(c.items.item.base,p&&c.items.item.selected,m&&c.items.item.disabled),onClick:()=>{m||(a(f),l(xe.Days))},children:h},u)})})},t2=({theme:t={}})=>{const{theme:e,selectedDate:r,minDate:n,maxDate:o,viewDate:i,setViewDate:s,setView:a}=ci(),l=W(e.views.years,t);return g.jsx("div",{className:l.items.base,children:[...Array(12)].map((c,d)=>{const f=Yr(i,10)-1+d*1,h=new Date(i.getTime());h.setFullYear(f);const p=di(r,h),m=!Rn(h,n,o);return g.jsx("button",{disabled:m,type:"button",className:F(l.items.item.base,p&&l.items.item.selected,m&&l.items.item.disabled),onClick:()=>{m||(s(h),a(xe.Months))},children:f},d)})})},r2=({title:t,open:e,inline:r=!1,autoHide:n=!0,showClearButton:o=!0,labelClearButton:i="Clear",showTodayButton:s=!0,labelTodayButton:a="Today",defaultDate:l=new Date,minDate:c,maxDate:d,language:u="en",weekStart:f=yf.Sunday,className:h,theme:p={},onSelectedDateChanged:m,...b},v)=>{const y=W(K().datepicker,p);l=qk(l,c,d);const[_,x]=k.useState(e),[w,S]=k.useState(xe.Days),[T,M]=k.useState(l),[N,E]=k.useState(l),I=k.useRef(null),A=k.useRef(null),D=(j,$)=>{M(j),m&&m(j),n&&w===xe.Days&&$==!0&&!r&&x(!1)},O=()=>{D(l,!0),l&&E(l)};k.useImperativeHandle(v,()=>({focus(){var j;(j=I.current)==null||j.focus()},clear(){O()}}));const P=j=>{switch(j){case xe.Decades:return g.jsx(Qk,{theme:y.views.decades});case xe.Years:return g.jsx(t2,{theme:y.views.years});case xe.Months:return g.jsx(e2,{theme:y.views.months});case xe.Days:default:return g.jsx(Jk,{theme:y.views.days})}},L=()=>{switch(w){case xe.Days:return xe.Months;case xe.Months:return xe.Years;case xe.Years:return xe.Decades}return w},z=()=>{switch(w){case xe.Decades:return`${Yr(N,100)} - ${Yr(N,100)+90}`;case xe.Years:return`${Yr(N,10)} - ${Yr(N,10)+9}`;case xe.Months:return Yn(u,N,{year:"numeric"});case xe.Days:default:return Yn(u,N,{month:"long",year:"numeric"})}},B=(j,$,H)=>{switch(j){case xe.Days:return new Date(Xk($,H));case xe.Months:return new Date(Rr($,H));case xe.Years:return new Date(Rr($,H*10));case xe.Decades:return new Date(Rr($,H*100));default:return new Date(Rr($,H*10))}};return k.useEffect(()=>{const j=$=>{var Y,U;const H=(Y=A==null?void 0:A.current)==null?void 0:Y.contains($.target),V=(U=I==null?void 0:I.current)==null?void 0:U.contains($.target);!H&&!V&&x(!1)};return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[I,A,x]),g.jsx(bf.Provider,{value:{theme:y,language:u,minDate:c,maxDate:d,weekStart:f,isOpen:_,setIsOpen:x,view:w,setView:S,viewDate:N,setViewDate:E,selectedDate:T,setSelectedDate:M,changeSelectedDate:D},children:g.jsxs("div",{className:F(y.root.base,h),children:[!r&&g.jsx(mf,{theme:y.root.input,icon:c1,ref:I,onFocus:()=>{di(N,T)||E(T),x(!0)},value:T&&Yn(u,T),readOnly:!0,...b}),(_||r)&&g.jsx("div",{ref:A,className:F(y.popup.root.base,r&&y.popup.root.inline),children:g.jsxs("div",{className:y.popup.root.inner,children:[g.jsxs("div",{className:y.popup.header.base,children:[t&&g.jsx("div",{className:y.popup.header.title,children:t}),g.jsxs("div",{className:y.popup.header.selectors.base,children:[g.jsx("button",{type:"button",className:F(y.popup.header.selectors.button.base,y.popup.header.selectors.button.prev),onClick:()=>E(B(w,N,-1)),children:g.jsx(a1,{})}),g.jsx("button",{type:"button",className:F(y.popup.header.selectors.button.base,y.popup.header.selectors.button.view),onClick:()=>S(L()),children:z()}),g.jsx("button",{type:"button",className:F(y.popup.header.selectors.button.base,y.popup.header.selectors.button.next),onClick:()=>E(B(w,N,1)),children:g.jsx(l1,{})})]})]}),g.jsx("div",{className:y.popup.view.base,children:P(w)}),(o||s)&&g.jsxs("div",{className:y.popup.footer.base,children:[s&&g.jsx("button",{type:"button",className:F(y.popup.footer.button.base,y.popup.footer.button.today),onClick:()=>{const j=new Date;D(j,!0),E(j)},children:a}),o&&g.jsx("button",{type:"button",className:F(y.popup.footer.button.base,y.popup.footer.button.clear),onClick:()=>{D(l,!0),l&&E(l)},children:i})]})]})})]})})},n2=k.forwardRef(r2);n2.displayName="Datepicker";function ui(){return typeof window<"u"}function wr(t){return vf(t)?(t.nodeName||"").toLowerCase():"#document"}function et(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Et(t){var e;return(e=(vf(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function vf(t){return ui()?t instanceof Node||t instanceof et(t).Node:!1}function pe(t){return ui()?t instanceof Element||t instanceof et(t).Element:!1}function je(t){return ui()?t instanceof HTMLElement||t instanceof et(t).HTMLElement:!1}function ta(t){return!ui()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof et(t).ShadowRoot}function Un(t){const{overflow:e,overflowX:r,overflowY:n,display:o}=ft(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(o)}function o2(t){return["table","td","th"].includes(wr(t))}function fi(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ra(t){const e=na(),r=pe(t)?ft(t):t;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function i2(t){let e=Ht(t);for(;je(e)&&!er(e);){if(ra(e))return e;if(fi(e))return null;e=Ht(e)}return null}function na(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function er(t){return["html","body","#document"].includes(wr(t))}function ft(t){return et(t).getComputedStyle(t)}function hi(t){return pe(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ht(t){if(wr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ta(t)&&t.host||Et(t);return ta(e)?e.host:e}function xf(t){const e=Ht(t);return er(e)?t.ownerDocument?t.ownerDocument.body:t.body:je(e)&&Un(e)?e:xf(e)}function tr(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const o=xf(t),i=o===((n=t.ownerDocument)==null?void 0:n.body),s=et(o);if(i){const a=oa(s);return e.concat(s,s.visualViewport||[],Un(o)?o:[],a&&r?tr(a):[])}return e.concat(o,tr(o,[],r))}function oa(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ot(t){let e=t.activeElement;for(;((r=e)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;e=e.shadowRoot.activeElement}return e}function Ee(t,e){if(!t||!e)return!1;const r=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(r&&ta(r)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function ia(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function wf(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:r,version:n}=e;return r+"/"+n}).join(" "):navigator.userAgent}function kf(t){return t.mozInputSource===0&&t.isTrusted?!0:la()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function sa(t){return s2()?!1:!la()&&t.width===0&&t.height===0||la()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function aa(){return/apple/i.test(navigator.vendor)}function la(){const t=/android/i;return t.test(ia())||t.test(wf())}function Cf(){return ia().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function s2(){return wf().includes("jsdom/")}function gi(t,e){const r=["mouse","pen"];return e||r.push("",void 0),r.includes(t)}function a2(t){return"nativeEvent"in t}function l2(t){return t.matches("html,body")}function qe(t){return(t==null?void 0:t.ownerDocument)||document}function ca(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const r=t;return r.target!=null&&e.contains(r.target)}function rr(t){return"composedPath"in t?t.composedPath()[0]:t.target}const c2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function da(t){return je(t)&&t.matches(c2)}function We(t){t.preventDefault(),t.stopPropagation()}function _f(t){return t?t.getAttribute("role")==="combobox"&&da(t):!1}const d2=["top","right","bottom","left"],Sf=["start","end"],Ef=d2.reduce((t,e)=>t.concat(e,e+"-"+Sf[0],e+"-"+Sf[1]),[]),Ur=Math.min,kr=Math.max,pi=Math.round,qr=Math.floor,Tt=t=>({x:t,y:t}),u2={left:"right",right:"left",bottom:"top",top:"bottom"},f2={start:"end",end:"start"};function ua(t,e,r){return kr(t,Ur(e,r))}function Kr(t,e){return typeof t=="function"?t(e):t}function Vt(t){return t.split("-")[0]}function Nt(t){return t.split("-")[1]}function Of(t){return t==="x"?"y":"x"}function fa(t){return t==="y"?"height":"width"}function mi(t){return["top","bottom"].includes(Vt(t))?"y":"x"}function ha(t){return Of(mi(t))}function Tf(t,e,r){r===void 0&&(r=!1);const n=Nt(t),o=ha(t),i=fa(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=yi(s)),[s,yi(s)]}function h2(t){const e=yi(t);return[bi(t),e,bi(e)]}function bi(t){return t.replace(/start|end/g,e=>f2[e])}function g2(t,e,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return r?e?o:n:e?n:o;case"left":case"right":return e?i:s;default:return[]}}function p2(t,e,r,n){const o=Nt(t);let i=g2(Vt(t),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),e&&(i=i.concat(i.map(bi)))),i}function yi(t){return t.replace(/left|right|bottom|top/g,e=>u2[e])}function m2(t){return{top:0,right:0,bottom:0,left:0,...t}}function Nf(t){return typeof t!="number"?m2(t):{top:t,right:t,bottom:t,left:t}}function vi(t){const{x:e,y:r,width:n,height:o}=t;return{width:n,height:o,top:r,left:e,right:e+n,bottom:r+o,x:e,y:r}}function Mf(t,e,r){let{reference:n,floating:o}=t;const i=mi(e),s=ha(e),a=fa(s),l=Vt(e),c=i==="y",d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,f=n[a]/2-o[a]/2;let h;switch(l){case"top":h={x:d,y:n.y-o.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-o.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Nt(e)){case"start":h[s]-=f*(r&&c?-1:1);break;case"end":h[s]+=f*(r&&c?-1:1);break}return h}const b2=async(t,e,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:u}=Mf(c,n,l),f=n,h={},p=0;for(let m=0;m<a.length;m++){const{name:b,fn:v}=a[m],{x:y,y:_,data:x,reset:w}=await v({x:d,y:u,initialPlacement:n,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:t,floating:e}});d=y??d,u=_??u,h={...h,[b]:{...h[b],...x}},w&&p<=50&&(p++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(c=w.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):w.rects),{x:d,y:u}=Mf(c,f,l)),m=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:h}};async function ga(t,e){var r;e===void 0&&(e={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:h=0}=Kr(e,t),p=Nf(h),b=a[f?u==="floating"?"reference":"floating":u],v=vi(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),y=u==="floating"?{...s.floating,x:n,y:o}:s.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(_))?await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1}:{x:1,y:1},w=vi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:_,strategy:l}):y);return{top:(v.top-w.top+p.top)/x.y,bottom:(w.bottom-v.bottom+p.bottom)/x.y,left:(v.left-w.left+p.left)/x.x,right:(w.right-v.right+p.right)/x.x}}const y2=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:d=0}=Kr(t,e)||{};if(c==null)return{};const u=Nf(d),f={x:r,y:n},h=ha(o),p=fa(h),m=await s.getDimensions(c),b=h==="y",v=b?"top":"left",y=b?"bottom":"right",_=b?"clientHeight":"clientWidth",x=i.reference[p]+i.reference[h]-f[h]-i.floating[p],w=f[h]-i.reference[h],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let T=S?S[_]:0;(!T||!await(s.isElement==null?void 0:s.isElement(S)))&&(T=a.floating[_]||i.floating[p]);const M=x/2-w/2,N=T/2-m[p]/2-1,E=Ur(u[v],N),I=Ur(u[y],N),A=E,D=T-m[p]-I,O=T/2-m[p]/2+M,P=ua(A,O,D),L=!l.arrow&&Nt(o)!=null&&O!==P&&i.reference[p]/2-(O<A?E:I)-m[p]/2<0,z=L?O<A?O-A:O-D:0;return{[h]:f[h]+z,data:{[h]:P,centerOffset:O-P-z,...L&&{alignmentOffset:z}},reset:L}}});function v2(t,e,r){return(t?[...r.filter(o=>Nt(o)===t),...r.filter(o=>Nt(o)!==t)]:r.filter(o=>Vt(o)===o)).filter(o=>t?Nt(o)===t||(e?bi(o)!==o:!1):!0)}const x2=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,n,o;const{rects:i,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:f=Ef,autoAlignment:h=!0,...p}=Kr(t,e),m=u!==void 0||f===Ef?v2(u||null,h,f):f,b=await ga(e,p),v=((r=s.autoPlacement)==null?void 0:r.index)||0,y=m[v];if(y==null)return{};const _=Tf(y,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==y)return{reset:{placement:m[0]}};const x=[b[Vt(y)],b[_[0]],b[_[1]]],w=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:y,overflows:x}],S=m[v+1];if(S)return{data:{index:v+1,overflows:w},reset:{placement:S}};const T=w.map(E=>{const I=Nt(E.placement);return[E.placement,I&&d?E.overflows.slice(0,2).reduce((A,D)=>A+D,0):E.overflows[0],E.overflows]}).sort((E,I)=>E[1]-I[1]),N=((o=T.filter(E=>E[2].slice(0,Nt(E[0])?2:3).every(I=>I<=0))[0])==null?void 0:o[0])||T[0][0];return N!==a?{data:{index:v+1,overflows:w},reset:{placement:N}}:{}}}},w2=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...b}=Kr(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=Vt(o),y=Vt(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=f||(y||!m?[yi(a)]:h2(a));!f&&p!=="none"&&x.push(...p2(a,m,p,_));const w=[a,...x],S=await ga(e,b),T=[];let M=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&T.push(S[v]),u){const A=Tf(o,s,_);T.push(S[A[0]],S[A[1]])}if(M=[...M,{placement:o,overflows:T}],!T.every(A=>A<=0)){var N,E;const A=(((N=i.flip)==null?void 0:N.index)||0)+1,D=w[A];if(D)return{data:{index:A,overflows:M},reset:{placement:D}};let O=(E=M.filter(P=>P.overflows[0]<=0).sort((P,L)=>P.overflows[1]-L.overflows[1])[0])==null?void 0:E.placement;if(!O)switch(h){case"bestFit":{var I;const P=(I=M.map(L=>[L.placement,L.overflows.filter(z=>z>0).reduce((z,B)=>z+B,0)]).sort((L,z)=>L[1]-z[1])[0])==null?void 0:I[0];P&&(O=P);break}case"initialPlacement":O=a;break}if(o!==O)return{reset:{placement:O}}}return{}}}};async function k2(t,e){const{placement:r,platform:n,elements:o}=t,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Vt(r),a=Nt(r),l=mi(r)==="y",c=["left","top"].includes(s)?-1:1,d=i&&l?-1:1,u=Kr(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*d,y:f*c}:{x:f*c,y:h*d}}const C2=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=e,l=await k2(e,t);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},_2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:o}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:b=>{let{x:v,y}=b;return{x:v,y}}},...l}=Kr(t,e),c={x:r,y:n},d=await ga(e,l),u=mi(Vt(o)),f=Of(u);let h=c[f],p=c[u];if(i){const b=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+d[b],_=h-d[v];h=ua(y,h,_)}if(s){const b=u==="y"?"top":"left",v=u==="y"?"bottom":"right",y=p+d[b],_=p-d[v];p=ua(y,p,_)}const m=a.fn({...e,[f]:h,[u]:p});return{...m,data:{x:m.x-r,y:m.y-n}}}}};function Pf(t){const e=ft(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=je(t),i=o?t.offsetWidth:r,s=o?t.offsetHeight:n,a=pi(r)!==i||pi(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function pa(t){return pe(t)?t:t.contextElement}function Gr(t){const e=pa(t);if(!je(e))return Tt(1);const r=e.getBoundingClientRect(),{width:n,height:o,$:i}=Pf(e);let s=(i?pi(r.width):r.width)/n,a=(i?pi(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const S2=Tt(0);function Af(t){const e=et(t);return!na()||!e.visualViewport?S2:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function E2(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==et(t)?!1:e}function Cr(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const o=t.getBoundingClientRect(),i=pa(t);let s=Tt(1);e&&(n?pe(n)&&(s=Gr(n)):s=Gr(t));const a=E2(i,r,n)?Af(i):Tt(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const f=et(i),h=n&&pe(n)?et(n):n;let p=f,m=oa(p);for(;m&&n&&h!==p;){const b=Gr(m),v=m.getBoundingClientRect(),y=ft(m),_=v.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,x=v.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,u*=b.y,l+=_,c+=x,p=et(m),m=oa(p)}}return vi({width:d,height:u,x:l,y:c})}function ma(t,e){const r=hi(t).scrollLeft;return e?e.left+r:Cr(Et(t)).left+r}function Df(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-(r?0:ma(t,n)),i=n.top+e.scrollTop;return{x:o,y:i}}function O2(t){let{elements:e,rect:r,offsetParent:n,strategy:o}=t;const i=o==="fixed",s=Et(n),a=e?fi(e.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Tt(1);const d=Tt(0),u=je(n);if((u||!u&&!i)&&((wr(n)!=="body"||Un(s))&&(l=hi(n)),je(n))){const h=Cr(n);c=Gr(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}const f=s&&!u&&!i?Df(s,l,!0):Tt(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-l.scrollTop*c.y+d.y+f.y}}function T2(t){return Array.from(t.getClientRects())}function N2(t){const e=Et(t),r=hi(t),n=t.ownerDocument.body,o=kr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=kr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+ma(t);const a=-r.scrollTop;return ft(n).direction==="rtl"&&(s+=kr(e.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}function M2(t,e){const r=et(t),n=Et(t),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=na();(!c||c&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function P2(t,e){const r=Cr(t,!0,e==="fixed"),n=r.top+t.clientTop,o=r.left+t.clientLeft,i=je(t)?Gr(t):Tt(1),s=t.clientWidth*i.x,a=t.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:s,height:a,x:l,y:c}}function If(t,e,r){let n;if(e==="viewport")n=M2(t,r);else if(e==="document")n=N2(Et(t));else if(pe(e))n=P2(e,r);else{const o=Af(t);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return vi(n)}function Lf(t,e){const r=Ht(t);return r===e||!pe(r)||er(r)?!1:ft(r).position==="fixed"||Lf(r,e)}function A2(t,e){const r=e.get(t);if(r)return r;let n=tr(t,[],!1).filter(a=>pe(a)&&wr(a)!=="body"),o=null;const i=ft(t).position==="fixed";let s=i?Ht(t):t;for(;pe(s)&&!er(s);){const a=ft(s),l=ra(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Un(s)&&!l&&Lf(t,s))?n=n.filter(d=>d!==s):o=a,s=Ht(s)}return e.set(t,n),n}function D2(t){let{element:e,boundary:r,rootBoundary:n,strategy:o}=t;const s=[...r==="clippingAncestors"?fi(e)?[]:A2(e,this._c):[].concat(r),n],a=s[0],l=s.reduce((c,d)=>{const u=If(e,d,o);return c.top=kr(u.top,c.top),c.right=Ur(u.right,c.right),c.bottom=Ur(u.bottom,c.bottom),c.left=kr(u.left,c.left),c},If(e,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function I2(t){const{width:e,height:r}=Pf(t);return{width:e,height:r}}function L2(t,e,r){const n=je(e),o=Et(e),i=r==="fixed",s=Cr(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Tt(0);if(n||!n&&!i)if((wr(e)!=="body"||Un(o))&&(a=hi(e)),n){const f=Cr(e,!0,i,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else o&&(l.x=ma(o));const c=o&&!n&&!i?Df(o,a):Tt(0),d=s.left+a.scrollLeft-l.x-c.x,u=s.top+a.scrollTop-l.y-c.y;return{x:d,y:u,width:s.width,height:s.height}}function ba(t){return ft(t).position==="static"}function Ff(t,e){if(!je(t)||ft(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Et(t)===r&&(r=r.ownerDocument.body),r}function zf(t,e){const r=et(t);if(fi(t))return r;if(!je(t)){let o=Ht(t);for(;o&&!er(o);){if(pe(o)&&!ba(o))return o;o=Ht(o)}return r}let n=Ff(t,e);for(;n&&o2(n)&&ba(n);)n=Ff(n,e);return n&&er(n)&&ba(n)&&!ra(n)?r:n||i2(t)||r}const F2=async function(t){const e=this.getOffsetParent||zf,r=this.getDimensions,n=await r(t.floating);return{reference:L2(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function z2(t){return ft(t).direction==="rtl"}const B2={convertOffsetParentRelativeRectToViewportRelativeRect:O2,getDocumentElement:Et,getClippingRect:D2,getOffsetParent:zf,getElementRects:F2,getClientRects:T2,getDimensions:I2,getScale:Gr,isElement:pe,isRTL:z2};function Bf(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function $2(t,e){let r=null,n;const o=Et(t);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=t.getBoundingClientRect(),{left:d,top:u,width:f,height:h}=c;if(a||e(),!f||!h)return;const p=qr(u),m=qr(o.clientWidth-(d+f)),b=qr(o.clientHeight-(u+h)),v=qr(d),_={rootMargin:-p+"px "+-m+"px "+-b+"px "+-v+"px",threshold:kr(0,Ur(1,l))||1};let x=!0;function w(S){const T=S[0].intersectionRatio;if(T!==l){if(!x)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!Bf(c,t.getBoundingClientRect())&&s(),x=!1}try{r=new IntersectionObserver(w,{..._,root:o.ownerDocument})}catch{r=new IntersectionObserver(w,_)}r.observe(t)}return s(!0),i}function $f(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=pa(t),d=o||i?[...c?tr(c):[],...tr(e)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const u=c&&a?$2(c,r):null;let f=-1,h=null;s&&(h=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var _;(_=h)==null||_.observe(e)})),r()}),c&&!l&&h.observe(c),h.observe(e));let p,m=l?Cr(t):null;l&&b();function b(){const v=Cr(t);m&&!Bf(m,v)&&r(),m=v,p=requestAnimationFrame(b)}return r(),()=>{var v;d.forEach(y=>{o&&y.removeEventListener("scroll",r),i&&y.removeEventListener("resize",r)}),u==null||u(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const j2=C2,W2=x2,H2=_2,V2=w2,jf=y2,R2=(t,e,r)=>{const n=new Map,o={platform:B2,...r},i={...o.platform,_c:n};return b2(t,e,{...o,platform:i})};var xi=typeof document<"u"?k.useLayoutEffect:k.useEffect;function wi(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!wi(t[n],e[n]))return!1;return!0}if(o=Object.keys(t),r=o.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&t.$$typeof)&&!wi(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function Wf(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Hf(t,e){const r=Wf(t);return Math.round(e*r)/r}function ya(t){const e=C.useRef(t);return xi(()=>{e.current=t}),e}function Y2(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[d,u]=C.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=C.useState(n);wi(f,n)||h(n);const[p,m]=C.useState(null),[b,v]=C.useState(null),y=C.useCallback(B=>{B!==S.current&&(S.current=B,m(B))},[]),_=C.useCallback(B=>{B!==T.current&&(T.current=B,v(B))},[]),x=i||p,w=s||b,S=C.useRef(null),T=C.useRef(null),M=C.useRef(d),N=l!=null,E=ya(l),I=ya(o),A=ya(c),D=C.useCallback(()=>{if(!S.current||!T.current)return;const B={placement:e,strategy:r,middleware:f};I.current&&(B.platform=I.current),R2(S.current,T.current,B).then(j=>{const $={...j,isPositioned:A.current!==!1};O.current&&!wi(M.current,$)&&(M.current=$,Hg.flushSync(()=>{u($)}))})},[f,e,r,I,A]);xi(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,u(B=>({...B,isPositioned:!1})))},[c]);const O=C.useRef(!1);xi(()=>(O.current=!0,()=>{O.current=!1}),[]),xi(()=>{if(x&&(S.current=x),w&&(T.current=w),x&&w){if(E.current)return E.current(x,w,D);D()}},[x,w,D,E,N]);const P=C.useMemo(()=>({reference:S,floating:T,setReference:y,setFloating:_}),[y,_]),L=C.useMemo(()=>({reference:x,floating:w}),[x,w]),z=C.useMemo(()=>{const B={position:r,left:0,top:0};if(!L.floating)return B;const j=Hf(L.floating,d.x),$=Hf(L.floating,d.y);return a?{...B,transform:"translate("+j+"px, "+$+"px)",...Wf(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:j,top:$}},[r,a,L.floating,d.x,d.y]);return C.useMemo(()=>({...d,update:D,refs:P,elements:L,floatingStyles:z}),[d,D,P,L,z])}const U2=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:o}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?jf({element:n.current,padding:o}).fn(r):{}:n?jf({element:n,padding:o}).fn(r):{}}}},q2=(t,e)=>({...j2(t),options:[t,e]}),K2=(t,e)=>({...H2(t),options:[t,e]}),G2=(t,e)=>({...V2(t),options:[t,e]}),X2=(t,e)=>({...W2(t),options:[t,e]}),Z2=(t,e)=>({...U2(t),options:[t,e]});/*!
|
|
496
496
|
* tabbable 6.2.0
|
|
497
497
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
498
|
-
*/var K2=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],wi=K2.join(","),Hf=typeof Element>"u",Xr=Hf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ki=!Hf&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Ci=function t(e,r){var n;r===void 0&&(r=!0);var o=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),i=o===""||o==="true",s=i||r&&e&&t(e.parentNode);return s},G2=function(e){var r,n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"contenteditable");return n===""||n==="true"},X2=function(e,r,n){if(Ci(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(wi));return r&&Xr.call(e,wi)&&o.unshift(e),o=o.filter(n),o},J2=function t(e,r,n){for(var o=[],i=Array.from(e);i.length;){var s=i.shift();if(!Ci(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=t(l,!0,n);n.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var d=Xr.call(s,wi);d&&n.filter(s)&&(r||!e.includes(s))&&o.push(s);var u=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),f=!Ci(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(u&&f){var h=t(u===!0?s.children:u.children,!0,n);n.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},Rf=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Vf=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||G2(e))&&!Rf(e)?0:e.tabIndex},Z2=function(e,r){var n=Vf(e);return n<0&&r&&!Rf(e)?0:n},Q2=function(e,r){return e.tabIndex===r.tabIndex?e.documentOrder-r.documentOrder:e.tabIndex-r.tabIndex},Yf=function(e){return e.tagName==="INPUT"},eC=function(e){return Yf(e)&&e.type==="hidden"},tC=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},rC=function(e,r){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===r)return e[n]},nC=function(e){if(!e.name)return!0;var r=e.form||ki(e),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(e.name));else try{o=n(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=rC(o,e.form);return!i||i===e},oC=function(e){return Yf(e)&&e.type==="radio"},iC=function(e){return oC(e)&&!nC(e)},sC=function(e){var r,n=e&&ki(e),o=(r=n)===null||r===void 0?void 0:r.host,i=!1;if(n&&n!==e){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!i&&o;){var c,d,u;n=ki(o),o=(c=n)===null||c===void 0?void 0:c.host,i=!!((d=o)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(o))}}return i},Uf=function(e){var r=e.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},aC=function(e,r){var n=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var i=Xr.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if(Xr.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof o=="function"){for(var a=e;e;){var l=e.parentElement,c=ki(e);if(l&&!l.shadowRoot&&o(l)===!0)return Uf(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=a}if(sC(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Uf(e);return!1},lC=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var r=e.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return Xr.call(r,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}r=r.parentElement}return!1},cC=function(e,r){return!(r.disabled||Ci(r)||eC(r)||aC(r,e)||tC(r)||lC(r))},ma=function(e,r){return!(iC(r)||Vf(r)<0||!cC(e,r))},dC=function(e){var r=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},uC=function t(e){var r=[],n=[];return e.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=Z2(a,s),c=s?t(o.candidates):a;l===0?s?r.push.apply(r,c):r.push(a):n.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),n.sort(Q2).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(r)},_i=function(e,r){r=r||{};var n;return r.getShadowRoot?n=J2([e],r.includeContainer,{filter:ma.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:dC}):n=X2(e,r.includeContainer,ma.bind(null,r)),uC(n)},fC=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return Xr.call(e,wi)===!1?!1:ma(r,e)};function qf(t){return C.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})},t)}const hC=C.useInsertionEffect||(t=>t());function Nt(t){const e=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return hC(()=>{e.current=t}),C.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return e.current==null?void 0:e.current(...n)},[])}const ba="ArrowUp",qn="ArrowDown",Jr="ArrowLeft",Zr="ArrowRight";function Si(t,e,r){return Math.floor(t/e)!==r}function Kn(t,e){return e<0||e>=t.current.length}function ya(t,e){return Ue(t,{disabledIndices:e})}function Kf(t,e){return Ue(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function Ue(t,e){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:o,amount:i=1}=e===void 0?{}:e;const s=t.current,a=o?c=>o.includes(c):c=>{const d=s[c];return d==null||d.hasAttribute("disabled")||d.getAttribute("aria-disabled")==="true"};let l=r;do l+=n?-i:i;while(l>=0&&l<=s.length-1&&a(l));return l}function gC(t,e){let{event:r,orientation:n,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:d=!1}=e,u=c;if(r.key===ba){if(d&&We(r),c===-1)u=l;else if(u=Ue(t,{startingIndex:u,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||u<0)){const f=c%i,h=l%i,g=l-(h-f);h===f?u=l:u=h>f?g:g-i}Kn(t,u)&&(u=c)}if(r.key===qn&&(d&&We(r),c===-1?u=a:(u=Ue(t,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(u=Ue(t,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),Kn(t,u)&&(u=c)),n==="both"){const f=qr(c/i);r.key===Zr&&(d&&We(r),c%i!==i-1?(u=Ue(t,{startingIndex:c,disabledIndices:s}),o&&Si(u,i,f)&&(u=Ue(t,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(u=Ue(t,{startingIndex:c-c%i-1,disabledIndices:s})),Si(u,i,f)&&(u=c)),r.key===Jr&&(d&&We(r),c%i!==0?(u=Ue(t,{startingIndex:c,disabledIndices:s,decrement:!0}),o&&Si(u,i,f)&&(u=Ue(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(u=Ue(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),Si(u,i,f)&&(u=c));const h=qr(l/i)===f;Kn(t,u)&&(o&&h?u=r.key===Jr?l:Ue(t,{startingIndex:c-c%i-1,disabledIndices:s}):u=c)}return u}function pC(t,e,r){const n=[];let o=0;return t.forEach((i,s)=>{let{width:a,height:l}=i;if(a>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(r&&(o=0);!c;){const d=[];for(let u=0;u<a;u++)for(let f=0;f<l;f++)d.push(o+u+f*e);o%e+a<=e&&d.every(u=>n[u]==null)?(d.forEach(u=>{n[u]=s}),c=!0):o++}}),[...n]}function mC(t,e,r,n,o){if(t===-1)return-1;const i=r.indexOf(t);switch(o){case"tl":return i;case"tr":return i+e[t].width-1;case"bl":return i+(e[t].height-1)*n;case"br":return r.lastIndexOf(t)}}function bC(t,e){return e.flatMap((r,n)=>t.includes(r)?[n]:[])}let Gf=0;function Vt(t,e){e===void 0&&(e={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=e;n&&cancelAnimationFrame(Gf);const i=()=>t==null?void 0:t.focus({preventScroll:r});o?i():Gf=requestAnimationFrame(i)}var me=typeof document<"u"?k.useLayoutEffect:k.useEffect;function yC(t,e){const r=t.compareDocumentPosition(e);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}function vC(t,e){if(t.size!==e.size)return!1;for(const[r,n]of t.entries())if(n!==e.get(r))return!1;return!0}const Xf=C.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function xC(t){let{children:e,elementsRef:r,labelsRef:n}=t;const[o,i]=C.useState(()=>new Map),s=C.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),a=C.useCallback(l=>{i(c=>{const d=new Map(c);return d.delete(l),d})},[]);return me(()=>{const l=new Map(o);Array.from(l.keys()).sort(yC).forEach((d,u)=>{l.set(d,u)}),vC(o,l)||i(l)},[o]),C.createElement(Xf.Provider,{value:C.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:r,labelsRef:n}),[s,a,o,r,n])},e)}function wC(t){let{label:e}=t===void 0?{}:t;const[r,n]=C.useState(null),o=C.useRef(null),{register:i,unregister:s,map:a,elementsRef:l,labelsRef:c}=C.useContext(Xf),d=C.useCallback(u=>{if(o.current=u,r!==null&&(l.current[r]=u,c)){var f;const h=e!==void 0;c.current[r]=h?e:(f=u==null?void 0:u.textContent)!=null?f:null}},[r,l,c,e]);return me(()=>{const u=o.current;if(u)return i(u),()=>{s(u)}},[i,s]),me(()=>{const u=o.current?a.get(o.current):null;u!=null&&n(u)},[a]),C.useMemo(()=>({ref:d,index:r??-1}),[r,d])}function Gn(){return Gn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Gn.apply(this,arguments)}let va=!1,kC=0;const Jf=()=>"floating-ui-"+kC++;function CC(){const[t,e]=C.useState(()=>va?Jf():void 0);return me(()=>{t==null&&e(Jf())},[]),C.useEffect(()=>{va||(va=!0)},[]),t}const Ei=C.useId||CC;function _C(){const t=new Map;return{emit(e,r){var n;(n=t.get(e))==null||n.forEach(o=>o(r))},on(e,r){t.set(e,[...t.get(e)||[],r])},off(e,r){var n;t.set(e,((n=t.get(e))==null?void 0:n.filter(o=>o!==r))||[])}}}const SC=C.createContext(null),EC=C.createContext(null),Oi=()=>{var t;return((t=C.useContext(SC))==null?void 0:t.id)||null},Xn=()=>C.useContext(EC);function _r(t){return"data-floating-ui-"+t}function Pt(t){const e=k.useRef(t);return me(()=>{e.current=t}),e}const Zf=_r("safe-polygon");function xa(t,e,r){return r&&!hi(r)?0:typeof t=="number"?t:t==null?void 0:t[e]}function OC(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,dataRef:o,events:i,elements:{domReference:s,floating:a},refs:l}=t,{enabled:c=!0,delay:d=0,handleClose:u=null,mouseOnly:f=!1,restMs:h=0,move:g=!0}=e,m=Xn(),b=Oi(),v=Pt(u),y=Pt(d),_=C.useRef(),x=C.useRef(),w=C.useRef(),S=C.useRef(),T=C.useRef(!0),N=C.useRef(!1),M=C.useRef(()=>{}),E=C.useCallback(()=>{var O;const P=(O=o.current.openEvent)==null?void 0:O.type;return(P==null?void 0:P.includes("mouse"))&&P!=="mousedown"},[o]);C.useEffect(()=>{if(!c)return;function O(P){let{open:L}=P;L||(clearTimeout(x.current),clearTimeout(S.current),T.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[c,i]),C.useEffect(()=>{if(!c||!v.current||!r)return;function O(L){E()&&n(!1,L,"hover")}const P=qe(a).documentElement;return P.addEventListener("mouseleave",O),()=>{P.removeEventListener("mouseleave",O)}},[a,r,n,c,v,E]);const I=C.useCallback(function(O,P,L){P===void 0&&(P=!0),L===void 0&&(L="hover");const z=xa(y.current,"close",_.current);z&&!w.current?(clearTimeout(x.current),x.current=setTimeout(()=>n(!1,O,L),z)):P&&(clearTimeout(x.current),n(!1,O,L))},[y,n]),A=C.useCallback(()=>{M.current(),w.current=void 0},[]),D=C.useCallback(()=>{if(N.current){const O=qe(l.floating.current).body;O.style.pointerEvents="",O.removeAttribute(Zf),N.current=!1}},[l]);return C.useEffect(()=>{if(!c)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function P(B){if(clearTimeout(x.current),T.current=!1,f&&!hi(_.current)||h>0&&xa(y.current,"open")===0)return;const j=xa(y.current,"open",_.current);j?x.current=setTimeout(()=>{n(!0,B,"hover")},j):n(!0,B,"hover")}function L(B){if(O())return;M.current();const j=qe(a);if(clearTimeout(S.current),v.current){r||clearTimeout(x.current),w.current=v.current({...t,tree:m,x:B.clientX,y:B.clientY,onClose(){D(),A(),I(B,!0,"safe-polygon")}});const H=w.current;j.addEventListener("mousemove",H),M.current=()=>{j.removeEventListener("mousemove",H)};return}(_.current==="touch"?!Ee(a,B.relatedTarget):!0)&&I(B)}function z(B){O()||v.current==null||v.current({...t,tree:m,x:B.clientX,y:B.clientY,onClose(){D(),A(),I(B)}})(B)}if(pe(s)){const B=s;return r&&B.addEventListener("mouseleave",z),a==null||a.addEventListener("mouseleave",z),g&&B.addEventListener("mousemove",P,{once:!0}),B.addEventListener("mouseenter",P),B.addEventListener("mouseleave",L),()=>{r&&B.removeEventListener("mouseleave",z),a==null||a.removeEventListener("mouseleave",z),g&&B.removeEventListener("mousemove",P),B.removeEventListener("mouseenter",P),B.removeEventListener("mouseleave",L)}}},[s,a,c,t,f,h,g,I,A,D,n,r,m,y,v,o]),me(()=>{var O;if(c&&r&&(O=v.current)!=null&&O.__options.blockPointerEvents&&E()){const L=qe(a).body;if(L.setAttribute(Zf,""),L.style.pointerEvents="none",N.current=!0,pe(s)&&a){var P;const z=s,B=m==null||(P=m.nodesRef.current.find(j=>j.id===b))==null||(P=P.context)==null?void 0:P.elements.floating;return B&&(B.style.pointerEvents=""),z.style.pointerEvents="auto",a.style.pointerEvents="auto",()=>{z.style.pointerEvents="",a.style.pointerEvents=""}}}},[c,r,b,a,s,m,v,E]),me(()=>{r||(_.current=void 0,A(),D())},[r,A,D]),C.useEffect(()=>()=>{A(),clearTimeout(x.current),clearTimeout(S.current),D()},[c,s,A,D]),C.useMemo(()=>{if(!c)return{};function O(P){_.current=P.pointerType}return{reference:{onPointerDown:O,onPointerEnter:O,onMouseMove(P){r||h===0||(clearTimeout(S.current),S.current=setTimeout(()=>{T.current||n(!0,P.nativeEvent,"hover")},h))}},floating:{onMouseEnter(){clearTimeout(x.current)},onMouseLeave(P){I(P.nativeEvent,!1)}}}},[c,h,r,n,I])}function TC(t,e){var r;let n=[],o=(r=t.find(i=>i.id===e))==null?void 0:r.parentId;for(;o;){const i=t.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(n=n.concat(i))}return n}function Sr(t,e){let r=t.filter(o=>{var i;return o.parentId===e&&((i=o.context)==null?void 0:i.open)}),n=r;for(;n.length;)n=t.filter(o=>{var i;return(i=n)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),r=r.concat(n);return r}function MC(t,e){let r,n=-1;function o(i,s){s>n&&(r=i,n=s),Sr(t,i).forEach(l=>{o(l.id,s+1)})}return o(e,0),t.find(i=>i.id===r)}let Qr=new WeakMap,Ti=new WeakSet,Mi={},wa=0;const NC=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Qf=t=>t&&(t.host||Qf(t.parentNode)),PC=(t,e)=>e.map(r=>{if(t.contains(r))return r;const n=Qf(r);return t.contains(n)?n:null}).filter(r=>r!=null);function AC(t,e,r,n){const o="data-floating-ui-inert",i=n?"inert":r?"aria-hidden":null,s=PC(e,t),a=new Set,l=new Set(s),c=[];Mi[o]||(Mi[o]=new WeakMap);const d=Mi[o];s.forEach(u),f(e),a.clear();function u(h){!h||a.has(h)||(a.add(h),h.parentNode&&u(h.parentNode))}function f(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,g=>{if(a.has(g))f(g);else{const m=i?g.getAttribute(i):null,b=m!==null&&m!=="false",v=(Qr.get(g)||0)+1,y=(d.get(g)||0)+1;Qr.set(g,v),d.set(g,y),c.push(g),v===1&&b&&Ti.add(g),y===1&&g.setAttribute(o,""),!b&&i&&g.setAttribute(i,"true")}})}return wa++,()=>{c.forEach(h=>{const g=(Qr.get(h)||0)-1,m=(d.get(h)||0)-1;Qr.set(h,g),d.set(h,m),g||(!Ti.has(h)&&i&&h.removeAttribute(i),Ti.delete(h)),m||h.removeAttribute(o)}),wa--,wa||(Qr=new WeakMap,Qr=new WeakMap,Ti=new WeakSet,Mi={})}}function eh(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);const n=qe(t[0]).body;return AC(t.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,e,r)}const Jn=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function th(t,e){const r=_i(t,Jn());e==="prev"&&r.reverse();const n=r.indexOf(Ot(qe(t)));return r.slice(n+1)[0]}function rh(){return th(document.body,"next")}function nh(){return th(document.body,"prev")}function Zn(t,e){const r=e||t.currentTarget,n=t.relatedTarget;return!n||!Ee(r,n)}function DC(t){_i(t,Jn()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function IC(t){t.querySelectorAll("[data-tabindex]").forEach(r=>{const n=r.dataset.tabindex;delete r.dataset.tabindex,n?r.setAttribute("tabindex",n):r.removeAttribute("tabindex")})}const ka={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let LC;function oh(t){t.key==="Tab"&&(t.target,clearTimeout(LC))}const Ni=C.forwardRef(function(e,r){const[n,o]=C.useState();me(()=>(oa()&&o("button"),document.addEventListener("keydown",oh),()=>{document.removeEventListener("keydown",oh)}),[]);const i={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[_r("focus-guard")]:"",style:ka};return C.createElement("span",Gn({},e,i))}),ih=C.createContext(null),sh=_r("portal");function FC(t){let{id:e,root:r}=t===void 0?{}:t;const[n,o]=C.useState(null),i=Ei(),s=ah(),a=C.useRef(null);return me(()=>()=>{n==null||n.remove(),queueMicrotask(()=>{a.current=null})},[n]),me(()=>{if(a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=i,c.setAttribute(sh,""),l.appendChild(c),a.current=c,o(c)},[e,i]),me(()=>{if(a.current)return;let l=r||(s==null?void 0:s.portalNode);l&&!pe(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=i,d.setAttribute(sh,""),l=c||l,l.appendChild(d),a.current=d,o(d)},[e,r,i,s]),n}function zC(t){let{children:e,id:r,root:n=null,preserveTabOrder:o=!0}=t;const i=FC({id:r,root:n}),[s,a]=C.useState(null),l=C.useRef(null),c=C.useRef(null),d=C.useRef(null),u=C.useRef(null),f=!!s&&!s.modal&&s.open&&o&&!!(n||i);return C.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function h(g){i&&Zn(g)&&(g.type==="focusin"?IC:DC)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,s==null?void 0:s.modal]),C.createElement(ih.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:i,setFocusManagerState:a}),[o,i])},f&&i&&C.createElement(Ni,{"data-type":"outside",ref:l,onFocus:h=>{if(Zn(h,i)){var g;(g=d.current)==null||g.focus()}else{const m=nh()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),f&&i&&C.createElement("span",{"aria-owns":i.id,style:ka}),i&&$a.createPortal(e,i),f&&i&&C.createElement(Ni,{"data-type":"outside",ref:c,onFocus:h=>{if(Zn(h,i)){var g;(g=u.current)==null||g.focus()}else{const m=rh()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,h.nativeEvent))}}}))}const ah=()=>C.useContext(ih),BC=20;let Er=[];function Ca(t){Er=Er.filter(r=>r.isConnected);let e=t;if(!(!e||wr(e)==="body")){if(!fC(e,Jn())){const r=_i(e,Jn())[0];if(!r)return;e=r}Er.push(e),Er.length>BC&&(Er=Er.slice(-20))}}function lh(){return Er.slice().reverse().find(t=>t.isConnected)}const $C=C.forwardRef(function(e,r){return C.createElement("button",Gn({},e,{type:"button",ref:r,tabIndex:-1,style:ka}))});function ch(t){const{context:e,children:r,disabled:n=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=t,{open:u,refs:f,nodeId:h,onOpenChange:g,events:m,dataRef:b,elements:{domReference:v,floating:y}}=e,_=typeof s=="number"&&s<0,x=Cf(v)&&_,w=NC()?i:!0,S=Pt(o),T=Pt(s),N=Pt(a),M=Xn(),E=ah(),I=C.useRef(null),A=C.useRef(null),D=C.useRef(!1),O=C.useRef(!1),P=E!=null,L=C.useCallback(function($){return $===void 0&&($=y),$?_i($,Jn()):[]},[y]),z=C.useCallback($=>{const H=L($);return S.current.map(R=>v&&R==="reference"?v:y&&R==="floating"?y:H).filter(Boolean).flat()},[v,y,S,L]);C.useEffect(()=>{if(n||!l)return;function $(R){if(R.key==="Tab"){Ee(y,Ot(qe(y)))&&L().length===0&&!x&&We(R);const Y=z(),U=rr(R);S.current[0]==="reference"&&U===v&&(We(R),R.shiftKey?Vt(Y[Y.length-1]):Vt(Y[1])),S.current[1]==="floating"&&U===y&&R.shiftKey&&(We(R),Vt(Y[0]))}}const H=qe(y);return H.addEventListener("keydown",$),()=>{H.removeEventListener("keydown",$)}},[n,v,y,l,S,x,L,z]),C.useEffect(()=>{if(n||!d)return;function $(){O.current=!0,setTimeout(()=>{O.current=!1})}function H(R){const Y=R.relatedTarget;queueMicrotask(()=>{const U=!(Ee(v,Y)||Ee(y,Y)||Ee(Y,y)||Ee(E==null?void 0:E.portalNode,Y)||Y!=null&&Y.hasAttribute(_r("focus-guard"))||M&&(Sr(M.nodesRef.current,h).find(q=>{var G,de;return Ee((G=q.context)==null?void 0:G.elements.floating,Y)||Ee((de=q.context)==null?void 0:de.elements.domReference,Y)})||TC(M.nodesRef.current,h).find(q=>{var G,de;return((G=q.context)==null?void 0:G.elements.floating)===Y||((de=q.context)==null?void 0:de.elements.domReference)===Y})));Y&&U&&!O.current&&Y!==lh()&&(D.current=!0,g(!1,R))})}if(y&&je(v))return v.addEventListener("focusout",H),v.addEventListener("pointerdown",$),!l&&y.addEventListener("focusout",H),()=>{v.removeEventListener("focusout",H),v.removeEventListener("pointerdown",$),!l&&y.removeEventListener("focusout",H)}},[n,v,y,l,h,M,E,g,d]),C.useEffect(()=>{var $;if(n)return;const H=Array.from((E==null||($=E.portalNode)==null?void 0:$.querySelectorAll("["+_r("portal")+"]"))||[]);if(y){const R=[y,...H,I.current,A.current,S.current.includes("reference")||x?v:null].filter(U=>U!=null),Y=l||x?eh(R,w,!w):eh(R);return()=>{Y()}}},[n,v,y,l,S,E,x,w]),me(()=>{if(n||!y)return;const $=qe(y),H=Ot($);queueMicrotask(()=>{const R=z(y),Y=T.current,U=(typeof Y=="number"?R[Y]:Y.current)||y,q=Ee(y,H);!_&&!q&&u&&Vt(U,{preventScroll:U===y})})},[n,u,y,_,z,T]),me(()=>{if(n||!y)return;let $=!1;const H=qe(y),R=Ot(H),Y=b.current;Ca(R);function U(q){let{reason:G,event:de,nested:X}=q;G==="escape-key"&&f.domReference.current&&Ca(f.domReference.current),G==="hover"&&de.type==="mouseleave"&&(D.current=!0),G==="outside-press"&&(X?(D.current=!1,$=!0):D.current=!(wf(de)||na(de)))}return m.on("openchange",U),()=>{m.off("openchange",U);const q=Ot(H),G=Ee(y,q)||M&&Sr(M.nodesRef.current,h).some(oe=>{var Le;return Ee((Le=oe.context)==null?void 0:Le.elements.floating,q)});(G||Y.openEvent&&["click","mousedown"].includes(Y.openEvent.type))&&f.domReference.current&&Ca(f.domReference.current);const X=lh();N.current&&!D.current&&je(X)&&(!(X!==q&&q!==H.body)||G)&&Vt(X,{cancelPrevious:!1,preventScroll:$})}},[n,y,N,b,f,m,M,h]),me(()=>{if(!(n||!E))return E.setFocusManagerState({modal:l,closeOnFocusOut:d,open:u,onOpenChange:g,refs:f}),()=>{E.setFocusManagerState(null)}},[n,E,l,u,g,f,d]),me(()=>{if(n||!y||typeof MutationObserver!="function"||_)return;const $=()=>{const R=y.getAttribute("tabindex");S.current.includes("floating")||Ot(qe(y))!==f.domReference.current&&L().length===0?R!=="0"&&y.setAttribute("tabindex","0"):R!=="-1"&&y.setAttribute("tabindex","-1")};$();const H=new MutationObserver($);return H.observe(y,{childList:!0,subtree:!0,attributes:!0}),()=>{H.disconnect()}},[n,y,f,S,L,_]);function B($){return n||!c||!l?null:C.createElement($C,{ref:$==="start"?I:A,onClick:H=>g(!1,H.nativeEvent)},typeof c=="string"?c:"Dismiss")}const j=!n&&w&&(P||l);return C.createElement(C.Fragment,null,j&&C.createElement(Ni,{"data-type":"inside",ref:E==null?void 0:E.beforeInsideRef,onFocus:$=>{if(l){const R=z();Vt(o[0]==="reference"?R[0]:R[R.length-1])}else if(E!=null&&E.preserveTabOrder&&E.portalNode)if(D.current=!1,Zn($,E.portalNode)){const R=rh()||v;R==null||R.focus()}else{var H;(H=E.beforeOutsideRef.current)==null||H.focus()}}}),!x&&B("start"),r,B("end"),j&&C.createElement(Ni,{"data-type":"inside",ref:E==null?void 0:E.afterInsideRef,onFocus:$=>{if(l)Vt(z()[0]);else if(E!=null&&E.preserveTabOrder&&E.portalNode)if(d&&(D.current=!0),Zn($,E.portalNode)){const R=nh()||v;R==null||R.focus()}else{var H;(H=E.afterOutsideRef.current)==null||H.focus()}}}))}const _a=new Set,jC=C.forwardRef(function(e,r){let{lockScroll:n=!1,...o}=e;const i=Ei();return me(()=>{if(!n)return;_a.add(i);const s=/iP(hone|ad|od)|iOS/.test(ra()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",d=window.innerWidth-document.documentElement.clientWidth,u=a.left?parseFloat(a.left):window.pageXOffset,f=a.top?parseFloat(a.top):window.pageYOffset;if(a.overflow="hidden",d&&(a[c]=d+"px"),s){var h,g;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,b=((g=window.visualViewport)==null?void 0:g.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(b))+"px",left:-(u-Math.floor(m))+"px",right:"0"})}return()=>{_a.delete(i),_a.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(u,f)))}},[i,n]),C.createElement("div",Gn({ref:r},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function dh(t){return je(t.target)&&t.target.tagName==="BUTTON"}function uh(t){return aa(t)}function fh(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,dataRef:o,elements:{domReference:i}}=t,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=e,u=C.useRef(),f=C.useRef(!1);return C.useMemo(()=>s?{reference:{onPointerDown(h){u.current=h.pointerType},onMouseDown(h){h.button===0&&(hi(u.current,!0)&&c||a!=="click"&&(r&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?n(!1,h.nativeEvent,"click"):(h.preventDefault(),n(!0,h.nativeEvent,"click"))))},onClick(h){if(a==="mousedown"&&u.current){u.current=void 0;return}hi(u.current,!0)&&c||(r&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?n(!1,h.nativeEvent,"click"):n(!0,h.nativeEvent,"click"))},onKeyDown(h){u.current=void 0,!(h.defaultPrevented||!d||dh(h))&&(h.key===" "&&!uh(i)&&(h.preventDefault(),f.current=!0),h.key==="Enter"&&n(!(r&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!d||dh(h)||uh(i)||h.key===" "&&f.current&&(f.current=!1,n(!(r&&l),h.nativeEvent,"click"))}}}:{},[s,o,a,c,d,i,l,r,n])}const WC={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},HC={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},hh=t=>{var e,r;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(r=t==null?void 0:t.outsidePress)!=null?r:!0}};function gh(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,nodeId:o,elements:{reference:i,domReference:s,floating:a},dataRef:l}=t,{enabled:c=!0,escapeKey:d=!0,outsidePress:u=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:g="pointerdown",ancestorScroll:m=!1,bubbles:b,capture:v}=e,y=Xn(),_=Nt(typeof u=="function"?u:()=>!1),x=typeof u=="function"?_:u,w=C.useRef(!1),S=C.useRef(!1),{escapeKey:T,outsidePress:N}=hh(b),{escapeKey:M,outsidePress:E}=hh(v),I=Nt(P=>{if(!r||!c||!d||P.key!=="Escape")return;const L=y?Sr(y.nodesRef.current,o):[];if(!T&&(P.stopPropagation(),L.length>0)){let z=!0;if(L.forEach(B=>{var j;if((j=B.context)!=null&&j.open&&!B.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}n(!1,n2(P)?P.nativeEvent:P,"escape-key")}),A=Nt(P=>{var L;const z=()=>{var B;I(P),(B=rr(P))==null||B.removeEventListener("keydown",z)};(L=rr(P))==null||L.addEventListener("keydown",z)}),D=Nt(P=>{const L=w.current;w.current=!1;const z=S.current;if(S.current=!1,f==="click"&&z||L||typeof x=="function"&&!x(P))return;const B=rr(P),j="["+_r("inert")+"]",$=qe(a).querySelectorAll(j);let H=pe(B)?B:null;for(;H&&!er(H);){const U=Ht(H);if(er(U)||!pe(U))break;H=U}if($.length&&pe(B)&&!o2(B)&&!Ee(B,a)&&Array.from($).every(U=>!Ee(H,U)))return;if(je(B)&&a){const U=B.clientWidth>0&&B.scrollWidth>B.clientWidth,q=B.clientHeight>0&&B.scrollHeight>B.clientHeight;let G=q&&P.offsetX>B.clientWidth;if(q&&ft(B).direction==="rtl"&&(G=P.offsetX<=B.offsetWidth-B.clientWidth),G||U&&P.offsetY>B.clientHeight)return}const R=y&&Sr(y.nodesRef.current,o).some(U=>{var q;return sa(P,(q=U.context)==null?void 0:q.elements.floating)});if(sa(P,a)||sa(P,s)||R)return;const Y=y?Sr(y.nodesRef.current,o):[];if(Y.length>0){let U=!0;if(Y.forEach(q=>{var G;if((G=q.context)!=null&&G.open&&!q.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}n(!1,P,"outside-press")}),O=Nt(P=>{var L;const z=()=>{var B;D(P),(B=rr(P))==null||B.removeEventListener(f,z)};(L=rr(P))==null||L.addEventListener(f,z)});return C.useEffect(()=>{if(!r||!c)return;l.current.__escapeKeyBubbles=T,l.current.__outsidePressBubbles=N;function P(B){n(!1,B,"ancestor-scroll")}const L=qe(a);d&&L.addEventListener("keydown",M?A:I,M),x&&L.addEventListener(f,E?O:D,E);let z=[];return m&&(pe(s)&&(z=tr(s)),pe(a)&&(z=z.concat(tr(a))),!pe(i)&&i&&i.contextElement&&(z=z.concat(tr(i.contextElement)))),z=z.filter(B=>{var j;return B!==((j=L.defaultView)==null?void 0:j.visualViewport)}),z.forEach(B=>{B.addEventListener("scroll",P,{passive:!0})}),()=>{d&&L.removeEventListener("keydown",M?A:I,M),x&&L.removeEventListener(f,E?O:D,E),z.forEach(B=>{B.removeEventListener("scroll",P)})}},[l,a,s,i,d,x,f,r,n,m,c,T,N,I,M,A,D,E,O]),C.useEffect(()=>{w.current=!1},[x,f]),C.useMemo(()=>c?{reference:{onKeyDown:I,[WC[g]]:P=>{h&&n(!1,P.nativeEvent,"reference-press")}},floating:{onKeyDown:I,onMouseDown(){S.current=!0},onMouseUp(){S.current=!0},[HC[f]]:()=>{w.current=!0}}}:{},[c,h,f,g,n,I])}let Sa;process.env.NODE_ENV!=="production"&&(Sa=new Set);function ph(t){var e;t===void 0&&(t={});const{open:r=!1,onOpenChange:n,nodeId:o}=t;if(process.env.NODE_ENV!=="production"){var i;const N="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((i=t.elements)!=null&&i.reference&&!pe(t.elements.reference)){var s;if(!((s=Sa)!=null&&s.has(N))){var a;(a=Sa)==null||a.add(N),console.error(N)}}}const[l,c]=C.useState(null),d=((e=t.elements)==null?void 0:e.reference)||l,u=W2(t),f=Xn(),h=Oi()!=null,g=Nt((N,M,E)=>{N&&(b.current.openEvent=M),v.emit("openchange",{open:N,event:M,reason:E,nested:h}),n==null||n(N,M,E)}),m=C.useRef(null),b=C.useRef({}),v=C.useState(()=>_C())[0],y=Ei(),_=C.useCallback(N=>{const M=pe(N)?{getBoundingClientRect:()=>N.getBoundingClientRect(),contextElement:N}:N;u.refs.setReference(M)},[u.refs]),x=C.useCallback(N=>{(pe(N)||N===null)&&(m.current=N,c(N)),(pe(u.refs.reference.current)||u.refs.reference.current===null||N!==null&&!pe(N))&&u.refs.setReference(N)},[u.refs]),w=C.useMemo(()=>({...u.refs,setReference:x,setPositionReference:_,domReference:m}),[u.refs,x,_]),S=C.useMemo(()=>({...u.elements,domReference:d}),[u.elements,d]),T=C.useMemo(()=>({...u,refs:w,elements:S,dataRef:b,nodeId:o,floatingId:y,events:v,open:r,onOpenChange:g}),[u,o,y,v,r,g,w,S]);return me(()=>{const N=f==null?void 0:f.nodesRef.current.find(M=>M.id===o);N&&(N.context=T)}),C.useMemo(()=>({...u,context:T,refs:w,elements:S}),[u,w,S,T])}function RC(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,events:o,refs:i,elements:{domReference:s}}=t,{enabled:a=!0,visibleOnly:l=!0}=e,c=C.useRef(!1),d=C.useRef(),u=C.useRef(!0);return C.useEffect(()=>{if(!a)return;const f=et(s);function h(){!r&&je(s)&&s===Ot(qe(s))&&(c.current=!0)}function g(){u.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",g,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",g,!0)}},[s,r,a]),C.useEffect(()=>{if(!a)return;function f(h){let{reason:g}=h;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,a]),C.useEffect(()=>()=>{clearTimeout(d.current)},[]),C.useMemo(()=>a?{reference:{onPointerDown(f){na(f.nativeEvent)||(u.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=rr(f.nativeEvent);if(l&&pe(h))try{if(oa()&&kf())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!u.current&&!aa(h))return}n(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,g=pe(h)&&h.hasAttribute(_r("focus-guard"))&&h.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{const m=Ot(s?s.ownerDocument:document);!h&&m===s||Ee(i.floating.current,m)||Ee(s,m)||g||n(!1,f.nativeEvent,"focus")})}}}:{},[a,l,s,i,n])}const mh="active",bh="selected";function Ea(t,e,r){const n=new Map,o=r==="item";let i=t;if(o&&t){const{[mh]:s,[bh]:a,...l}=t;i=l}return{...r==="floating"&&{tabIndex:-1},...i,...e.map(s=>{const a=s?s[r]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(o&&[mh,bh].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof d=="function"){var u;(u=n.get(c))==null||u.push(d),s[c]=function(){for(var f,h=arguments.length,g=new Array(h),m=0;m<h;m++)g[m]=arguments[m];return(f=n.get(c))==null?void 0:f.map(b=>b(...g)).find(b=>b!==void 0)}}}else s[c]=d}),s),{})}}function yh(t){t===void 0&&(t=[]);const e=t,r=C.useCallback(i=>Ea(i,t,"reference"),e),n=C.useCallback(i=>Ea(i,t,"floating"),e),o=C.useCallback(i=>Ea(i,t,"item"),t.map(i=>i==null?void 0:i.item));return C.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])}let vh=!1;function Pi(t,e,r){switch(t){case"vertical":return e;case"horizontal":return r;default:return e||r}}function xh(t,e){return Pi(e,t===ba||t===qn,t===Jr||t===Zr)}function Oa(t,e,r){return Pi(e,t===qn,r?t===Jr:t===Zr)||t==="Enter"||t===" "||t===""}function VC(t,e,r){return Pi(e,r?t===Jr:t===Zr,t===qn)}function wh(t,e,r){return Pi(e,r?t===Zr:t===Jr,t===ba)}function YC(t,e){const{open:r,onOpenChange:n,refs:o,elements:{domReference:i,floating:s}}=t,{listRef:a,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:u=null,allowEscape:f=!1,loop:h=!1,nested:g=!1,rtl:m=!1,virtual:b=!1,focusItemOnOpen:v="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:_=!0,disabledIndices:x=void 0,orientation:w="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:N,itemSizes:M,dense:E=!1}=e;process.env.NODE_ENV!=="production"&&(f&&(h||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),b||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),w==="vertical"&&S>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const I=Oi(),A=Xn(),D=Nt(c),O=C.useRef(v),P=C.useRef(u??-1),L=C.useRef(null),z=C.useRef(!0),B=C.useRef(D),j=C.useRef(!!s),$=C.useRef(!1),H=C.useRef(!1),R=Pt(x),Y=Pt(r),U=Pt(T),[q,G]=C.useState(),[de,X]=C.useState(),oe=Nt(function(Z,Oe,le){le===void 0&&(le=!1);const re=Z.current[Oe.current];re&&(b?(G(re.id),A==null||A.events.emit("virtualfocus",re),N&&(N.current=re)):Vt(re,{preventScroll:!0,sync:kf()&&oa()?vh||$.current:!1}),requestAnimationFrame(()=>{const ge=U.current;ge&&re&&(le||!z.current)&&(re.scrollIntoView==null||re.scrollIntoView(typeof ge=="boolean"?{block:"nearest",inline:"nearest"}:ge))}))});me(()=>{document.createElement("div").focus({get preventScroll(){return vh=!0,!1}})},[]),me(()=>{d&&(r&&s?O.current&&u!=null&&(H.current=!0,P.current=u,D(u)):j.current&&(P.current=-1,B.current(null)))},[d,r,s,u,D]),me(()=>{if(d&&r&&s)if(l==null){if($.current=!1,u!=null)return;if(j.current&&(P.current=-1,oe(a,P)),!j.current&&O.current&&(L.current!=null||O.current===!0&&L.current==null)){let Z=0;const Oe=()=>{a.current[0]==null?(Z<2&&(Z?requestAnimationFrame:queueMicrotask)(Oe),Z++):(P.current=L.current==null||Oa(L.current,w,m)||g?ya(a,R.current):Kf(a,R.current),L.current=null,D(P.current))};Oe()}}else Kn(a,l)||(P.current=l,oe(a,P,H.current),H.current=!1)},[d,r,s,l,u,g,a,w,m,D,oe,R]),me(()=>{var Z;if(!d||s||!A||b||!j.current)return;const Oe=A.nodesRef.current,le=(Z=Oe.find(Q=>Q.id===I))==null||(Z=Z.context)==null?void 0:Z.elements.floating,re=Ot(qe(s)),ge=Oe.some(Q=>Q.context&&Ee(Q.context.elements.floating,re));le&&!ge&&z.current&&le.focus({preventScroll:!0})},[d,s,A,I,b]),me(()=>{if(!d||!A||!b||I)return;function Z(Oe){X(Oe.id),N&&(N.current=Oe)}return A.events.on("virtualfocus",Z),()=>{A.events.off("virtualfocus",Z)}},[d,A,b,I,N]),me(()=>{B.current=D,j.current=!!s}),me(()=>{r||(L.current=null)},[r]);const Le=l!=null,He=C.useMemo(()=>{function Z(le){if(!r)return;const re=a.current.indexOf(le);re!==-1&&D(re)}return{onFocus(le){let{currentTarget:re}=le;Z(re)},onClick:le=>{let{currentTarget:re}=le;return re.focus({preventScroll:!0})},...y&&{onMouseMove(le){let{currentTarget:re}=le;Z(re)},onPointerLeave(le){let{pointerType:re}=le;!z.current||re==="touch"||(P.current=-1,oe(a,P),D(null),b||Vt(o.floating.current,{preventScroll:!0}))}}}},[r,o,oe,y,a,D,b]);return C.useMemo(()=>{if(!d)return{};const Z=R.current;function Oe(V){if(z.current=!1,$.current=!0,!Y.current&&V.currentTarget===o.floating.current)return;if(g&&wh(V.key,w,m)){We(V),n(!1,V.nativeEvent,"list-navigation"),je(i)&&!b&&i.focus();return}const Te=P.current,ie=ya(a,Z),Ce=Kf(a,Z);if(V.key==="Home"&&(We(V),P.current=ie,D(P.current)),V.key==="End"&&(We(V),P.current=Ce,D(P.current)),S>1){const Fe=M||Array.from({length:a.current.length},()=>({width:1,height:1})),Ae=pC(Fe,S,E),ht=Ae.findIndex(it=>it!=null&&!(Z!=null&&Z.includes(it))),vt=Ae.reduce((it,or,st)=>or!=null&&!(Z!=null&&Z.includes(or))?st:it,-1);if(P.current=Ae[gC({current:Ae.map(it=>it!=null?a.current[it]:null)},{event:V,orientation:w,loop:h,cols:S,disabledIndices:bC([...Z||[],void 0],Ae),minIndex:ht,maxIndex:vt,prevIndex:mC(P.current,Fe,Ae,S,V.key===qn?"bl":V.key===Zr?"tr":"tl"),stopEvent:!0})],D(P.current),w==="both")return}if(xh(V.key,w)){if(We(V),r&&!b&&Ot(V.currentTarget.ownerDocument)===V.currentTarget){P.current=Oa(V.key,w,m)?ie:Ce,D(P.current);return}Oa(V.key,w,m)?h?P.current=Te>=Ce?f&&Te!==a.current.length?-1:ie:Ue(a,{startingIndex:Te,disabledIndices:Z}):P.current=Math.min(Ce,Ue(a,{startingIndex:Te,disabledIndices:Z})):h?P.current=Te<=ie?f&&Te!==-1?a.current.length:Ce:Ue(a,{startingIndex:Te,decrement:!0,disabledIndices:Z}):P.current=Math.max(ie,Ue(a,{startingIndex:Te,decrement:!0,disabledIndices:Z})),Kn(a,P.current)?D(null):D(P.current)}}function le(V){v==="auto"&&wf(V.nativeEvent)&&(O.current=!0)}function re(V){O.current=v,v==="auto"&&na(V.nativeEvent)&&(O.current=!0)}const ge=b&&r&&Le&&{"aria-activedescendant":de||q},Q=a.current.find(V=>(V==null?void 0:V.id)===q);return{reference:{...ge,onKeyDown(V){z.current=!1;const Te=V.key.indexOf("Arrow")===0,ie=VC(V.key,w,m),Ce=wh(V.key,w,m),Fe=xh(V.key,w),Ae=(g?ie:Fe)||V.key==="Enter"||V.key.trim()==="";if(b&&r){const or=A==null?void 0:A.nodesRef.current.find(Ii=>Ii.parentId==null),st=A&&or?MC(A.nodesRef.current,or.id):null;if(Te&&st&&N){const Ii=new KeyboardEvent("keydown",{key:V.key,bubbles:!0});if(ie||Ce){var ht,vt;const x5=((ht=st.context)==null?void 0:ht.elements.domReference)===V.currentTarget,$g=Ce&&!x5?(vt=st.context)==null?void 0:vt.elements.domReference:ie?Q:null;$g&&(We(V),$g.dispatchEvent(Ii),X(void 0))}if(Fe&&st.context&&st.context.open&&st.parentId&&V.currentTarget!==st.context.elements.domReference){var it;We(V),(it=st.context.elements.domReference)==null||it.dispatchEvent(Ii);return}}return Oe(V)}if(!(!r&&!_&&Te)){if(Ae&&(L.current=g&&Fe?null:V.key),g){ie&&(We(V),r?(P.current=ya(a,Z),D(P.current)):n(!0,V.nativeEvent,"list-navigation"));return}Fe&&(u!=null&&(P.current=u),We(V),!r&&_?n(!0,V.nativeEvent,"list-navigation"):Oe(V),r&&D(P.current))}},onFocus(){r&&D(null)},onPointerDown:re,onMouseDown:le,onClick:le},floating:{"aria-orientation":w==="both"?void 0:w,...!Cf(i)&&ge,onKeyDown:Oe,onPointerMove(){z.current=!0}},item:He}},[i,o,q,de,R,Y,a,d,w,m,b,r,Le,g,u,_,f,S,h,v,D,n,He,A,N,M,E])}const UC=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function kh(t,e){var r;e===void 0&&(e={});const{open:n,floatingId:o}=t,{enabled:i=!0,role:s="dialog"}=e,a=(r=UC.get(s))!=null?r:s,l=Ei(),d=Oi()!=null;return C.useMemo(()=>{if(!i)return{};const u={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?{reference:{["aria-"+(s==="label"?"labelledby":"describedby")]:n?o:void 0},floating:u}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&d&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},floating:{...u,...a==="menu"&&{"aria-labelledby":l}},item(f){let{active:h,selected:g}=f;const m={role:"option",...h&&{id:o+"-option"}};switch(s){case"select":return{...m,"aria-selected":h&&g};case"combobox":return{...m,...h&&{"aria-selected":!0}}}return{}}}},[i,s,a,n,o,l,d])}function qC(t,e){var r;const{open:n,dataRef:o}=t,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:d=null,resetMs:u=750,ignoreKeys:f=[],selectedIndex:h=null}=e,g=C.useRef(),m=C.useRef(""),b=C.useRef((r=h??s)!=null?r:-1),v=C.useRef(null),y=Nt(a),_=Nt(l),x=Pt(d),w=Pt(f);return me(()=>{n&&(clearTimeout(g.current),v.current=null,m.current="")},[n]),me(()=>{if(n&&m.current===""){var S;b.current=(S=h??s)!=null?S:-1}},[n,h,s]),C.useMemo(()=>{if(!c)return{};function S(M){M?o.current.typing||(o.current.typing=M,_(M)):o.current.typing&&(o.current.typing=M,_(M))}function T(M,E,I){const A=x.current?x.current(E,I):E.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(I.toLocaleLowerCase()))===0);return A?M.indexOf(A):-1}function N(M){const E=i.current;if(m.current.length>0&&m.current[0]!==" "&&(T(E,E,m.current)===-1?S(!1):M.key===" "&&We(M)),E==null||w.current.includes(M.key)||M.key.length!==1||M.ctrlKey||M.metaKey||M.altKey)return;n&&M.key!==" "&&(We(M),S(!0)),E.every(O=>{var P,L;return O?((P=O[0])==null?void 0:P.toLocaleLowerCase())!==((L=O[1])==null?void 0:L.toLocaleLowerCase()):!0})&&m.current===M.key&&(m.current="",b.current=v.current),m.current+=M.key,clearTimeout(g.current),g.current=setTimeout(()=>{m.current="",b.current=v.current,S(!1)},u);const A=b.current,D=T(E,[...E.slice((A||0)+1),...E.slice(0,(A||0)+1)],m.current);D!==-1?(y(D),v.current=D):M.key!==" "&&(m.current="",S(!1))}return{reference:{onKeyDown:N},floating:{onKeyDown:N,onKeyUp(M){M.key===" "&&S(!1)}}}},[c,n,o,i,u,w,x,y,_])}function Ch(t,e){const[r,n]=t;let o=!1;const i=e.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=e[s]||[0,0],[d,u]=e[a]||[0,0];c>=n!=u>=n&&r<=(d-l)*(n-c)/(u-c)+l&&(o=!o)}return o}function KC(t,e){return t[0]>=e.x&&t[0]<=e.x+e.width&&t[1]>=e.y&&t[1]<=e.y+e.height}function GC(t){t===void 0&&(t={});const{buffer:e=.5,blockPointerEvents:r=!1,requireIntent:n=!0}=t;let o,i=!1,s=null,a=null,l=performance.now();function c(u,f){const h=performance.now(),g=h-l;if(s===null||a===null||g===0)return s=u,a=f,l=h,null;const m=u-s,b=f-a,y=Math.sqrt(m*m+b*b)/g;return s=u,a=f,l=h,y}const d=u=>{let{x:f,y:h,placement:g,elements:m,onClose:b,nodeId:v,tree:y}=u;return function(x){function w(){clearTimeout(o),b()}if(clearTimeout(o),!m.domReference||!m.floating||g==null||f==null||h==null)return;const{clientX:S,clientY:T}=x,N=[S,T],M=rr(x),E=x.type==="mouseleave",I=Ee(m.floating,M),A=Ee(m.domReference,M),D=m.domReference.getBoundingClientRect(),O=m.floating.getBoundingClientRect(),P=g.split("-")[0],L=f>O.right-O.width/2,z=h>O.bottom-O.height/2,B=KC(N,D),j=O.width>D.width,$=O.height>D.height,H=(j?D:O).left,R=(j?D:O).right,Y=($?D:O).top,U=($?D:O).bottom;if(I&&(i=!0,!E))return;if(A&&(i=!1),A&&!E){i=!0;return}if(E&&pe(x.relatedTarget)&&Ee(m.floating,x.relatedTarget)||y&&Sr(y.nodesRef.current,v).some(de=>{let{context:X}=de;return X==null?void 0:X.open}))return;if(P==="top"&&h>=D.bottom-1||P==="bottom"&&h<=D.top+1||P==="left"&&f>=D.right-1||P==="right"&&f<=D.left+1)return w();let q=[];switch(P){case"top":q=[[H,D.top+1],[H,O.bottom-1],[R,O.bottom-1],[R,D.top+1]];break;case"bottom":q=[[H,O.top+1],[H,D.bottom-1],[R,D.bottom-1],[R,O.top+1]];break;case"left":q=[[O.right-1,U],[O.right-1,Y],[D.left+1,Y],[D.left+1,U]];break;case"right":q=[[D.right-1,U],[D.right-1,Y],[O.left+1,Y],[O.left+1,U]];break}function G(de){let[X,oe]=de;switch(P){case"top":{const Le=[j?X+e/2:L?X+e*4:X-e*4,oe+e+1],He=[j?X-e/2:L?X+e*4:X-e*4,oe+e+1],Z=[[O.left,L||j?O.bottom-e:O.top],[O.right,L?j?O.bottom-e:O.top:O.bottom-e]];return[Le,He,...Z]}case"bottom":{const Le=[j?X+e/2:L?X+e*4:X-e*4,oe-e],He=[j?X-e/2:L?X+e*4:X-e*4,oe-e],Z=[[O.left,L||j?O.top+e:O.bottom],[O.right,L?j?O.top+e:O.bottom:O.top+e]];return[Le,He,...Z]}case"left":{const Le=[X+e+1,$?oe+e/2:z?oe+e*4:oe-e*4],He=[X+e+1,$?oe-e/2:z?oe+e*4:oe-e*4];return[...[[z||$?O.right-e:O.left,O.top],[z?$?O.right-e:O.left:O.right-e,O.bottom]],Le,He]}case"right":{const Le=[X-e,$?oe+e/2:z?oe+e*4:oe-e*4],He=[X-e,$?oe-e/2:z?oe+e*4:oe-e*4],Z=[[z||$?O.left+e:O.right,O.top],[z?$?O.left+e:O.right:O.left+e,O.bottom]];return[Le,He,...Z]}}}if(!Ch([S,T],q)){if(i&&!B)return w();if(!E&&n){const de=c(x.clientX,x.clientY);if(de!==null&&de<.1)return w()}Ch([S,T],G([f,h]))?!i&&n&&(o=window.setTimeout(w,40)):w()}}};return d.__options={blockPointerEvents:r},d}const XC=({arrowRef:t,placement:e})=>{const r=[];return r.push(R2(8)),r.push(e==="auto"?U2():Y2()),r.push(V2({padding:8})),t!=null&&t.current&&r.push(q2({element:t.current})),r},JC=({placement:t})=>t==="auto"?void 0:t,ZC=({placement:t})=>({top:"bottom",right:"left",bottom:"top",left:"right"})[t.split("-")[0]],_h=({open:t,arrowRef:e,placement:r="top",setOpen:n})=>ph({placement:JC({placement:r}),open:t,onOpenChange:n,whileElementsMounted:Bf,middleware:XC({placement:r,arrowRef:e})}),Sh=({context:t,trigger:e,role:r="tooltip",interactions:n=[]})=>yh([fh(t,{enabled:e==="click"}),OC(t,{enabled:e==="hover",handleClose:GC()}),gh(t),kh(t,{role:r}),...n]),Eh=k.createContext(void 0);function Ta(){const t=k.useContext(Eh);if(!t)throw new Error("useDropdownContext should be used within the DropdownContext provider!");return t}const Ma=({className:t,theme:e={},...r})=>{const{theme:n}=Ta(),o=e.divider??n.floating.divider;return p.jsx("div",{className:F(o,t),...r})},Oh=({children:t,className:e,theme:r={},...n})=>{const{theme:o}=Ta(),i=r.header??o.floating.header;return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:F(i,e),...n,children:t}),p.jsx(Ma,{})]})},Th=k.forwardRef(({children:t,className:e,icon:r,onClick:n,theme:o={},...i},s)=>{const{ref:a,index:l}=wC({label:typeof t=="string"?t:void 0}),c=qf([s,a]),{theme:d,activeIndex:u,dismissOnClick:f,getItemProps:h,handleSelect:g}=Ta(),m=u===l,b=W(d.floating.item,o),v=i;return p.jsx("li",{role:"menuitem",className:b.container,children:p.jsxs(Gs,{ref:c,className:F(b.base,e),...v,...h({onClick:()=>{n==null||n(),f&&g(null)}}),tabIndex:m?0:-1,children:[r&&p.jsx(r,{className:b.icon}),t]})})});Th.displayName="DropdownItem";const QC={top:u1,right:Bu,bottom:zu,left:d1},e5=({refs:t,children:e,inline:r,theme:n,disabled:o,setButtonWidth:i,getReferenceProps:s,renderTrigger:a,...l})=>{const c=t.reference,d=s();if(k.useEffect(()=>{c.current&&(i==null||i(c.current.clientWidth))},[c,i]),a){const u=a(n);return k.cloneElement(u,{ref:t.setReference,disabled:o,...d,...u.props})}return r?p.jsx("button",{type:"button",ref:t.setReference,className:n==null?void 0:n.inlineWrapper,disabled:o,...d,children:e}):p.jsx(lf,{...l,disabled:o,type:"button",ref:t.setReference,...d,children:e})},Mh=({children:t,className:e,dismissOnClick:r=!0,theme:n={},renderTrigger:o,...i})=>{const[s,a]=k.useState(!1),[l,c]=k.useState(null),[d,u]=k.useState(null),[f,h]=k.useState(void 0),g=k.useRef([]),m=k.useRef([]),b=W(K().dropdown,n),v=i,y=i["data-testid"]||"flowbite-dropdown-target",{placement:_=i.inline?"bottom-start":"bottom",trigger:x="click",label:w,inline:S,arrowIcon:T=!0,...N}=v,M=k.useCallback($=>{u($),a(!1)},[]),E=k.useCallback($=>{s?c($):M($)},[s,M]),{context:I,floatingStyles:A,refs:D}=_h({open:s,setOpen:a,placement:_}),O=YC(I,{listRef:g,activeIndex:l,selectedIndex:d,onNavigate:c}),P=qC(I,{listRef:m,activeIndex:l,selectedIndex:d,onMatch:E}),{getReferenceProps:L,getFloatingProps:z,getItemProps:B}=Sh({context:I,role:"menu",trigger:x,interactions:[O,P]}),j=k.useMemo(()=>{const[$]=_.split("-");return QC[$]??zu},[_]);return p.jsxs(Eh.Provider,{value:{theme:b,activeIndex:l,dismissOnClick:r,getItemProps:B,handleSelect:M},children:[p.jsxs(e5,{...N,refs:D,inline:S,theme:b,"data-testid":y,className:F(b.floating.target,N.className),setButtonWidth:h,getReferenceProps:L,renderTrigger:o,children:[w,T&&p.jsx(j,{className:b.arrowIcon})]}),s&&p.jsx(ch,{context:I,modal:!1,children:p.jsx("div",{ref:D.setFloating,style:{...A,minWidth:f},"data-testid":"flowbite-dropdown","aria-expanded":s,...z({className:F(b.floating.base,b.floating.animation,"duration-100",!s&&b.floating.hidden,b.floating.style.auto,e)}),children:p.jsx(xC,{elementsRef:g,labelsRef:m,children:p.jsx("ul",{className:b.content,tabIndex:-1,children:t})})})})]})};Mh.displayName="Dropdown",Oh.displayName="Dropdown.Header",Ma.displayName="Dropdown.Divider",Object.assign(Mh,{Item:Th,Header:Oh,Divider:Ma});const t5=k.forwardRef(({className:t,color:e="gray",helperText:r,sizing:n="md",theme:o={},...i},s)=>{const a=W(K().fileInput,o);return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:F(a.root.base,t),children:p.jsx("div",{className:a.field.base,children:p.jsx("input",{className:F(a.field.input.base,a.field.input.colors[e],a.field.input.sizes[n]),...i,type:"file",ref:s})})}),r&&p.jsx(Rn,{color:e,children:r})]})});t5.displayName="FileInput";const r5=k.forwardRef(({label:t,helperText:e,color:r="default",sizing:n="md",variant:o,disabled:i=!1,theme:s={},className:a,...l},c)=>{const d=k.useId(),u=W(K().floatingLabel,s);return p.jsxs("div",{children:[p.jsxs("div",{className:F("relative",o==="standard"?"z-0":""),children:[p.jsx("input",{type:"text",id:l.id?l.id:"floatingLabel"+d,"aria-describedby":"outlined_success_help",className:F(u.input[r][o][n],a),placeholder:" ","data-testid":"floating-label",disabled:i,...l,ref:c}),p.jsx("label",{htmlFor:l.id?l.id:"floatingLabel"+d,className:F(u.label[r][o][n],a),children:t})]}),p.jsx("p",{id:"outlined_helper_text"+d,className:F(u.helperText[r],a),children:e})]})});r5.displayName="FloatingLabel";const Nh=({alt:t,className:e,children:r,href:n,name:o,src:i,theme:s={},...a})=>{const l=W(K().footer.brand,s);return p.jsx("div",{children:n?p.jsxs("a",{"data-testid":"flowbite-footer-brand",href:n,className:F(l.base,e),...a,children:[p.jsx("img",{alt:t,src:i,className:l.img}),p.jsx("span",{"data-testid":"flowbite-footer-brand-span",className:l.span,children:o}),r]}):p.jsx("img",{alt:t,"data-testid":"flowbite-footer-brand",src:i,className:F(l.img,e),...a})})},Ph=({by:t,className:e,href:r,theme:n={},year:o,...i})=>{const s=W(K().footer.copyright,n);return p.jsxs("div",{"data-testid":"flowbite-footer-copyright",className:F(s.base,e),...i,children:["© ",o,r?p.jsx("a",{href:r,className:s.href,children:t}):p.jsx("span",{"data-testid":"flowbite-footer-copyright-span",className:s.span,children:t})]})},Ah=({className:t,theme:e={},...r})=>{const n=W(K().footer.divider,e);return p.jsx("hr",{"data-testid":"footer-divider",className:F(n.base,t),...r})},Dh=({ariaLabel:t,className:e,href:r,icon:n,theme:o={},...i})=>{const s=W(K().footer.icon,o);return p.jsx("div",{children:r?p.jsx("a",{"aria-label":t,"data-testid":"flowbite-footer-icon",href:r,className:F(s.base,e),...i,children:p.jsx(n,{className:s.size})}):p.jsx(n,{"data-testid":"flowbite-footer-icon",className:s.size,...i})})},Ih=({as:t="a",children:e,className:r,href:n,theme:o={},...i})=>{const s=W(K().footer.groupLink.link,o);return p.jsx("li",{className:F(s.base,r),children:p.jsx(t,{href:n,className:s.href,...i,children:e})})},Lh=({children:t,className:e,col:r=!1,theme:n={},...o})=>{const i=W(K().footer.groupLink,n);return p.jsx("ul",{"data-testid":"footer-groupLink",className:F(i.base,r&&i.col,e),...o,children:t})},Fh=({as:t="h2",className:e,theme:r={},title:n,...o})=>{const i=W(K().footer.title,r);return p.jsx(t,{"data-testid":"flowbite-footer-title",className:F(i.base,e),...o,children:n})},zh=({bgDark:t=!1,children:e,className:r,container:n=!1,theme:o={},...i})=>{const s=W(K().footer,o);return p.jsx("footer",{"data-testid":"flowbite-footer",className:F(s.root.base,t&&s.root.bgDark,n&&s.root.container,r),...i,children:e})};zh.displayName="Footer",Ph.displayName="Footer.Copyright",Ih.displayName="Footer.Link",Nh.displayName="Footer.Brand",Lh.displayName="Footer.LinkGroup",Dh.displayName="Footer.Icon",Fh.displayName="Footer.Title",Ah.displayName="Footer.Divider",Object.assign(zh,{Copyright:Ph,Link:Ih,LinkGroup:Lh,Brand:Nh,Icon:Dh,Title:Fh,Divider:Ah});const Bh=({children:t,className:e,icon:r,theme:n={},...o})=>{const i=W(K().list.item,n);return p.jsxs("li",{className:F(i.withIcon[r?"on":"off"],e),...o,children:[r&&p.jsx(r,{className:F(i.icon)}),t]})},$h=({children:t,className:e,unstyled:r,nested:n,ordered:o,horizontal:i,theme:s={},...a})=>{const l=W(K().list,s),c=o?"ol":"ul";return p.jsx(c,{className:F(l.root.base,l.root.ordered[o?"on":"off"],r&&l.root.unstyled,n&&l.root.nested,i&&l.root.horizontal,e),...a,children:t})};$h.displayName="List",Bh.displayName="List.Item",Object.assign($h,{Item:Bh});const jh=({active:t,children:e,className:r,href:n,icon:o,onClick:i,theme:s={},disabled:a,...l})=>{const c=W(K().listGroup.item,s),d=typeof n<"u",u=d?"a":"button";return p.jsx("li",{className:F(c.base,r),children:p.jsxs(u,{href:n,onClick:i,type:d?void 0:"button",disabled:a,className:F(c.link.active[t?"on":"off"],c.link.disabled[a?"on":"off"],c.link.base,c.link.href[d?"on":"off"]),...l,children:[o&&p.jsx(o,{"aria-hidden":!0,"data-testid":"flowbite-list-group-item-icon",className:c.link.icon}),e]})})},Wh=({children:t,className:e,theme:r={},...n})=>{const o=W(K().listGroup,r);return p.jsx("ul",{className:F(o.root.base,e),...n,children:t})};Wh.displayName="ListGroup",jh.displayName="ListGroup.Item",Object.assign(Wh,{Item:jh});const Hh=k.createContext(void 0);function Na(){const t=k.useContext(Hh);if(!t)throw new Error("useModalContext should be used within the ModalContext provider!");return t}const Rh=({children:t,className:e,theme:r={},...n})=>{const{theme:o,popup:i}=Na(),s=W(o.body,r);return p.jsx("div",{className:F(s.base,i&&[s.popup],e),...n,children:t})},Vh=({children:t,className:e,theme:r={},...n})=>{const{theme:o,popup:i}=Na(),s=W(o.footer,r);return p.jsx("div",{className:F(s.base,!i&&s.popup,e),...n,children:t})},Yh=({as:t="h3",children:e,className:r,theme:n={},id:o,...i})=>{const s=k.useId(),a=o||s,{theme:l,popup:c,onClose:d,setHeaderId:u}=Na(),f=W(l.header,n);return k.useLayoutEffect(()=>(u(a),()=>u(void 0)),[a,u]),p.jsxs("div",{className:F(f.base,c&&f.popup,r),...i,children:[p.jsx(t,{id:a,className:f.title,children:e}),p.jsx("button",{"aria-label":"Close",className:f.close.base,type:"button",onClick:d,children:p.jsx(f1,{"aria-hidden":!0,className:f.close.icon})})]})},Uh=k.forwardRef(({children:t,className:e,dismissible:r=!1,onClose:n,popup:o,position:i="center",root:s,show:a,size:l="2xl",theme:c={},initialFocus:d,...u},f)=>{const[h,g]=k.useState(void 0),m=W(K().modal,c),{context:b}=ph({open:a,onOpenChange:()=>n&&n()}),v=qf([b.refs.setFloating,f]),y=fh(b),_=gh(b,{outsidePressEvent:"mousedown",enabled:r}),x=kh(b),{getFloatingProps:w}=yh([y,_,x]);return a?p.jsx(Hh.Provider,{value:{theme:m,popup:o,onClose:n,setHeaderId:g},children:p.jsx(zC,{root:s,children:p.jsx(jC,{lockScroll:!0,"data-testid":"modal-overlay",className:F(m.root.base,m.root.positions[i],a?m.root.show.on:m.root.show.off,e),...u,children:p.jsx(ch,{context:b,initialFocus:d,children:p.jsx("div",{ref:v,...w(u),"aria-labelledby":h,className:F(m.content.base,m.root.sizes[l]),children:p.jsx("div",{className:m.content.inner,children:t})})})})})}):null});Uh.displayName="Modal",Yh.displayName="Modal.Header",Rh.displayName="Modal.Body",Vh.displayName="Modal.Footer",Object.assign(Uh,{Header:Yh,Body:Rh,Footer:Vh});const qh=k.createContext(void 0);function Ai(){const t=k.useContext(qh);if(!t)throw new Error("useNavBarContext should be used within the NavbarContext provider!");return t}const Kh=({as:t="a",children:e,className:r,theme:n={},...o})=>{const{theme:i}=Ai(),s=W(i.brand,n);return p.jsx(t,{className:F(s.base,r),...o,children:e})},Gh=({children:t,className:e,theme:r={},...n})=>{const{theme:o,isOpen:i}=Ai(),s=W(o.collapse,r);return p.jsx("div",{"data-testid":"flowbite-navbar-collapse",className:F(s.base,s.hidden[i?"off":"on"],e),...n,children:p.jsx("ul",{className:s.list,children:t})})},Xh=({active:t,as:e="a",disabled:r,children:n,className:o,theme:i={},onClick:s,...a})=>{const{theme:l,setIsOpen:c}=Ai(),d=W(l.link,i),u=f=>{c(!1),s==null||s(f)};return p.jsx("li",{children:p.jsx(e,{className:F(d.base,t&&d.active.on,!t&&!r&&d.active.off,d.disabled[r?"on":"off"],o),onClick:u,...a,children:n})})},Jh=({barIcon:t=Xg,className:e,theme:r={},...n})=>{const{theme:o,isOpen:i,setIsOpen:s}=Ai(),a=W(o.toggle,r),l=()=>{s(!i)};return p.jsxs("button",{"data-testid":"flowbite-navbar-toggle",onClick:l,className:F(a.base,e),...n,children:[p.jsx("span",{className:"sr-only",children:"Open main menu"}),p.jsx(t,{"aria-hidden":!0,className:a.icon})]})},Zh=({border:t,children:e,className:r,fluid:n=!1,menuOpen:o,rounded:i,theme:s={},...a})=>{const[l,c]=k.useState(o),d=W(K().navbar,s);return p.jsx(qh.Provider,{value:{theme:d,isOpen:l,setIsOpen:c},children:p.jsx("nav",{className:F(d.root.base,d.root.bordered[t?"on":"off"],d.root.rounded[i?"on":"off"],r),...a,children:p.jsx("div",{className:F(d.root.inner.base,d.root.inner.fluid[n?"on":"off"]),children:e})})})};Zh.displayName="Navbar",Kh.displayName="Navbar.Brand",Gh.displayName="Navbar.Collapse",Xh.displayName="Navbar.Link",Jh.displayName="Navbar.Toggle",Object.assign(Zh,{Brand:Kh,Collapse:Gh,Link:Xh,Toggle:Jh});const n5=(t,e)=>t>=e?[]:[...Array(e-t+1).keys()].map(r=>r+t),Pa=({active:t,children:e,className:r,onClick:n,theme:o={},...i})=>{const s=W(K().pagination,o);return p.jsx("button",{type:"button",className:F(t&&s.pages.selector.active,r),onClick:n,...i,children:e})};Pa.displayName="Pagination.Button";const Aa=({children:t,className:e,onClick:r,theme:n={},disabled:o=!1,...i})=>{const s=W(K().pagination,n);return p.jsx("button",{type:"button",className:F(o&&s.pages.selector.disabled,e),disabled:o,onClick:r,...i,children:t})};Aa.displayName="Pagination.Navigation";const Qh=({className:t,currentPage:e,layout:r="pagination",nextLabel:n="Next",onPageChange:o,previousLabel:i="Previous",renderPaginationButton:s=u=>p.jsx(Pa,{...u}),showIcons:a=!1,theme:l={},totalPages:c,...d})=>{const u=W(K().pagination,l),f=Math.min(Math.max(r==="pagination"?e+2:e+4,5),c),h=Math.max(1,f-4),g=()=>{o(Math.min(e+1,c))},m=()=>{o(Math.max(e-1,1))};return p.jsxs("nav",{className:F(u.base,t),...d,children:[r==="table"&&p.jsxs("div",{className:u.layout.table.base,children:["Showing ",p.jsx("span",{className:u.layout.table.span,children:h})," to ",p.jsx("span",{className:u.layout.table.span,children:f})," of ",p.jsx("span",{className:u.layout.table.span,children:c})," Entries"]}),p.jsxs("ul",{className:u.pages.base,children:[p.jsx("li",{children:p.jsxs(Aa,{className:F(u.pages.previous.base,a&&u.pages.showIcon),onClick:m,disabled:e===1,children:[a&&p.jsx(s1,{"aria-hidden":!0,className:u.pages.previous.icon}),i]})}),r==="pagination"&&n5(h,f).map(b=>p.jsx("li",{"aria-current":b===e?"page":void 0,children:s({className:F(u.pages.selector.base,e===b&&u.pages.selector.active),active:b===e,onClick:()=>o(b),children:b})},b)),p.jsx("li",{children:p.jsxs(Aa,{className:F(u.pages.next.base,a&&u.pages.showIcon),onClick:g,disabled:e===c,children:[n,a&&p.jsx(a1,{"aria-hidden":!0,className:u.pages.next.icon})]})})]})]})};Qh.displayName="Pagination",Object.assign(Qh,{Button:Pa});const o5=k.forwardRef(({className:t,theme:e={},...r},n)=>{const o=W(K().radio,e);return p.jsx("input",{ref:n,type:"radio",className:F(o.root.base,t),...r})});o5.displayName="Radio";const i5=k.forwardRef(({className:t,sizing:e="md",theme:r={},...n},o)=>{const i=W(K().rangeSlider,r);return p.jsx(p.Fragment,{children:p.jsx("div",{"data-testid":"flowbite-range-slider",className:F(i.root.base,t),children:p.jsx("div",{className:i.field.base,children:p.jsx("input",{ref:o,type:"range",className:F(i.field.input.base,i.field.input.sizes[e]),...n})})})})});i5.displayName="RangeSlider";const eg=({children:t,className:e,percentFilled:r=0,theme:n={},...o})=>{const i=W(K().ratingAdvanced,n);return p.jsxs("div",{className:F(i.base,e),...o,children:[p.jsx("span",{className:i.label,children:t}),p.jsx("div",{className:i.progress.base,children:p.jsx("div",{className:i.progress.fill,"data-testid":"flowbite-rating-fill",style:{width:`${r}%`}})}),p.jsx("span",{className:i.progress.label,children:`${r}%`})]})},tg=k.createContext(void 0);function s5(){const t=k.useContext(tg);if(!t)throw new Error("useRatingContext should be used within the RatingContext provider!");return t}const rg=({className:t,filled:e=!0,starIcon:r=l1,theme:n={},...o})=>{const{theme:i,size:s="sm"}=s5(),a=W(i.star,n);return p.jsx(r,{"data-testid":"flowbite-rating-star",className:F(a.sizes[s],a[e?"filled":"empty"],t),...o})},ng=({children:t,className:e,size:r="sm",theme:n={},...o})=>{const i=W(K().rating,n);return p.jsx(tg.Provider,{value:{theme:i,size:r},children:p.jsx("div",{className:F(i.root.base,e),...o,children:t})})};ng.displayName="Rating",rg.displayName="Rating.Star",eg.displayName="Rating.Advanced",Object.assign(ng,{Star:rg,Advanced:eg});const a5=k.forwardRef(({addon:t,children:e,className:r,color:n="gray",helperText:o,icon:i,shadow:s,sizing:a="md",theme:l={},...c},d)=>{const u=W(K().select,l);return p.jsxs("div",{className:F(u.base,r),children:[t&&p.jsx("span",{className:u.addon,children:t}),p.jsxs("div",{className:u.field.base,children:[i&&p.jsx("div",{className:u.field.icon.base,children:p.jsx(i,{className:u.field.icon.svg})}),p.jsx("select",{className:F(u.field.select.base,u.field.select.colors[n],u.field.select.sizes[a],u.field.select.withIcon[i?"on":"off"],u.field.select.withAddon[t?"on":"off"],u.field.select.withShadow[s?"on":"off"]),...c,ref:d,children:e}),o&&p.jsx(Rn,{color:n,children:o})]})]})});a5.displayName="Select";const l5=({animation:t="duration-300",arrow:e=!0,children:r,className:n,content:o,placement:i="top",style:s="dark",theme:a,trigger:l="hover",minWidth:c,...d})=>{const u=k.useRef(null),[f,h]=k.useState(!1),g=_h({open:f,placement:i,arrowRef:u,setOpen:h}),{context:m,middlewareData:{arrow:{x:b,y:v}={}},refs:y,strategy:_,update:x,x:w,y:S}=g,T=RC(m),{getFloatingProps:N,getReferenceProps:M}=Sh({context:m,role:"tooltip",trigger:l,interactions:[T]});return k.useEffect(()=>{if(y.reference.current&&y.floating.current&&f)return Bf(y.reference.current,y.floating.current,x)},[f,y.floating,y.reference,x]),p.jsxs(p.Fragment,{children:[p.jsx("div",{ref:y.setReference,className:a.target,"data-testid":"flowbite-tooltip-target",...M(),children:r}),p.jsxs("div",{ref:y.setFloating,"data-testid":"flowbite-tooltip",...N({className:F(a.base,t&&`${a.animation} ${t}`,!f&&a.hidden,a.style[s],n),style:{position:_,top:S??" ",left:w??" ",minWidth:c},...d}),children:[p.jsx("div",{className:a.content,children:o}),e&&p.jsx("div",{className:F(a.arrow.base,s==="dark"&&a.arrow.style.dark,s==="light"&&a.arrow.style.light,s==="auto"&&a.arrow.style.auto),"data-testid":"flowbite-tooltip-arrow",ref:u,style:{top:v??" ",left:b??" ",right:" ",bottom:" ",[ZC({placement:g.placement})]:a.arrow.placement},children:" "})]})]})},Da=({animation:t="duration-300",arrow:e=!0,children:r,className:n,content:o,placement:i="top",style:s="dark",theme:a={},trigger:l="hover",...c})=>{const d=W(K().tooltip,a);return p.jsx(l5,{animation:t,arrow:e,content:o,placement:i,style:s,theme:d,trigger:l,className:n,...c,children:r})};Da.displayName="Tooltip";const og=k.createContext(void 0);function en(){const t=k.useContext(og);if(!t)throw new Error("useSidebarContext should be used within the SidebarContext provider!");return t}const Ia=k.createContext(void 0);function c5(){const t=k.useContext(Ia);if(!t)throw new Error("useSidebarItemContext should be used within the SidebarItemContext provider!");return t}const ig=({children:t,className:e,icon:r,label:n,chevronIcon:o=Fu,renderChevronIcon:i,open:s=!1,theme:a={},...l})=>{const c=k.useId(),[d,u]=k.useState(s),{theme:f,isCollapsed:h}=en(),g=W(f.collapse,a);k.useEffect(()=>u(s),[s]);const m=({children:b})=>p.jsx("li",{children:h&&!d?p.jsx(Da,{content:n,placement:"right",children:b}):b});return p.jsxs(m,{children:[p.jsxs("button",{id:`flowbite-sidebar-collapse-${c}`,onClick:()=>u(!d),title:n,type:"button",className:F(g.button,e),...l,children:[r&&p.jsx(r,{"aria-hidden":!0,"data-testid":"flowbite-sidebar-collapse-icon",className:F(g.icon.base,g.icon.open[d?"on":"off"])}),h?p.jsx("span",{className:"sr-only",children:n}):p.jsxs(p.Fragment,{children:[p.jsx("span",{"data-testid":"flowbite-sidebar-collapse-label",className:g.label.base,children:n}),i?i(g,d):p.jsx(o,{"aria-hidden":!0,className:F(g.label.icon.base,g.label.icon.open[d?"on":"off"])})]})]}),p.jsx("ul",{"aria-labelledby":`flowbite-sidebar-collapse-${c}`,hidden:!d,className:g.list,children:p.jsx(Ia.Provider,{value:{isInsideCollapse:!0},children:t})})]})};ig.displayName="Sidebar.Collapse";const sg=({children:t,color:e="info",className:r,theme:n={},...o})=>{const{theme:i,isCollapsed:s}=en(),a=W(i.cta,n);return p.jsx("div",{"data-testid":"sidebar-cta",hidden:s,className:F(a.base,a.color[e],r),...o,children:t})};sg.displayName="Sidebar.CTA";const d5=({id:t,theme:e,isCollapsed:r,tooltipChildren:n,children:o,...i})=>p.jsx("li",{...i,children:r?p.jsx(Da,{content:p.jsx(ag,{id:t,theme:e,children:n}),placement:"right",children:o}):o}),ag=({id:t,theme:e,children:r})=>p.jsx("span",{"data-testid":"flowbite-sidebar-item-content",id:`flowbite-sidebar-item-${t}`,className:F(e.content.base),children:r}),lg=k.forwardRef(({active:t,as:e="a",children:r,className:n,icon:o,label:i,labelColor:s="info",theme:a={},...l},c)=>{var m,b,v,y;const d=k.useId(),{theme:u,isCollapsed:f}=en(),{isInsideCollapse:h}=c5(),g=W(u.item,a);return p.jsx(d5,{theme:g,className:g.listItem,id:d,isCollapsed:f,tooltipChildren:r,children:p.jsxs(e,{"aria-labelledby":`flowbite-sidebar-item-${d}`,ref:c,className:F(g.base,t&&g.active,!f&&h&&((m=g.collapsed)==null?void 0:m.insideCollapse),n),...l,children:[o&&p.jsx(o,{"aria-hidden":!0,"data-testid":"flowbite-sidebar-item-icon",className:F((b=g.icon)==null?void 0:b.base,t&&((v=g.icon)==null?void 0:v.active))}),f&&!o&&p.jsx("span",{className:(y=g.collapsed)==null?void 0:y.noIcon,children:r.charAt(0).toLocaleUpperCase()??"?"}),!f&&p.jsx(ag,{id:d,theme:g,children:r}),!f&&i&&p.jsx(tf,{color:s,"data-testid":"flowbite-sidebar-label",hidden:f,className:g.label,children:i})]})})});lg.displayName="Sidebar.Item";const cg=({children:t,className:e,theme:r={},...n})=>{const{theme:o}=en(),i=W(o.itemGroup,r);return p.jsx("ul",{"data-testid":"flowbite-sidebar-item-group",className:F(i.base,e),...n,children:p.jsx(Ia.Provider,{value:{isInsideCollapse:!1},children:t})})};cg.displayName="Sidebar.ItemGroup";const dg=({children:t,className:e,theme:r={},...n})=>{const{theme:o}=en(),i=W(o.items,r);return p.jsx("div",{className:F(i.base,e),"data-testid":"flowbite-sidebar-items",...n,children:t})};dg.displayName="Sidebar.Items";const ug=({children:t,className:e,href:r,img:n,imgAlt:o="",theme:i={},...s})=>{const a=k.useId(),{theme:l,isCollapsed:c}=en(),d=W(l.logo,i);return p.jsxs("a",{"aria-labelledby":`flowbite-sidebar-logo-${a}`,href:r,className:F(d.base,e),...s,children:[p.jsx("img",{alt:o,src:n,className:d.img}),p.jsx("span",{className:d.collapsed[c?"on":"off"],id:`flowbite-sidebar-logo-${a}`,children:t})]})};ug.displayName="Sidebar.Logo";const fg=({children:t,as:e="nav",collapseBehavior:r="collapse",collapsed:n=!1,theme:o={},className:i,...s})=>{const a=W(K().sidebar,o);return p.jsx(og.Provider,{value:{theme:a,isCollapsed:n},children:p.jsx(e,{"aria-label":"Sidebar",hidden:n&&r==="hide",className:F(a.root.base,a.root.collapsed[n?"on":"off"],i),...s,children:p.jsx("div",{className:a.root.inner,children:t})})})};fg.displayName="Sidebar",Object.assign(fg,{Collapse:ig,CTA:sg,Item:lg,Items:dg,ItemGroup:cg,Logo:ug});const hg=k.createContext(void 0);function u5(){const t=k.useContext(hg);if(!t)throw new Error("useTableBodyContext should be used within the TableBodyContext provider!");return t}const gg=k.createContext(void 0);function La(){const t=k.useContext(gg);if(!t)throw new Error("useTableContext should be used within the TableContext provider!");return t}const pg=k.forwardRef(({children:t,className:e,theme:r={},...n},o)=>{const{theme:i}=La(),s=W(i.body,r);return p.jsx(hg.Provider,{value:{theme:s},children:p.jsx("tbody",{className:F(s.base,e),ref:o,...n,children:t})})});pg.displayName="Table.Body";const mg=k.forwardRef(({children:t,className:e,theme:r={},...n},o)=>{const{theme:i}=u5(),s=W(i.cell,r);return p.jsx("td",{className:F(s.base,e),ref:o,...n,children:t})});mg.displayName="Table.Cell";const bg=k.createContext(void 0);function f5(){const t=k.useContext(bg);if(!t)throw new Error("useTableHeadContext should be used within the TableHeadContext provider!");return t}const yg=k.forwardRef(({children:t,className:e,theme:r={},...n},o)=>{const{theme:i}=La(),s=W(i.head,r);return p.jsx(bg.Provider,{value:{theme:s},children:p.jsx("thead",{className:F(s.base,e),ref:o,...n,children:p.jsx("tr",{children:t})})})});yg.displayName="Table.Head";const vg=k.forwardRef(({children:t,className:e,theme:r={},...n},o)=>{const{theme:i}=f5(),s=W(i.cell,r);return p.jsx("th",{className:F(s.base,e),ref:o,...n,children:t})});vg.displayName="Table.HeadCell";const xg=k.forwardRef(({children:t,className:e,theme:r={},...n},o)=>{const{theme:i,hoverable:s,striped:a}=La(),l=W(i.row,r);return p.jsx("tr",{ref:o,"data-testid":"table-row-element",className:F(l.base,a&&l.striped,s&&l.hovered,e),...n,children:t})});xg.displayName="Table.Row";const wg=k.forwardRef(({children:t,className:e,striped:r,hoverable:n,theme:o={},...i},s)=>{const a=W(K().table,o);return p.jsx("div",{"data-testid":"table-element",className:F(a.root.wrapper),children:p.jsxs(gg.Provider,{value:{theme:a,striped:r,hoverable:n},children:[p.jsx("div",{className:F(a.root.shadow,e)}),p.jsx("table",{className:F(a.root.base,e),...i,ref:s,children:t})]})})});wg.displayName="Table";const ee=Object.assign(wg,{Head:yg,Body:pg,Row:xg,Cell:mg,HeadCell:vg}),kg=({children:t,className:e})=>p.jsx("div",{className:e,children:t});kg.displayName="Tabs.Item";const Cg=k.forwardRef(({children:t,className:e,onActiveTabChange:r,style:n="default",theme:o={},...i},s)=>{const a=W(K().tabs,o),l=k.useId(),c=k.useMemo(()=>k.Children.map(k.Children.toArray(t),({props:x})=>x),[t]),d=k.useRef([]),[u,f]=k.useState(Math.max(0,c.findIndex(x=>x.active))),[h,g]=k.useState(-1),m=x=>{f(x),r&&r(x)},b=({target:x})=>{m(x),g(x)},v=({event:x,target:w})=>{x.key==="ArrowLeft"&&g(Math.max(0,h-1)),x.key==="ArrowRight"&&g(Math.min(c.length-1,h+1)),x.key==="Enter"&&(m(w),g(w))},y=a.tablist.tabitem.styles[n],_=a.tabitemcontainer.styles[n];return k.useEffect(()=>{var x;(x=d.current[h])==null||x.focus()},[h]),k.useImperativeHandle(s,()=>({setActiveTab:m})),p.jsxs("div",{className:F(a.base,e),children:[p.jsx("div",{"aria-label":"Tabs",role:"tablist",className:F(a.tablist.base,a.tablist.styles[n],e),...i,children:c.map((x,w)=>p.jsxs("button",{type:"button","aria-controls":`${l}-tabpanel-${w}`,"aria-selected":w===u,className:F(a.tablist.tabitem.base,y.base,w===u&&y.active.on,w!==u&&!x.disabled&&y.active.off),disabled:x.disabled,id:`${l}-tab-${w}`,onClick:()=>b({target:w}),onKeyDown:S=>v({event:S,target:w}),ref:S=>d.current[w]=S,role:"tab",tabIndex:w===h?0:-1,style:{zIndex:w===h?2:1},children:[x.icon&&p.jsx(x.icon,{className:a.tablist.tabitem.icon}),x.title]},w))}),p.jsx("div",{className:F(a.tabitemcontainer.base,_),children:c.map((x,w)=>p.jsx("div",{"aria-labelledby":`${l}-tab-${w}`,className:a.tabpanel,hidden:w!==u,id:`${l}-tabpanel-${w}`,role:"tabpanel",tabIndex:0,children:x.children},w))})]})});Cg.displayName="Tabs",Object.assign(Cg,{Item:kg});const h5=k.forwardRef(({className:t,color:e="gray",helperText:r,shadow:n,theme:o={},...i},s)=>{const a=W(K().textarea,o);return p.jsxs(p.Fragment,{children:[p.jsx("textarea",{ref:s,className:F(a.base,a.colors[e],a.withShadow[n?"on":"off"],t),...i}),r&&p.jsx(Rn,{color:e,children:r})]})});h5.displayName="Textarea";const _g=k.createContext(void 0);function Fa(){const t=k.useContext(_g);if(!t)throw new Error("useTimelineContentContext should be used within the TimelineContentContext provider!");return t}const Sg=({children:t,className:e,theme:r={},...n})=>{const{theme:o}=Fa(),i=W(o.body,r);return p.jsx("div",{className:F(i.base,e),...n,children:t})},Eg=k.createContext(void 0);function za(){const t=k.useContext(Eg);if(!t)throw new Error("useTimelineContext should be used within the TimelineContext provider!");return t}const Og=k.createContext(void 0);function Tg(){const t=k.useContext(Og);if(!t)throw new Error("useTimelineItemContext should be used within the TimelineItemContext provider!");return t}const Mg=({children:t,className:e,theme:r={},...n})=>{const{horizontal:o}=za(),{theme:i}=Tg(),s=W(i.content,r);return p.jsx(_g.Provider,{value:{theme:s},children:p.jsx("div",{"data-testid":"timeline-content",className:F(o&&s.root.base,e),...n,children:t})})},Ng=({children:t,className:e,theme:r={},...n})=>{const{theme:o,horizontal:i}=za(),s=W(o.item,r);return p.jsx(Og.Provider,{value:{theme:s},children:p.jsx("li",{"data-testid":"timeline-item",className:F(i&&s.root.horizontal,!i&&s.root.vertical,e),...n,children:t})})},Pg=({children:t,className:e,icon:r,theme:n={},...o})=>{const{horizontal:i}=za(),{theme:s}=Tg(),a=W(s.point,n);return p.jsxs("div",{"data-testid":"timeline-point",className:F(i&&a.horizontal,!i&&a.vertical,e),...o,children:[t,r?p.jsx("span",{className:F(a.marker.icon.wrapper),children:p.jsx(r,{"aria-hidden":!0,className:F(a.marker.icon.base)})}):p.jsx("div",{className:F(i&&a.marker.base.horizontal,!i&&a.marker.base.vertical)}),i&&p.jsx("div",{className:F(a.line)})]})},Ag=({children:t,className:e,theme:r={},...n})=>{const{theme:o}=Fa(),i=W(o.time,r);return p.jsx("time",{className:F(i.base,e),...n,children:t})},Dg=({as:t="h3",children:e,className:r,theme:n={},...o})=>{const{theme:i}=Fa(),s=W(i.title,n);return p.jsx(t,{className:F(s.base,r),...o,children:e})},Ig=({children:t,className:e,horizontal:r,theme:n={},...o})=>{const i=W(K().timeline,n);return p.jsx(Eg.Provider,{value:{theme:i,horizontal:r},children:p.jsx("ol",{"data-testid":"timeline-component",className:F(r&&i.root.direction.horizontal,!r&&i.root.direction.vertical,e),...o,children:t})})};Ig.displayName="Timeline",Ng.displayName="Timeline.Item",Pg.displayName="Timeline.Point",Mg.displayName="Timeline.Content",Ag.displayName="Timeline.Time",Dg.displayName="Timeline.Title",Sg.displayName="Timeline.Body",Object.assign(Ig,{Item:Ng,Point:Pg,Content:Mg,Time:Ag,Title:Dg,Body:Sg});const Lg=k.createContext(void 0);function g5(){const t=k.useContext(Lg);if(!t)throw new Error("useToastContext should be used within the ToastContext provider!");return t}const Fg=({className:t,onClick:e,theme:r={},xIcon:n=c1,onDismiss:o,...i})=>{const{theme:s,duration:a,isClosed:l,isRemoved:c,setIsClosed:d,setIsRemoved:u}=g5(),f=W(s.toggle,r),h=g=>{if(e&&e(g),o){o();return}d(!l),setTimeout(()=>u(!c),a)};return p.jsx("button",{"aria-label":"Close",onClick:h,type:"button",className:F(f.base,t),...i,children:p.jsx(n,{"aria-hidden":!0,className:f.icon})})},p5={75:"duration-75",100:"duration-100",150:"duration-150",200:"duration-200",300:"duration-300",500:"duration-500",700:"duration-700",1e3:"duration-1000"},zg=({children:t,className:e,duration:r=300,theme:n={},...o})=>{const[i,s]=k.useState(!1),[a,l]=k.useState(!1),c=W(K().toast,n);return a?null:p.jsx(Lg.Provider,{value:{theme:c,duration:r,isClosed:i,isRemoved:a,setIsClosed:s,setIsRemoved:l},children:p.jsx("div",{"data-testid":"flowbite-toast",role:"alert",className:F(c.root.base,p5[r],i&&c.root.closed,e),...o,children:t})})};zg.displayName="Toast",Fg.displayName="Toast.Toggle",Object.assign(zg,{Toggle:Fg});const m5=k.forwardRef(({checked:t,className:e,color:r="blue",sizing:n="md",disabled:o,label:i,name:s,onChange:a,theme:l={},...c},d)=>{const u=k.useId(),f=W(K().toggleSwitch,l),h=()=>a(!t),g=()=>{h()},m=b=>{b.code=="Enter"&&b.preventDefault()};return p.jsxs(p.Fragment,{children:[s&&t?p.jsx("input",{ref:d,checked:t,hidden:!0,name:s,readOnly:!0,type:"checkbox",className:"sr-only"}):null,p.jsxs("button",{"aria-checked":t,"aria-labelledby":`${u}-flowbite-toggleswitch-label`,disabled:o,id:`${u}-flowbite-toggleswitch`,onClick:g,onKeyDown:m,role:"switch",tabIndex:0,type:"button",className:F(f.root.base,f.root.active[o?"off":"on"],e),...c,children:[p.jsx("div",{"data-testid":"flowbite-toggleswitch-toggle",className:F(f.toggle.base,f.toggle.checked[t?"on":"off"],t&&f.toggle.checked.color[r],f.toggle.sizes[n])}),i!=null&&i.length?p.jsx("span",{"data-testid":"flowbite-toggleswitch-label",id:`${u}-flowbite-toggleswitch-label`,className:f.root.label,children:i}):null]})]})});m5.displayName="ToggleSwitch";const b5=()=>p.jsx("div",{className:"w-full",children:p.jsx("div",{className:"overflow-x-auto",children:p.jsxs(ee,{striped:!0,children:[p.jsxs(ee.Head,{children:[p.jsx(ee.HeadCell,{children:"Product name"}),p.jsx(ee.HeadCell,{children:"Color"}),p.jsx(ee.HeadCell,{children:"Category"}),p.jsx(ee.HeadCell,{children:"Price"}),p.jsx(ee.HeadCell,{children:p.jsx("span",{className:"sr-only",children:"Edit"})})]}),p.jsxs(ee.Body,{className:"divide-y",children:[p.jsxs(ee.Row,{className:"bg-white dark:border-gray-700 dark:bg-gray-800",children:[p.jsx(ee.Cell,{className:"whitespace-nowrap font-medium text-gray-900 dark:text-white",children:'Apple MacBook Pro 17"'}),p.jsx(ee.Cell,{children:"Sliver"}),p.jsx(ee.Cell,{children:"Laptop"}),p.jsx(ee.Cell,{children:"$2999"}),p.jsx(ee.Cell,{children:p.jsx("a",{href:"#",className:"font-medium text-cyan-600 hover:underline dark:text-cyan-500",children:"Edit"})})]}),p.jsxs(ee.Row,{className:"bg-white dark:border-gray-700 dark:bg-gray-800",children:[p.jsx(ee.Cell,{className:"whitespace-nowrap font-medium text-gray-900 dark:text-white",children:"Microsoft Surface Pro"}),p.jsx(ee.Cell,{children:"White"}),p.jsx(ee.Cell,{children:"Laptop PC"}),p.jsx(ee.Cell,{children:"$1999"}),p.jsx(ee.Cell,{children:p.jsx("a",{href:"#",className:"font-medium text-cyan-600 hover:underline dark:text-cyan-500",children:"Edit"})})]}),p.jsxs(ee.Row,{className:"bg-white dark:border-gray-700 dark:bg-gray-800",children:[p.jsx(ee.Cell,{className:"whitespace-nowrap font-medium text-gray-900 dark:text-white",children:"Magic Mouse 2"}),p.jsx(ee.Cell,{children:"Black"}),p.jsx(ee.Cell,{children:"Accessories"}),p.jsx(ee.Cell,{children:"$99"}),p.jsx(ee.Cell,{children:p.jsx("a",{href:"#",className:"font-medium text-cyan-600 hover:underline dark:text-cyan-500",children:"Edit"})})]}),p.jsxs(ee.Row,{className:"bg-white dark:border-gray-700 dark:bg-gray-800",children:[p.jsx(ee.Cell,{className:"whitespace-nowrap font-medium text-gray-900 dark:text-white",children:"Google Pixel Phone"}),p.jsx(ee.Cell,{children:"Gray"}),p.jsx(ee.Cell,{children:"Phone"}),p.jsx(ee.Cell,{children:"$799"}),p.jsx(ee.Cell,{children:p.jsx("a",{href:"#",className:"font-medium text-cyan-600 hover:underline dark:text-cyan-500",children:"Edit"})})]}),p.jsxs(ee.Row,{className:"bg-white dark:border-gray-700 dark:bg-gray-800",children:[p.jsx(ee.Cell,{className:"whitespace-nowrap font-medium text-gray-900 dark:text-white",children:"Apple Watch 5"}),p.jsx(ee.Cell,{children:"Red"}),p.jsx(ee.Cell,{children:"Wearables"}),p.jsx(ee.Cell,{children:"$999"}),p.jsx(ee.Cell,{children:p.jsx("a",{href:"#",className:"font-medium text-cyan-600 hover:underline dark:text-cyan-500",children:"Edit"})})]})]})]})})}),Bg=(()=>{const{protocol:t,host:e}=window.location;return`${t}//${e}/`})(),y5=()=>p.jsxs("div",{children:[p.jsx(Or,{classIm:"mx-auto mt-32",src:`${Bg}/public/assets/images/mathilde.png`,alt:"Logo Mathilde ads",width:400,height:250}),p.jsx("div",{className:"m-image-container",children:p.jsx(Or,{classIm:"m-image",src:`${Bg}/public/assets/images/background-mathilde.png`,alt:"Logo Mathilde ads",width:400,height:300})})]}),v5=({onOpenModal:t,checked:e,onChange:r,label:n,...o})=>{const i=()=>{e||t(),r(!1)};return p.jsx("div",{className:"mb-5",children:p.jsxs("label",{className:eo["checkbox-container"],children:[p.jsx("input",{type:"checkbox",...o,checked:e,onChange:i,required:!0}),p.jsx("span",{className:eo.checkmark}),n&&p.jsx("span",{children:n})]})})};ue.ButtonFormat=Wg,ue.CardIndicator=op,ue.Checkbox=Hg,ue.ImageFormat=Or,ue.InputForm=Wa,ue.Logout=gu,ue.ModalFormat=Dr,ue.MyDoughnutChart=Tb,ue.PasswordInput=rp,ue.ProgressBar=qa,ue.SelectForm=Ka,ue.SidebarMth=r1,ue.TableComponent=b5,ue.TermsCheckbox=v5,ue.layoutOutside=y5,Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"})});
|
|
498
|
+
*/var J2=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ki=J2.join(","),Vf=typeof Element>"u",Xr=Vf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ci=!Vf&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},_i=function t(e,r){var n;r===void 0&&(r=!0);var o=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),i=o===""||o==="true",s=i||r&&e&&t(e.parentNode);return s},Q2=function(e){var r,n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"contenteditable");return n===""||n==="true"},e5=function(e,r,n){if(_i(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(ki));return r&&Xr.call(e,ki)&&o.unshift(e),o=o.filter(n),o},t5=function t(e,r,n){for(var o=[],i=Array.from(e);i.length;){var s=i.shift();if(!_i(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=t(l,!0,n);n.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var d=Xr.call(s,ki);d&&n.filter(s)&&(r||!e.includes(s))&&o.push(s);var u=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),f=!_i(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(u&&f){var h=t(u===!0?s.children:u.children,!0,n);n.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},Rf=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Yf=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Q2(e))&&!Rf(e)?0:e.tabIndex},r5=function(e,r){var n=Yf(e);return n<0&&r&&!Rf(e)?0:n},n5=function(e,r){return e.tabIndex===r.tabIndex?e.documentOrder-r.documentOrder:e.tabIndex-r.tabIndex},Uf=function(e){return e.tagName==="INPUT"},o5=function(e){return Uf(e)&&e.type==="hidden"},i5=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},s5=function(e,r){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===r)return e[n]},a5=function(e){if(!e.name)return!0;var r=e.form||Ci(e),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(e.name));else try{o=n(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=s5(o,e.form);return!i||i===e},l5=function(e){return Uf(e)&&e.type==="radio"},c5=function(e){return l5(e)&&!a5(e)},d5=function(e){var r,n=e&&Ci(e),o=(r=n)===null||r===void 0?void 0:r.host,i=!1;if(n&&n!==e){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!i&&o;){var c,d,u;n=Ci(o),o=(c=n)===null||c===void 0?void 0:c.host,i=!!((d=o)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(o))}}return i},qf=function(e){var r=e.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},u5=function(e,r){var n=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var i=Xr.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if(Xr.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof o=="function"){for(var a=e;e;){var l=e.parentElement,c=Ci(e);if(l&&!l.shadowRoot&&o(l)===!0)return qf(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=a}if(d5(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return qf(e);return!1},f5=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var r=e.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return Xr.call(r,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}r=r.parentElement}return!1},h5=function(e,r){return!(r.disabled||_i(r)||o5(r)||u5(r,e)||i5(r)||f5(r))},va=function(e,r){return!(c5(r)||Yf(r)<0||!h5(e,r))},g5=function(e){var r=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},p5=function t(e){var r=[],n=[];return e.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=r5(a,s),c=s?t(o.candidates):a;l===0?s?r.push.apply(r,c):r.push(a):n.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),n.sort(n5).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(r)},Si=function(e,r){r=r||{};var n;return r.getShadowRoot?n=t5([e],r.includeContainer,{filter:va.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:g5}):n=e5(e,r.includeContainer,va.bind(null,r)),p5(n)},m5=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return Xr.call(e,ki)===!1?!1:va(r,e)};function Kf(t){return C.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})},t)}const b5=C.useInsertionEffect||(t=>t());function Mt(t){const e=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return b5(()=>{e.current=t}),C.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return e.current==null?void 0:e.current(...n)},[])}const xa="ArrowUp",qn="ArrowDown",Zr="ArrowLeft",Jr="ArrowRight";function Ei(t,e,r){return Math.floor(t/e)!==r}function Kn(t,e){return e<0||e>=t.current.length}function wa(t,e){return Ue(t,{disabledIndices:e})}function Gf(t,e){return Ue(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function Ue(t,e){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:o,amount:i=1}=e===void 0?{}:e;const s=t.current,a=o?c=>o.includes(c):c=>{const d=s[c];return d==null||d.hasAttribute("disabled")||d.getAttribute("aria-disabled")==="true"};let l=r;do l+=n?-i:i;while(l>=0&&l<=s.length-1&&a(l));return l}function y5(t,e){let{event:r,orientation:n,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:d=!1}=e,u=c;if(r.key===xa){if(d&&We(r),c===-1)u=l;else if(u=Ue(t,{startingIndex:u,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||u<0)){const f=c%i,h=l%i,p=l-(h-f);h===f?u=l:u=h>f?p:p-i}Kn(t,u)&&(u=c)}if(r.key===qn&&(d&&We(r),c===-1?u=a:(u=Ue(t,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(u=Ue(t,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),Kn(t,u)&&(u=c)),n==="both"){const f=qr(c/i);r.key===Jr&&(d&&We(r),c%i!==i-1?(u=Ue(t,{startingIndex:c,disabledIndices:s}),o&&Ei(u,i,f)&&(u=Ue(t,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(u=Ue(t,{startingIndex:c-c%i-1,disabledIndices:s})),Ei(u,i,f)&&(u=c)),r.key===Zr&&(d&&We(r),c%i!==0?(u=Ue(t,{startingIndex:c,disabledIndices:s,decrement:!0}),o&&Ei(u,i,f)&&(u=Ue(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(u=Ue(t,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),Ei(u,i,f)&&(u=c));const h=qr(l/i)===f;Kn(t,u)&&(o&&h?u=r.key===Zr?l:Ue(t,{startingIndex:c-c%i-1,disabledIndices:s}):u=c)}return u}function v5(t,e,r){const n=[];let o=0;return t.forEach((i,s)=>{let{width:a,height:l}=i;if(a>e&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(r&&(o=0);!c;){const d=[];for(let u=0;u<a;u++)for(let f=0;f<l;f++)d.push(o+u+f*e);o%e+a<=e&&d.every(u=>n[u]==null)?(d.forEach(u=>{n[u]=s}),c=!0):o++}}),[...n]}function x5(t,e,r,n,o){if(t===-1)return-1;const i=r.indexOf(t);switch(o){case"tl":return i;case"tr":return i+e[t].width-1;case"bl":return i+(e[t].height-1)*n;case"br":return r.lastIndexOf(t)}}function w5(t,e){return e.flatMap((r,n)=>t.includes(r)?[n]:[])}let Xf=0;function Rt(t,e){e===void 0&&(e={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=e;n&&cancelAnimationFrame(Xf);const i=()=>t==null?void 0:t.focus({preventScroll:r});o?i():Xf=requestAnimationFrame(i)}var be=typeof document<"u"?k.useLayoutEffect:k.useEffect;function k5(t,e){const r=t.compareDocumentPosition(e);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}function C5(t,e){if(t.size!==e.size)return!1;for(const[r,n]of t.entries())if(n!==e.get(r))return!1;return!0}const Zf=C.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function _5(t){let{children:e,elementsRef:r,labelsRef:n}=t;const[o,i]=C.useState(()=>new Map),s=C.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),a=C.useCallback(l=>{i(c=>{const d=new Map(c);return d.delete(l),d})},[]);return be(()=>{const l=new Map(o);Array.from(l.keys()).sort(k5).forEach((d,u)=>{l.set(d,u)}),C5(o,l)||i(l)},[o]),C.createElement(Zf.Provider,{value:C.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:r,labelsRef:n}),[s,a,o,r,n])},e)}function S5(t){let{label:e}=t===void 0?{}:t;const[r,n]=C.useState(null),o=C.useRef(null),{register:i,unregister:s,map:a,elementsRef:l,labelsRef:c}=C.useContext(Zf),d=C.useCallback(u=>{if(o.current=u,r!==null&&(l.current[r]=u,c)){var f;const h=e!==void 0;c.current[r]=h?e:(f=u==null?void 0:u.textContent)!=null?f:null}},[r,l,c,e]);return be(()=>{const u=o.current;if(u)return i(u),()=>{s(u)}},[i,s]),be(()=>{const u=o.current?a.get(o.current):null;u!=null&&n(u)},[a]),C.useMemo(()=>({ref:d,index:r??-1}),[r,d])}function Gn(){return Gn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Gn.apply(this,arguments)}let ka=!1,E5=0;const Jf=()=>"floating-ui-"+E5++;function O5(){const[t,e]=C.useState(()=>ka?Jf():void 0);return be(()=>{t==null&&e(Jf())},[]),C.useEffect(()=>{ka||(ka=!0)},[]),t}const Oi=C.useId||O5;function T5(){const t=new Map;return{emit(e,r){var n;(n=t.get(e))==null||n.forEach(o=>o(r))},on(e,r){t.set(e,[...t.get(e)||[],r])},off(e,r){var n;t.set(e,((n=t.get(e))==null?void 0:n.filter(o=>o!==r))||[])}}}const N5=C.createContext(null),M5=C.createContext(null),Ti=()=>{var t;return((t=C.useContext(N5))==null?void 0:t.id)||null},Xn=()=>C.useContext(M5);function _r(t){return"data-floating-ui-"+t}function Pt(t){const e=k.useRef(t);return be(()=>{e.current=t}),e}const Qf=_r("safe-polygon");function Ca(t,e,r){return r&&!gi(r)?0:typeof t=="number"?t:t==null?void 0:t[e]}function P5(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,dataRef:o,events:i,elements:{domReference:s,floating:a},refs:l}=t,{enabled:c=!0,delay:d=0,handleClose:u=null,mouseOnly:f=!1,restMs:h=0,move:p=!0}=e,m=Xn(),b=Ti(),v=Pt(u),y=Pt(d),_=C.useRef(),x=C.useRef(),w=C.useRef(),S=C.useRef(),T=C.useRef(!0),M=C.useRef(!1),N=C.useRef(()=>{}),E=C.useCallback(()=>{var O;const P=(O=o.current.openEvent)==null?void 0:O.type;return(P==null?void 0:P.includes("mouse"))&&P!=="mousedown"},[o]);C.useEffect(()=>{if(!c)return;function O(P){let{open:L}=P;L||(clearTimeout(x.current),clearTimeout(S.current),T.current=!0)}return i.on("openchange",O),()=>{i.off("openchange",O)}},[c,i]),C.useEffect(()=>{if(!c||!v.current||!r)return;function O(L){E()&&n(!1,L,"hover")}const P=qe(a).documentElement;return P.addEventListener("mouseleave",O),()=>{P.removeEventListener("mouseleave",O)}},[a,r,n,c,v,E]);const I=C.useCallback(function(O,P,L){P===void 0&&(P=!0),L===void 0&&(L="hover");const z=Ca(y.current,"close",_.current);z&&!w.current?(clearTimeout(x.current),x.current=setTimeout(()=>n(!1,O,L),z)):P&&(clearTimeout(x.current),n(!1,O,L))},[y,n]),A=C.useCallback(()=>{N.current(),w.current=void 0},[]),D=C.useCallback(()=>{if(M.current){const O=qe(l.floating.current).body;O.style.pointerEvents="",O.removeAttribute(Qf),M.current=!1}},[l]);return C.useEffect(()=>{if(!c)return;function O(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function P(B){if(clearTimeout(x.current),T.current=!1,f&&!gi(_.current)||h>0&&Ca(y.current,"open")===0)return;const j=Ca(y.current,"open",_.current);j?x.current=setTimeout(()=>{n(!0,B,"hover")},j):n(!0,B,"hover")}function L(B){if(O())return;N.current();const j=qe(a);if(clearTimeout(S.current),v.current){r||clearTimeout(x.current),w.current=v.current({...t,tree:m,x:B.clientX,y:B.clientY,onClose(){D(),A(),I(B,!0,"safe-polygon")}});const H=w.current;j.addEventListener("mousemove",H),N.current=()=>{j.removeEventListener("mousemove",H)};return}(_.current==="touch"?!Ee(a,B.relatedTarget):!0)&&I(B)}function z(B){O()||v.current==null||v.current({...t,tree:m,x:B.clientX,y:B.clientY,onClose(){D(),A(),I(B)}})(B)}if(pe(s)){const B=s;return r&&B.addEventListener("mouseleave",z),a==null||a.addEventListener("mouseleave",z),p&&B.addEventListener("mousemove",P,{once:!0}),B.addEventListener("mouseenter",P),B.addEventListener("mouseleave",L),()=>{r&&B.removeEventListener("mouseleave",z),a==null||a.removeEventListener("mouseleave",z),p&&B.removeEventListener("mousemove",P),B.removeEventListener("mouseenter",P),B.removeEventListener("mouseleave",L)}}},[s,a,c,t,f,h,p,I,A,D,n,r,m,y,v,o]),be(()=>{var O;if(c&&r&&(O=v.current)!=null&&O.__options.blockPointerEvents&&E()){const L=qe(a).body;if(L.setAttribute(Qf,""),L.style.pointerEvents="none",M.current=!0,pe(s)&&a){var P;const z=s,B=m==null||(P=m.nodesRef.current.find(j=>j.id===b))==null||(P=P.context)==null?void 0:P.elements.floating;return B&&(B.style.pointerEvents=""),z.style.pointerEvents="auto",a.style.pointerEvents="auto",()=>{z.style.pointerEvents="",a.style.pointerEvents=""}}}},[c,r,b,a,s,m,v,E]),be(()=>{r||(_.current=void 0,A(),D())},[r,A,D]),C.useEffect(()=>()=>{A(),clearTimeout(x.current),clearTimeout(S.current),D()},[c,s,A,D]),C.useMemo(()=>{if(!c)return{};function O(P){_.current=P.pointerType}return{reference:{onPointerDown:O,onPointerEnter:O,onMouseMove(P){r||h===0||(clearTimeout(S.current),S.current=setTimeout(()=>{T.current||n(!0,P.nativeEvent,"hover")},h))}},floating:{onMouseEnter(){clearTimeout(x.current)},onMouseLeave(P){I(P.nativeEvent,!1)}}}},[c,h,r,n,I])}function A5(t,e){var r;let n=[],o=(r=t.find(i=>i.id===e))==null?void 0:r.parentId;for(;o;){const i=t.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(n=n.concat(i))}return n}function Sr(t,e){let r=t.filter(o=>{var i;return o.parentId===e&&((i=o.context)==null?void 0:i.open)}),n=r;for(;n.length;)n=t.filter(o=>{var i;return(i=n)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),r=r.concat(n);return r}function D5(t,e){let r,n=-1;function o(i,s){s>n&&(r=i,n=s),Sr(t,i).forEach(l=>{o(l.id,s+1)})}return o(e,0),t.find(i=>i.id===r)}let Qr=new WeakMap,Ni=new WeakSet,Mi={},_a=0;const I5=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,eh=t=>t&&(t.host||eh(t.parentNode)),L5=(t,e)=>e.map(r=>{if(t.contains(r))return r;const n=eh(r);return t.contains(n)?n:null}).filter(r=>r!=null);function F5(t,e,r,n){const o="data-floating-ui-inert",i=n?"inert":r?"aria-hidden":null,s=L5(e,t),a=new Set,l=new Set(s),c=[];Mi[o]||(Mi[o]=new WeakMap);const d=Mi[o];s.forEach(u),f(e),a.clear();function u(h){!h||a.has(h)||(a.add(h),h.parentNode&&u(h.parentNode))}function f(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,p=>{if(a.has(p))f(p);else{const m=i?p.getAttribute(i):null,b=m!==null&&m!=="false",v=(Qr.get(p)||0)+1,y=(d.get(p)||0)+1;Qr.set(p,v),d.set(p,y),c.push(p),v===1&&b&&Ni.add(p),y===1&&p.setAttribute(o,""),!b&&i&&p.setAttribute(i,"true")}})}return _a++,()=>{c.forEach(h=>{const p=(Qr.get(h)||0)-1,m=(d.get(h)||0)-1;Qr.set(h,p),d.set(h,m),p||(!Ni.has(h)&&i&&h.removeAttribute(i),Ni.delete(h)),m||h.removeAttribute(o)}),_a--,_a||(Qr=new WeakMap,Qr=new WeakMap,Ni=new WeakSet,Mi={})}}function th(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);const n=qe(t[0]).body;return F5(t.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,e,r)}const Zn=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function rh(t,e){const r=Si(t,Zn());e==="prev"&&r.reverse();const n=r.indexOf(Ot(qe(t)));return r.slice(n+1)[0]}function nh(){return rh(document.body,"next")}function oh(){return rh(document.body,"prev")}function Jn(t,e){const r=e||t.currentTarget,n=t.relatedTarget;return!n||!Ee(r,n)}function z5(t){Si(t,Zn()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function B5(t){t.querySelectorAll("[data-tabindex]").forEach(r=>{const n=r.dataset.tabindex;delete r.dataset.tabindex,n?r.setAttribute("tabindex",n):r.removeAttribute("tabindex")})}const Sa={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let $5;function ih(t){t.key==="Tab"&&(t.target,clearTimeout($5))}const Pi=C.forwardRef(function(e,r){const[n,o]=C.useState();be(()=>(aa()&&o("button"),document.addEventListener("keydown",ih),()=>{document.removeEventListener("keydown",ih)}),[]);const i={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[_r("focus-guard")]:"",style:Sa};return C.createElement("span",Gn({},e,i))}),sh=C.createContext(null),ah=_r("portal");function j5(t){let{id:e,root:r}=t===void 0?{}:t;const[n,o]=C.useState(null),i=Oi(),s=lh(),a=C.useRef(null);return be(()=>()=>{n==null||n.remove(),queueMicrotask(()=>{a.current=null})},[n]),be(()=>{if(a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=i,c.setAttribute(ah,""),l.appendChild(c),a.current=c,o(c)},[e,i]),be(()=>{if(a.current)return;let l=r||(s==null?void 0:s.portalNode);l&&!pe(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=i,d.setAttribute(ah,""),l=c||l,l.appendChild(d),a.current=d,o(d)},[e,r,i,s]),n}function W5(t){let{children:e,id:r,root:n=null,preserveTabOrder:o=!0}=t;const i=j5({id:r,root:n}),[s,a]=C.useState(null),l=C.useRef(null),c=C.useRef(null),d=C.useRef(null),u=C.useRef(null),f=!!s&&!s.modal&&s.open&&o&&!!(n||i);return C.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function h(p){i&&Jn(p)&&(p.type==="focusin"?B5:z5)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,s==null?void 0:s.modal]),C.createElement(sh.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:i,setFocusManagerState:a}),[o,i])},f&&i&&C.createElement(Pi,{"data-type":"outside",ref:l,onFocus:h=>{if(Jn(h,i)){var p;(p=d.current)==null||p.focus()}else{const m=oh()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),f&&i&&C.createElement("span",{"aria-owns":i.id,style:Sa}),i&&Ha.createPortal(e,i),f&&i&&C.createElement(Pi,{"data-type":"outside",ref:c,onFocus:h=>{if(Jn(h,i)){var p;(p=u.current)==null||p.focus()}else{const m=nh()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,h.nativeEvent))}}}))}const lh=()=>C.useContext(sh),H5=20;let Er=[];function Ea(t){Er=Er.filter(r=>r.isConnected);let e=t;if(!(!e||wr(e)==="body")){if(!m5(e,Zn())){const r=Si(e,Zn())[0];if(!r)return;e=r}Er.push(e),Er.length>H5&&(Er=Er.slice(-20))}}function ch(){return Er.slice().reverse().find(t=>t.isConnected)}const V5=C.forwardRef(function(e,r){return C.createElement("button",Gn({},e,{type:"button",ref:r,tabIndex:-1,style:Sa}))});function dh(t){const{context:e,children:r,disabled:n=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0}=t,{open:u,refs:f,nodeId:h,onOpenChange:p,events:m,dataRef:b,elements:{domReference:v,floating:y}}=e,_=typeof s=="number"&&s<0,x=_f(v)&&_,w=I5()?i:!0,S=Pt(o),T=Pt(s),M=Pt(a),N=Xn(),E=lh(),I=C.useRef(null),A=C.useRef(null),D=C.useRef(!1),O=C.useRef(!1),P=E!=null,L=C.useCallback(function($){return $===void 0&&($=y),$?Si($,Zn()):[]},[y]),z=C.useCallback($=>{const H=L($);return S.current.map(V=>v&&V==="reference"?v:y&&V==="floating"?y:H).filter(Boolean).flat()},[v,y,S,L]);C.useEffect(()=>{if(n||!l)return;function $(V){if(V.key==="Tab"){Ee(y,Ot(qe(y)))&&L().length===0&&!x&&We(V);const Y=z(),U=rr(V);S.current[0]==="reference"&&U===v&&(We(V),V.shiftKey?Rt(Y[Y.length-1]):Rt(Y[1])),S.current[1]==="floating"&&U===y&&V.shiftKey&&(We(V),Rt(Y[0]))}}const H=qe(y);return H.addEventListener("keydown",$),()=>{H.removeEventListener("keydown",$)}},[n,v,y,l,S,x,L,z]),C.useEffect(()=>{if(n||!d)return;function $(){O.current=!0,setTimeout(()=>{O.current=!1})}function H(V){const Y=V.relatedTarget;queueMicrotask(()=>{const U=!(Ee(v,Y)||Ee(y,Y)||Ee(Y,y)||Ee(E==null?void 0:E.portalNode,Y)||Y!=null&&Y.hasAttribute(_r("focus-guard"))||N&&(Sr(N.nodesRef.current,h).find(q=>{var G,ue;return Ee((G=q.context)==null?void 0:G.elements.floating,Y)||Ee((ue=q.context)==null?void 0:ue.elements.domReference,Y)})||A5(N.nodesRef.current,h).find(q=>{var G,ue;return((G=q.context)==null?void 0:G.elements.floating)===Y||((ue=q.context)==null?void 0:ue.elements.domReference)===Y})));Y&&U&&!O.current&&Y!==ch()&&(D.current=!0,p(!1,V))})}if(y&&je(v))return v.addEventListener("focusout",H),v.addEventListener("pointerdown",$),!l&&y.addEventListener("focusout",H),()=>{v.removeEventListener("focusout",H),v.removeEventListener("pointerdown",$),!l&&y.removeEventListener("focusout",H)}},[n,v,y,l,h,N,E,p,d]),C.useEffect(()=>{var $;if(n)return;const H=Array.from((E==null||($=E.portalNode)==null?void 0:$.querySelectorAll("["+_r("portal")+"]"))||[]);if(y){const V=[y,...H,I.current,A.current,S.current.includes("reference")||x?v:null].filter(U=>U!=null),Y=l||x?th(V,w,!w):th(V);return()=>{Y()}}},[n,v,y,l,S,E,x,w]),be(()=>{if(n||!y)return;const $=qe(y),H=Ot($);queueMicrotask(()=>{const V=z(y),Y=T.current,U=(typeof Y=="number"?V[Y]:Y.current)||y,q=Ee(y,H);!_&&!q&&u&&Rt(U,{preventScroll:U===y})})},[n,u,y,_,z,T]),be(()=>{if(n||!y)return;let $=!1;const H=qe(y),V=Ot(H),Y=b.current;Ea(V);function U(q){let{reason:G,event:ue,nested:X}=q;G==="escape-key"&&f.domReference.current&&Ea(f.domReference.current),G==="hover"&&ue.type==="mouseleave"&&(D.current=!0),G==="outside-press"&&(X?(D.current=!1,$=!0):D.current=!(kf(ue)||sa(ue)))}return m.on("openchange",U),()=>{m.off("openchange",U);const q=Ot(H),G=Ee(y,q)||N&&Sr(N.nodesRef.current,h).some(ie=>{var Le;return Ee((Le=ie.context)==null?void 0:Le.elements.floating,q)});(G||Y.openEvent&&["click","mousedown"].includes(Y.openEvent.type))&&f.domReference.current&&Ea(f.domReference.current);const X=ch();M.current&&!D.current&&je(X)&&(!(X!==q&&q!==H.body)||G)&&Rt(X,{cancelPrevious:!1,preventScroll:$})}},[n,y,M,b,f,m,N,h]),be(()=>{if(!(n||!E))return E.setFocusManagerState({modal:l,closeOnFocusOut:d,open:u,onOpenChange:p,refs:f}),()=>{E.setFocusManagerState(null)}},[n,E,l,u,p,f,d]),be(()=>{if(n||!y||typeof MutationObserver!="function"||_)return;const $=()=>{const V=y.getAttribute("tabindex");S.current.includes("floating")||Ot(qe(y))!==f.domReference.current&&L().length===0?V!=="0"&&y.setAttribute("tabindex","0"):V!=="-1"&&y.setAttribute("tabindex","-1")};$();const H=new MutationObserver($);return H.observe(y,{childList:!0,subtree:!0,attributes:!0}),()=>{H.disconnect()}},[n,y,f,S,L,_]);function B($){return n||!c||!l?null:C.createElement(V5,{ref:$==="start"?I:A,onClick:H=>p(!1,H.nativeEvent)},typeof c=="string"?c:"Dismiss")}const j=!n&&w&&(P||l);return C.createElement(C.Fragment,null,j&&C.createElement(Pi,{"data-type":"inside",ref:E==null?void 0:E.beforeInsideRef,onFocus:$=>{if(l){const V=z();Rt(o[0]==="reference"?V[0]:V[V.length-1])}else if(E!=null&&E.preserveTabOrder&&E.portalNode)if(D.current=!1,Jn($,E.portalNode)){const V=nh()||v;V==null||V.focus()}else{var H;(H=E.beforeOutsideRef.current)==null||H.focus()}}}),!x&&B("start"),r,B("end"),j&&C.createElement(Pi,{"data-type":"inside",ref:E==null?void 0:E.afterInsideRef,onFocus:$=>{if(l)Rt(z()[0]);else if(E!=null&&E.preserveTabOrder&&E.portalNode)if(d&&(D.current=!0),Jn($,E.portalNode)){const V=oh()||v;V==null||V.focus()}else{var H;(H=E.afterOutsideRef.current)==null||H.focus()}}}))}const Oa=new Set,R5=C.forwardRef(function(e,r){let{lockScroll:n=!1,...o}=e;const i=Oi();return be(()=>{if(!n)return;Oa.add(i);const s=/iP(hone|ad|od)|iOS/.test(ia()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",d=window.innerWidth-document.documentElement.clientWidth,u=a.left?parseFloat(a.left):window.pageXOffset,f=a.top?parseFloat(a.top):window.pageYOffset;if(a.overflow="hidden",d&&(a[c]=d+"px"),s){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,b=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(f-Math.floor(b))+"px",left:-(u-Math.floor(m))+"px",right:"0"})}return()=>{Oa.delete(i),Oa.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(u,f)))}},[i,n]),C.createElement("div",Gn({ref:r},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function uh(t){return je(t.target)&&t.target.tagName==="BUTTON"}function fh(t){return da(t)}function hh(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,dataRef:o,elements:{domReference:i}}=t,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:d=!0}=e,u=C.useRef(),f=C.useRef(!1);return C.useMemo(()=>s?{reference:{onPointerDown(h){u.current=h.pointerType},onMouseDown(h){h.button===0&&(gi(u.current,!0)&&c||a!=="click"&&(r&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?n(!1,h.nativeEvent,"click"):(h.preventDefault(),n(!0,h.nativeEvent,"click"))))},onClick(h){if(a==="mousedown"&&u.current){u.current=void 0;return}gi(u.current,!0)&&c||(r&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?n(!1,h.nativeEvent,"click"):n(!0,h.nativeEvent,"click"))},onKeyDown(h){u.current=void 0,!(h.defaultPrevented||!d||uh(h))&&(h.key===" "&&!fh(i)&&(h.preventDefault(),f.current=!0),h.key==="Enter"&&n(!(r&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!d||uh(h)||fh(i)||h.key===" "&&f.current&&(f.current=!1,n(!(r&&l),h.nativeEvent,"click"))}}}:{},[s,o,a,c,d,i,l,r,n])}const Y5={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},U5={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},gh=t=>{var e,r;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(r=t==null?void 0:t.outsidePress)!=null?r:!0}};function ph(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,nodeId:o,elements:{reference:i,domReference:s,floating:a},dataRef:l}=t,{enabled:c=!0,escapeKey:d=!0,outsidePress:u=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:p="pointerdown",ancestorScroll:m=!1,bubbles:b,capture:v}=e,y=Xn(),_=Mt(typeof u=="function"?u:()=>!1),x=typeof u=="function"?_:u,w=C.useRef(!1),S=C.useRef(!1),{escapeKey:T,outsidePress:M}=gh(b),{escapeKey:N,outsidePress:E}=gh(v),I=Mt(P=>{if(!r||!c||!d||P.key!=="Escape")return;const L=y?Sr(y.nodesRef.current,o):[];if(!T&&(P.stopPropagation(),L.length>0)){let z=!0;if(L.forEach(B=>{var j;if((j=B.context)!=null&&j.open&&!B.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}n(!1,a2(P)?P.nativeEvent:P,"escape-key")}),A=Mt(P=>{var L;const z=()=>{var B;I(P),(B=rr(P))==null||B.removeEventListener("keydown",z)};(L=rr(P))==null||L.addEventListener("keydown",z)}),D=Mt(P=>{const L=w.current;w.current=!1;const z=S.current;if(S.current=!1,f==="click"&&z||L||typeof x=="function"&&!x(P))return;const B=rr(P),j="["+_r("inert")+"]",$=qe(a).querySelectorAll(j);let H=pe(B)?B:null;for(;H&&!er(H);){const U=Ht(H);if(er(U)||!pe(U))break;H=U}if($.length&&pe(B)&&!l2(B)&&!Ee(B,a)&&Array.from($).every(U=>!Ee(H,U)))return;if(je(B)&&a){const U=B.clientWidth>0&&B.scrollWidth>B.clientWidth,q=B.clientHeight>0&&B.scrollHeight>B.clientHeight;let G=q&&P.offsetX>B.clientWidth;if(q&&ft(B).direction==="rtl"&&(G=P.offsetX<=B.offsetWidth-B.clientWidth),G||U&&P.offsetY>B.clientHeight)return}const V=y&&Sr(y.nodesRef.current,o).some(U=>{var q;return ca(P,(q=U.context)==null?void 0:q.elements.floating)});if(ca(P,a)||ca(P,s)||V)return;const Y=y?Sr(y.nodesRef.current,o):[];if(Y.length>0){let U=!0;if(Y.forEach(q=>{var G;if((G=q.context)!=null&&G.open&&!q.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}n(!1,P,"outside-press")}),O=Mt(P=>{var L;const z=()=>{var B;D(P),(B=rr(P))==null||B.removeEventListener(f,z)};(L=rr(P))==null||L.addEventListener(f,z)});return C.useEffect(()=>{if(!r||!c)return;l.current.__escapeKeyBubbles=T,l.current.__outsidePressBubbles=M;function P(B){n(!1,B,"ancestor-scroll")}const L=qe(a);d&&L.addEventListener("keydown",N?A:I,N),x&&L.addEventListener(f,E?O:D,E);let z=[];return m&&(pe(s)&&(z=tr(s)),pe(a)&&(z=z.concat(tr(a))),!pe(i)&&i&&i.contextElement&&(z=z.concat(tr(i.contextElement)))),z=z.filter(B=>{var j;return B!==((j=L.defaultView)==null?void 0:j.visualViewport)}),z.forEach(B=>{B.addEventListener("scroll",P,{passive:!0})}),()=>{d&&L.removeEventListener("keydown",N?A:I,N),x&&L.removeEventListener(f,E?O:D,E),z.forEach(B=>{B.removeEventListener("scroll",P)})}},[l,a,s,i,d,x,f,r,n,m,c,T,M,I,N,A,D,E,O]),C.useEffect(()=>{w.current=!1},[x,f]),C.useMemo(()=>c?{reference:{onKeyDown:I,[Y5[p]]:P=>{h&&n(!1,P.nativeEvent,"reference-press")}},floating:{onKeyDown:I,onMouseDown(){S.current=!0},onMouseUp(){S.current=!0},[U5[f]]:()=>{w.current=!0}}}:{},[c,h,f,p,n,I])}let Ta;process.env.NODE_ENV!=="production"&&(Ta=new Set);function mh(t){var e;t===void 0&&(t={});const{open:r=!1,onOpenChange:n,nodeId:o}=t;if(process.env.NODE_ENV!=="production"){var i;const M="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((i=t.elements)!=null&&i.reference&&!pe(t.elements.reference)){var s;if(!((s=Ta)!=null&&s.has(M))){var a;(a=Ta)==null||a.add(M),console.error(M)}}}const[l,c]=C.useState(null),d=((e=t.elements)==null?void 0:e.reference)||l,u=Y2(t),f=Xn(),h=Ti()!=null,p=Mt((M,N,E)=>{M&&(b.current.openEvent=N),v.emit("openchange",{open:M,event:N,reason:E,nested:h}),n==null||n(M,N,E)}),m=C.useRef(null),b=C.useRef({}),v=C.useState(()=>T5())[0],y=Oi(),_=C.useCallback(M=>{const N=pe(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),contextElement:M}:M;u.refs.setReference(N)},[u.refs]),x=C.useCallback(M=>{(pe(M)||M===null)&&(m.current=M,c(M)),(pe(u.refs.reference.current)||u.refs.reference.current===null||M!==null&&!pe(M))&&u.refs.setReference(M)},[u.refs]),w=C.useMemo(()=>({...u.refs,setReference:x,setPositionReference:_,domReference:m}),[u.refs,x,_]),S=C.useMemo(()=>({...u.elements,domReference:d}),[u.elements,d]),T=C.useMemo(()=>({...u,refs:w,elements:S,dataRef:b,nodeId:o,floatingId:y,events:v,open:r,onOpenChange:p}),[u,o,y,v,r,p,w,S]);return be(()=>{const M=f==null?void 0:f.nodesRef.current.find(N=>N.id===o);M&&(M.context=T)}),C.useMemo(()=>({...u,context:T,refs:w,elements:S}),[u,w,S,T])}function q5(t,e){e===void 0&&(e={});const{open:r,onOpenChange:n,events:o,refs:i,elements:{domReference:s}}=t,{enabled:a=!0,visibleOnly:l=!0}=e,c=C.useRef(!1),d=C.useRef(),u=C.useRef(!0);return C.useEffect(()=>{if(!a)return;const f=et(s);function h(){!r&&je(s)&&s===Ot(qe(s))&&(c.current=!0)}function p(){u.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",p,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",p,!0)}},[s,r,a]),C.useEffect(()=>{if(!a)return;function f(h){let{reason:p}=h;(p==="reference-press"||p==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,a]),C.useEffect(()=>()=>{clearTimeout(d.current)},[]),C.useMemo(()=>a?{reference:{onPointerDown(f){sa(f.nativeEvent)||(u.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=rr(f.nativeEvent);if(l&&pe(h))try{if(aa()&&Cf())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!u.current&&!da(h))return}n(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,p=pe(h)&&h.hasAttribute(_r("focus-guard"))&&h.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{const m=Ot(s?s.ownerDocument:document);!h&&m===s||Ee(i.floating.current,m)||Ee(s,m)||p||n(!1,f.nativeEvent,"focus")})}}}:{},[a,l,s,i,n])}const bh="active",yh="selected";function Na(t,e,r){const n=new Map,o=r==="item";let i=t;if(o&&t){const{[bh]:s,[yh]:a,...l}=t;i=l}return{...r==="floating"&&{tabIndex:-1},...i,...e.map(s=>{const a=s?s[r]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(o&&[bh,yh].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof d=="function"){var u;(u=n.get(c))==null||u.push(d),s[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=n.get(c))==null?void 0:f.map(b=>b(...p)).find(b=>b!==void 0)}}}else s[c]=d}),s),{})}}function vh(t){t===void 0&&(t=[]);const e=t,r=C.useCallback(i=>Na(i,t,"reference"),e),n=C.useCallback(i=>Na(i,t,"floating"),e),o=C.useCallback(i=>Na(i,t,"item"),t.map(i=>i==null?void 0:i.item));return C.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])}let xh=!1;function Ai(t,e,r){switch(t){case"vertical":return e;case"horizontal":return r;default:return e||r}}function wh(t,e){return Ai(e,t===xa||t===qn,t===Zr||t===Jr)}function Ma(t,e,r){return Ai(e,t===qn,r?t===Zr:t===Jr)||t==="Enter"||t===" "||t===""}function K5(t,e,r){return Ai(e,r?t===Zr:t===Jr,t===qn)}function kh(t,e,r){return Ai(e,r?t===Jr:t===Zr,t===xa)}function G5(t,e){const{open:r,onOpenChange:n,refs:o,elements:{domReference:i,floating:s}}=t,{listRef:a,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:u=null,allowEscape:f=!1,loop:h=!1,nested:p=!1,rtl:m=!1,virtual:b=!1,focusItemOnOpen:v="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:_=!0,disabledIndices:x=void 0,orientation:w="vertical",cols:S=1,scrollItemIntoView:T=!0,virtualItemRef:M,itemSizes:N,dense:E=!1}=e;process.env.NODE_ENV!=="production"&&(f&&(h||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),b||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),w==="vertical"&&S>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const I=Ti(),A=Xn(),D=Mt(c),O=C.useRef(v),P=C.useRef(u??-1),L=C.useRef(null),z=C.useRef(!0),B=C.useRef(D),j=C.useRef(!!s),$=C.useRef(!1),H=C.useRef(!1),V=Pt(x),Y=Pt(r),U=Pt(T),[q,G]=C.useState(),[ue,X]=C.useState(),ie=Mt(function(J,Oe,ce){ce===void 0&&(ce=!1);const re=J.current[Oe.current];re&&(b?(G(re.id),A==null||A.events.emit("virtualfocus",re),M&&(M.current=re)):Rt(re,{preventScroll:!0,sync:Cf()&&aa()?xh||$.current:!1}),requestAnimationFrame(()=>{const ge=U.current;ge&&re&&(ce||!z.current)&&(re.scrollIntoView==null||re.scrollIntoView(typeof ge=="boolean"?{block:"nearest",inline:"nearest"}:ge))}))});be(()=>{document.createElement("div").focus({get preventScroll(){return xh=!0,!1}})},[]),be(()=>{d&&(r&&s?O.current&&u!=null&&(H.current=!0,P.current=u,D(u)):j.current&&(P.current=-1,B.current(null)))},[d,r,s,u,D]),be(()=>{if(d&&r&&s)if(l==null){if($.current=!1,u!=null)return;if(j.current&&(P.current=-1,ie(a,P)),!j.current&&O.current&&(L.current!=null||O.current===!0&&L.current==null)){let J=0;const Oe=()=>{a.current[0]==null?(J<2&&(J?requestAnimationFrame:queueMicrotask)(Oe),J++):(P.current=L.current==null||Ma(L.current,w,m)||p?wa(a,V.current):Gf(a,V.current),L.current=null,D(P.current))};Oe()}}else Kn(a,l)||(P.current=l,ie(a,P,H.current),H.current=!1)},[d,r,s,l,u,p,a,w,m,D,ie,V]),be(()=>{var J;if(!d||s||!A||b||!j.current)return;const Oe=A.nodesRef.current,ce=(J=Oe.find(Q=>Q.id===I))==null||(J=J.context)==null?void 0:J.elements.floating,re=Ot(qe(s)),ge=Oe.some(Q=>Q.context&&Ee(Q.context.elements.floating,re));ce&&!ge&&z.current&&ce.focus({preventScroll:!0})},[d,s,A,I,b]),be(()=>{if(!d||!A||!b||I)return;function J(Oe){X(Oe.id),M&&(M.current=Oe)}return A.events.on("virtualfocus",J),()=>{A.events.off("virtualfocus",J)}},[d,A,b,I,M]),be(()=>{B.current=D,j.current=!!s}),be(()=>{r||(L.current=null)},[r]);const Le=l!=null,He=C.useMemo(()=>{function J(ce){if(!r)return;const re=a.current.indexOf(ce);re!==-1&&D(re)}return{onFocus(ce){let{currentTarget:re}=ce;J(re)},onClick:ce=>{let{currentTarget:re}=ce;return re.focus({preventScroll:!0})},...y&&{onMouseMove(ce){let{currentTarget:re}=ce;J(re)},onPointerLeave(ce){let{pointerType:re}=ce;!z.current||re==="touch"||(P.current=-1,ie(a,P),D(null),b||Rt(o.floating.current,{preventScroll:!0}))}}}},[r,o,ie,y,a,D,b]);return C.useMemo(()=>{if(!d)return{};const J=V.current;function Oe(R){if(z.current=!1,$.current=!0,!Y.current&&R.currentTarget===o.floating.current)return;if(p&&kh(R.key,w,m)){We(R),n(!1,R.nativeEvent,"list-navigation"),je(i)&&!b&&i.focus();return}const Te=P.current,se=wa(a,J),Ce=Gf(a,J);if(R.key==="Home"&&(We(R),P.current=se,D(P.current)),R.key==="End"&&(We(R),P.current=Ce,D(P.current)),S>1){const Fe=N||Array.from({length:a.current.length},()=>({width:1,height:1})),Ae=v5(Fe,S,E),ht=Ae.findIndex(it=>it!=null&&!(J!=null&&J.includes(it))),vt=Ae.reduce((it,or,st)=>or!=null&&!(J!=null&&J.includes(or))?st:it,-1);if(P.current=Ae[y5({current:Ae.map(it=>it!=null?a.current[it]:null)},{event:R,orientation:w,loop:h,cols:S,disabledIndices:w5([...J||[],void 0],Ae),minIndex:ht,maxIndex:vt,prevIndex:x5(P.current,Fe,Ae,S,R.key===qn?"bl":R.key===Jr?"tr":"tl"),stopEvent:!0})],D(P.current),w==="both")return}if(wh(R.key,w)){if(We(R),r&&!b&&Ot(R.currentTarget.ownerDocument)===R.currentTarget){P.current=Ma(R.key,w,m)?se:Ce,D(P.current);return}Ma(R.key,w,m)?h?P.current=Te>=Ce?f&&Te!==a.current.length?-1:se:Ue(a,{startingIndex:Te,disabledIndices:J}):P.current=Math.min(Ce,Ue(a,{startingIndex:Te,disabledIndices:J})):h?P.current=Te<=se?f&&Te!==-1?a.current.length:Ce:Ue(a,{startingIndex:Te,decrement:!0,disabledIndices:J}):P.current=Math.max(se,Ue(a,{startingIndex:Te,decrement:!0,disabledIndices:J})),Kn(a,P.current)?D(null):D(P.current)}}function ce(R){v==="auto"&&kf(R.nativeEvent)&&(O.current=!0)}function re(R){O.current=v,v==="auto"&&sa(R.nativeEvent)&&(O.current=!0)}const ge=b&&r&&Le&&{"aria-activedescendant":ue||q},Q=a.current.find(R=>(R==null?void 0:R.id)===q);return{reference:{...ge,onKeyDown(R){z.current=!1;const Te=R.key.indexOf("Arrow")===0,se=K5(R.key,w,m),Ce=kh(R.key,w,m),Fe=wh(R.key,w),Ae=(p?se:Fe)||R.key==="Enter"||R.key.trim()==="";if(b&&r){const or=A==null?void 0:A.nodesRef.current.find(Li=>Li.parentId==null),st=A&&or?D5(A.nodesRef.current,or.id):null;if(Te&&st&&M){const Li=new KeyboardEvent("keydown",{key:R.key,bubbles:!0});if(se||Ce){var ht,vt;const OC=((ht=st.context)==null?void 0:ht.elements.domReference)===R.currentTarget,Wg=Ce&&!OC?(vt=st.context)==null?void 0:vt.elements.domReference:se?Q:null;Wg&&(We(R),Wg.dispatchEvent(Li),X(void 0))}if(Fe&&st.context&&st.context.open&&st.parentId&&R.currentTarget!==st.context.elements.domReference){var it;We(R),(it=st.context.elements.domReference)==null||it.dispatchEvent(Li);return}}return Oe(R)}if(!(!r&&!_&&Te)){if(Ae&&(L.current=p&&Fe?null:R.key),p){se&&(We(R),r?(P.current=wa(a,J),D(P.current)):n(!0,R.nativeEvent,"list-navigation"));return}Fe&&(u!=null&&(P.current=u),We(R),!r&&_?n(!0,R.nativeEvent,"list-navigation"):Oe(R),r&&D(P.current))}},onFocus(){r&&D(null)},onPointerDown:re,onMouseDown:ce,onClick:ce},floating:{"aria-orientation":w==="both"?void 0:w,...!_f(i)&&ge,onKeyDown:Oe,onPointerMove(){z.current=!0}},item:He}},[i,o,q,ue,V,Y,a,d,w,m,b,r,Le,p,u,_,f,S,h,v,D,n,He,A,M,N,E])}const X5=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Ch(t,e){var r;e===void 0&&(e={});const{open:n,floatingId:o}=t,{enabled:i=!0,role:s="dialog"}=e,a=(r=X5.get(s))!=null?r:s,l=Oi(),d=Ti()!=null;return C.useMemo(()=>{if(!i)return{};const u={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?{reference:{["aria-"+(s==="label"?"labelledby":"describedby")]:n?o:void 0},floating:u}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&d&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},floating:{...u,...a==="menu"&&{"aria-labelledby":l}},item(f){let{active:h,selected:p}=f;const m={role:"option",...h&&{id:o+"-option"}};switch(s){case"select":return{...m,"aria-selected":h&&p};case"combobox":return{...m,...h&&{"aria-selected":!0}}}return{}}}},[i,s,a,n,o,l,d])}function Z5(t,e){var r;const{open:n,dataRef:o}=t,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:d=null,resetMs:u=750,ignoreKeys:f=[],selectedIndex:h=null}=e,p=C.useRef(),m=C.useRef(""),b=C.useRef((r=h??s)!=null?r:-1),v=C.useRef(null),y=Mt(a),_=Mt(l),x=Pt(d),w=Pt(f);return be(()=>{n&&(clearTimeout(p.current),v.current=null,m.current="")},[n]),be(()=>{if(n&&m.current===""){var S;b.current=(S=h??s)!=null?S:-1}},[n,h,s]),C.useMemo(()=>{if(!c)return{};function S(N){N?o.current.typing||(o.current.typing=N,_(N)):o.current.typing&&(o.current.typing=N,_(N))}function T(N,E,I){const A=x.current?x.current(E,I):E.find(D=>(D==null?void 0:D.toLocaleLowerCase().indexOf(I.toLocaleLowerCase()))===0);return A?N.indexOf(A):-1}function M(N){const E=i.current;if(m.current.length>0&&m.current[0]!==" "&&(T(E,E,m.current)===-1?S(!1):N.key===" "&&We(N)),E==null||w.current.includes(N.key)||N.key.length!==1||N.ctrlKey||N.metaKey||N.altKey)return;n&&N.key!==" "&&(We(N),S(!0)),E.every(O=>{var P,L;return O?((P=O[0])==null?void 0:P.toLocaleLowerCase())!==((L=O[1])==null?void 0:L.toLocaleLowerCase()):!0})&&m.current===N.key&&(m.current="",b.current=v.current),m.current+=N.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",b.current=v.current,S(!1)},u);const A=b.current,D=T(E,[...E.slice((A||0)+1),...E.slice(0,(A||0)+1)],m.current);D!==-1?(y(D),v.current=D):N.key!==" "&&(m.current="",S(!1))}return{reference:{onKeyDown:M},floating:{onKeyDown:M,onKeyUp(N){N.key===" "&&S(!1)}}}},[c,n,o,i,u,w,x,y,_])}function _h(t,e){const[r,n]=t;let o=!1;const i=e.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=e[s]||[0,0],[d,u]=e[a]||[0,0];c>=n!=u>=n&&r<=(d-l)*(n-c)/(u-c)+l&&(o=!o)}return o}function J5(t,e){return t[0]>=e.x&&t[0]<=e.x+e.width&&t[1]>=e.y&&t[1]<=e.y+e.height}function Q5(t){t===void 0&&(t={});const{buffer:e=.5,blockPointerEvents:r=!1,requireIntent:n=!0}=t;let o,i=!1,s=null,a=null,l=performance.now();function c(u,f){const h=performance.now(),p=h-l;if(s===null||a===null||p===0)return s=u,a=f,l=h,null;const m=u-s,b=f-a,y=Math.sqrt(m*m+b*b)/p;return s=u,a=f,l=h,y}const d=u=>{let{x:f,y:h,placement:p,elements:m,onClose:b,nodeId:v,tree:y}=u;return function(x){function w(){clearTimeout(o),b()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||f==null||h==null)return;const{clientX:S,clientY:T}=x,M=[S,T],N=rr(x),E=x.type==="mouseleave",I=Ee(m.floating,N),A=Ee(m.domReference,N),D=m.domReference.getBoundingClientRect(),O=m.floating.getBoundingClientRect(),P=p.split("-")[0],L=f>O.right-O.width/2,z=h>O.bottom-O.height/2,B=J5(M,D),j=O.width>D.width,$=O.height>D.height,H=(j?D:O).left,V=(j?D:O).right,Y=($?D:O).top,U=($?D:O).bottom;if(I&&(i=!0,!E))return;if(A&&(i=!1),A&&!E){i=!0;return}if(E&&pe(x.relatedTarget)&&Ee(m.floating,x.relatedTarget)||y&&Sr(y.nodesRef.current,v).some(ue=>{let{context:X}=ue;return X==null?void 0:X.open}))return;if(P==="top"&&h>=D.bottom-1||P==="bottom"&&h<=D.top+1||P==="left"&&f>=D.right-1||P==="right"&&f<=D.left+1)return w();let q=[];switch(P){case"top":q=[[H,D.top+1],[H,O.bottom-1],[V,O.bottom-1],[V,D.top+1]];break;case"bottom":q=[[H,O.top+1],[H,D.bottom-1],[V,D.bottom-1],[V,O.top+1]];break;case"left":q=[[O.right-1,U],[O.right-1,Y],[D.left+1,Y],[D.left+1,U]];break;case"right":q=[[D.right-1,U],[D.right-1,Y],[O.left+1,Y],[O.left+1,U]];break}function G(ue){let[X,ie]=ue;switch(P){case"top":{const Le=[j?X+e/2:L?X+e*4:X-e*4,ie+e+1],He=[j?X-e/2:L?X+e*4:X-e*4,ie+e+1],J=[[O.left,L||j?O.bottom-e:O.top],[O.right,L?j?O.bottom-e:O.top:O.bottom-e]];return[Le,He,...J]}case"bottom":{const Le=[j?X+e/2:L?X+e*4:X-e*4,ie-e],He=[j?X-e/2:L?X+e*4:X-e*4,ie-e],J=[[O.left,L||j?O.top+e:O.bottom],[O.right,L?j?O.top+e:O.bottom:O.top+e]];return[Le,He,...J]}case"left":{const Le=[X+e+1,$?ie+e/2:z?ie+e*4:ie-e*4],He=[X+e+1,$?ie-e/2:z?ie+e*4:ie-e*4];return[...[[z||$?O.right-e:O.left,O.top],[z?$?O.right-e:O.left:O.right-e,O.bottom]],Le,He]}case"right":{const Le=[X-e,$?ie+e/2:z?ie+e*4:ie-e*4],He=[X-e,$?ie-e/2:z?ie+e*4:ie-e*4],J=[[z||$?O.left+e:O.right,O.top],[z?$?O.left+e:O.right:O.left+e,O.bottom]];return[Le,He,...J]}}}if(!_h([S,T],q)){if(i&&!B)return w();if(!E&&n){const ue=c(x.clientX,x.clientY);if(ue!==null&&ue<.1)return w()}_h([S,T],G([f,h]))?!i&&n&&(o=window.setTimeout(w,40)):w()}}};return d.__options={blockPointerEvents:r},d}const eC=({arrowRef:t,placement:e})=>{const r=[];return r.push(q2(8)),r.push(e==="auto"?X2():G2()),r.push(K2({padding:8})),t!=null&&t.current&&r.push(Z2({element:t.current})),r},tC=({placement:t})=>t==="auto"?void 0:t,rC=({placement:t})=>({top:"bottom",right:"left",bottom:"top",left:"right"})[t.split("-")[0]],Sh=({open:t,arrowRef:e,placement:r="top",setOpen:n})=>mh({placement:tC({placement:r}),open:t,onOpenChange:n,whileElementsMounted:$f,middleware:eC({placement:r,arrowRef:e})}),Eh=({context:t,trigger:e,role:r="tooltip",interactions:n=[]})=>vh([hh(t,{enabled:e==="click"}),P5(t,{enabled:e==="hover",handleClose:Q5()}),ph(t),Ch(t,{role:r}),...n]),Oh=k.createContext(void 0);function Pa(){const t=k.useContext(Oh);if(!t)throw new Error("useDropdownContext should be used within the DropdownContext provider!");return t}const Aa=({className:t,theme:e={},...r})=>{const{theme:n}=Pa(),o=e.divider??n.floating.divider;return g.jsx("div",{className:F(o,t),...r})},Th=({children:t,className:e,theme:r={},...n})=>{const{theme:o}=Pa(),i=r.header??o.floating.header;return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:F(i,e),...n,children:t}),g.jsx(Aa,{})]})},Nh=k.forwardRef(({children:t,className:e,icon:r,onClick:n,theme:o={},...i},s)=>{const{ref:a,index:l}=S5({label:typeof t=="string"?t:void 0}),c=Kf([s,a]),{theme:d,activeIndex:u,dismissOnClick:f,getItemProps:h,handleSelect:p}=Pa(),m=u===l,b=W(d.floating.item,o),v=i;return g.jsx("li",{role:"menuitem",className:b.container,children:g.jsxs(Js,{ref:c,className:F(b.base,e),...v,...h({onClick:()=>{n==null||n(),f&&p(null)}}),tabIndex:m?0:-1,children:[r&&g.jsx(r,{className:b.icon}),t]})})});Nh.displayName="DropdownItem";const nC={top:p1,right:$u,bottom:Bu,left:g1},oC=({refs:t,children:e,inline:r,theme:n,disabled:o,setButtonWidth:i,getReferenceProps:s,renderTrigger:a,...l})=>{const c=t.reference,d=s();if(k.useEffect(()=>{c.current&&(i==null||i(c.current.clientWidth))},[c,i]),a){const u=a(n);return k.cloneElement(u,{ref:t.setReference,disabled:o,...d,...u.props})}return r?g.jsx("button",{type:"button",ref:t.setReference,className:n==null?void 0:n.inlineWrapper,disabled:o,...d,children:e}):g.jsx(cf,{...l,disabled:o,type:"button",ref:t.setReference,...d,children:e})},Mh=({children:t,className:e,dismissOnClick:r=!0,theme:n={},renderTrigger:o,...i})=>{const[s,a]=k.useState(!1),[l,c]=k.useState(null),[d,u]=k.useState(null),[f,h]=k.useState(void 0),p=k.useRef([]),m=k.useRef([]),b=W(K().dropdown,n),v=i,y=i["data-testid"]||"flowbite-dropdown-target",{placement:_=i.inline?"bottom-start":"bottom",trigger:x="click",label:w,inline:S,arrowIcon:T=!0,...M}=v,N=k.useCallback($=>{u($),a(!1)},[]),E=k.useCallback($=>{s?c($):N($)},[s,N]),{context:I,floatingStyles:A,refs:D}=Sh({open:s,setOpen:a,placement:_}),O=G5(I,{listRef:p,activeIndex:l,selectedIndex:d,onNavigate:c}),P=Z5(I,{listRef:m,activeIndex:l,selectedIndex:d,onMatch:E}),{getReferenceProps:L,getFloatingProps:z,getItemProps:B}=Eh({context:I,role:"menu",trigger:x,interactions:[O,P]}),j=k.useMemo(()=>{const[$]=_.split("-");return nC[$]??Bu},[_]);return g.jsxs(Oh.Provider,{value:{theme:b,activeIndex:l,dismissOnClick:r,getItemProps:B,handleSelect:N},children:[g.jsxs(oC,{...M,refs:D,inline:S,theme:b,"data-testid":y,className:F(b.floating.target,M.className),setButtonWidth:h,getReferenceProps:L,renderTrigger:o,children:[w,T&&g.jsx(j,{className:b.arrowIcon})]}),s&&g.jsx(dh,{context:I,modal:!1,children:g.jsx("div",{ref:D.setFloating,style:{...A,minWidth:f},"data-testid":"flowbite-dropdown","aria-expanded":s,...z({className:F(b.floating.base,b.floating.animation,"duration-100",!s&&b.floating.hidden,b.floating.style.auto,e)}),children:g.jsx(_5,{elementsRef:p,labelsRef:m,children:g.jsx("ul",{className:b.content,tabIndex:-1,children:t})})})})]})};Mh.displayName="Dropdown",Th.displayName="Dropdown.Header",Aa.displayName="Dropdown.Divider",Object.assign(Mh,{Item:Nh,Header:Th,Divider:Aa});const iC=k.forwardRef(({className:t,color:e="gray",helperText:r,sizing:n="md",theme:o={},...i},s)=>{const a=W(K().fileInput,o);return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:F(a.root.base,t),children:g.jsx("div",{className:a.field.base,children:g.jsx("input",{className:F(a.field.input.base,a.field.input.colors[e],a.field.input.sizes[n]),...i,type:"file",ref:s})})}),r&&g.jsx(Vn,{color:e,children:r})]})});iC.displayName="FileInput";const sC=k.forwardRef(({label:t,helperText:e,color:r="default",sizing:n="md",variant:o,disabled:i=!1,theme:s={},className:a,...l},c)=>{const d=k.useId(),u=W(K().floatingLabel,s);return g.jsxs("div",{children:[g.jsxs("div",{className:F("relative",o==="standard"?"z-0":""),children:[g.jsx("input",{type:"text",id:l.id?l.id:"floatingLabel"+d,"aria-describedby":"outlined_success_help",className:F(u.input[r][o][n],a),placeholder:" ","data-testid":"floating-label",disabled:i,...l,ref:c}),g.jsx("label",{htmlFor:l.id?l.id:"floatingLabel"+d,className:F(u.label[r][o][n],a),children:t})]}),g.jsx("p",{id:"outlined_helper_text"+d,className:F(u.helperText[r],a),children:e})]})});sC.displayName="FloatingLabel";const Ph=({alt:t,className:e,children:r,href:n,name:o,src:i,theme:s={},...a})=>{const l=W(K().footer.brand,s);return g.jsx("div",{children:n?g.jsxs("a",{"data-testid":"flowbite-footer-brand",href:n,className:F(l.base,e),...a,children:[g.jsx("img",{alt:t,src:i,className:l.img}),g.jsx("span",{"data-testid":"flowbite-footer-brand-span",className:l.span,children:o}),r]}):g.jsx("img",{alt:t,"data-testid":"flowbite-footer-brand",src:i,className:F(l.img,e),...a})})},Ah=({by:t,className:e,href:r,theme:n={},year:o,...i})=>{const s=W(K().footer.copyright,n);return g.jsxs("div",{"data-testid":"flowbite-footer-copyright",className:F(s.base,e),...i,children:["© ",o,r?g.jsx("a",{href:r,className:s.href,children:t}):g.jsx("span",{"data-testid":"flowbite-footer-copyright-span",className:s.span,children:t})]})},Dh=({className:t,theme:e={},...r})=>{const n=W(K().footer.divider,e);return g.jsx("hr",{"data-testid":"footer-divider",className:F(n.base,t),...r})},Ih=({ariaLabel:t,className:e,href:r,icon:n,theme:o={},...i})=>{const s=W(K().footer.icon,o);return g.jsx("div",{children:r?g.jsx("a",{"aria-label":t,"data-testid":"flowbite-footer-icon",href:r,className:F(s.base,e),...i,children:g.jsx(n,{className:s.size})}):g.jsx(n,{"data-testid":"flowbite-footer-icon",className:s.size,...i})})},Lh=({as:t="a",children:e,className:r,href:n,theme:o={},...i})=>{const s=W(K().footer.groupLink.link,o);return g.jsx("li",{className:F(s.base,r),children:g.jsx(t,{href:n,className:s.href,...i,children:e})})},Fh=({children:t,className:e,col:r=!1,theme:n={},...o})=>{const i=W(K().footer.groupLink,n);return g.jsx("ul",{"data-testid":"footer-groupLink",className:F(i.base,r&&i.col,e),...o,children:t})},zh=({as:t="h2",className:e,theme:r={},title:n,...o})=>{const i=W(K().footer.title,r);return g.jsx(t,{"data-testid":"flowbite-footer-title",className:F(i.base,e),...o,children:n})},Bh=({bgDark:t=!1,children:e,className:r,container:n=!1,theme:o={},...i})=>{const s=W(K().footer,o);return g.jsx("footer",{"data-testid":"flowbite-footer",className:F(s.root.base,t&&s.root.bgDark,n&&s.root.container,r),...i,children:e})};Bh.displayName="Footer",Ah.displayName="Footer.Copyright",Lh.displayName="Footer.Link",Ph.displayName="Footer.Brand",Fh.displayName="Footer.LinkGroup",Ih.displayName="Footer.Icon",zh.displayName="Footer.Title",Dh.displayName="Footer.Divider",Object.assign(Bh,{Copyright:Ah,Link:Lh,LinkGroup:Fh,Brand:Ph,Icon:Ih,Title:zh,Divider:Dh});const $h=({children:t,className:e,icon:r,theme:n={},...o})=>{const i=W(K().list.item,n);return g.jsxs("li",{className:F(i.withIcon[r?"on":"off"],e),...o,children:[r&&g.jsx(r,{className:F(i.icon)}),t]})},jh=({children:t,className:e,unstyled:r,nested:n,ordered:o,horizontal:i,theme:s={},...a})=>{const l=W(K().list,s),c=o?"ol":"ul";return g.jsx(c,{className:F(l.root.base,l.root.ordered[o?"on":"off"],r&&l.root.unstyled,n&&l.root.nested,i&&l.root.horizontal,e),...a,children:t})};jh.displayName="List",$h.displayName="List.Item",Object.assign(jh,{Item:$h});const Wh=({active:t,children:e,className:r,href:n,icon:o,onClick:i,theme:s={},disabled:a,...l})=>{const c=W(K().listGroup.item,s),d=typeof n<"u",u=d?"a":"button";return g.jsx("li",{className:F(c.base,r),children:g.jsxs(u,{href:n,onClick:i,type:d?void 0:"button",disabled:a,className:F(c.link.active[t?"on":"off"],c.link.disabled[a?"on":"off"],c.link.base,c.link.href[d?"on":"off"]),...l,children:[o&&g.jsx(o,{"aria-hidden":!0,"data-testid":"flowbite-list-group-item-icon",className:c.link.icon}),e]})})},Hh=({children:t,className:e,theme:r={},...n})=>{const o=W(K().listGroup,r);return g.jsx("ul",{className:F(o.root.base,e),...n,children:t})};Hh.displayName="ListGroup",Wh.displayName="ListGroup.Item",Object.assign(Hh,{Item:Wh});const Vh=k.createContext(void 0);function Da(){const t=k.useContext(Vh);if(!t)throw new Error("useModalContext should be used within the ModalContext provider!");return t}const Rh=({children:t,className:e,theme:r={},...n})=>{const{theme:o,popup:i}=Da(),s=W(o.body,r);return g.jsx("div",{className:F(s.base,i&&[s.popup],e),...n,children:t})},Yh=({children:t,className:e,theme:r={},...n})=>{const{theme:o,popup:i}=Da(),s=W(o.footer,r);return g.jsx("div",{className:F(s.base,!i&&s.popup,e),...n,children:t})},Uh=({as:t="h3",children:e,className:r,theme:n={},id:o,...i})=>{const s=k.useId(),a=o||s,{theme:l,popup:c,onClose:d,setHeaderId:u}=Da(),f=W(l.header,n);return k.useLayoutEffect(()=>(u(a),()=>u(void 0)),[a,u]),g.jsxs("div",{className:F(f.base,c&&f.popup,r),...i,children:[g.jsx(t,{id:a,className:f.title,children:e}),g.jsx("button",{"aria-label":"Close",className:f.close.base,type:"button",onClick:d,children:g.jsx(m1,{"aria-hidden":!0,className:f.close.icon})})]})},qh=k.forwardRef(({children:t,className:e,dismissible:r=!1,onClose:n,popup:o,position:i="center",root:s,show:a,size:l="2xl",theme:c={},initialFocus:d,...u},f)=>{const[h,p]=k.useState(void 0),m=W(K().modal,c),{context:b}=mh({open:a,onOpenChange:()=>n&&n()}),v=Kf([b.refs.setFloating,f]),y=hh(b),_=ph(b,{outsidePressEvent:"mousedown",enabled:r}),x=Ch(b),{getFloatingProps:w}=vh([y,_,x]);return a?g.jsx(Vh.Provider,{value:{theme:m,popup:o,onClose:n,setHeaderId:p},children:g.jsx(W5,{root:s,children:g.jsx(R5,{lockScroll:!0,"data-testid":"modal-overlay",className:F(m.root.base,m.root.positions[i],a?m.root.show.on:m.root.show.off,e),...u,children:g.jsx(dh,{context:b,initialFocus:d,children:g.jsx("div",{ref:v,...w(u),"aria-labelledby":h,className:F(m.content.base,m.root.sizes[l]),children:g.jsx("div",{className:m.content.inner,children:t})})})})})}):null});qh.displayName="Modal",Uh.displayName="Modal.Header",Rh.displayName="Modal.Body",Yh.displayName="Modal.Footer",Object.assign(qh,{Header:Uh,Body:Rh,Footer:Yh});const Kh=k.createContext(void 0);function Di(){const t=k.useContext(Kh);if(!t)throw new Error("useNavBarContext should be used within the NavbarContext provider!");return t}const Gh=({as:t="a",children:e,className:r,theme:n={},...o})=>{const{theme:i}=Di(),s=W(i.brand,n);return g.jsx(t,{className:F(s.base,r),...o,children:e})},Xh=({children:t,className:e,theme:r={},...n})=>{const{theme:o,isOpen:i}=Di(),s=W(o.collapse,r);return g.jsx("div",{"data-testid":"flowbite-navbar-collapse",className:F(s.base,s.hidden[i?"off":"on"],e),...n,children:g.jsx("ul",{className:s.list,children:t})})},Zh=({active:t,as:e="a",disabled:r,children:n,className:o,theme:i={},onClick:s,...a})=>{const{theme:l,setIsOpen:c}=Di(),d=W(l.link,i),u=f=>{c(!1),s==null||s(f)};return g.jsx("li",{children:g.jsx(e,{className:F(d.base,t&&d.active.on,!t&&!r&&d.active.off,d.disabled[r?"on":"off"],o),onClick:u,...a,children:n})})},Jh=({barIcon:t=Jg,className:e,theme:r={},...n})=>{const{theme:o,isOpen:i,setIsOpen:s}=Di(),a=W(o.toggle,r),l=()=>{s(!i)};return g.jsxs("button",{"data-testid":"flowbite-navbar-toggle",onClick:l,className:F(a.base,e),...n,children:[g.jsx("span",{className:"sr-only",children:"Open main menu"}),g.jsx(t,{"aria-hidden":!0,className:a.icon})]})},Qh=({border:t,children:e,className:r,fluid:n=!1,menuOpen:o,rounded:i,theme:s={},...a})=>{const[l,c]=k.useState(o),d=W(K().navbar,s);return g.jsx(Kh.Provider,{value:{theme:d,isOpen:l,setIsOpen:c},children:g.jsx("nav",{className:F(d.root.base,d.root.bordered[t?"on":"off"],d.root.rounded[i?"on":"off"],r),...a,children:g.jsx("div",{className:F(d.root.inner.base,d.root.inner.fluid[n?"on":"off"]),children:e})})})};Qh.displayName="Navbar",Gh.displayName="Navbar.Brand",Xh.displayName="Navbar.Collapse",Zh.displayName="Navbar.Link",Jh.displayName="Navbar.Toggle",Object.assign(Qh,{Brand:Gh,Collapse:Xh,Link:Zh,Toggle:Jh});const aC=(t,e)=>t>=e?[]:[...Array(e-t+1).keys()].map(r=>r+t),Ia=({active:t,children:e,className:r,onClick:n,theme:o={},...i})=>{const s=W(K().pagination,o);return g.jsx("button",{type:"button",className:F(t&&s.pages.selector.active,r),onClick:n,...i,children:e})};Ia.displayName="Pagination.Button";const La=({children:t,className:e,onClick:r,theme:n={},disabled:o=!1,...i})=>{const s=W(K().pagination,n);return g.jsx("button",{type:"button",className:F(o&&s.pages.selector.disabled,e),disabled:o,onClick:r,...i,children:t})};La.displayName="Pagination.Navigation";const eg=({className:t,currentPage:e,layout:r="pagination",nextLabel:n="Next",onPageChange:o,previousLabel:i="Previous",renderPaginationButton:s=u=>g.jsx(Ia,{...u}),showIcons:a=!1,theme:l={},totalPages:c,...d})=>{const u=W(K().pagination,l),f=Math.min(Math.max(r==="pagination"?e+2:e+4,5),c),h=Math.max(1,f-4),p=()=>{o(Math.min(e+1,c))},m=()=>{o(Math.max(e-1,1))};return g.jsxs("nav",{className:F(u.base,t),...d,children:[r==="table"&&g.jsxs("div",{className:u.layout.table.base,children:["Showing ",g.jsx("span",{className:u.layout.table.span,children:h})," to ",g.jsx("span",{className:u.layout.table.span,children:f})," of ",g.jsx("span",{className:u.layout.table.span,children:c})," Entries"]}),g.jsxs("ul",{className:u.pages.base,children:[g.jsx("li",{children:g.jsxs(La,{className:F(u.pages.previous.base,a&&u.pages.showIcon),onClick:m,disabled:e===1,children:[a&&g.jsx(d1,{"aria-hidden":!0,className:u.pages.previous.icon}),i]})}),r==="pagination"&&aC(h,f).map(b=>g.jsx("li",{"aria-current":b===e?"page":void 0,children:s({className:F(u.pages.selector.base,e===b&&u.pages.selector.active),active:b===e,onClick:()=>o(b),children:b})},b)),g.jsx("li",{children:g.jsxs(La,{className:F(u.pages.next.base,a&&u.pages.showIcon),onClick:p,disabled:e===c,children:[n,a&&g.jsx(u1,{"aria-hidden":!0,className:u.pages.next.icon})]})})]})]})};eg.displayName="Pagination",Object.assign(eg,{Button:Ia});const lC=k.forwardRef(({className:t,theme:e={},...r},n)=>{const o=W(K().radio,e);return g.jsx("input",{ref:n,type:"radio",className:F(o.root.base,t),...r})});lC.displayName="Radio";const cC=k.forwardRef(({className:t,sizing:e="md",theme:r={},...n},o)=>{const i=W(K().rangeSlider,r);return g.jsx(g.Fragment,{children:g.jsx("div",{"data-testid":"flowbite-range-slider",className:F(i.root.base,t),children:g.jsx("div",{className:i.field.base,children:g.jsx("input",{ref:o,type:"range",className:F(i.field.input.base,i.field.input.sizes[e]),...n})})})})});cC.displayName="RangeSlider";const tg=({children:t,className:e,percentFilled:r=0,theme:n={},...o})=>{const i=W(K().ratingAdvanced,n);return g.jsxs("div",{className:F(i.base,e),...o,children:[g.jsx("span",{className:i.label,children:t}),g.jsx("div",{className:i.progress.base,children:g.jsx("div",{className:i.progress.fill,"data-testid":"flowbite-rating-fill",style:{width:`${r}%`}})}),g.jsx("span",{className:i.progress.label,children:`${r}%`})]})},rg=k.createContext(void 0);function dC(){const t=k.useContext(rg);if(!t)throw new Error("useRatingContext should be used within the RatingContext provider!");return t}const ng=({className:t,filled:e=!0,starIcon:r=f1,theme:n={},...o})=>{const{theme:i,size:s="sm"}=dC(),a=W(i.star,n);return g.jsx(r,{"data-testid":"flowbite-rating-star",className:F(a.sizes[s],a[e?"filled":"empty"],t),...o})},og=({children:t,className:e,size:r="sm",theme:n={},...o})=>{const i=W(K().rating,n);return g.jsx(rg.Provider,{value:{theme:i,size:r},children:g.jsx("div",{className:F(i.root.base,e),...o,children:t})})};og.displayName="Rating",ng.displayName="Rating.Star",tg.displayName="Rating.Advanced",Object.assign(og,{Star:ng,Advanced:tg});const uC=k.forwardRef(({addon:t,children:e,className:r,color:n="gray",helperText:o,icon:i,shadow:s,sizing:a="md",theme:l={},...c},d)=>{const u=W(K().select,l);return g.jsxs("div",{className:F(u.base,r),children:[t&&g.jsx("span",{className:u.addon,children:t}),g.jsxs("div",{className:u.field.base,children:[i&&g.jsx("div",{className:u.field.icon.base,children:g.jsx(i,{className:u.field.icon.svg})}),g.jsx("select",{className:F(u.field.select.base,u.field.select.colors[n],u.field.select.sizes[a],u.field.select.withIcon[i?"on":"off"],u.field.select.withAddon[t?"on":"off"],u.field.select.withShadow[s?"on":"off"]),...c,ref:d,children:e}),o&&g.jsx(Vn,{color:n,children:o})]})]})});uC.displayName="Select";const fC=({animation:t="duration-300",arrow:e=!0,children:r,className:n,content:o,placement:i="top",style:s="dark",theme:a,trigger:l="hover",minWidth:c,...d})=>{const u=k.useRef(null),[f,h]=k.useState(!1),p=Sh({open:f,placement:i,arrowRef:u,setOpen:h}),{context:m,middlewareData:{arrow:{x:b,y:v}={}},refs:y,strategy:_,update:x,x:w,y:S}=p,T=q5(m),{getFloatingProps:M,getReferenceProps:N}=Eh({context:m,role:"tooltip",trigger:l,interactions:[T]});return k.useEffect(()=>{if(y.reference.current&&y.floating.current&&f)return $f(y.reference.current,y.floating.current,x)},[f,y.floating,y.reference,x]),g.jsxs(g.Fragment,{children:[g.jsx("div",{ref:y.setReference,className:a.target,"data-testid":"flowbite-tooltip-target",...N(),children:r}),g.jsxs("div",{ref:y.setFloating,"data-testid":"flowbite-tooltip",...M({className:F(a.base,t&&`${a.animation} ${t}`,!f&&a.hidden,a.style[s],n),style:{position:_,top:S??" ",left:w??" ",minWidth:c},...d}),children:[g.jsx("div",{className:a.content,children:o}),e&&g.jsx("div",{className:F(a.arrow.base,s==="dark"&&a.arrow.style.dark,s==="light"&&a.arrow.style.light,s==="auto"&&a.arrow.style.auto),"data-testid":"flowbite-tooltip-arrow",ref:u,style:{top:v??" ",left:b??" ",right:" ",bottom:" ",[rC({placement:p.placement})]:a.arrow.placement},children:" "})]})]})},Fa=({animation:t="duration-300",arrow:e=!0,children:r,className:n,content:o,placement:i="top",style:s="dark",theme:a={},trigger:l="hover",...c})=>{const d=W(K().tooltip,a);return g.jsx(fC,{animation:t,arrow:e,content:o,placement:i,style:s,theme:d,trigger:l,className:n,...c,children:r})};Fa.displayName="Tooltip";const ig=k.createContext(void 0);function en(){const t=k.useContext(ig);if(!t)throw new Error("useSidebarContext should be used within the SidebarContext provider!");return t}const za=k.createContext(void 0);function hC(){const t=k.useContext(za);if(!t)throw new Error("useSidebarItemContext should be used within the SidebarItemContext provider!");return t}const sg=({children:t,className:e,icon:r,label:n,chevronIcon:o=zu,renderChevronIcon:i,open:s=!1,theme:a={},...l})=>{const c=k.useId(),[d,u]=k.useState(s),{theme:f,isCollapsed:h}=en(),p=W(f.collapse,a);k.useEffect(()=>u(s),[s]);const m=({children:b})=>g.jsx("li",{children:h&&!d?g.jsx(Fa,{content:n,placement:"right",children:b}):b});return g.jsxs(m,{children:[g.jsxs("button",{id:`flowbite-sidebar-collapse-${c}`,onClick:()=>u(!d),title:n,type:"button",className:F(p.button,e),...l,children:[r&&g.jsx(r,{"aria-hidden":!0,"data-testid":"flowbite-sidebar-collapse-icon",className:F(p.icon.base,p.icon.open[d?"on":"off"])}),h?g.jsx("span",{className:"sr-only",children:n}):g.jsxs(g.Fragment,{children:[g.jsx("span",{"data-testid":"flowbite-sidebar-collapse-label",className:p.label.base,children:n}),i?i(p,d):g.jsx(o,{"aria-hidden":!0,className:F(p.label.icon.base,p.label.icon.open[d?"on":"off"])})]})]}),g.jsx("ul",{"aria-labelledby":`flowbite-sidebar-collapse-${c}`,hidden:!d,className:p.list,children:g.jsx(za.Provider,{value:{isInsideCollapse:!0},children:t})})]})};sg.displayName="Sidebar.Collapse";const ag=({children:t,color:e="info",className:r,theme:n={},...o})=>{const{theme:i,isCollapsed:s}=en(),a=W(i.cta,n);return g.jsx("div",{"data-testid":"sidebar-cta",hidden:s,className:F(a.base,a.color[e],r),...o,children:t})};ag.displayName="Sidebar.CTA";const gC=({id:t,theme:e,isCollapsed:r,tooltipChildren:n,children:o,...i})=>g.jsx("li",{...i,children:r?g.jsx(Fa,{content:g.jsx(lg,{id:t,theme:e,children:n}),placement:"right",children:o}):o}),lg=({id:t,theme:e,children:r})=>g.jsx("span",{"data-testid":"flowbite-sidebar-item-content",id:`flowbite-sidebar-item-${t}`,className:F(e.content.base),children:r}),cg=k.forwardRef(({active:t,as:e="a",children:r,className:n,icon:o,label:i,labelColor:s="info",theme:a={},...l},c)=>{var m,b,v,y;const d=k.useId(),{theme:u,isCollapsed:f}=en(),{isInsideCollapse:h}=hC(),p=W(u.item,a);return g.jsx(gC,{theme:p,className:p.listItem,id:d,isCollapsed:f,tooltipChildren:r,children:g.jsxs(e,{"aria-labelledby":`flowbite-sidebar-item-${d}`,ref:c,className:F(p.base,t&&p.active,!f&&h&&((m=p.collapsed)==null?void 0:m.insideCollapse),n),...l,children:[o&&g.jsx(o,{"aria-hidden":!0,"data-testid":"flowbite-sidebar-item-icon",className:F((b=p.icon)==null?void 0:b.base,t&&((v=p.icon)==null?void 0:v.active))}),f&&!o&&g.jsx("span",{className:(y=p.collapsed)==null?void 0:y.noIcon,children:r.charAt(0).toLocaleUpperCase()??"?"}),!f&&g.jsx(lg,{id:d,theme:p,children:r}),!f&&i&&g.jsx(rf,{color:s,"data-testid":"flowbite-sidebar-label",hidden:f,className:p.label,children:i})]})})});cg.displayName="Sidebar.Item";const dg=({children:t,className:e,theme:r={},...n})=>{const{theme:o}=en(),i=W(o.itemGroup,r);return g.jsx("ul",{"data-testid":"flowbite-sidebar-item-group",className:F(i.base,e),...n,children:g.jsx(za.Provider,{value:{isInsideCollapse:!1},children:t})})};dg.displayName="Sidebar.ItemGroup";const ug=({children:t,className:e,theme:r={},...n})=>{const{theme:o}=en(),i=W(o.items,r);return g.jsx("div",{className:F(i.base,e),"data-testid":"flowbite-sidebar-items",...n,children:t})};ug.displayName="Sidebar.Items";const fg=({children:t,className:e,href:r,img:n,imgAlt:o="",theme:i={},...s})=>{const a=k.useId(),{theme:l,isCollapsed:c}=en(),d=W(l.logo,i);return g.jsxs("a",{"aria-labelledby":`flowbite-sidebar-logo-${a}`,href:r,className:F(d.base,e),...s,children:[g.jsx("img",{alt:o,src:n,className:d.img}),g.jsx("span",{className:d.collapsed[c?"on":"off"],id:`flowbite-sidebar-logo-${a}`,children:t})]})};fg.displayName="Sidebar.Logo";const hg=({children:t,as:e="nav",collapseBehavior:r="collapse",collapsed:n=!1,theme:o={},className:i,...s})=>{const a=W(K().sidebar,o);return g.jsx(ig.Provider,{value:{theme:a,isCollapsed:n},children:g.jsx(e,{"aria-label":"Sidebar",hidden:n&&r==="hide",className:F(a.root.base,a.root.collapsed[n?"on":"off"],i),...s,children:g.jsx("div",{className:a.root.inner,children:t})})})};hg.displayName="Sidebar",Object.assign(hg,{Collapse:sg,CTA:ag,Item:cg,Items:ug,ItemGroup:dg,Logo:fg});const gg=k.createContext(void 0);function pC(){const t=k.useContext(gg);if(!t)throw new Error("useTableBodyContext should be used within the TableBodyContext provider!");return t}const pg=k.createContext(void 0);function Ba(){const t=k.useContext(pg);if(!t)throw new Error("useTableContext should be used within the TableContext provider!");return t}const mg=k.forwardRef(({children:t,className:e,theme:r={},...n},o)=>{const{theme:i}=Ba(),s=W(i.body,r);return g.jsx(gg.Provider,{value:{theme:s},children:g.jsx("tbody",{className:F(s.base,e),ref:o,...n,children:t})})});mg.displayName="Table.Body";const bg=k.forwardRef(({children:t,className:e,theme:r={},...n},o)=>{const{theme:i}=pC(),s=W(i.cell,r);return g.jsx("td",{className:F(s.base,e),ref:o,...n,children:t})});bg.displayName="Table.Cell";const yg=k.createContext(void 0);function mC(){const t=k.useContext(yg);if(!t)throw new Error("useTableHeadContext should be used within the TableHeadContext provider!");return t}const vg=k.forwardRef(({children:t,className:e,theme:r={},...n},o)=>{const{theme:i}=Ba(),s=W(i.head,r);return g.jsx(yg.Provider,{value:{theme:s},children:g.jsx("thead",{className:F(s.base,e),ref:o,...n,children:g.jsx("tr",{children:t})})})});vg.displayName="Table.Head";const xg=k.forwardRef(({children:t,className:e,theme:r={},...n},o)=>{const{theme:i}=mC(),s=W(i.cell,r);return g.jsx("th",{className:F(s.base,e),ref:o,...n,children:t})});xg.displayName="Table.HeadCell";const wg=k.forwardRef(({children:t,className:e,theme:r={},...n},o)=>{const{theme:i,hoverable:s,striped:a}=Ba(),l=W(i.row,r);return g.jsx("tr",{ref:o,"data-testid":"table-row-element",className:F(l.base,a&&l.striped,s&&l.hovered,e),...n,children:t})});wg.displayName="Table.Row";const kg=k.forwardRef(({children:t,className:e,striped:r,hoverable:n,theme:o={},...i},s)=>{const a=W(K().table,o);return g.jsx("div",{"data-testid":"table-element",className:F(a.root.wrapper),children:g.jsxs(pg.Provider,{value:{theme:a,striped:r,hoverable:n},children:[g.jsx("div",{className:F(a.root.shadow,e)}),g.jsx("table",{className:F(a.root.base,e),...i,ref:s,children:t})]})})});kg.displayName="Table";const ee=Object.assign(kg,{Head:vg,Body:mg,Row:wg,Cell:bg,HeadCell:xg}),Cg=({children:t,className:e})=>g.jsx("div",{className:e,children:t});Cg.displayName="Tabs.Item";const _g=k.forwardRef(({children:t,className:e,onActiveTabChange:r,style:n="default",theme:o={},...i},s)=>{const a=W(K().tabs,o),l=k.useId(),c=k.useMemo(()=>k.Children.map(k.Children.toArray(t),({props:x})=>x),[t]),d=k.useRef([]),[u,f]=k.useState(Math.max(0,c.findIndex(x=>x.active))),[h,p]=k.useState(-1),m=x=>{f(x),r&&r(x)},b=({target:x})=>{m(x),p(x)},v=({event:x,target:w})=>{x.key==="ArrowLeft"&&p(Math.max(0,h-1)),x.key==="ArrowRight"&&p(Math.min(c.length-1,h+1)),x.key==="Enter"&&(m(w),p(w))},y=a.tablist.tabitem.styles[n],_=a.tabitemcontainer.styles[n];return k.useEffect(()=>{var x;(x=d.current[h])==null||x.focus()},[h]),k.useImperativeHandle(s,()=>({setActiveTab:m})),g.jsxs("div",{className:F(a.base,e),children:[g.jsx("div",{"aria-label":"Tabs",role:"tablist",className:F(a.tablist.base,a.tablist.styles[n],e),...i,children:c.map((x,w)=>g.jsxs("button",{type:"button","aria-controls":`${l}-tabpanel-${w}`,"aria-selected":w===u,className:F(a.tablist.tabitem.base,y.base,w===u&&y.active.on,w!==u&&!x.disabled&&y.active.off),disabled:x.disabled,id:`${l}-tab-${w}`,onClick:()=>b({target:w}),onKeyDown:S=>v({event:S,target:w}),ref:S=>d.current[w]=S,role:"tab",tabIndex:w===h?0:-1,style:{zIndex:w===h?2:1},children:[x.icon&&g.jsx(x.icon,{className:a.tablist.tabitem.icon}),x.title]},w))}),g.jsx("div",{className:F(a.tabitemcontainer.base,_),children:c.map((x,w)=>g.jsx("div",{"aria-labelledby":`${l}-tab-${w}`,className:a.tabpanel,hidden:w!==u,id:`${l}-tabpanel-${w}`,role:"tabpanel",tabIndex:0,children:x.children},w))})]})});_g.displayName="Tabs",Object.assign(_g,{Item:Cg});const bC=k.forwardRef(({className:t,color:e="gray",helperText:r,shadow:n,theme:o={},...i},s)=>{const a=W(K().textarea,o);return g.jsxs(g.Fragment,{children:[g.jsx("textarea",{ref:s,className:F(a.base,a.colors[e],a.withShadow[n?"on":"off"],t),...i}),r&&g.jsx(Vn,{color:e,children:r})]})});bC.displayName="Textarea";const Sg=k.createContext(void 0);function $a(){const t=k.useContext(Sg);if(!t)throw new Error("useTimelineContentContext should be used within the TimelineContentContext provider!");return t}const Eg=({children:t,className:e,theme:r={},...n})=>{const{theme:o}=$a(),i=W(o.body,r);return g.jsx("div",{className:F(i.base,e),...n,children:t})},Og=k.createContext(void 0);function ja(){const t=k.useContext(Og);if(!t)throw new Error("useTimelineContext should be used within the TimelineContext provider!");return t}const Tg=k.createContext(void 0);function Ng(){const t=k.useContext(Tg);if(!t)throw new Error("useTimelineItemContext should be used within the TimelineItemContext provider!");return t}const Mg=({children:t,className:e,theme:r={},...n})=>{const{horizontal:o}=ja(),{theme:i}=Ng(),s=W(i.content,r);return g.jsx(Sg.Provider,{value:{theme:s},children:g.jsx("div",{"data-testid":"timeline-content",className:F(o&&s.root.base,e),...n,children:t})})},Pg=({children:t,className:e,theme:r={},...n})=>{const{theme:o,horizontal:i}=ja(),s=W(o.item,r);return g.jsx(Tg.Provider,{value:{theme:s},children:g.jsx("li",{"data-testid":"timeline-item",className:F(i&&s.root.horizontal,!i&&s.root.vertical,e),...n,children:t})})},Ag=({children:t,className:e,icon:r,theme:n={},...o})=>{const{horizontal:i}=ja(),{theme:s}=Ng(),a=W(s.point,n);return g.jsxs("div",{"data-testid":"timeline-point",className:F(i&&a.horizontal,!i&&a.vertical,e),...o,children:[t,r?g.jsx("span",{className:F(a.marker.icon.wrapper),children:g.jsx(r,{"aria-hidden":!0,className:F(a.marker.icon.base)})}):g.jsx("div",{className:F(i&&a.marker.base.horizontal,!i&&a.marker.base.vertical)}),i&&g.jsx("div",{className:F(a.line)})]})},Dg=({children:t,className:e,theme:r={},...n})=>{const{theme:o}=$a(),i=W(o.time,r);return g.jsx("time",{className:F(i.base,e),...n,children:t})},Ig=({as:t="h3",children:e,className:r,theme:n={},...o})=>{const{theme:i}=$a(),s=W(i.title,n);return g.jsx(t,{className:F(s.base,r),...o,children:e})},Lg=({children:t,className:e,horizontal:r,theme:n={},...o})=>{const i=W(K().timeline,n);return g.jsx(Og.Provider,{value:{theme:i,horizontal:r},children:g.jsx("ol",{"data-testid":"timeline-component",className:F(r&&i.root.direction.horizontal,!r&&i.root.direction.vertical,e),...o,children:t})})};Lg.displayName="Timeline",Pg.displayName="Timeline.Item",Ag.displayName="Timeline.Point",Mg.displayName="Timeline.Content",Dg.displayName="Timeline.Time",Ig.displayName="Timeline.Title",Eg.displayName="Timeline.Body",Object.assign(Lg,{Item:Pg,Point:Ag,Content:Mg,Time:Dg,Title:Ig,Body:Eg});const Fg=k.createContext(void 0);function yC(){const t=k.useContext(Fg);if(!t)throw new Error("useToastContext should be used within the ToastContext provider!");return t}const zg=({className:t,onClick:e,theme:r={},xIcon:n=h1,onDismiss:o,...i})=>{const{theme:s,duration:a,isClosed:l,isRemoved:c,setIsClosed:d,setIsRemoved:u}=yC(),f=W(s.toggle,r),h=p=>{if(e&&e(p),o){o();return}d(!l),setTimeout(()=>u(!c),a)};return g.jsx("button",{"aria-label":"Close",onClick:h,type:"button",className:F(f.base,t),...i,children:g.jsx(n,{"aria-hidden":!0,className:f.icon})})},vC={75:"duration-75",100:"duration-100",150:"duration-150",200:"duration-200",300:"duration-300",500:"duration-500",700:"duration-700",1e3:"duration-1000"},Bg=({children:t,className:e,duration:r=300,theme:n={},...o})=>{const[i,s]=k.useState(!1),[a,l]=k.useState(!1),c=W(K().toast,n);return a?null:g.jsx(Fg.Provider,{value:{theme:c,duration:r,isClosed:i,isRemoved:a,setIsClosed:s,setIsRemoved:l},children:g.jsx("div",{"data-testid":"flowbite-toast",role:"alert",className:F(c.root.base,vC[r],i&&c.root.closed,e),...o,children:t})})};Bg.displayName="Toast",zg.displayName="Toast.Toggle",Object.assign(Bg,{Toggle:zg});const xC=k.forwardRef(({checked:t,className:e,color:r="blue",sizing:n="md",disabled:o,label:i,name:s,onChange:a,theme:l={},...c},d)=>{const u=k.useId(),f=W(K().toggleSwitch,l),h=()=>a(!t),p=()=>{h()},m=b=>{b.code=="Enter"&&b.preventDefault()};return g.jsxs(g.Fragment,{children:[s&&t?g.jsx("input",{ref:d,checked:t,hidden:!0,name:s,readOnly:!0,type:"checkbox",className:"sr-only"}):null,g.jsxs("button",{"aria-checked":t,"aria-labelledby":`${u}-flowbite-toggleswitch-label`,disabled:o,id:`${u}-flowbite-toggleswitch`,onClick:p,onKeyDown:m,role:"switch",tabIndex:0,type:"button",className:F(f.root.base,f.root.active[o?"off":"on"],e),...c,children:[g.jsx("div",{"data-testid":"flowbite-toggleswitch-toggle",className:F(f.toggle.base,f.toggle.checked[t?"on":"off"],t&&f.toggle.checked.color[r],f.toggle.sizes[n])}),i!=null&&i.length?g.jsx("span",{"data-testid":"flowbite-toggleswitch-label",id:`${u}-flowbite-toggleswitch-label`,className:f.root.label,children:i}):null]})]})});xC.displayName="ToggleSwitch";const wC=()=>g.jsx("div",{className:"w-full",children:g.jsx("div",{className:"overflow-x-auto",children:g.jsxs(ee,{striped:!0,children:[g.jsxs(ee.Head,{children:[g.jsx(ee.HeadCell,{children:"Product name"}),g.jsx(ee.HeadCell,{children:"Color"}),g.jsx(ee.HeadCell,{children:"Category"}),g.jsx(ee.HeadCell,{children:"Price"}),g.jsx(ee.HeadCell,{children:g.jsx("span",{className:"sr-only",children:"Edit"})})]}),g.jsxs(ee.Body,{className:"divide-y",children:[g.jsxs(ee.Row,{className:"bg-white dark:border-gray-700 dark:bg-gray-800",children:[g.jsx(ee.Cell,{className:"whitespace-nowrap font-medium text-gray-900 dark:text-white",children:'Apple MacBook Pro 17"'}),g.jsx(ee.Cell,{children:"Sliver"}),g.jsx(ee.Cell,{children:"Laptop"}),g.jsx(ee.Cell,{children:"$2999"}),g.jsx(ee.Cell,{children:g.jsx("a",{href:"#",className:"font-medium text-cyan-600 hover:underline dark:text-cyan-500",children:"Edit"})})]}),g.jsxs(ee.Row,{className:"bg-white dark:border-gray-700 dark:bg-gray-800",children:[g.jsx(ee.Cell,{className:"whitespace-nowrap font-medium text-gray-900 dark:text-white",children:"Microsoft Surface Pro"}),g.jsx(ee.Cell,{children:"White"}),g.jsx(ee.Cell,{children:"Laptop PC"}),g.jsx(ee.Cell,{children:"$1999"}),g.jsx(ee.Cell,{children:g.jsx("a",{href:"#",className:"font-medium text-cyan-600 hover:underline dark:text-cyan-500",children:"Edit"})})]}),g.jsxs(ee.Row,{className:"bg-white dark:border-gray-700 dark:bg-gray-800",children:[g.jsx(ee.Cell,{className:"whitespace-nowrap font-medium text-gray-900 dark:text-white",children:"Magic Mouse 2"}),g.jsx(ee.Cell,{children:"Black"}),g.jsx(ee.Cell,{children:"Accessories"}),g.jsx(ee.Cell,{children:"$99"}),g.jsx(ee.Cell,{children:g.jsx("a",{href:"#",className:"font-medium text-cyan-600 hover:underline dark:text-cyan-500",children:"Edit"})})]}),g.jsxs(ee.Row,{className:"bg-white dark:border-gray-700 dark:bg-gray-800",children:[g.jsx(ee.Cell,{className:"whitespace-nowrap font-medium text-gray-900 dark:text-white",children:"Google Pixel Phone"}),g.jsx(ee.Cell,{children:"Gray"}),g.jsx(ee.Cell,{children:"Phone"}),g.jsx(ee.Cell,{children:"$799"}),g.jsx(ee.Cell,{children:g.jsx("a",{href:"#",className:"font-medium text-cyan-600 hover:underline dark:text-cyan-500",children:"Edit"})})]}),g.jsxs(ee.Row,{className:"bg-white dark:border-gray-700 dark:bg-gray-800",children:[g.jsx(ee.Cell,{className:"whitespace-nowrap font-medium text-gray-900 dark:text-white",children:"Apple Watch 5"}),g.jsx(ee.Cell,{children:"Red"}),g.jsx(ee.Cell,{children:"Wearables"}),g.jsx(ee.Cell,{children:"$999"}),g.jsx(ee.Cell,{children:g.jsx("a",{href:"#",className:"font-medium text-cyan-600 hover:underline dark:text-cyan-500",children:"Edit"})})]})]})]})})}),$g=no(),kC=()=>g.jsxs("div",{children:[g.jsx(Or,{classIm:"mx-auto mt-32",src:`${$g}/public/assets/images/mathilde.png`,alt:"Logo Mathilde ads",width:400,height:250}),g.jsx("div",{className:"m-image-container",children:g.jsx(Or,{classIm:"m-image",src:`${$g}/public/assets/images/background-mathilde.png`,alt:"Logo Mathilde ads",width:400,height:300})})]}),CC=({onOpenModal:t,checked:e,onChange:r,label:n,...o})=>{const i=()=>{e||t(),r(!1)};return g.jsx("div",{className:"mb-5",children:g.jsxs("label",{className:eo["checkbox-container"],children:[g.jsx("input",{type:"checkbox",...o,checked:e,onChange:i,required:!0}),g.jsx("span",{className:eo.checkmark}),n&&g.jsx("span",{children:n})]})})},jg=({validations:t})=>{const e=({isValid:n})=>g.jsx("svg",{className:`w-3.5 h-3.5 me-2 ${n?"text-green-500 dark:text-green-400":"text-gray-500 dark:text-gray-400"} shrink-0`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:g.jsx("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})}),r=[{key:"hasMinLength",text:"Debe ser minimo de 8 caracteres"},{key:"hasNumber",text:"Debe tener minimo un numero"},{key:"hasUpperCase",text:"Debe tener minimo una letra mayuscula"},{key:"hasLowerCase",text:"Debe tener minimo una letra minuscula"},{key:"hasSpecialChar",text:"Debe tener minimo un caracter especial"}];return g.jsx("ul",{className:"max-w-md text-sm mb-3 space-y-1 text-gray-500 list-inside dark:text-gray-400",children:r.map(({key:n,text:o})=>g.jsxs("li",{className:"flex items-center",children:[g.jsx(e,{isValid:t[n]}),o]},n))})},_C=()=>{const[t,e]=k.useState(""),[r,n]=k.useState(""),[o,i]=k.useState({hasMinLength:!1,hasNumber:!1,hasUpperCase:!1,hasLowerCase:!1,hasSpecialChar:!1});k.useEffect(()=>{i({hasMinLength:t.length>=8,hasNumber:/\d/.test(t),hasUpperCase:/[A-Z]/.test(t),hasLowerCase:/[a-z]/.test(t),hasSpecialChar:/[!@#$%^&*(),.?":{}|<>]/.test(t)})},[t]);const s=()=>t.trim()&&r.trim()&&t===r&&Object.values(o).every(l=>l);return{password:t,setPassword:e,confirmPassword:r,setConfirmPassword:n,showError:()=>!s()&&t.trim()&&r.trim(),validations:o}},SC=({formik:t})=>{const{password:e,setPassword:r,confirmPassword:n,setConfirmPassword:o,validations:i}=_C();return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"block",children:[g.jsx(Fi,{placeholder:"Contraseña",value:e,onChange:s=>{r(s.target.value),t.setFieldValue("password",s.target.value)},onBlur:t.handleBlur("password")}),t.errors.password&&t.touched.password&&g.jsx("div",{className:"text-red-500 text-sm my-2",children:String(t.errors.password)})]}),g.jsxs("div",{className:"block",children:[g.jsx(Fi,{placeholder:"Confirmar contraseña",value:n,onChange:s=>{o(s.target.value),t.setFieldValue("confirmPassword",s.target.value)},onBlur:t.handleBlur("confirmPassword")}),t.errors.confirmPassword&&t.touched.confirmPassword&&g.jsx("div",{className:"text-red-500 text-sm my-2",children:String(t.errors.confirmPassword)})]}),g.jsx(jg,{validations:i})]})},EC=({items:t})=>{const[e,r]=k.useState([]),n=i=>{r(s=>s.includes(i)?s.filter(a=>a!==i):[...s,i])},o=(i,s=0)=>g.jsx("ul",{className:"list-none space-y-2",children:i.map(a=>{const l=a.subItems&&a.subItems.length>0,c=e.includes(a.id);return g.jsxs("li",{className:`
|
|
499
|
+
${s>0?"ml-7":""}
|
|
500
|
+
`,children:[g.jsxs("div",{className:"flex items-center gap-2 py-1",children:[g.jsxs("div",{className:"flex items-center gap-1 min-w-[48px]",children:[l&&g.jsx("button",{onClick:()=>n(a.id),className:"p-1 hover:bg-gray-100 rounded-full transition-transform duration-200",children:c?g.jsx(ep,{className:"text-gray-500 text-sm"}):g.jsx(Qg,{className:"text-gray-500 text-sm"})}),!l&&g.jsx("div",{className:"w-[28px]"})," ",a.icon&&g.jsx(a.icon,{className:`text-lg ${a.isActive?"text-blue-700 dark:text-blue-500":"text-gray-600"}`})]}),g.jsx("a",{href:a.href,className:`
|
|
501
|
+
flex-grow transition-colors duration-200
|
|
502
|
+
${a.isActive?"text-blue-700 font-medium dark:text-blue-500":"text-gray-700 hover:text-blue-600 dark:text-gray-300"}
|
|
503
|
+
`,children:a.title})]}),l&&c&&o(a.subItems||[],s+1)]},a.id)})});return g.jsx("nav",{id:"TableOfContents",children:o(t)})};ne.ButtonFormat=Vg,ne.CardFormat=Bs,ne.CardIndicator=ap,ne.Checkbox=Rg,ne.ImageFormat=Or,ne.InputForm=Ra,ne.LayoutOutside=kC,ne.ModalFormat=Dr,ne.MyDoughnutChart=Pb,ne.PasswordInput=Fi,ne.PasswordValidationList=jg,ne.ProgressBar=Xa,ne.SelectForm=Za,ne.SidebarMth=s1,ne.TableComponent=wC,ne.TableOfContents=EC,ne.TermsCheckbox=CC,ne.ValidationPassword=SC,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
|