@iqworksai/common-components 0.1.5 → 0.1.7

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/dist/index.cjs CHANGED
@@ -1,240 +1 @@
1
- "use strict";var r4=Object.defineProperty;var i4=(e,t,n)=>t in e?r4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ae=(e,t,n)=>i4(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),M=require("react"),Ur=require("react-dom");function cy(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const we=cy(M),hu=cy(Ur);var uy={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Bm=M.createContext&&M.createContext(uy),s4=["attr","size","title"];function o4(e,t){if(e==null)return{};var n=a4(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function a4(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gu(){return gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gu.apply(this,arguments)}function Vm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vm(Object(n),!0).forEach(function(r){l4(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l4(e,t,n){return t=c4(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c4(e){var t=u4(e,"string");return typeof t=="symbol"?t:t+""}function u4(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dy(e){return e&&e.map((t,n)=>M.createElement(t.tag,pu({key:n},t.attr),dy(t.child)))}function Ye(e){return t=>M.createElement(d4,gu({attr:pu({},e.attr)},t),dy(e.child))}function d4(e){var t=n=>{var{attr:r,size:i,title:s}=e,o=o4(e,s4),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),M.createElement("svg",gu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:l,style:pu(pu({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&M.createElement("title",null,s),e.children)};return Bm!==void 0?M.createElement(Bm.Consumer,null,n=>t(n)):t(uy)}function f4(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm108.25 138.29-134.4 160a16 16 0 0 1-12 5.71h-.27a16 16 0 0 1-11.89-5.3l-57.6-64a16 16 0 1 1 23.78-21.4l45.29 50.32 122.59-145.91a16 16 0 0 1 24.5 20.58z"},child:[]}]})(e)}function h4(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm75.31 260.69a16 16 0 1 1-22.62 22.62L256 278.63l-52.69 52.68a16 16 0 0 1-22.62-22.62L233.37 256l-52.68-52.69a16 16 0 0 1 22.62-22.62L256 233.37l52.69-52.68a16 16 0 0 1 22.62 22.62L278.63 256z"},child:[]}]})(e)}function g4(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 56C145.72 56 56 145.72 56 256s89.72 200 200 200 200-89.72 200-200S366.28 56 256 56zm0 82a26 26 0 1 1-26 26 26 26 0 0 1 26-26zm48 226h-88a16 16 0 0 1 0-32h28v-88h-16a16 16 0 0 1 0-32h32a16 16 0 0 1 16 16v104h28a16 16 0 0 1 0 32z"},child:[]}]})(e)}function p4(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M449.07 399.08 278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0 0 80 446.25h340.89a32 32 0 0 0 28.18-47.17zm-198.6-1.83a20 20 0 1 1 20-20 20 20 0 0 1-20 20zm21.72-201.15-5.74 122a16 16 0 0 1-32 0l-5.74-121.95a21.73 21.73 0 0 1 21.5-22.69h.21a21.74 21.74 0 0 1 21.73 22.7z"},child:[]}]})(e)}const m4={info:"bg-brand-surface-subtle border-brand-primary",warning:"bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-700 text-amber-800 dark:text-amber-200",success:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800 text-green-800 dark:text-green-200",error:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800 text-red-800 dark:text-red-200"},b4={info:g4,warning:p4,success:f4,error:h4},v4=({variant:e="info",title:t,children:n,compact:r=!1,className:i="",borderStyle:s="left",icon:o=!0})=>{const a=b4[e],l=r?"p-3":"p-4",c=s==="left"?"border-l-4":"border rounded-lg";return O.jsx("div",{className:`${m4[e]} ${c} ${l} ${i}`,children:O.jsxs("div",{className:o?"flex items-start":"",children:[o&&O.jsx(a,{className:`${r?"text-lg":"text-xl"} mr-3 flex-shrink-0 mt-0.5`}),O.jsxs("div",{className:"flex-1",children:[t&&O.jsx("p",{className:`font-semibold ${r?"text-sm":""} ${typeof n=="string"?"":"mb-1"}`,children:t}),typeof n=="string"?O.jsx("p",{className:r?"text-sm":"",children:n}):O.jsx("div",{className:r?"text-sm":"",children:n})]})]})})},x4=({isLoading:e,isRelative:t})=>e?O.jsxs("div",{"data-testid":"loader-overlay",role:"status","aria-live":"polite","aria-label":"Loading",className:`${t?"absolute":"fixed"} inset-0 flex items-center justify-center bg-black/50 dark:bg-black/70 z-[99990]`,children:[O.jsx("div",{"data-testid":"loader-spinner",className:"loader rounded-full w-12 h-12 animate-spin",style:{border:"4px solid var(--brand-light)",borderTopColor:"var(--brand-orange)"}}),O.jsx("span",{className:"sr-only",children:"Loading..."})]}):null;function zm(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.034 8 8 119.033 8 256s111.034 248 248 248 248-111.034 248-248S392.967 8 256 8zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676zM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676z"},child:[]}]})(e)}function Hm(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},child:[]}]})(e)}function Gm(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(e)}function fy(e){return Ye({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(e)}function y4(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"},child:[]}]})(e)}function _4(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256.12 245.96c-13.25 0-24 10.74-24 24 1.14 72.25-8.14 141.9-27.7 211.55-2.73 9.72 2.15 30.49 23.12 30.49 10.48 0 20.11-6.92 23.09-17.52 13.53-47.91 31.04-125.41 29.48-224.52.01-13.25-10.73-24-23.99-24zm-.86-81.73C194 164.16 151.25 211.3 152.1 265.32c.75 47.94-3.75 95.91-13.37 142.55-2.69 12.98 5.67 25.69 18.64 28.36 13.05 2.67 25.67-5.66 28.36-18.64 10.34-50.09 15.17-101.58 14.37-153.02-.41-25.95 19.92-52.49 54.45-52.34 31.31.47 57.15 25.34 57.62 55.47.77 48.05-2.81 96.33-10.61 143.55-2.17 13.06 6.69 25.42 19.76 27.58 19.97 3.33 26.81-15.1 27.58-19.77 8.28-50.03 12.06-101.21 11.27-152.11-.88-55.8-47.94-101.88-104.91-102.72zm-110.69-19.78c-10.3-8.34-25.37-6.8-33.76 3.48-25.62 31.5-39.39 71.28-38.75 112 .59 37.58-2.47 75.27-9.11 112.05-2.34 13.05 6.31 25.53 19.36 27.89 20.11 3.5 27.07-14.81 27.89-19.36 7.19-39.84 10.5-80.66 9.86-121.33-.47-29.88 9.2-57.88 28-80.97 8.35-10.28 6.79-25.39-3.49-33.76zm109.47-62.33c-15.41-.41-30.87 1.44-45.78 4.97-12.89 3.06-20.87 15.98-17.83 28.89 3.06 12.89 16 20.83 28.89 17.83 11.05-2.61 22.47-3.77 34-3.69 75.43 1.13 137.73 61.5 138.88 134.58.59 37.88-1.28 76.11-5.58 113.63-1.5 13.17 7.95 25.08 21.11 26.58 16.72 1.95 25.51-11.88 26.58-21.11a929.06 929.06 0 0 0 5.89-119.85c-1.56-98.75-85.07-180.33-186.16-181.83zm252.07 121.45c-2.86-12.92-15.51-21.2-28.61-18.27-12.94 2.86-21.12 15.66-18.26 28.61 4.71 21.41 4.91 37.41 4.7 61.6-.11 13.27 10.55 24.09 23.8 24.2h.2c13.17 0 23.89-10.61 24-23.8.18-22.18.4-44.11-5.83-72.34zm-40.12-90.72C417.29 43.46 337.6 1.29 252.81.02 183.02-.82 118.47 24.91 70.46 72.94 24.09 119.37-.9 181.04.14 246.65l-.12 21.47c-.39 13.25 10.03 24.31 23.28 24.69.23.02.48.02.72.02 12.92 0 23.59-10.3 23.97-23.3l.16-23.64c-.83-52.5 19.16-101.86 56.28-139 38.76-38.8 91.34-59.67 147.68-58.86 69.45 1.03 134.73 35.56 174.62 92.39 7.61 10.86 22.56 13.45 33.42 5.86 10.84-7.62 13.46-22.59 5.84-33.43z"},child:[]}]})(e)}function w4(e){return Ye({attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152h177zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64zm324.7-96c-28.6-67.9-86.5-120.4-158-141.6 24.4 33.8 41.2 84.7 50 141.6h108zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z"},child:[]}]})(e)}function Wm(e){return Ye({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M360 64c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H24C10.745 0 0 10.745 0 24v16c0 13.255 10.745 24 24 24 0 90.965 51.016 167.734 120.842 192C75.016 280.266 24 357.035 24 448c-13.255 0-24 10.745-24 24v16c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24 0-90.965-51.016-167.734-120.842-192C308.984 231.734 360 154.965 360 64z"},child:[]}]})(e)}function C4(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},child:[]}]})(e)}function S4(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M512 176.001C512 273.203 433.202 352 336 352c-11.22 0-22.19-1.062-32.827-3.069l-24.012 27.014A23.999 23.999 0 0 1 261.223 384H224v40c0 13.255-10.745 24-24 24h-40v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24v-78.059c0-6.365 2.529-12.47 7.029-16.971l161.802-161.802C163.108 213.814 160 195.271 160 176 160 78.798 238.797.001 335.999 0 433.488-.001 512 78.511 512 176.001zM336 128c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z"},child:[]}]})(e)}function E4(e){return Ye({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"},child:[]}]})(e)}function I4(e){return Ye({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M202.021 0C122.202 0 70.503 32.703 29.914 91.026c-7.363 10.58-5.093 25.086 5.178 32.874l43.138 32.709c10.373 7.865 25.132 6.026 33.253-4.148 25.049-31.381 43.63-49.449 82.757-49.449 30.764 0 68.816 19.799 68.816 49.631 0 22.552-18.617 34.134-48.993 51.164-35.423 19.86-82.299 44.576-82.299 106.405V320c0 13.255 10.745 24 24 24h72.471c13.255 0 24-10.745 24-24v-5.773c0-42.86 125.268-44.645 125.268-160.627C377.504 66.256 286.902 0 202.021 0zM192 373.459c-38.196 0-69.271 31.075-69.271 69.271 0 38.195 31.075 69.27 69.271 69.27s69.271-31.075 69.271-69.271-31.075-69.27-69.271-69.27z"},child:[]}]})(e)}function k4(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"},child:[]}]})(e)}function A4(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"},child:[]}]})(e)}function hy(e){return Ye({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(e)}function er(...e){const t=[];for(const n of e)if(n){if(typeof n=="string")t.push(n);else if(typeof n=="number")t.push(String(n));else if(Array.isArray(n)){const r=er(...n);r&&t.push(r)}}return t.join(" ")}function M4(e,t,n=""){return e?t:n}function R4(e,t,n=""){return t[e]||n}const Ug=e=>{M.useEffect(()=>{if(!e)return;const t=document.body.style.overflow,n=document.body.style.paddingRight,r=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",r>0&&(document.body.style.paddingRight=`${r}px`),document.body.classList.add("overflow-hidden"),()=>{document.body.style.overflow=t,document.body.style.paddingRight=n,document.body.classList.remove("overflow-hidden")}},[e])},mo=({title:e,subtitle:t,isUuidSubtitle:n=!0,body:r,onClose:i,onConfirm:s,onDelete:o,showFooter:a=!0,customFooter:l,isOpen:c,confirmButtonText:d="Confirm",disableConfirm:g,deleteButtonText:b="Delete",cancelButtonText:x="Cancel",customWidth:w="max-w-screen-lg max-h-[90vh] lg:min-w-[600px]",wrapperClass:C})=>{if(Ug(c),!c)return null;const E=O.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-[40] p-4 overflow-y-auto",children:O.jsxs("div",{className:er("relative py-4 rounded-lg shadow-lg modal","w-[95%] sm:w-[90%] md:w-[85%] lg:w-auto","min-w-[320px] sm:min-w-[400px] md:min-w-[500px]","max-h-[90vh] flex flex-col",w,C),style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:[O.jsx(P4,{title:e,onClose:i}),t&&O.jsx(N4,{subtitle:t,isUuidSubtitle:n}),r&&O.jsx(T4,{body:r}),a&&O.jsx(O4,{customFooter:l,onClose:i,onConfirm:s,onDelete:o,cancelButtonText:x,confirmButtonText:d,deleteButtonText:b,disableConfirm:g})]})});return Ur.createPortal(E,document.getElementById("modal-root")||document.body)},P4=({title:e,onClose:t})=>O.jsx("div",{className:"px-4 flex-shrink-0",children:O.jsxs("div",{className:"flex justify-between items-center",children:[O.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--text-color)",fontFamily:"var(--font-family-heading, 'Afacad', 'Rubik', sans-serif)"},children:typeof e=="string"?O.jsx("span",{children:e}):e}),O.jsx("button",{onClick:t,className:"text-brand-primary hover:opacity-80","aria-label":"Close",children:O.jsx(hy,{size:16})})]})}),N4=({subtitle:e,isUuidSubtitle:t})=>O.jsx("div",{className:"px-4 flex-shrink-0",children:O.jsxs("div",{className:er("mt-1 p-2 text-xs rounded-md flex flex-wrap",t?"gap-1":"flex-col"),style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)"},children:[t&&O.jsx("b",{style:{color:"var(--text-color)"},children:"UUID:"}),typeof e=="string"?O.jsx("span",{className:"break-all",children:e}):e]})}),T4=({body:e})=>O.jsx("div",{className:er("px-4 text-sm modal-body flex-1",typeof e=="string"?"pb-4 mt-2":"pb-1 mt-1"),children:typeof e=="string"?O.jsx("p",{className:"break-words",style:{color:"var(--text-color)"},children:e}):e}),O4=({customFooter:e,onClose:t,onConfirm:n,onDelete:r,cancelButtonText:i,confirmButtonText:s,deleteButtonText:o,disableConfirm:a})=>O.jsx("div",{className:"px-4 mt-1 flex-shrink-0",children:e||O.jsxs("div",{className:"flex flex-wrap justify-between gap-2 sm:space-x-2",children:[t&&i&&O.jsx("button",{"data-testid":"modal-cancel-button",onClick:t,className:"px-4 py-2 rounded footer-button",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)"},onMouseEnter:l=>l.currentTarget.style.backgroundColor="var(--brand-light)",onMouseLeave:l=>l.currentTarget.style.backgroundColor="var(--hover-bg-color)",children:i}),r&&O.jsx("button",{"data-testid":"modal-delete-button",onClick:r,className:er("border border-red-600 text-red-600 px-4 py-2 rounded-md","hover:bg-red-200 dark:text-red-400","dark:hover:bg-red-700 dark:border-red-500","footer-button"),children:o}),n&&O.jsx("button",{"data-testid":"modal-save-button",onClick:n,disabled:a,className:er("bg-brand-primary text-white px-4 py-2 rounded-md hover:bg-[var(--brand-orange)]/90","footer-button",a&&"opacity-50 cursor-not-allowed"),children:s})]})});function D4(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C140.559 48 48 140.559 48 256c0 115.436 92.559 208 208 208 115.435 0 208-92.564 208-208 0-115.441-92.564-208-208-208zm104.002 282.881l-29.12 29.117L256 285.117l-74.881 74.881-29.121-29.117L226.881 256l-74.883-74.881 29.121-29.116L256 226.881l74.881-74.878 29.12 29.116L285.119 256l74.883 74.881z"},child:[]}]})(e)}function F4(e){return Ye({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"},child:[]}]})(e)}function L4(e){return Ye({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"},child:[]}]})(e)}function j4(e){return Ye({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"},child:[]}]})(e)}function gy(e){return Ye({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"},child:[]},{tag:"path",attr:{d:"M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"},child:[]}]})(e)}function B4(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M9.836 3.244c.963-1.665 3.365-1.665 4.328 0l8.967 15.504c.963 1.667-.24 3.752-2.165 3.752H3.034c-1.926 0-3.128-2.085-2.165-3.752ZM12 8.5a.75.75 0 0 0-.75.75v4.5a.75.75 0 0 0 1.5 0v-4.5A.75.75 0 0 0 12 8.5Zm1 9a1 1 0 1 0-2 0 1 1 0 0 0 2 0Z"},child:[]}]})(e)}var ln=(e=>(e.SUCCESS="success",e.ERROR="error",e.INFO="info",e.WARNING="warning",e))(ln||{}),Za=(e=>(e.SCANS="scans",e.ATTRIBUTE="attributes",e.ENDPOINT="endpoint",e.DEPARTMENTS="departments",e.CONNECTORS="connectors",e.SHARED_DRIVE="shared_drive",e.ONE_DRIVE="one_drive",e.AWS_S3="aws_s3",e.OUTLOOK="outlook",e.SALESFORCE="salesforce",e.SCANRESULT="scansResult",e.PROCESSED="ProcessedResults",e.FILE="File",e.FILEBROWSER="fileBrowser",e.SCANCONNECTORS="scanConnectors",e.METADATA="metaData",e.FILTERED="filtered",e.LEGENDS="legends",e.REPORTS="reports",e.APPLICATION_CATALOG="application_catalog",e.CLASSIFICATION_LEVELS="classification_levels",e.CLASSIFICATION_RULES="classification_rules",e.AUDIT_TRAIL="audit_trail",e.RETENTION_RULES="retention_rules",e.RETENTION_AUDIT_TRAIL="retention_audit_trail",e))(Za||{}),vs=(e=>(e.LINEAR="Linear",e.LOG="logarithmic",e.NORMALISED="normalised",e))(vs||{}),py=(e=>(e.DEPARTMENTS="departments",e.GEOLOCATIONS="geolocations",e))(py||{}),my=(e=>(e.DATABASE="database",e.SHARED_DRIVE="shared_drive",e.ONE_DRIVE="one_drive",e.AWS_S3="aws_s3",e.SALESFORCE="salesforce",e))(my||{}),by=(e=>(e.SCAN_STATUS="scan_status",e))(by||{});const $m={[ln.SUCCESS]:O.jsx(F4,{size:"1.5rem"}),[ln.INFO]:O.jsx(j4,{size:"1.5rem"}),[ln.ERROR]:O.jsx(L4,{size:"1.5rem"}),[ln.WARNING]:O.jsx(B4,{size:"1.5rem"})},V4=({message:e,type:t=ln.INFO,duration:n=5e3,onClose:r})=>{M.useEffect(()=>{const s=setTimeout(()=>{r()},n);return()=>clearTimeout(s)},[n,r]);const i=s=>{s.stopPropagation(),r()};return O.jsxs("div",{className:`toast toast-${t}`,role:"alert","aria-live":"assertive",onClick:s=>s.stopPropagation(),children:[$m[t]&&O.jsx("span",{className:"toast-icon",children:$m[t]}),O.jsx("div",{className:"toast-message",children:e}),O.jsx("button",{onClick:i,"aria-label":"Close notification",className:"toast-close-button",children:O.jsx(D4,{size:"1.2rem"})})]})},jo=({text:e,children:t,position:n="bottom",fixedWidth:r=!1,isVisible:i=!0})=>{const[s,o]=M.useState(!1),[a,l]=M.useState({}),[c,d]=M.useState({}),g=M.useRef(null),b=M.useRef(null);return M.useEffect(()=>{if(!i){o(!1);return}if(!s||!g.current)return;const x=g.current.getBoundingClientRect(),w=b.current;if(!w)return;const C=w.getBoundingClientRect(),E=window.innerWidth,k=window.innerHeight;let u=n,v=0,f=0,p=0,y=0;switch(n==="top"&&x.top-C.height<10?u="bottom":n==="bottom"&&x.bottom+C.height>k-10?u="top":n==="left"&&x.left-C.width<10?u="right":n==="right"&&x.right+C.width>E-10&&(u="left"),u){case"top":v=x.top-C.height-8,f=x.left+x.width/2-C.width/2,p=C.height-4,y=C.width/2-5;break;case"bottom":v=x.bottom+8,f=x.left+x.width/2-C.width/2,p=-5,y=C.width/2-5;break;case"left":v=x.top+x.height/2-C.height/2,f=x.left-C.width-8,p=C.height/2-5,y=C.width-4;break;case"right":v=x.top+x.height/2-C.height/2,f=x.right+8,p=C.height/2-5,y=-5;break}l({top:`${v}px`,left:`${f}px`,opacity:1,visibility:"visible"}),d({top:`${p}px`,left:`${y}px`,transform:"rotate(45deg)"})},[i,s,n]),O.jsxs("div",{className:"tooltip-wrapper",ref:g,onMouseEnter:()=>i&&o(!0),onMouseLeave:()=>i&&o(!1),children:[t,i&&s&&Ur.createPortal(O.jsxs("div",{ref:b,className:`tooltip ${r?"fixed-width":""}`,style:a,children:[e,O.jsx("span",{className:"tooltip-arrow",style:c})]}),document.body)]})},wr={failed:"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400",running:"bg-yellow-200 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400",partial_successful:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",successful:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",not_started:"bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300",request_received:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",completed:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",suspended:"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400",cancelled:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400",scheduled:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"},vh={scheduled:{icon:Gm,label:"Scheduled",colorClass:wr.scheduled||"bg-blue-100 text-blue-700"},completed:{icon:Hm,label:"Completed",colorClass:wr.completed||"bg-green-100 text-green-700"},successful:{icon:Hm,label:"Successful",colorClass:wr.successful||"bg-green-100 text-green-700"},failed:{icon:A4,label:"Failed",colorClass:wr.failed||"bg-red-100 text-red-700"},partial_successful:{icon:fy,label:"Partially Successful",colorClass:wr.partial_successful||"bg-blue-100 text-blue-700"},running:{icon:k4,animation:"animate-spin",label:"Running",colorClass:wr.running||"bg-yellow-200 text-yellow-700"},not_started:{icon:Gm,label:"Not Started",colorClass:wr.not_started||"bg-gray-100 text-gray-700"},request_received:{icon:Wm,label:"Request Received",colorClass:wr.request_received||"bg-blue-100 text-blue-700"},queue:{icon:Wm,label:"In Queue",colorClass:"bg-blue-100 text-blue-700"},suspended:{icon:zm,label:"Suspended",colorClass:wr.suspended||"bg-orange-100 text-orange-700"},cancelled:{icon:zm,label:"Cancelled",colorClass:wr.cancelled||"bg-purple-100 text-purple-700"},unknown:{icon:I4,label:"Unknown",colorClass:"bg-gray-100 text-gray-700"}},Jg=e=>vh[e]||vh.unknown,z4=e=>["running","not_started","request_received"].includes(e),H4=e=>["failed","cancelled","suspended","unknown"].includes(e),G4=e=>["completed","successful"].includes(e),mu=M.memo(({statusKey:e})=>{const{icon:t,animation:n}=Jg(e);return O.jsx(t,{className:er("mr-1",n)})});mu.displayName="StatusIcon";const W4=({statusKey:e,statusLabel:t,scheduledTime:n,recurrenceDetails:r,showScheduledInfo:i=!1,adjustWidth:s=!0})=>{const{colorClass:o}=Jg(e);return i&&n?O.jsxs("div",{className:`flex flex-col items-center ${s?"w-max":""}`,children:[O.jsxs("span",{className:er("inline-flex items-center px-2 py-1 text-xs font-medium rounded w-max",o),children:[O.jsx(mu,{statusKey:e}),t]}),O.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[O.jsx("span",{className:"text-[10px] text-gray-500",children:n}),r&&O.jsx(jo,{text:r,position:"top",children:O.jsx(C4,{className:"text-xs cursor-pointer",style:{color:"var(--secondary-text-color)"}})})]})]}):O.jsxs("span",{className:er("inline-flex items-center px-2 py-1 text-xs font-medium rounded",o),children:[O.jsx(mu,{statusKey:e}),t]})},$4=({enabled:e,setEnabled:t,id:n="toggle-switch",disabled:r=!1,ariaLabel:i})=>{const s=M.useCallback(()=>{r||t(!e)},[e,t,r]);return O.jsx("button",{id:n,type:"button",role:"switch","aria-checked":e,"aria-label":i,disabled:r,onClick:s,className:er("toggle-switch",e?"toggle-on":"toggle-off",r&&"opacity-50 cursor-not-allowed"),children:O.jsx("span",{className:er("toggle-knob",e?"knob-on":"knob-off")})})},X4=typeof document<"u"?M.useLayoutEffect:()=>{},rs=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},ys=e=>e&&"window"in e&&e.window===e?e:rs(e).defaultView||window;function Y4(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Z4(e){return Y4(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let U4=!1;function qg(){return U4}function vy(e,t){if(!qg())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Z4(n)?n=n.host:n=n.parentNode}return!1}const xh=(e=document)=>{var t;if(!qg())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function xy(e){return qg()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function J4(e){if(q4())e.focus({preventScroll:!0});else{let t=K4(e);e.focus(),Q4(t)}}let ql=null;function q4(){if(ql==null){ql=!1;try{document.createElement("div").focus({get preventScroll(){return ql=!0,!0}})}catch{}}return ql}function K4(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Q4(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function dd(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function Kg(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ai(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Ua=Ai(function(){return Kg(/^Mac/i)}),eE=Ai(function(){return Kg(/^iPhone/i)}),yy=Ai(function(){return Kg(/^iPad/i)||Ua()&&navigator.maxTouchPoints>1}),tE=Ai(function(){return eE()||yy()});Ai(function(){return Ua()||tE()});const nE=Ai(function(){return dd(/AppleWebKit/i)&&!rE()}),rE=Ai(function(){return dd(/Chrome/i)}),iE=Ai(function(){return dd(/Android/i)}),sE=Ai(function(){return dd(/Firefox/i)});function Ja(e,t,n=!0){var r,i;let{metaKey:s,ctrlKey:o,altKey:a,shiftKey:l}=t;sE()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Ua()?s=!0:o=!0);let c=nE()&&Ua()&&!yy()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:o,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:s,ctrlKey:o,altKey:a,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});Ja.isOpening=n,J4(e),e.dispatchEvent(c),Ja.isOpening=!1}Ja.isOpening=!1;function _y(){let e=M.useRef(new Map),t=M.useCallback((i,s,o,a)=>{let l=a!=null&&a.once?(...c)=>{e.current.delete(o),o(...c)}:o;e.current.set(o,{type:s,eventTarget:i,fn:l,options:a}),i.addEventListener(s,l,a)},[]),n=M.useCallback((i,s,o,a)=>{var l;let c=((l=e.current.get(o))===null||l===void 0?void 0:l.fn)||o;i.removeEventListener(s,c,a),e.current.delete(o)},[]),r=M.useCallback(()=>{e.current.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})},[n]);return M.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function oE(e){return e.pointerType===""&&e.isTrusted?!0:iE()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function wy(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function aE(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Cy(e){let t=M.useRef({isFocused:!1,observer:null});return X4(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),M.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=n.target,i=s=>{if(t.current.isFocused=!1,r.disabled){let o=wy(s);e==null||e(o)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let o=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let lE=!1,Cl=null,yh=new Set,Na=new Map,Ds=!1,_h=!1;const cE={Tab:!0,Escape:!0};function Qg(e,t){for(let n of yh)n(e,t)}function uE(e){return!(e.metaKey||!Ua()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function bu(e){Ds=!0,!Ja.isOpening&&uE(e)&&(Cl="keyboard",Qg("keyboard",e))}function cr(e){Cl="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(Ds=!0,Qg("pointer",e))}function Sy(e){!Ja.isOpening&&oE(e)&&(Ds=!0,Cl="virtual")}function Ey(e){e.target===window||e.target===document||lE||!e.isTrusted||(!Ds&&!_h&&(Cl="virtual",Qg("virtual",e)),Ds=!1,_h=!1)}function Iy(){Ds=!1,_h=!0}function wh(e){if(typeof window>"u"||typeof document>"u"||Na.get(ys(e)))return;const t=ys(e),n=rs(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Ds=!0,r.apply(this,arguments)},n.addEventListener("keydown",bu,!0),n.addEventListener("keyup",bu,!0),n.addEventListener("click",Sy,!0),t.addEventListener("focus",Ey,!0),t.addEventListener("blur",Iy,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",cr,!0),n.addEventListener("pointermove",cr,!0),n.addEventListener("pointerup",cr,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",cr,!0),n.addEventListener("mousemove",cr,!0),n.addEventListener("mouseup",cr,!0)),t.addEventListener("beforeunload",()=>{ky(e)},{once:!0}),Na.set(t,{focus:r})}const ky=(e,t)=>{const n=ys(e),r=rs(e);t&&r.removeEventListener("DOMContentLoaded",t),Na.has(n)&&(n.HTMLElement.prototype.focus=Na.get(n).focus,r.removeEventListener("keydown",bu,!0),r.removeEventListener("keyup",bu,!0),r.removeEventListener("click",Sy,!0),n.removeEventListener("focus",Ey,!0),n.removeEventListener("blur",Iy,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",cr,!0),r.removeEventListener("pointermove",cr,!0),r.removeEventListener("pointerup",cr,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",cr,!0),r.removeEventListener("mousemove",cr,!0),r.removeEventListener("mouseup",cr,!0)),Na.delete(n))};function dE(e){const t=rs(e);let n;return t.readyState!=="loading"?wh(e):(n=()=>{wh(e)},t.addEventListener("DOMContentLoaded",n)),()=>ky(e,n)}typeof document<"u"&&dE();function Ay(){return Cl!=="pointer"}const fE=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function hE(e,t,n){let r=rs(n==null?void 0:n.target);const i=typeof window<"u"?ys(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?ys(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<"u"?ys(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?ys(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!fE.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof o&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!cE[n.key])}function gE(e,t,n){wh(),M.useEffect(()=>{let r=(i,s)=>{hE(!!(n!=null&&n.isTextInput),i,s)&&e(Ay())};return yh.add(r),()=>{yh.delete(r)}},t)}function pE(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const s=M.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),o=Cy(s),a=M.useCallback(l=>{const c=rs(l.target),d=c?xh(c):xh();l.target===l.currentTarget&&d===xy(l.nativeEvent)&&(n&&n(l),i&&i(!0),o(l))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?a:void 0,onBlur:!t&&(r||i)?s:void 0}}}function mE(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,s=M.useRef({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:a}=_y(),l=M.useCallback(g=>{g.currentTarget.contains(g.target)&&s.current.isFocusWithin&&!g.currentTarget.contains(g.relatedTarget)&&(s.current.isFocusWithin=!1,a(),n&&n(g),i&&i(!1))},[n,i,s,a]),c=Cy(l),d=M.useCallback(g=>{if(!g.currentTarget.contains(g.target))return;const b=rs(g.target),x=xh(b);if(!s.current.isFocusWithin&&x===xy(g.nativeEvent)){r&&r(g),i&&i(!0),s.current.isFocusWithin=!0,c(g);let w=g.currentTarget;o(b,"focus",C=>{if(s.current.isFocusWithin&&!vy(w,C.target)){let E=new b.defaultView.FocusEvent("blur",{relatedTarget:C.target});aE(E,w);let k=wy(E);l(k)}},{capture:!0})}},[r,i,c,o,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:l}}}let vu=!1,Kl=0;function Ch(){vu=!0,setTimeout(()=>{vu=!1},50)}function Xm(e){e.pointerType==="touch"&&Ch()}function bE(){if(!(typeof document>"u"))return Kl===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Xm):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Ch)),Kl++,()=>{Kl--,!(Kl>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Xm):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Ch))}}function vE(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[s,o]=M.useState(!1),a=M.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;M.useEffect(bE,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=_y(),{hoverProps:d,triggerHoverEnd:g}=M.useMemo(()=>{let b=(C,E)=>{if(a.pointerType=E,i||E==="touch"||a.isHovered||!C.currentTarget.contains(C.target))return;a.isHovered=!0;let k=C.currentTarget;a.target=k,l(rs(C.target),"pointerover",u=>{a.isHovered&&a.target&&!vy(a.target,u.target)&&x(u,u.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:k,pointerType:E}),n&&n(!0),o(!0)},x=(C,E)=>{let k=a.target;a.pointerType="",a.target=null,!(E==="touch"||!a.isHovered||!k)&&(a.isHovered=!1,c(),r&&r({type:"hoverend",target:k,pointerType:E}),n&&n(!1),o(!1))},w={};return typeof PointerEvent<"u"?(w.onPointerEnter=C=>{vu&&C.pointerType==="mouse"||b(C,C.pointerType)},w.onPointerLeave=C=>{!i&&C.currentTarget.contains(C.target)&&x(C,C.pointerType)}):process.env.NODE_ENV==="test"&&(w.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},w.onMouseEnter=C=>{!a.ignoreEmulatedMouseEvents&&!vu&&b(C,"mouse"),a.ignoreEmulatedMouseEvents=!1},w.onMouseLeave=C=>{!i&&C.currentTarget.contains(C.target)&&x(C,"mouse")}),{hoverProps:w,triggerHoverEnd:x}},[t,n,r,i,a,l,c]);return M.useEffect(()=>{i&&g({currentTarget:a.target},a.pointerType)},[i]),{hoverProps:d,isHovered:s}}function xE(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=M.useRef({isFocused:!1,isFocusVisible:t||Ay()}),[s,o]=M.useState(!1),[a,l]=M.useState(()=>i.current.isFocused&&i.current.isFocusVisible),c=M.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),d=M.useCallback(x=>{i.current.isFocused=x,o(x),c()},[c]);gE(x=>{i.current.isFocusVisible=x,c()},[],{isTextInput:n});let{focusProps:g}=pE({isDisabled:r,onFocusChange:d}),{focusWithinProps:b}=mE({isDisabled:!r,onFocusWithinChange:d});return{isFocused:s,isFocusVisible:a,focusProps:r?b:g}}var yE=Object.defineProperty,_E=(e,t,n)=>t in e?yE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,df=(e,t,n)=>(_E(e,typeof t!="symbol"?t+"":t,n),n);let wE=class{constructor(){df(this,"current",this.detect()),df(this,"handoffState","pending"),df(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Is=new wE;function Sl(e){var t;return Is.isServer?null:e==null?document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function xu(e){var t,n;return Is.isServer?null:e==null?document:(n=(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))!=null?n:document}function ep(e){var t,n;return(n=(t=xu(e))==null?void 0:t.activeElement)!=null?n:null}function CE(e){return ep(e)===e}function My(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Zn(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return My(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=Zn();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function El(){let[e]=M.useState(Zn);return M.useEffect(()=>()=>e.dispose(),[e]),e}let wn=(e,t)=>{Is.isServer?M.useEffect(e,t):M.useLayoutEffect(e,t)};function Il(e){let t=M.useRef(e);return wn(()=>{t.current=e},[e]),t}let Tt=function(e){let t=Il(e);return M.useCallback((...n)=>t.current(...n),[t])};function SE(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function EE(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function IE({disabled:e=!1}={}){let t=M.useRef(null),[n,r]=M.useState(!1),i=El(),s=Tt(()=>{t.current=null,r(!1),i.dispose()}),o=Tt(a=>{if(i.dispose(),t.current===null){t.current=a.currentTarget,r(!0);{let l=Sl(a.currentTarget);i.addEventListener(l,"pointerup",s,!1),i.addEventListener(l,"pointermove",c=>{if(t.current){let d=SE(c);r(EE(d,t.current.getBoundingClientRect()))}},!1),i.addEventListener(l,"pointercancel",s,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:o,onPointerUp:s,onClick:s}}}function Bo(e){return M.useMemo(()=>e,Object.values(e))}let kE=M.createContext(void 0);function Ry(){return M.useContext(kE)}function Ym(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Vo(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Vo),r}var Sh=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Sh||{}),AE=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(AE||{});function mr(){let e=RE();return M.useCallback(t=>ME({mergeRefs:e,...t}),[e])}function ME({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??PE;let l=Py(t,e);if(s)return Ql(l,n,r,o,a);let c=i??0;if(c&2){let{static:d=!1,...g}=l;if(d)return Ql(g,n,r,o,a)}if(c&1){let{unmount:d=!0,...g}=l;return Vo(d?0:1,{0(){return null},1(){return Ql({...g,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return Ql(l,n,r,o,a)}function Ql(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...l}=ff(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},d=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let g={};if(t){let b=!1,x=[];for(let[w,C]of Object.entries(t))typeof C=="boolean"&&(b=!0),C===!0&&x.push(w.replace(/([A-Z])/g,E=>`-${E.toLowerCase()}`));if(b){g["data-headlessui-state"]=x.join(" ");for(let w of x)g[`data-${w}`]=""}}if($c(s)&&(Object.keys(no(l)).length>0||Object.keys(no(g)).length>0))if(!M.isValidElement(d)||Array.isArray(d)&&d.length>1||TE(d)){if(Object.keys(no(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(no(l)).concat(Object.keys(no(g))).map(b=>` - ${b}`).join(`
2
- `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(`
3
- `)].join(`
4
- `))}else{let b=d.props,x=b==null?void 0:b.className,w=typeof x=="function"?(...k)=>Ym(x(...k),l.className):Ym(x,l.className),C=w?{className:w}:{},E=Py(d.props,no(ff(l,["ref"])));for(let k in g)k in E&&delete g[k];return M.cloneElement(d,Object.assign({},E,g,c,{ref:i(NE(d),c.ref)},C))}return M.createElement(s,Object.assign({},ff(l,["ref"]),!$c(s)&&c,!$c(s)&&g),d)}function RE(){let e=M.useRef([]),t=M.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function PE(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Py(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var s;return(s=i==null?void 0:i.preventDefault)==null?void 0:s.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...s)}}});return t}function Ny(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];for(let r in n)Object.assign(t,{[r](...i){let s=n[r];for(let o of s)o==null||o(...i)}});return t}function br(e){var t;return Object.assign(M.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function no(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function ff(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function NE(e){return M.version.split(".")[0]>="19"?e.props.ref:e.ref}function $c(e){return e===M.Fragment||e===Symbol.for("react.fragment")}function TE(e){return $c(e.type)}let OE=M.createContext(void 0);function DE(){return M.useContext(OE)}function Ty(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function fd(e){return Ty(e)&&"tagName"in e}function Mi(e){return fd(e)&&"accessKey"in e}function _s(e){return fd(e)&&"tabIndex"in e}function FE(e){return fd(e)&&"style"in e}function LE(e){return Mi(e)&&e.nodeName==="IFRAME"}function Oy(e){return Mi(e)&&e.nodeName==="INPUT"}function Zm(e){return Mi(e)&&e.nodeName==="LABEL"}function jE(e){return Mi(e)&&e.nodeName==="FIELDSET"}function Dy(e){return Mi(e)&&e.nodeName==="LEGEND"}function BE(e){return fd(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function Um(e){let t=e.parentElement,n=null;for(;t&&!jE(t);)Dy(t)&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&VE(n)?!1:r}function VE(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(Dy(t))return!1;t=t.previousElementSibling}return!0}let Fy=Symbol();function zE(e,t=!0){return Object.assign(e,{[Fy]:t})}function Ri(...e){let t=M.useRef(e);M.useEffect(()=>{t.current=e},[e]);let n=Tt(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Fy]))?void 0:n}let tp=M.createContext(null);tp.displayName="DescriptionContext";function Ly(){let e=M.useContext(tp);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Ly),t}return e}function HE(){let[e,t]=M.useState([]);return[e.length>0?e.join(" "):void 0,M.useMemo(()=>function(n){let r=Tt(s=>(t(o=>[...o,s]),()=>t(o=>{let a=o.slice(),l=a.indexOf(s);return l!==-1&&a.splice(l,1),a}))),i=M.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return M.createElement(tp.Provider,{value:i},n.children)},[t])]}let GE="p";function WE(e,t){let n=M.useId(),r=Ry(),{id:i=`headlessui-description-${n}`,...s}=e,o=Ly(),a=Ri(t);wn(()=>o.register(i),[i,o.register]);let l=Bo({...o.slot,disabled:r||!1}),c={ref:a,...o.props,id:i};return mr()({ourProps:c,theirProps:s,slot:l,defaultTag:GE,name:o.name||"Description"})}let $E=br(WE);Object.assign($E,{});var yn=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(yn||{});let hd=M.createContext(null);hd.displayName="LabelContext";function np(){let e=M.useContext(hd);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,np),t}return e}function XE(e){var t,n,r;let i=(n=(t=M.useContext(hd))==null?void 0:t.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>0?[i,...e].filter(Boolean).join(" "):i}function jy({inherit:e=!1}={}){let t=XE(),[n,r]=M.useState([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,M.useMemo(()=>function(s){let o=Tt(l=>(r(c=>[...c,l]),()=>r(c=>{let d=c.slice(),g=d.indexOf(l);return g!==-1&&d.splice(g,1),d}))),a=M.useMemo(()=>({register:o,slot:s.slot,name:s.name,props:s.props,value:s.value}),[o,s.slot,s.name,s.props,s.value]);return M.createElement(hd.Provider,{value:a},s.children)},[r])]}let YE="label";function ZE(e,t){var n;let r=M.useId(),i=np(),s=DE(),o=Ry(),{id:a=`headlessui-label-${r}`,htmlFor:l=s??((n=i.props)==null?void 0:n.htmlFor),passive:c=!1,...d}=e,g=Ri(t);wn(()=>i.register(a),[a,i.register]);let b=Tt(C=>{let E=C.currentTarget;if(!(C.target!==C.currentTarget&&BE(C.target))&&(Zm(E)&&C.preventDefault(),i.props&&"onClick"in i.props&&typeof i.props.onClick=="function"&&i.props.onClick(C),Zm(E))){let k=document.getElementById(E.htmlFor);if(k){let u=k.getAttribute("disabled");if(u==="true"||u==="")return;let v=k.getAttribute("aria-disabled");if(v==="true"||v==="")return;(Oy(k)&&(k.type==="file"||k.type==="radio"||k.type==="checkbox")||k.role==="radio"||k.role==="checkbox"||k.role==="switch")&&k.click(),k.focus({preventScroll:!0})}}}),x=Bo({...i.slot,disabled:o||!1}),w={ref:g,...i.props,id:a,htmlFor:l,onClick:b};return c&&("onClick"in w&&(delete w.htmlFor,delete w.onClick),"onClick"in d&&delete d.onClick),mr()({ourProps:w,theirProps:d,slot:x,defaultTag:l?YE:"div",name:i.name||"Label"})}let UE=br(ZE);Object.assign(UE,{});function Jm(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function JE(e,t,n=!1){let[r,i]=M.useState(()=>Jm(t));return wn(()=>{if(!t||!e)return;let s=Zn();return s.requestAnimationFrame(function o(){s.requestAnimationFrame(o),i(a=>{let l=Jm(t);return l.width===a.width&&l.height===a.height?a:l})}),()=>{s.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var By=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(By||{});function qE(e){let t=M.useRef(null),n=Tt(i=>{t.current=i.pointerType,!Um(i.currentTarget)&&i.pointerType==="mouse"&&i.button===By.Left&&(i.preventDefault(),e(i))}),r=Tt(i=>{t.current!=="mouse"&&(Um(i.currentTarget)||e(i))});return{onPointerDown:n,onClick:r}}let Vy=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var KE=Object.defineProperty,QE=(e,t,n)=>t in e?KE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eI=(e,t,n)=>(QE(e,t+"",n),n),zy=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ar=(e,t,n)=>(zy(e,t,"read from private field"),n?n.call(e):t.get(e)),hf=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},qm=(e,t,n,r)=>(zy(e,t,"write to private field"),t.set(e,n),n),jr,ma,ba;let Hy=class{constructor(t){hf(this,jr,{}),hf(this,ma,new Vy(()=>new Set)),hf(this,ba,new Set),eI(this,"disposables",Zn()),qm(this,jr,t),Is.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return ar(this,jr)}subscribe(t,n){if(Is.isServer)return()=>{};let r={selector:t,callback:n,current:t(ar(this,jr))};return ar(this,ba).add(r),this.disposables.add(()=>{ar(this,ba).delete(r)})}on(t,n){return Is.isServer?()=>{}:(ar(this,ma).get(t).add(n),this.disposables.add(()=>{ar(this,ma).get(t).delete(n)}))}send(t){let n=this.reduce(ar(this,jr),t);if(n!==ar(this,jr)){qm(this,jr,n);for(let r of ar(this,ba)){let i=r.selector(ar(this,jr));Gy(r.current,i)||(r.current=i,r.callback(i))}for(let r of ar(this,ma).get(t.type))r(ar(this,jr),t)}}};jr=new WeakMap,ma=new WeakMap,ba=new WeakMap;function Gy(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:gf(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:gf(e.entries(),t.entries()):Km(e)&&Km(t)?gf(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function gf(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function Km(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function Qm(e){let[t,n]=e(),r=Zn();return(...i)=>{t(...i),r.dispose(),r.microTask(n)}}var tI=Object.defineProperty,nI=(e,t,n)=>t in e?tI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,e0=(e,t,n)=>(nI(e,typeof t!="symbol"?t+"":t,n),n),Wy=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Wy||{});let rI={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(i!==-1){let s=e.stack.slice();return s.splice(i,1),s.push(n),r=s,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}},iI=class $y extends Hy{constructor(){super(...arguments),e0(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),e0(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new $y({stack:[]})}reduce(t,n){return Vo(n.type,rI,t,n)}};const rp=new Vy(()=>iI.new());var gd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Eh={exports:{}},pf={};/**
5
- * @license React
6
- * use-sync-external-store-with-selector.production.js
7
- *
8
- * Copyright (c) Meta Platforms, Inc. and affiliates.
9
- *
10
- * This source code is licensed under the MIT license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- */var t0;function sI(){if(t0)return pf;t0=1;var e=M;function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,s=e.useEffect,o=e.useMemo,a=e.useDebugValue;return pf.useSyncExternalStoreWithSelector=function(l,c,d,g,b){var x=i(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=o(function(){function E(p){if(!k){if(k=!0,u=p,p=g(p),b!==void 0&&w.hasValue){var y=w.value;if(b(y,p))return v=y}return v=p}if(y=v,n(u,p))return y;var h=g(p);return b!==void 0&&b(y,h)?(u=p,y):(u=p,v=h)}var k=!1,u,v,f=d===void 0?null:d;return[function(){return E(c())},f===null?void 0:function(){return E(f())}]},[c,d,g,b]);var C=r(l,x[0],x[1]);return s(function(){w.hasValue=!0,w.value=C},[C]),a(C),C},pf}var mf={};/**
13
- * @license React
14
- * use-sync-external-store-with-selector.development.js
15
- *
16
- * Copyright (c) Meta Platforms, Inc. and affiliates.
17
- *
18
- * This source code is licensed under the MIT license found in the
19
- * LICENSE file in the root directory of this source tree.
20
- */var n0;function oI(){return n0||(n0=1,process.env.NODE_ENV!=="production"&&function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=M,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,s=t.useEffect,o=t.useMemo,a=t.useDebugValue;mf.useSyncExternalStoreWithSelector=function(l,c,d,g,b){var x=i(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=o(function(){function E(p){if(!k){if(k=!0,u=p,p=g(p),b!==void 0&&w.hasValue){var y=w.value;if(b(y,p))return v=y}return v=p}if(y=v,n(u,p))return y;var h=g(p);return b!==void 0&&b(y,h)?(u=p,y):(u=p,v=h)}var k=!1,u,v,f=d===void 0?null:d;return[function(){return E(c())},f===null?void 0:function(){return E(f())}]},[c,d,g,b]);var C=r(l,x[0],x[1]);return s(function(){w.hasValue=!0,w.value=C},[C]),a(C),C},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),mf}process.env.NODE_ENV==="production"?Eh.exports=sI():Eh.exports=oI();var aI=Eh.exports;function Er(e,t,n=Gy){return aI.useSyncExternalStoreWithSelector(Tt(r=>e.subscribe(lI,r)),Tt(()=>e.state),Tt(()=>e.state),Tt(t),n)}function lI(e){return e}function Xy(e,t){let n=M.useId(),r=rp.get(t),[i,s]=Er(r,M.useCallback(o=>[r.selectors.isTop(o,n),r.selectors.inStack(o,n)],[r,n]));return wn(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?s?i:!0:!1}let Ih=new Map,Ta=new Map;function r0(e){var t;let n=(t=Ta.get(e))!=null?t:0;return Ta.set(e,n+1),n!==0?()=>i0(e):(Ih.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>i0(e))}function i0(e){var t;let n=(t=Ta.get(e))!=null?t:1;if(n===1?Ta.delete(e):Ta.set(e,n-1),n!==1)return;let r=Ih.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Ih.delete(e))}function cI(e,{allowed:t,disallowed:n}={}){let r=Xy(e,"inert-others");wn(()=>{var i,s;if(!r)return;let o=Zn();for(let l of(i=n==null?void 0:n())!=null?i:[])l&&o.add(r0(l));let a=(s=t==null?void 0:t())!=null?s:[];for(let l of a){if(!l)continue;let c=Sl(l);if(!c)continue;let d=l.parentElement;for(;d&&d!==c.body;){for(let g of d.children)a.some(b=>g.contains(b))||o.add(r0(g));d=d.parentElement}}return o.dispose},[r,t,n])}function uI(e,t,n){let r=Il(i=>{let s=i.getBoundingClientRect();s.x===0&&s.y===0&&s.width===0&&s.height===0&&n()});M.useEffect(()=>{if(!e)return;let i=t===null?null:Mi(t)?t:t.current;if(!i)return;let s=Zn();if(typeof ResizeObserver<"u"){let o=new ResizeObserver(()=>r.current(i));o.observe(i),s.add(()=>o.disconnect())}if(typeof IntersectionObserver<"u"){let o=new IntersectionObserver(()=>r.current(i));o.observe(i),s.add(()=>o.disconnect())}return()=>s.dispose()},[t,r,e])}let kh=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),dI=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ah=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Ah||{}),fI=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(fI||{}),hI=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(hI||{});function Yy(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(kh)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function gI(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(dI)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var ip=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(ip||{});function sp(e,t=0){var n;return e===((n=Sl(e))==null?void 0:n.body)?!1:Vo(t,{0(){return e.matches(kh)},1(){let r=e;for(;r!==null;){if(r.matches(kh))return!0;r=r.parentElement}return!1}})}function Zy(e){Zn().nextFrame(()=>{let t=ep(e);t&&_s(t)&&!sp(t,0)&&mI(e)})}var pI=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(pI||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function mI(e){e==null||e.focus({preventScroll:!0})}let bI=["textarea","input"].join(",");function vI(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,bI))!=null?n:!1}function Uy(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),s=t(r);if(i===null||s===null)return 0;let o=i.compareDocumentPosition(s);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function xI(e,t,n=e===null?document.body:xu(e)){return yI(Yy(n),t,{relativeTo:e})}function yI(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let s=Array.isArray(e)?e.length>0?xu(e[0]):document:xu(e),o=Array.isArray(e)?n?Uy(e):e:t&64?gI(e):Yy(e);i.length>0&&o.length>1&&(o=o.filter(x=>!i.some(w=>w!=null&&"current"in w?(w==null?void 0:w.current)===x:w===x))),r=r??(s==null?void 0:s.activeElement);let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},d=0,g=o.length,b;do{if(d>=g||d+g<=0)return 0;let x=l+d;if(t&16)x=(x+g)%g;else{if(x<0)return 3;if(x>=g)return 1}b=o[x],b==null||b.focus(c),d+=a}while(b!==ep(b));return t&6&&vI(b)&&b.select(),2}function Jy(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function _I(){return/Android/gi.test(window.navigator.userAgent)}function s0(){return Jy()||_I()}function uo(e,t,n,r){let i=Il(n);M.useEffect(()=>{if(!e)return;function s(o){i.current(o)}return document.addEventListener(t,s,r),()=>document.removeEventListener(t,s,r)},[e,t,r])}function wI(e,t,n,r){let i=Il(n);M.useEffect(()=>{if(!e)return;function s(o){i.current(o)}return window.addEventListener(t,s,r),()=>window.removeEventListener(t,s,r)},[e,t,r])}const o0=30;function CI(e,t,n){let r=Il(n),i=M.useCallback(function(a,l){if(a.defaultPrevented)return;let c=l(a);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let d=function g(b){return typeof b=="function"?g(b()):Array.isArray(b)||b instanceof Set?b:[b]}(t);for(let g of d)if(g!==null&&(g.contains(c)||a.composed&&a.composedPath().includes(g)))return;return!sp(c,ip.Loose)&&c.tabIndex!==-1&&a.preventDefault(),r.current(a,c)},[r,t]),s=M.useRef(null);uo(e,"pointerdown",a=>{var l,c;s0()||(s.current=((c=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:c[0])||a.target)},!0),uo(e,"pointerup",a=>{if(s0()||!s.current)return;let l=s.current;return s.current=null,i(a,()=>l)},!0);let o=M.useRef({x:0,y:0});uo(e,"touchstart",a=>{o.current.x=a.touches[0].clientX,o.current.y=a.touches[0].clientY},!0),uo(e,"touchend",a=>{let l={x:a.changedTouches[0].clientX,y:a.changedTouches[0].clientY};if(!(Math.abs(l.x-o.current.x)>=o0||Math.abs(l.y-o.current.y)>=o0))return i(a,()=>_s(a.target)?a.target:null)},!0),wI(e,"blur",a=>i(a,()=>LE(window.document.activeElement)?window.document.activeElement:null),!0)}function Mh(...e){return M.useMemo(()=>Sl(...e),[...e])}var SI=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(SI||{});const ec={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},EI=200,a0=5;function II(e,{trigger:t,action:n,close:r,select:i}){let s=M.useRef(null),o=M.useRef(null),a=M.useRef(null);uo(e&&t!==null,"pointerdown",l=>{Ty(l==null?void 0:l.target)&&t!=null&&t.contains(l.target)&&(o.current=l.x,a.current=l.y,s.current=l.timeStamp)}),uo(e&&t!==null,"pointerup",l=>{var c,d;let g=s.current;if(g===null||(s.current=null,!_s(l.target))||Math.abs(l.x-((c=o.current)!=null?c:l.x))<a0&&Math.abs(l.y-((d=a.current)!=null?d:l.y))<a0)return;let b=n(l);switch(b.kind){case 0:return;case 1:{l.timeStamp-g>EI&&(i(b.target),r());break}case 2:{r();break}}},{capture:!0})}function kI(e,t){return M.useMemo(()=>{var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function AI(e){return M.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function MI(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...s){let o=t[i].call(n,...s);o&&(n=o,r.forEach(a=>a()))}}}function RI(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=(n=t.defaultView)!=null?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-i);n.style(r,"paddingRight",`${s}px`)}}}function PI(){return Jy()?{before({doc:e,d:t,meta:n}){function r(i){for(let s of n().containers)for(let o of s())if(o.contains(i))return!0;return!1}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Zn();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let s=(i=window.scrollY)!=null?i:window.pageYOffset,o=null;t.addEventListener(e,"click",a=>{if(_s(a.target))try{let l=a.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),d=e.querySelector(c);_s(d)&&!r(d)&&(o=d)}catch{}},!0),t.group(a=>{t.addEventListener(e,"touchstart",l=>{if(a.dispose(),_s(l.target)&&FE(l.target))if(r(l.target)){let c=l.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;a.style(c,"overscrollBehavior","contain")}else a.style(l.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",a=>{if(_s(a.target)){if(Oy(a.target))return;if(r(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;s!==l&&window.scrollTo(0,s),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})})}}:{}}function NI(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function l0(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ws=MI(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Zn(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=l0(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=l0(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[PI(),RI(),NI()];n.forEach(({before:r})=>r==null?void 0:r(t)),n.forEach(({after:r})=>r==null?void 0:r(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ws.subscribe(()=>{let e=ws.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&ws.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&ws.dispatch("TEARDOWN",n)}});function TI(e,t,n=()=>({containers:[]})){let r=AI(ws),i=t?r.get(t):void 0,s=i?i.count>0:!1;return wn(()=>{if(!(!t||!e))return ws.dispatch("PUSH",t,n),()=>ws.dispatch("POP",t,n)},[e,t]),s}function OI(e,t,n=()=>[document.body]){let r=Xy(e,"scroll-lock");TI(r,t,i=>{var s;return{containers:[...(s=i.containers)!=null?s:[],n]}})}function c0(e){return[e.screenX,e.screenY]}function DI(){let e=M.useRef([-1,-1]);return{wasMoved(t){let n=c0(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=c0(t)}}}function FI(e=0){let[t,n]=M.useState(e),r=M.useCallback(l=>n(l),[]),i=M.useCallback(l=>n(c=>c|l),[]),s=M.useCallback(l=>(t&l)===l,[t]),o=M.useCallback(l=>n(c=>c&~l),[]),a=M.useCallback(l=>n(c=>c^l),[]);return{flags:t,setFlag:r,addFlag:i,hasFlag:s,removeFlag:o,toggleFlag:a}}var u0,d0;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((u0=process==null?void 0:process.env)==null?void 0:u0.NODE_ENV)==="test"&&typeof((d0=Element==null?void 0:Element.prototype)==null?void 0:d0.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
21
- `)),[]});var LI=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(LI||{});function jI(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function BI(e,t,n,r){let[i,s]=M.useState(n),{hasFlag:o,addFlag:a,removeFlag:l}=FI(e&&i?3:0),c=M.useRef(!1),d=M.useRef(!1),g=El();return wn(()=>{var b;if(e){if(n&&s(!0),!t){n&&a(3);return}return(b=void 0)==null||b.call(r,n),VI(t,{inFlight:c,prepare(){d.current?d.current=!1:d.current=c.current,c.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var x;d.current&&GI(t)||(c.current=!1,l(7),n||s(!1),(x=void 0)==null||x.call(r,n))}})}},[e,n,t,g]),e?[i,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function VI(e,{prepare:t,run:n,done:r,inFlight:i}){let s=Zn();return HI(e,{prepare:t,inFlight:i}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(zI(e,r))})}),s.dispose}function zI(e,t){var n,r;let i=Zn();if(!e)return i.dispose;let s=!1;i.add(()=>{s=!0});let o=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return o.length===0?(t(),i.dispose):(Promise.allSettled(o.map(a=>a.finished)).then(()=>{s||t()}),i.dispose)}function HI(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function GI(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function WI(e,{container:t,accept:n,walk:r}){let i=M.useRef(n),s=M.useRef(r);M.useEffect(()=>{i.current=n,s.current=r},[n,r]),wn(()=>{if(!t||!e)return;let o=Sl(t);if(!o)return;let a=i.current,l=s.current,c=Object.assign(g=>a(g),{acceptNode:a}),d=o.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c,!1);for(;d.nextNode();)l(d.currentNode)},[t,e,i,s])}function pd(){return typeof window<"u"}function zo(e){return qy(e)?(e.nodeName||"").toLowerCase():"#document"}function Kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(qy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qy(e){return pd()?e instanceof Node||e instanceof Kn(e).Node:!1}function Nn(e){return pd()?e instanceof Element||e instanceof Kn(e).Element:!1}function Jr(e){return pd()?e instanceof HTMLElement||e instanceof Kn(e).HTMLElement:!1}function f0(e){return!pd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Kn(e).ShadowRoot}const $I=new Set(["inline","contents"]);function Al(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!$I.has(i)}const XI=new Set(["table","td","th"]);function YI(e){return XI.has(zo(e))}const ZI=[":popover-open",":modal"];function md(e){return ZI.some(t=>{try{return e.matches(t)}catch{return!1}})}const UI=["transform","translate","scale","rotate","perspective"],JI=["transform","translate","scale","rotate","perspective","filter"],qI=["paint","layout","strict","content"];function op(e){const t=ap(),n=Nn(e)?Rr(e):e;return UI.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||JI.some(r=>(n.willChange||"").includes(r))||qI.some(r=>(n.contain||"").includes(r))}function KI(e){let t=Ji(e);for(;Jr(t)&&!Eo(t);){if(op(t))return t;if(md(t))return null;t=Ji(t)}return null}function ap(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const QI=new Set(["html","body","#document"]);function Eo(e){return QI.has(zo(e))}function Rr(e){return Kn(e).getComputedStyle(e)}function bd(e){return Nn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ji(e){if(zo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||f0(e)&&e.host||Qr(e);return f0(t)?t.host:t}function Ky(e){const t=Ji(e);return Eo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jr(t)&&Al(t)?t:Ky(t)}function qa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ky(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=Kn(i);if(s){const a=Rh(o);return t.concat(o,o.visualViewport||[],Al(i)?i:[],a&&n?qa(a):[])}return t.concat(i,qa(i,[],n))}function Rh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ek(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const Fs=Math.min,Pn=Math.max,Ka=Math.round,tc=Math.floor,Wr=e=>({x:e,y:e}),tk={left:"right",right:"left",bottom:"top",top:"bottom"},nk={start:"end",end:"start"};function h0(e,t,n){return Pn(e,Fs(t,n))}function Ho(e,t){return typeof e=="function"?e(t):e}function qi(e){return e.split("-")[0]}function Ml(e){return e.split("-")[1]}function Qy(e){return e==="x"?"y":"x"}function e1(e){return e==="y"?"height":"width"}const rk=new Set(["top","bottom"]);function pi(e){return rk.has(qi(e))?"y":"x"}function t1(e){return Qy(pi(e))}function ik(e,t,n){n===void 0&&(n=!1);const r=Ml(e),i=t1(e),s=e1(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=yu(o)),[o,yu(o)]}function sk(e){const t=yu(e);return[Ph(e),t,Ph(t)]}function Ph(e){return e.replace(/start|end/g,t=>nk[t])}const g0=["left","right"],p0=["right","left"],ok=["top","bottom"],ak=["bottom","top"];function lk(e,t,n){switch(e){case"top":case"bottom":return n?t?p0:g0:t?g0:p0;case"left":case"right":return t?ok:ak;default:return[]}}function ck(e,t,n,r){const i=Ml(e);let s=lk(qi(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Ph)))),s}function yu(e){return e.replace(/left|right|bottom|top/g,t=>tk[t])}function uk(e){return{top:0,right:0,bottom:0,left:0,...e}}function dk(e){return typeof e!="number"?uk(e):{top:e,right:e,bottom:e,left:e}}function _u(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function m0(e,t,n){let{reference:r,floating:i}=e;const s=pi(t),o=t1(t),a=e1(o),l=qi(t),c=s==="y",d=r.x+r.width/2-i.width/2,g=r.y+r.height/2-i.height/2,b=r[a]/2-i[a]/2;let x;switch(l){case"top":x={x:d,y:r.y-i.height};break;case"bottom":x={x:d,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:g};break;case"left":x={x:r.x-i.width,y:g};break;default:x={x:r.x,y:r.y}}switch(Ml(t)){case"start":x[o]-=b*(n&&c?-1:1);break;case"end":x[o]+=b*(n&&c?-1:1);break}return x}const fk=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:g}=m0(c,r,l),b=r,x={},w=0;for(let C=0;C<a.length;C++){const{name:E,fn:k}=a[C],{x:u,y:v,data:f,reset:p}=await k({x:d,y:g,initialPlacement:r,placement:b,strategy:i,middlewareData:x,rects:c,platform:o,elements:{reference:e,floating:t}});d=u??d,g=v??g,x={...x,[E]:{...x[E],...f}},p&&w<=50&&(w++,typeof p=="object"&&(p.placement&&(b=p.placement),p.rects&&(c=p.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):p.rects),{x:d,y:g}=m0(c,b,l)),C=-1)}return{x:d,y:g,placement:b,strategy:i,middlewareData:x}};async function vd(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:g="floating",altBoundary:b=!1,padding:x=0}=Ho(t,e),w=dk(x),E=a[b?g==="floating"?"reference":"floating":g],k=_u(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(E)))==null||n?E:E.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),u=g==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),f=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},p=_u(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:u,offsetParent:v,strategy:l}):u);return{top:(k.top-p.top+w.top)/f.y,bottom:(p.bottom-k.bottom+w.bottom)/f.y,left:(k.left-p.left+w.left)/f.x,right:(p.right-k.right+w.right)/f.x}}const hk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:C=!0,...E}=Ho(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const k=qi(i),u=pi(a),v=qi(a)===a,f=await(l.isRTL==null?void 0:l.isRTL(c.floating)),p=b||(v||!C?[yu(a)]:sk(a)),y=w!=="none";!b&&y&&p.push(...ck(a,C,w,f));const h=[a,...p],_=await vd(t,E),I=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&I.push(_[k]),g){const N=ik(i,o,f);I.push(_[N[0]],_[N[1]])}if(A=[...A,{placement:i,overflows:I}],!I.every(N=>N<=0)){var R,D;const N=(((R=s.flip)==null?void 0:R.index)||0)+1,F=h[N];if(F&&(!(g==="alignment"?u!==pi(F):!1)||A.every(L=>pi(L.placement)===u?L.overflows[0]>0:!0)))return{data:{index:N,overflows:A},reset:{placement:F}};let j=(D=A.filter(H=>H.overflows[0]<=0).sort((H,L)=>H.overflows[1]-L.overflows[1])[0])==null?void 0:D.placement;if(!j)switch(x){case"bestFit":{var B;const H=(B=A.filter(L=>{if(y){const G=pi(L.placement);return G===u||G==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(G=>G>0).reduce((G,$)=>G+$,0)]).sort((L,G)=>L[1]-G[1])[0])==null?void 0:B[0];H&&(j=H);break}case"initialPlacement":j=a;break}if(i!==j)return{reset:{placement:j}}}return{}}}},gk=new Set(["left","top"]);async function pk(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=qi(n),a=Ml(n),l=pi(n)==="y",c=gk.has(o)?-1:1,d=s&&l?-1:1,g=Ho(t,e);let{mainAxis:b,crossAxis:x,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return a&&typeof w=="number"&&(x=a==="end"?w*-1:w),l?{x:x*d,y:b*c}:{x:b*c,y:x*d}}const mk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await pk(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},bk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:E=>{let{x:k,y:u}=E;return{x:k,y:u}}},...l}=Ho(e,t),c={x:n,y:r},d=await vd(t,l),g=pi(qi(i)),b=Qy(g);let x=c[b],w=c[g];if(s){const E=b==="y"?"top":"left",k=b==="y"?"bottom":"right",u=x+d[E],v=x-d[k];x=h0(u,x,v)}if(o){const E=g==="y"?"top":"left",k=g==="y"?"bottom":"right",u=w+d[E],v=w-d[k];w=h0(u,w,v)}const C=a.fn({...t,[b]:x,[g]:w});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[b]:s,[g]:o}}}}}},vk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...c}=Ho(e,t),d=await vd(t,c),g=qi(i),b=Ml(i),x=pi(i)==="y",{width:w,height:C}=s.floating;let E,k;g==="top"||g==="bottom"?(E=g,k=b===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(k=g,E=b==="end"?"top":"bottom");const u=C-d.top-d.bottom,v=w-d.left-d.right,f=Fs(C-d[E],u),p=Fs(w-d[k],v),y=!t.middlewareData.shift;let h=f,_=p;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(h=u),y&&!b){const A=Pn(d.left,0),R=Pn(d.right,0),D=Pn(d.top,0),B=Pn(d.bottom,0);x?_=w-2*(A!==0||R!==0?A+R:Pn(d.left,d.right)):h=C-2*(D!==0||B!==0?D+B:Pn(d.top,d.bottom))}await l({...t,availableWidth:_,availableHeight:h});const I=await o.getDimensions(a.floating);return w!==I.width||C!==I.height?{reset:{rects:!0}}:{}}}};function n1(e){const t=Rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Jr(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=Ka(n)!==s||Ka(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function lp(e){return Nn(e)?e:e.contextElement}function bo(e){const t=lp(e);if(!Jr(t))return Wr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=n1(t);let o=(s?Ka(n.width):n.width)/r,a=(s?Ka(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const xk=Wr(0);function r1(e){const t=Kn(e);return!ap()||!t.visualViewport?xk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Kn(e)?!1:t}function Ls(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=lp(e);let o=Wr(1);t&&(r?Nn(r)&&(o=bo(r)):o=bo(e));const a=yk(s,n,r)?r1(s):Wr(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,d=i.width/o.x,g=i.height/o.y;if(s){const b=Kn(s),x=r&&Nn(r)?Kn(r):r;let w=b,C=Rh(w);for(;C&&r&&x!==w;){const E=bo(C),k=C.getBoundingClientRect(),u=Rr(C),v=k.left+(C.clientLeft+parseFloat(u.paddingLeft))*E.x,f=k.top+(C.clientTop+parseFloat(u.paddingTop))*E.y;l*=E.x,c*=E.y,d*=E.x,g*=E.y,l+=v,c+=f,w=Kn(C),C=Rh(w)}}return _u({width:d,height:g,x:l,y:c})}function xd(e,t){const n=bd(e).scrollLeft;return t?t.left+n:Ls(Qr(e)).left+n}function i1(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-xd(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function _k(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Qr(r),a=t?md(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Wr(1);const d=Wr(0),g=Jr(r);if((g||!g&&!s)&&((zo(r)!=="body"||Al(o))&&(l=bd(r)),Jr(r))){const x=Ls(r);c=bo(r),d.x=x.x+r.clientLeft,d.y=x.y+r.clientTop}const b=o&&!g&&!s?i1(o,l):Wr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+b.x,y:n.y*c.y-l.scrollTop*c.y+d.y+b.y}}function wk(e){return Array.from(e.getClientRects())}function Ck(e){const t=Qr(e),n=bd(e),r=e.ownerDocument.body,i=Pn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Pn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+xd(e);const a=-n.scrollTop;return Rr(r).direction==="rtl"&&(o+=Pn(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const b0=25;function Sk(e,t){const n=Kn(e),r=Qr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const d=ap();(!d||d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=xd(r);if(c<=0){const d=r.ownerDocument,g=d.body,b=getComputedStyle(g),x=d.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,w=Math.abs(r.clientWidth-g.clientWidth-x);w<=b0&&(s-=w)}else c<=b0&&(s+=c);return{width:s,height:o,x:a,y:l}}const Ek=new Set(["absolute","fixed"]);function Ik(e,t){const n=Ls(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Jr(e)?bo(e):Wr(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function v0(e,t,n){let r;if(t==="viewport")r=Sk(e,n);else if(t==="document")r=Ck(Qr(e));else if(Nn(t))r=Ik(t,n);else{const i=r1(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return _u(r)}function s1(e,t){const n=Ji(e);return n===t||!Nn(n)||Eo(n)?!1:Rr(n).position==="fixed"||s1(n,t)}function kk(e,t){const n=t.get(e);if(n)return n;let r=qa(e,[],!1).filter(a=>Nn(a)&&zo(a)!=="body"),i=null;const s=Rr(e).position==="fixed";let o=s?Ji(e):e;for(;Nn(o)&&!Eo(o);){const a=Rr(o),l=op(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&Ek.has(i.position)||Al(o)&&!l&&s1(e,o))?r=r.filter(d=>d!==o):i=a,o=Ji(o)}return t.set(e,r),r}function Ak(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?md(t)?[]:kk(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,d)=>{const g=v0(t,d,i);return c.top=Pn(g.top,c.top),c.right=Fs(g.right,c.right),c.bottom=Fs(g.bottom,c.bottom),c.left=Pn(g.left,c.left),c},v0(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Mk(e){const{width:t,height:n}=n1(e);return{width:t,height:n}}function Rk(e,t,n){const r=Jr(t),i=Qr(t),s=n==="fixed",o=Ls(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Wr(0);function c(){l.x=xd(i)}if(r||!r&&!s)if((zo(t)!=="body"||Al(i))&&(a=bd(t)),r){const x=Ls(t,!0,s,t);l.x=x.x+t.clientLeft,l.y=x.y+t.clientTop}else i&&c();s&&!r&&i&&c();const d=i&&!r&&!s?i1(i,a):Wr(0),g=o.left+a.scrollLeft-l.x-d.x,b=o.top+a.scrollTop-l.y-d.y;return{x:g,y:b,width:o.width,height:o.height}}function bf(e){return Rr(e).position==="static"}function x0(e,t){if(!Jr(e)||Rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qr(e)===n&&(n=n.ownerDocument.body),n}function o1(e,t){const n=Kn(e);if(md(e))return n;if(!Jr(e)){let i=Ji(e);for(;i&&!Eo(i);){if(Nn(i)&&!bf(i))return i;i=Ji(i)}return n}let r=x0(e,t);for(;r&&YI(r)&&bf(r);)r=x0(r,t);return r&&Eo(r)&&bf(r)&&!op(r)?n:r||KI(e)||n}const Pk=async function(e){const t=this.getOffsetParent||o1,n=this.getDimensions,r=await n(e.floating);return{reference:Rk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Nk(e){return Rr(e).direction==="rtl"}const Tk={convertOffsetParentRelativeRectToViewportRelativeRect:_k,getDocumentElement:Qr,getClippingRect:Ak,getOffsetParent:o1,getElementRects:Pk,getClientRects:wk,getDimensions:Mk,getScale:bo,isElement:Nn,isRTL:Nk};function a1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ok(e,t){let n=null,r;const i=Qr(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:g,width:b,height:x}=c;if(a||t(),!b||!x)return;const w=tc(g),C=tc(i.clientWidth-(d+b)),E=tc(i.clientHeight-(g+x)),k=tc(d),v={rootMargin:-w+"px "+-C+"px "+-E+"px "+-k+"px",threshold:Pn(0,Fs(1,l))||1};let f=!0;function p(y){const h=y[0].intersectionRatio;if(h!==l){if(!f)return o();h?o(!1,h):r=setTimeout(()=>{o(!1,1e-7)},1e3)}h===1&&!a1(c,e.getBoundingClientRect())&&o(),f=!1}try{n=new IntersectionObserver(p,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(p,v)}n.observe(e)}return o(!0),s}function l1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=lp(e),d=i||s?[...c?qa(c):[],...qa(t)]:[];d.forEach(k=>{i&&k.addEventListener("scroll",n,{passive:!0}),s&&k.addEventListener("resize",n)});const g=c&&a?Ok(c,n):null;let b=-1,x=null;o&&(x=new ResizeObserver(k=>{let[u]=k;u&&u.target===c&&x&&(x.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var v;(v=x)==null||v.observe(t)})),n()}),c&&!l&&x.observe(c),x.observe(t));let w,C=l?Ls(e):null;l&&E();function E(){const k=Ls(e);C&&!a1(C,k)&&n(),C=k,w=requestAnimationFrame(E)}return n(),()=>{var k;d.forEach(u=>{i&&u.removeEventListener("scroll",n),s&&u.removeEventListener("resize",n)}),g==null||g(),(k=x)==null||k.disconnect(),x=null,l&&cancelAnimationFrame(w)}}const vf=vd,Dk=mk,Fk=bk,Lk=hk,jk=vk,Bk=(e,t,n)=>{const r=new Map,i={platform:Tk,...n},s={...i.platform,_c:r};return fk(e,t,{...i,platform:s})};var Vk=typeof document<"u",zk=function(){},Xc=Vk?M.useLayoutEffect:zk;function wu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!wu(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function c1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function y0(e,t){const n=c1(e);return Math.round(t*n)/n}function xf(e){const t=we.useRef(e);return Xc(()=>{t.current=e}),t}function Hk(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,g]=we.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,x]=we.useState(r);wu(b,r)||x(r);const[w,C]=we.useState(null),[E,k]=we.useState(null),u=we.useCallback(L=>{L!==y.current&&(y.current=L,C(L))},[]),v=we.useCallback(L=>{L!==h.current&&(h.current=L,k(L))},[]),f=s||w,p=o||E,y=we.useRef(null),h=we.useRef(null),_=we.useRef(d),I=l!=null,A=xf(l),R=xf(i),D=xf(c),B=we.useCallback(()=>{if(!y.current||!h.current)return;const L={placement:t,strategy:n,middleware:b};R.current&&(L.platform=R.current),Bk(y.current,h.current,L).then(G=>{const $={...G,isPositioned:D.current!==!1};N.current&&!wu(_.current,$)&&(_.current=$,hu.flushSync(()=>{g($)}))})},[b,t,n,R,D]);Xc(()=>{c===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,g(L=>({...L,isPositioned:!1})))},[c]);const N=we.useRef(!1);Xc(()=>(N.current=!0,()=>{N.current=!1}),[]),Xc(()=>{if(f&&(y.current=f),p&&(h.current=p),f&&p){if(A.current)return A.current(f,p,B);B()}},[f,p,B,A,I]);const F=we.useMemo(()=>({reference:y,floating:h,setReference:u,setFloating:v}),[u,v]),j=we.useMemo(()=>({reference:f,floating:p}),[f,p]),H=we.useMemo(()=>{const L={position:n,left:0,top:0};if(!j.floating)return L;const G=y0(j.floating,d.x),$=y0(j.floating,d.y);return a?{...L,transform:"translate("+G+"px, "+$+"px)",...c1(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:$}},[n,a,j.floating,d.x,d.y]);return we.useMemo(()=>({...d,update:B,refs:F,elements:j,floatingStyles:H}),[d,B,F,j,H])}const u1=(e,t)=>({...Dk(e),options:[e,t]}),Gk=(e,t)=>({...Fk(e),options:[e,t]}),Wk=(e,t)=>({...Lk(e),options:[e,t]}),$k=(e,t)=>({...jk(e),options:[e,t]}),d1={...we},Xk=d1.useInsertionEffect,Yk=Xk||(e=>e());function f1(e){const t=we.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Yk(()=>{t.current=e}),we.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}var Nh=typeof document<"u"?M.useLayoutEffect:M.useEffect;let _0=!1,Zk=0;const w0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Zk++;function Uk(){const[e,t]=we.useState(()=>_0?w0():void 0);return Nh(()=>{e==null&&t(w0())},[]),we.useEffect(()=>{_0=!0},[]),e}const Jk=d1.useId,qk=Jk||Uk;let Qa;process.env.NODE_ENV!=="production"&&(Qa=new Set);function Kk(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");if(!((e=Qa)!=null&&e.has(i))){var s;(s=Qa)==null||s.add(i),console.warn(i)}}function Qk(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");if(!((e=Qa)!=null&&e.has(i))){var s;(s=Qa)==null||s.add(i),console.error(i)}}function e5(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const t5=we.createContext(null),n5=we.createContext(null),r5=()=>{var e;return((e=we.useContext(t5))==null?void 0:e.id)||null},i5=()=>we.useContext(n5),s5="data-floating-ui-focusable";function o5(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=qk(),s=we.useRef({}),[o]=we.useState(()=>e5()),a=r5()!=null;if(process.env.NODE_ENV!=="production"){const x=r.reference;x&&!Nn(x)&&Qk("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=we.useState(r.reference),d=f1((x,w,C)=>{s.current.openEvent=x?w:void 0,o.emit("openchange",{open:x,event:w,reason:C,nested:a}),n==null||n(x,w,C)}),g=we.useMemo(()=>({setPositionReference:c}),[]),b=we.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return we.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:b,events:o,floatingId:i,refs:g}),[t,d,b,o,i,g])}function a5(e){e===void 0&&(e={});const{nodeId:t}=e,n=o5({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[s,o]=we.useState(null),[a,l]=we.useState(null),d=(i==null?void 0:i.domReference)||s,g=we.useRef(null),b=i5();Nh(()=>{d&&(g.current=d)},[d]);const x=Hk({...e,elements:{...i,...a&&{reference:a}}}),w=we.useCallback(v=>{const f=Nn(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;l(f),x.refs.setReference(f)},[x.refs]),C=we.useCallback(v=>{(Nn(v)||v===null)&&(g.current=v,o(v)),(Nn(x.refs.reference.current)||x.refs.reference.current===null||v!==null&&!Nn(v))&&x.refs.setReference(v)},[x.refs]),E=we.useMemo(()=>({...x.refs,setReference:C,setPositionReference:w,domReference:g}),[x.refs,C,w]),k=we.useMemo(()=>({...x.elements,domReference:d}),[x.elements,d]),u=we.useMemo(()=>({...x,...r,refs:E,elements:k,nodeId:t}),[x,E,k,t,r]);return Nh(()=>{r.dataRef.current.floatingContext=u;const v=b==null?void 0:b.nodesRef.current.find(f=>f.id===t);v&&(v.context=u)}),we.useMemo(()=>({...x,context:u,refs:E,elements:k}),[x,E,k,u])}const C0="active",S0="selected";function yf(e,t,n){const r=new Map,i=n==="item";let s=e;if(i&&e){const{[C0]:o,[S0]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[s5]:""},...s,...t.map(o=>{const a=o?o[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((o,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(i&&[C0,S0].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var g;(g=r.get(c))==null||g.push(d),o[c]=function(){for(var b,x=arguments.length,w=new Array(x),C=0;C<x;C++)w[C]=arguments[C];return(b=r.get(c))==null?void 0:b.map(E=>E(...w)).find(E=>E!==void 0)}}}else o[c]=d}),o),{})}}function l5(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),i=we.useCallback(a=>yf(a,e,"reference"),t),s=we.useCallback(a=>yf(a,e,"floating"),n),o=we.useCallback(a=>yf(a,e,"item"),r);return we.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:o}),[i,s,o])}function E0(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const c5=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:s=0,index:o=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:c,...d}=Ho(e,t),{rects:g,elements:{floating:b}}=t,x=n.current[o],w=(c==null?void 0:c.current)||b,C=b.clientTop||w.clientTop,E=b.clientTop!==0,k=w.clientTop!==0,u=b===w;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||Kk('`placement` side must be "bottom" when using the `inner`',"middleware.")),!x)return{};const v={...t,...await u1(-x.offsetTop-b.clientTop-g.reference.height/2-x.offsetHeight/2-s).fn(t)},f=await vf(E0(v,w.scrollHeight+C+b.clientTop),d),p=await vf(v,{...d,elementContext:"reference"}),y=Pn(0,f.top),h=v.y+y,A=(w.scrollHeight>w.clientHeight?R=>R:Ka)(Pn(0,w.scrollHeight+(E&&u||k?C*2:0)-y-Pn(0,f.bottom)));if(w.style.maxHeight=A+"px",w.scrollTop=y,i){const R=w.offsetHeight<x.offsetHeight*Fs(a,n.current.length)-1||p.top>=-l||p.bottom>=-l;hu.flushSync(()=>i(R))}return r&&(r.current=await vf(E0({...v,y:h},w.offsetHeight+C+b.clientTop),d)),{y:h}}});function u5(e,t){const{open:n,elements:r}=e,{enabled:i=!0,overflowRef:s,scrollRef:o,onChange:a}=t,l=f1(a),c=we.useRef(!1),d=we.useRef(null),g=we.useRef(null);we.useEffect(()=>{if(!i)return;function x(C){if(C.ctrlKey||!w||s.current==null)return;const E=C.deltaY,k=s.current.top>=-.5,u=s.current.bottom>=-.5,v=w.scrollHeight-w.clientHeight,f=E<0?-1:1,p=E<0?"max":"min";w.scrollHeight<=w.clientHeight||(!k&&E>0||!u&&E<0?(C.preventDefault(),hu.flushSync(()=>{l(y=>y+Math[p](E,v*f))})):/firefox/i.test(ek())&&(w.scrollTop+=E))}const w=(o==null?void 0:o.current)||r.floating;if(n&&w)return w.addEventListener("wheel",x),requestAnimationFrame(()=>{d.current=w.scrollTop,s.current!=null&&(g.current={...s.current})}),()=>{d.current=null,g.current=null,w.removeEventListener("wheel",x)}},[i,n,r.floating,s,o,l]);const b=we.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const x=(o==null?void 0:o.current)||r.floating;if(!(!s.current||!x||!c.current)){if(d.current!==null){const w=x.scrollTop-d.current;(s.current.bottom<-.5&&w<-1||s.current.top<-.5&&w>1)&&hu.flushSync(()=>l(C=>C+w))}requestAnimationFrame(()=>{d.current=x.scrollTop})}}}),[r.floating,l,s,o]);return we.useMemo(()=>i?{floating:b}:{},[i,b])}let Go=M.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Go.displayName="FloatingContext";let cp=M.createContext(null);cp.displayName="PlacementContext";function d5(e){return M.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function f5(){return M.useContext(Go).setReference}function h5(){return M.useContext(Go).getReferenceProps}function g5(){let{getFloatingProps:e,slot:t}=M.useContext(Go);return M.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function p5(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=M.useContext(cp),n=M.useMemo(()=>e,[JSON.stringify(e,(i,s)=>{var o;return(o=s==null?void 0:s.outerHTML)!=null?o:s})]);wn(()=>{t==null||t(n??null)},[t,n]);let r=M.useContext(Go);return M.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let I0=4;function m5({children:e,enabled:t=!0}){let[n,r]=M.useState(null),[i,s]=M.useState(0),o=M.useRef(null),[a,l]=M.useState(null);b5(a);let c=t&&n!==null&&a!==null,{to:d="bottom",gap:g=0,offset:b=0,padding:x=0,inner:w}=v5(n,a),[C,E="center"]=d.split(" ");wn(()=>{c&&s(0)},[c]);let{refs:k,floatingStyles:u,context:v}=a5({open:c,placement:C==="selection"?E==="center"?"bottom":`bottom-${E}`:E==="center"?`${C}`:`${C}-${E}`,strategy:"absolute",transform:!1,middleware:[u1({mainAxis:C==="selection"?0:g,crossAxis:b}),Gk({padding:x}),C!=="selection"&&Wk({padding:x}),C==="selection"&&w?c5({...w,padding:x,overflowRef:o,offset:i,minItemsVisible:I0,referenceOverflowThreshold:x,onFallbackChange(R){var D,B;if(!R)return;let N=v.elements.floating;if(!N)return;let F=parseFloat(getComputedStyle(N).scrollPaddingBottom)||0,j=Math.min(I0,N.childElementCount),H=0,L=0;for(let G of(B=(D=v.elements.floating)==null?void 0:D.childNodes)!=null?B:[])if(Mi(G)){let $=G.offsetTop,Z=$+G.clientHeight+F,U=N.scrollTop,ee=U+N.clientHeight;if($>=U&&Z<=ee)j--;else{L=Math.max(0,Math.min(Z,ee)-Math.max($,U)),H=G.clientHeight;break}}j>=1&&s(G=>{let $=H*j-L+F;return G>=$?G:$})}}):null,$k({padding:x,apply({availableWidth:R,availableHeight:D,elements:B}){Object.assign(B.floating.style,{overflow:"auto",maxWidth:`${R}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${D}px)`})}})].filter(Boolean),whileElementsMounted:l1}),[f=C,p=E]=v.placement.split("-");C==="selection"&&(f="selection");let y=M.useMemo(()=>({anchor:[f,p].filter(Boolean).join(" ")}),[f,p]),h=u5(v,{overflowRef:o,onChange:s}),{getReferenceProps:_,getFloatingProps:I}=l5([h]),A=Tt(R=>{l(R),k.setFloating(R)});return we.createElement(cp.Provider,{value:r},we.createElement(Go.Provider,{value:{setFloating:A,setReference:k.setReference,styles:u,getReferenceProps:_,getFloatingProps:I,slot:y}},e))}function b5(e){wn(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let i=parseInt(n);isNaN(i)||r!==i&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function v5(e,t){var n,r,i;let s=_f((n=e==null?void 0:e.gap)!=null?n:"var(--anchor-gap, 0)",t),o=_f((r=e==null?void 0:e.offset)!=null?r:"var(--anchor-offset, 0)",t),a=_f((i=e==null?void 0:e.padding)!=null?i:"var(--anchor-padding, 0)",t);return{...e,gap:s,offset:o,padding:a}}function _f(e,t,n=void 0){let r=El(),i=Tt((l,c)=>{if(l==null)return[n,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!c)return[n,null];let d=k0(l,c);return[d,g=>{let b=h1(l);{let x=b.map(w=>window.getComputedStyle(c).getPropertyValue(w));r.requestAnimationFrame(function w(){r.nextFrame(w);let C=!1;for(let[k,u]of b.entries()){let v=window.getComputedStyle(c).getPropertyValue(u);if(x[k]!==v){x[k]=v,C=!0;break}}if(!C)return;let E=k0(l,c);d!==E&&(g(E),d=E)})}return r.dispose}]}return[n,null]}),s=M.useMemo(()=>i(e,t)[0],[e,t]),[o=s,a]=M.useState();return wn(()=>{let[l,c]=i(e,t);if(a(l),!!c)return c(a)},[e,t]),o}function h1(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),i=t[1].slice(n+1).trim();return i?[r,...h1(i)]:[r]}return[]}function k0(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}let up=M.createContext(null);up.displayName="OpenClosedContext";var el=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(el||{});function x5(){return M.useContext(up)}function y5({value:e,children:t}){return M.createElement(up.Provider,{value:e},t)}function _5(e){throw new Error("Unexpected object: "+e)}var nn=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(nn||{});function nc(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:{for(let s=0;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 1:{i===-1&&(i=n.length);for(let s=i-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 2:{for(let s=i+1;s<n.length;++s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 3:{for(let s=n.length-1;s>=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 4:{for(let s=0;s<n.length;++s)if(t.resolveId(n[s],s,n)===e.id)return s;return r}case 5:return null;default:_5(e)}}function g1(e){let t=Tt(e),n=M.useRef(!1);M.useEffect(()=>(n.current=!1,()=>{n.current=!0,My(()=>{n.current&&t()})}),[t])}let w5=M.createContext(!1);function C5(){return M.useContext(w5)}function S5(e){let t=C5(),n=M.useContext(m1),[r,i]=M.useState(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(Is.isServer)return null;let o=e==null?void 0:e.getElementById("headlessui-portal-root");if(o)return o;if(e===null)return null;let a=e.createElement("div");return a.setAttribute("id","headlessui-portal-root"),e.body.appendChild(a)});return M.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),M.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}let p1=M.Fragment,E5=br(function(e,t){let{ownerDocument:n=null,...r}=e,i=M.useRef(null),s=Ri(zE(b=>{i.current=b}),t),o=Mh(i.current),a=n??o,l=S5(a),c=M.useContext(M5),d=El(),g=mr();return g1(()=>{var b;l&&l.childNodes.length<=0&&((b=l.parentElement)==null||b.removeChild(l))}),l?Ur.createPortal(M.createElement("div",{"data-headlessui-portal":"",ref:b=>{d.dispose(),c&&b&&d.add(c.register(b))}},g({ourProps:{ref:s},theirProps:r,slot:{},defaultTag:p1,name:"Portal"})),l):null});function I5(e,t){let n=Ri(t),{enabled:r=!0,ownerDocument:i,...s}=e,o=mr();return r?M.createElement(E5,{...s,ownerDocument:i,ref:n}):o({ourProps:{ref:n},theirProps:s,slot:{},defaultTag:p1,name:"Portal"})}let k5=M.Fragment,m1=M.createContext(null);function A5(e,t){let{target:n,...r}=e,i={ref:Ri(t)},s=mr();return M.createElement(m1.Provider,{value:n},s({ourProps:i,theirProps:r,defaultTag:k5,name:"Popover.Group"}))}let M5=M.createContext(null),R5=br(I5),P5=br(A5),N5=Object.assign(R5,{Group:P5});const Yc={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function b1(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function T5(e,t,n){let r=Zn();if(t.kind==="Tracked"){let i=function(){s!==b1(e)&&(r.dispose(),n())},{position:s}=t,o=new ResizeObserver(i);o.observe(e),r.add(()=>o.disconnect()),r.addEventListener(window,"scroll",i,{passive:!0}),r.addEventListener(window,"resize",i)}return()=>r.dispose()}let A0=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function M0(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!Mi(i))return r;let s=!1;for(let a of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),s=!0;let o=s?(n=i.innerText)!=null?n:"":r;return A0.test(o)&&(o=o.replace(A0,"")),o}function O5(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let s=document.getElementById(i);if(s){let o=s.getAttribute("aria-label");return typeof o=="string"?o.trim():M0(s).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return M0(e).trim()}function D5(e){let t=M.useRef(""),n=M.useRef("");return Tt(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let s=O5(r).trim().toLowerCase();return t.current=i,n.current=s,s})}var F5=Object.defineProperty,L5=(e,t,n)=>t in e?F5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R0=(e,t,n)=>(L5(e,typeof t!="symbol"?t+"":t,n),n),Mn=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Mn||{}),Cu=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Cu||{}),jt=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItems=5]="RegisterItems",e[e.UnregisterItems=6]="UnregisterItems",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e[e.SortItems=9]="SortItems",e[e.MarkButtonAsMoved=10]="MarkButtonAsMoved",e))(jt||{});function P0(e,t=n=>n){let n=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=Uy(t(e.items.slice()),s=>s.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{items:r,activeItemIndex:i}}let j5={1(e){if(e.menuState===1)return e;let t=e.buttonElement?Yc.Tracked(b1(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:nn.Nothing},menuState:1,buttonPositionState:t}},0(e,t){return e.menuState===0?e:{...e,__demoMode:!1,pendingFocus:t.focus,menuState:0,buttonPositionState:Yc.Idle}},2:(e,t)=>{var n,r,i,s,o;if(e.menuState===1)return e;let a={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===nn.Nothing)return{...a,activeItemIndex:null};if(t.focus===nn.Specific)return{...a,activeItemIndex:e.items.findIndex(d=>d.id===t.id)};if(t.focus===nn.Previous){let d=e.activeItemIndex;if(d!==null){let g=e.items[d].dataRef.current.domRef,b=nc(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:x=>x.id,resolveDisabled:x=>x.dataRef.current.disabled});if(b!==null){let x=e.items[b].dataRef.current.domRef;if(((r=g.current)==null?void 0:r.previousElementSibling)===x.current||((i=x.current)==null?void 0:i.previousElementSibling)===null)return{...a,activeItemIndex:b}}}}else if(t.focus===nn.Next){let d=e.activeItemIndex;if(d!==null){let g=e.items[d].dataRef.current.domRef,b=nc(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:x=>x.id,resolveDisabled:x=>x.dataRef.current.disabled});if(b!==null){let x=e.items[b].dataRef.current.domRef;if(((s=g.current)==null?void 0:s.nextElementSibling)===x.current||((o=x.current)==null?void 0:o.nextElementSibling)===null)return{...a,activeItemIndex:b}}}}let l=P0(e),c=nc(t,{resolveItems:()=>l.items,resolveActiveIndex:()=>l.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...a,...l,activeItemIndex:c}},3:(e,t)=>{let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(o=>{var a;return((a=o.dataRef.current.textValue)==null?void 0:a.startsWith(r))&&!o.dataRef.current.disabled}),s=i?e.items.indexOf(i):-1;return s===-1||s===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:s,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,t)=>{let n=e.items.concat(t.items.map(i=>i)),r=e.activeItemIndex;return e.pendingFocus.focus!==nn.Nothing&&(r=nc(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeItemIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled})),{...e,items:n,activeItemIndex:r,pendingFocus:{focus:nn.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let n=e.items,r=[],i=new Set(t.items);for(let[s,o]of n.entries())if(i.has(o.id)&&(r.push(s),i.delete(o.id),i.size===0))break;if(r.length>0){n=n.slice();for(let s of r.reverse())n.splice(s,1)}return{...e,items:n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element},9:e=>e.pendingShouldSort?{...e,...P0(e),pendingShouldSort:!1}:e,10(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:Yc.Moved}}};class dp extends Hy{constructor(t){super(t),R0(this,"actions",{registerItem:Qm(()=>{let n=[],r=new Set;return[(i,s)=>{r.has(s)||(r.add(s),n.push({id:i,dataRef:s}))},()=>(r.clear(),this.send({type:5,items:n.splice(0)}))]}),unregisterItem:Qm(()=>{let n=[];return[r=>n.push(r),()=>this.send({type:6,items:n.splice(0)})]})}),R0(this,"selectors",{activeDescendantId(n){var r;let i=n.activeItemIndex,s=n.items;return i===null||(r=s[i])==null?void 0:r.id},isActive(n,r){var i;let s=n.activeItemIndex,o=n.items;return s!==null?((i=o[s])==null?void 0:i.id)===r:!1},shouldScrollIntoView(n,r){return n.__demoMode||n.menuState!==0||n.activationTrigger===0?!1:this.isActive(n,r)},didButtonMove(n){return n.buttonPositionState.kind==="Moved"}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let n=this.state.id,r=rp.get(null);this.disposables.add(r.on(Wy.Push,i=>{!r.selectors.isTop(i,n)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>r.actions.push(n)),this.on(1,()=>r.actions.pop(n))}this.disposables.group(n=>{this.on(1,r=>{r.buttonElement&&(n.dispose(),n.add(T5(r.buttonElement,r.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:t,__demoMode:n=!1}){return new dp({id:t,__demoMode:n,menuState:n?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:nn.Nothing},buttonPositionState:Yc.Idle})}reduce(t,n){return Vo(n.type,j5,t,n)}}const v1=M.createContext(null);function fp(e){let t=M.useContext(v1);if(t===null){let n=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,x1),n}return t}function x1({id:e,__demoMode:t=!1}){let n=M.useMemo(()=>dp.new({id:e,__demoMode:t}),[]);return g1(()=>n.dispose()),n}let B5=M.Fragment;function V5(e,t){let n=M.useId(),{__demoMode:r=!1,...i}=e,s=x1({id:n,__demoMode:r}),[o,a,l]=Er(s,E=>[E.menuState,E.itemsElement,E.buttonElement]),c=Ri(t),d=rp.get(null),g=Er(d,M.useCallback(E=>d.selectors.isTop(E,n),[d,n]));CI(g,[l,a],(E,k)=>{var u;s.send({type:jt.CloseMenu}),sp(k,ip.Loose)||(E.preventDefault(),(u=s.state.buttonElement)==null||u.focus())});let b=Tt(()=>{s.send({type:jt.CloseMenu})}),x=Bo({open:o===Mn.Open,close:b}),w={ref:c},C=mr();return M.createElement(m5,null,M.createElement(v1.Provider,{value:s},M.createElement(y5,{value:Vo(o,{[Mn.Open]:el.Open,[Mn.Closed]:el.Closed})},C({ourProps:w,theirProps:i,slot:x,defaultTag:B5,name:"Menu"}))))}let z5="button";function H5(e,t){let n=fp("Menu.Button"),r=M.useId(),{id:i=`headlessui-menu-button-${r}`,disabled:s=!1,autoFocus:o=!1,...a}=e,l=M.useRef(null),c=h5(),d=Ri(t,l,f5(),Tt(A=>n.send({type:jt.SetButtonElement,element:A}))),g=Tt(A=>{switch(A.key){case yn.Space:case yn.Enter:case yn.ArrowDown:A.preventDefault(),A.stopPropagation(),n.send({type:jt.OpenMenu,focus:{focus:nn.First}});break;case yn.ArrowUp:A.preventDefault(),A.stopPropagation(),n.send({type:jt.OpenMenu,focus:{focus:nn.Last}});break}}),b=Tt(A=>{switch(A.key){case yn.Space:A.preventDefault();break}}),[x,w,C]=Er(n,A=>[A.menuState,A.buttonElement,A.itemsElement]),E=x===Mn.Open;II(E,{trigger:w,action:M.useCallback(A=>{if(w!=null&&w.contains(A.target))return ec.Ignore;let R=A.target.closest('[role="menuitem"]:not([data-disabled])');return Mi(R)?ec.Select(R):C!=null&&C.contains(A.target)?ec.Ignore:ec.Close},[w,C]),close:M.useCallback(()=>n.send({type:jt.CloseMenu}),[]),select:M.useCallback(A=>A.click(),[])});let k=qE(A=>{var R;s||(x===Mn.Open?(Ur.flushSync(()=>n.send({type:jt.CloseMenu})),(R=l.current)==null||R.focus({preventScroll:!0})):(A.preventDefault(),n.send({type:jt.OpenMenu,focus:{focus:nn.Nothing},trigger:Cu.Pointer})))}),{isFocusVisible:u,focusProps:v}=xE({autoFocus:o}),{isHovered:f,hoverProps:p}=vE({isDisabled:s}),{pressed:y,pressProps:h}=IE({disabled:s}),_=Bo({open:x===Mn.Open,active:y||x===Mn.Open,disabled:s,hover:f,focus:u,autofocus:o}),I=Ny(c(),{ref:d,id:i,type:kI(e,l.current),"aria-haspopup":"menu","aria-controls":C==null?void 0:C.id,"aria-expanded":x===Mn.Open,disabled:s||void 0,autoFocus:o,onKeyDown:g,onKeyUp:b},k,v,p,h);return mr()({ourProps:I,theirProps:a,slot:_,defaultTag:z5,name:"Menu.Button"})}let G5="div",W5=Sh.RenderStrategy|Sh.Static;function $5(e,t){let n=M.useId(),{id:r=`headlessui-menu-items-${n}`,anchor:i,portal:s=!1,modal:o=!0,transition:a=!1,...l}=e,c=d5(i),d=fp("Menu.Items"),[g,b]=p5(c),x=g5(),[w,C]=M.useState(null),E=Ri(t,c?g:null,Tt(L=>d.send({type:jt.SetItemsElement,element:L})),C),[k,u]=Er(d,L=>[L.menuState,L.buttonElement]),v=Mh(u),f=Mh(w);c&&(s=!0);let p=x5(),[y,h]=BI(a,w,p!==null?(p&el.Open)===el.Open:k===Mn.Open);uI(y,u,()=>{d.send({type:jt.CloseMenu})});let _=Er(d,L=>L.__demoMode),I=_?!1:o&&k===Mn.Open;OI(I,f);let A=_?!1:o&&k===Mn.Open;cI(A,{allowed:M.useCallback(()=>[u,w],[u,w])});let R=Er(d,d.selectors.didButtonMove)?!1:y;M.useEffect(()=>{let L=w;L&&k===Mn.Open&&(CE(L)||L.focus({preventScroll:!0}))},[k,w]),WI(k===Mn.Open,{container:w,accept(L){return L.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:L.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(L){L.setAttribute("role","none")}});let D=El(),B=Tt(L=>{var G,$,Z;switch(D.dispose(),L.key){case yn.Space:if(d.state.searchQuery!=="")return L.preventDefault(),L.stopPropagation(),d.send({type:jt.Search,value:L.key});case yn.Enter:if(L.preventDefault(),L.stopPropagation(),d.state.activeItemIndex!==null){let{dataRef:U}=d.state.items[d.state.activeItemIndex];($=(G=U.current)==null?void 0:G.domRef.current)==null||$.click()}d.send({type:jt.CloseMenu}),Zy(d.state.buttonElement);break;case yn.ArrowDown:return L.preventDefault(),L.stopPropagation(),d.send({type:jt.GoToItem,focus:nn.Next});case yn.ArrowUp:return L.preventDefault(),L.stopPropagation(),d.send({type:jt.GoToItem,focus:nn.Previous});case yn.Home:case yn.PageUp:return L.preventDefault(),L.stopPropagation(),d.send({type:jt.GoToItem,focus:nn.First});case yn.End:case yn.PageDown:return L.preventDefault(),L.stopPropagation(),d.send({type:jt.GoToItem,focus:nn.Last});case yn.Escape:L.preventDefault(),L.stopPropagation(),Ur.flushSync(()=>d.send({type:jt.CloseMenu})),(Z=d.state.buttonElement)==null||Z.focus({preventScroll:!0});break;case yn.Tab:L.preventDefault(),L.stopPropagation(),Ur.flushSync(()=>d.send({type:jt.CloseMenu})),xI(d.state.buttonElement,L.shiftKey?Ah.Previous:Ah.Next);break;default:L.key.length===1&&(d.send({type:jt.Search,value:L.key}),D.setTimeout(()=>d.send({type:jt.ClearSearch}),350));break}}),N=Tt(L=>{switch(L.key){case yn.Space:L.preventDefault();break}}),F=Bo({open:k===Mn.Open}),j=Ny(c?x():{},{"aria-activedescendant":Er(d,d.selectors.activeDescendantId),"aria-labelledby":Er(d,L=>{var G;return(G=L.buttonElement)==null?void 0:G.id}),id:r,onKeyDown:B,onKeyUp:N,role:"menu",tabIndex:k===Mn.Open?0:void 0,ref:E,style:{...l.style,...b,"--button-width":JE(y,u,!0).width},...jI(h)}),H=mr();return M.createElement(N5,{enabled:s?e.static||y:!1,ownerDocument:v},H({ourProps:j,theirProps:l,slot:F,defaultTag:G5,features:W5,visible:R,name:"Menu.Items"}))}let X5=M.Fragment;function Y5(e,t){let n=M.useId(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...s}=e,o=fp("Menu.Item"),a=Er(o,R=>o.selectors.isActive(R,r)),l=M.useRef(null),c=Ri(t,l),d=Er(o,R=>o.selectors.shouldScrollIntoView(R,r));wn(()=>{if(d)return Zn().requestAnimationFrame(()=>{var R,D;(D=(R=l.current)==null?void 0:R.scrollIntoView)==null||D.call(R,{block:"nearest"})})},[d,l]);let g=D5(l),b=M.useRef({disabled:i,domRef:l,get textValue(){return g()}});wn(()=>{b.current.disabled=i},[b,i]),wn(()=>(o.actions.registerItem(r,b),()=>o.actions.unregisterItem(r)),[b,r]);let x=Tt(()=>{o.send({type:jt.CloseMenu})}),w=Tt(R=>{if(i)return R.preventDefault();o.send({type:jt.CloseMenu}),Zy(o.state.buttonElement)}),C=Tt(()=>{if(i)return o.send({type:jt.GoToItem,focus:nn.Nothing});o.send({type:jt.GoToItem,focus:nn.Specific,id:r})}),E=DI(),k=Tt(R=>E.update(R)),u=Tt(R=>{E.wasMoved(R)&&(i||a||o.send({type:jt.GoToItem,focus:nn.Specific,id:r,trigger:Cu.Pointer}))}),v=Tt(R=>{E.wasMoved(R)&&(i||a&&o.state.activationTrigger===Cu.Pointer&&o.send({type:jt.GoToItem,focus:nn.Nothing}))}),[f,p]=jy(),[y,h]=HE(),_=Bo({active:a,focus:a,disabled:i,close:x}),I={id:r,ref:c,role:"menuitem",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-labelledby":f,"aria-describedby":y,disabled:void 0,onClick:w,onFocus:C,onPointerEnter:k,onMouseEnter:k,onPointerMove:u,onMouseMove:u,onPointerLeave:v,onMouseLeave:v},A=mr();return M.createElement(p,null,M.createElement(h,null,A({ourProps:I,theirProps:s,slot:_,defaultTag:X5,name:"Menu.Item"})))}let Z5="div";function U5(e,t){let[n,r]=jy(),i=e,s={ref:t,"aria-labelledby":n,role:"group"},o=mr();return M.createElement(r,null,o({ourProps:s,theirProps:i,slot:{},defaultTag:Z5,name:"Menu.Section"}))}let J5="header";function q5(e,t){let n=M.useId(),{id:r=`headlessui-menu-heading-${n}`,...i}=e,s=np();wn(()=>s.register(r),[r,s.register]);let o={id:r,ref:t,role:"presentation",...s.props};return mr()({ourProps:o,theirProps:i,slot:{},defaultTag:J5,name:"Menu.Heading"})}let K5="div";function Q5(e,t){let n=e,r={ref:t,role:"separator"};return mr()({ourProps:r,theirProps:n,slot:{},defaultTag:K5,name:"Menu.Separator"})}let eA=br(V5),y1=br(H5),_1=br($5),w1=br(Y5),tA=br(U5),nA=br(q5),rA=br(Q5),iA=Object.assign(eA,{Button:y1,Items:_1,Item:w1,Section:tA,Heading:nA,Separator:rA});const sA=({menuButton:e,menuItems:t})=>{const[n,r]=M.useState(),[i,s]=M.useState(!1),o=a=>{const l=a.currentTarget.getBoundingClientRect(),c=160,g=window.innerWidth-l.right,b={top:l.bottom+window.scrollY};g>=c?b.left=l.left+window.scrollX:b.right=g+window.scrollX,r(b),s(!0)};return M.useEffect(()=>{const a=()=>s(!1);return window.addEventListener("scroll",a,!0),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}},[]),O.jsxs(iA,{as:"div","data-open":i,className:"relative",children:[O.jsx(y1,{"data-testid":"dropdown-menu-button",onClick:o,className:"headlessui-menu-button",children:e}),i&&n&&O.jsx(_1,{className:"fixed min-w-30 shadow-lg rounded-md z-40 overflow-hidden",style:{top:`${n.top}px`,left:n.left!==void 0?`${n.left}px`:"auto",right:n.right!==void 0?`${n.right}px`:"auto",backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:t.map(({label:a,icon:l,action:c,disabled:d=!1},g)=>O.jsx(w1,{disabled:d,children:({close:b})=>O.jsxs("button",{"data-testid":`dropdown-menu-item-${a.toLowerCase().replace(/\s+/g,"-")}`,onClick:()=>{d||(c(),b(),s(!1))},disabled:d,className:`w-full px-4 py-2 text-xs text-left flex items-center gap-2 transition-colors ${d?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,style:{color:"var(--text-color)"},onMouseEnter:x=>{d||(x.currentTarget.style.backgroundColor="var(--hover-bg-color)")},onMouseLeave:x=>{x.currentTarget.style.backgroundColor="transparent"},children:[l,a]})},g))})]})};function js(e){"@babel/helpers - typeof";return js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},js(e)}function oA(e,t){if(js(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(js(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C1(e){var t=oA(e,"string");return js(t)=="symbol"?t:t+""}function va(e,t,n){return(t=C1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N0(Object(n),!0).forEach(function(r){va(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aA(e){if(Array.isArray(e))return e}function lA(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function Th(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function S1(e,t){if(e){if(typeof e=="string")return Th(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Th(e,t):void 0}}function cA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
22
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ci(e,t){return aA(e)||lA(e,t)||S1(e,t)||cA()}function uA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ei(e,t){if(e==null)return{};var n,r,i=uA(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var dA=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function E1(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,s=e.defaultValue,o=s===void 0?null:s,a=e.inputValue,l=e.menuIsOpen,c=e.onChange,d=e.onInputChange,g=e.onMenuClose,b=e.onMenuOpen,x=e.value,w=ei(e,dA),C=M.useState(a!==void 0?a:n),E=Ci(C,2),k=E[0],u=E[1],v=M.useState(l!==void 0?l:i),f=Ci(v,2),p=f[0],y=f[1],h=M.useState(x!==void 0?x:o),_=Ci(h,2),I=_[0],A=_[1],R=M.useCallback(function(L,G){typeof c=="function"&&c(L,G),A(L)},[c]),D=M.useCallback(function(L,G){var $;typeof d=="function"&&($=d(L,G)),u($!==void 0?$:L)},[d]),B=M.useCallback(function(){typeof b=="function"&&b(),y(!0)},[b]),N=M.useCallback(function(){typeof g=="function"&&g(),y(!1)},[g]),F=a!==void 0?a:k,j=l!==void 0?l:p,H=x!==void 0?x:I;return Ge(Ge({},w),{},{inputValue:F,menuIsOpen:j,onChange:R,onInputChange:D,onMenuClose:N,onMenuOpen:B,value:H})}function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$e.apply(null,arguments)}function fA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C1(r.key),r)}}function hA(e,t,n){return t&&T0(e.prototype,t),n&&T0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oh(e,t){return Oh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Oh(e,t)}function gA(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oh(e,t)}function Su(e){return Su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Su(e)}function I1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(I1=function(){return!!e})()}function pA(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mA(e,t){if(t&&(js(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pA(e)}function bA(e){var t=I1();return function(){var n,r=Su(e);if(t){var i=Su(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mA(this,n)}}function vA(e){if(Array.isArray(e))return Th(e)}function xA(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yA(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
23
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vo(e){return vA(e)||xA(e)||S1(e)||yA()}function _A(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function wA(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var CA=function(){function e(n){var r=this;this._insertTag=function(i){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,s),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(wA(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var s=_A(i);try{s.insertRule(r,s.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),kn="-ms-",Eu="-moz-",St="-webkit-",k1="comm",hp="rule",gp="decl",SA="@import",A1="@keyframes",EA="@layer",IA=Math.abs,yd=String.fromCharCode,kA=Object.assign;function AA(e,t){return _n(e,0)^45?(((t<<2^_n(e,0))<<2^_n(e,1))<<2^_n(e,2))<<2^_n(e,3):0}function M1(e){return e.trim()}function MA(e,t){return(e=t.exec(e))?e[0]:e}function Et(e,t,n){return e.replace(t,n)}function Dh(e,t){return e.indexOf(t)}function _n(e,t){return e.charCodeAt(t)|0}function tl(e,t,n){return e.slice(t,n)}function Vr(e){return e.length}function pp(e){return e.length}function rc(e,t){return t.push(e),e}function RA(e,t){return e.map(t).join("")}var _d=1,Io=1,R1=0,Yn=0,rn=0,Wo="";function wd(e,t,n,r,i,s,o){return{value:e,root:t,parent:n,type:r,props:i,children:s,line:_d,column:Io,length:o,return:""}}function na(e,t){return kA(wd("",null,null,"",null,null,0),e,{length:-e.length},t)}function PA(){return rn}function NA(){return rn=Yn>0?_n(Wo,--Yn):0,Io--,rn===10&&(Io=1,_d--),rn}function Qn(){return rn=Yn<R1?_n(Wo,Yn++):0,Io++,rn===10&&(Io=1,_d++),rn}function $r(){return _n(Wo,Yn)}function Zc(){return Yn}function Rl(e,t){return tl(Wo,e,t)}function nl(e){switch(e){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 P1(e){return _d=Io=1,R1=Vr(Wo=e),Yn=0,[]}function N1(e){return Wo="",e}function Uc(e){return M1(Rl(Yn-1,Fh(e===91?e+2:e===40?e+1:e)))}function TA(e){for(;(rn=$r())&&rn<33;)Qn();return nl(e)>2||nl(rn)>3?"":" "}function OA(e,t){for(;--t&&Qn()&&!(rn<48||rn>102||rn>57&&rn<65||rn>70&&rn<97););return Rl(e,Zc()+(t<6&&$r()==32&&Qn()==32))}function Fh(e){for(;Qn();)switch(rn){case e:return Yn;case 34:case 39:e!==34&&e!==39&&Fh(rn);break;case 40:e===41&&Fh(e);break;case 92:Qn();break}return Yn}function DA(e,t){for(;Qn()&&e+rn!==57;)if(e+rn===84&&$r()===47)break;return"/*"+Rl(t,Yn-1)+"*"+yd(e===47?e:Qn())}function FA(e){for(;!nl($r());)Qn();return Rl(e,Yn)}function LA(e){return N1(Jc("",null,null,null,[""],e=P1(e),0,[0],e))}function Jc(e,t,n,r,i,s,o,a,l){for(var c=0,d=0,g=o,b=0,x=0,w=0,C=1,E=1,k=1,u=0,v="",f=i,p=s,y=r,h=v;E;)switch(w=u,u=Qn()){case 40:if(w!=108&&_n(h,g-1)==58){Dh(h+=Et(Uc(u),"&","&\f"),"&\f")!=-1&&(k=-1);break}case 34:case 39:case 91:h+=Uc(u);break;case 9:case 10:case 13:case 32:h+=TA(w);break;case 92:h+=OA(Zc()-1,7);continue;case 47:switch($r()){case 42:case 47:rc(jA(DA(Qn(),Zc()),t,n),l);break;default:h+="/"}break;case 123*C:a[c++]=Vr(h)*k;case 125*C:case 59:case 0:switch(u){case 0:case 125:E=0;case 59+d:k==-1&&(h=Et(h,/\f/g,"")),x>0&&Vr(h)-g&&rc(x>32?D0(h+";",r,n,g-1):D0(Et(h," ","")+";",r,n,g-2),l);break;case 59:h+=";";default:if(rc(y=O0(h,t,n,c,d,i,a,v,f=[],p=[],g),s),u===123)if(d===0)Jc(h,t,y,y,f,s,g,a,p);else switch(b===99&&_n(h,3)===110?100:b){case 100:case 108:case 109:case 115:Jc(e,y,y,r&&rc(O0(e,y,y,0,0,i,a,v,i,f=[],g),p),i,p,g,a,r?f:p);break;default:Jc(h,y,y,y,[""],p,0,a,p)}}c=d=x=0,C=k=1,v=h="",g=o;break;case 58:g=1+Vr(h),x=w;default:if(C<1){if(u==123)--C;else if(u==125&&C++==0&&NA()==125)continue}switch(h+=yd(u),u*C){case 38:k=d>0?1:(h+="\f",-1);break;case 44:a[c++]=(Vr(h)-1)*k,k=1;break;case 64:$r()===45&&(h+=Uc(Qn())),b=$r(),d=g=Vr(v=h+=FA(Zc())),u++;break;case 45:w===45&&Vr(h)==2&&(C=0)}}return s}function O0(e,t,n,r,i,s,o,a,l,c,d){for(var g=i-1,b=i===0?s:[""],x=pp(b),w=0,C=0,E=0;w<r;++w)for(var k=0,u=tl(e,g+1,g=IA(C=o[w])),v=e;k<x;++k)(v=M1(C>0?b[k]+" "+u:Et(u,/&\f/g,b[k])))&&(l[E++]=v);return wd(e,t,n,i===0?hp:a,l,c,d)}function jA(e,t,n){return wd(e,t,n,k1,yd(PA()),tl(e,2,-2),0)}function D0(e,t,n,r){return wd(e,t,n,gp,tl(e,0,r),tl(e,r+1,-1),r)}function xo(e,t){for(var n="",r=pp(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function BA(e,t,n,r){switch(e.type){case EA:if(e.children.length)break;case SA:case gp:return e.return=e.return||e.value;case k1:return"";case A1:return e.return=e.value+"{"+xo(e.children,r)+"}";case hp:e.value=e.props.join(",")}return Vr(n=xo(e.children,r))?e.return=e.value+"{"+n+"}":""}function VA(e){var t=pp(e);return function(n,r,i,s){for(var o="",a=0;a<t;a++)o+=e[a](n,r,i,s)||"";return o}}function zA(e){return function(t){t.root||(t=t.return)&&e(t)}}function HA(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var GA=function(t,n,r){for(var i=0,s=0;i=s,s=$r(),i===38&&s===12&&(n[r]=1),!nl(s);)Qn();return Rl(t,Yn)},WA=function(t,n){var r=-1,i=44;do switch(nl(i)){case 0:i===38&&$r()===12&&(n[r]=1),t[r]+=GA(Yn-1,n,r);break;case 2:t[r]+=Uc(i);break;case 4:if(i===44){t[++r]=$r()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=yd(i)}while(i=Qn());return t},$A=function(t,n){return N1(WA(P1(t),n))},F0=new WeakMap,XA=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!F0.get(r))&&!i){F0.set(t,!0);for(var s=[],o=$A(n,s),a=r.props,l=0,c=0;l<o.length;l++)for(var d=0;d<a.length;d++,c++)t.props[c]=s[l]?o[l].replace(/&\f/g,a[d]):a[d]+" "+o[l]}}},YA=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function T1(e,t){switch(AA(e,t)){case 5103:return St+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return St+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return St+e+Eu+e+kn+e+e;case 6828:case 4268:return St+e+kn+e+e;case 6165:return St+e+kn+"flex-"+e+e;case 5187:return St+e+Et(e,/(\w+).+(:[^]+)/,St+"box-$1$2"+kn+"flex-$1$2")+e;case 5443:return St+e+kn+"flex-item-"+Et(e,/flex-|-self/,"")+e;case 4675:return St+e+kn+"flex-line-pack"+Et(e,/align-content|flex-|-self/,"")+e;case 5548:return St+e+kn+Et(e,"shrink","negative")+e;case 5292:return St+e+kn+Et(e,"basis","preferred-size")+e;case 6060:return St+"box-"+Et(e,"-grow","")+St+e+kn+Et(e,"grow","positive")+e;case 4554:return St+Et(e,/([^-])(transform)/g,"$1"+St+"$2")+e;case 6187:return Et(Et(Et(e,/(zoom-|grab)/,St+"$1"),/(image-set)/,St+"$1"),e,"")+e;case 5495:case 3959:return Et(e,/(image-set\([^]*)/,St+"$1$`$1");case 4968:return Et(Et(e,/(.+:)(flex-)?(.*)/,St+"box-pack:$3"+kn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+St+e+e;case 4095:case 3583:case 4068:case 2532:return Et(e,/(.+)-inline(.+)/,St+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Vr(e)-1-t>6)switch(_n(e,t+1)){case 109:if(_n(e,t+4)!==45)break;case 102:return Et(e,/(.+:)(.+)-([^]+)/,"$1"+St+"$2-$3$1"+Eu+(_n(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Dh(e,"stretch")?T1(Et(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(_n(e,t+1)!==115)break;case 6444:switch(_n(e,Vr(e)-3-(~Dh(e,"!important")&&10))){case 107:return Et(e,":",":"+St)+e;case 101:return Et(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+St+(_n(e,14)===45?"inline-":"")+"box$3$1"+St+"$2$3$1"+kn+"$2box$3")+e}break;case 5936:switch(_n(e,t+11)){case 114:return St+e+kn+Et(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return St+e+kn+Et(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return St+e+kn+Et(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return St+e+kn+e+e}return e}var ZA=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case gp:t.return=T1(t.value,t.length);break;case A1:return xo([na(t,{value:Et(t.value,"@","@"+St)})],i);case hp:if(t.length)return RA(t.props,function(s){switch(MA(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return xo([na(t,{props:[Et(s,/:(read-\w+)/,":"+Eu+"$1")]})],i);case"::placeholder":return xo([na(t,{props:[Et(s,/:(plac\w+)/,":"+St+"input-$1")]}),na(t,{props:[Et(s,/:(plac\w+)/,":"+Eu+"$1")]}),na(t,{props:[Et(s,/:(plac\w+)/,kn+"input-$1")]})],i)}return""})}},UA=[ZA],JA=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(C){var E=C.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(C),C.setAttribute("data-s",""))})}var i=t.stylisPlugins||UA,s={},o,a=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(C){for(var E=C.getAttribute("data-emotion").split(" "),k=1;k<E.length;k++)s[E[k]]=!0;a.push(C)});var l,c=[XA,YA];{var d,g=[BA,zA(function(C){d.insert(C)})],b=VA(c.concat(i,g)),x=function(E){return xo(LA(E),b)};l=function(E,k,u,v){d=u,x(E?E+"{"+k.styles+"}":k.styles),v&&(w.inserted[k.name]=!0)}}var w={key:n,sheet:new CA({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:l};return w.sheet.hydrate(a),w},Lh={exports:{}},At={};/** @license React v16.13.1
24
- * react-is.production.min.js
25
- *
26
- * Copyright (c) Facebook, Inc. and its affiliates.
27
- *
28
- * This source code is licensed under the MIT license found in the
29
- * LICENSE file in the root directory of this source tree.
30
- */var L0;function qA(){if(L0)return At;L0=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,w=e?Symbol.for("react.lazy"):60116,C=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,u=e?Symbol.for("react.scope"):60119;function v(p){if(typeof p=="object"&&p!==null){var y=p.$$typeof;switch(y){case t:switch(p=p.type,p){case l:case c:case r:case s:case i:case g:return p;default:switch(p=p&&p.$$typeof,p){case a:case d:case w:case x:case o:return p;default:return y}}case n:return y}}}function f(p){return v(p)===c}return At.AsyncMode=l,At.ConcurrentMode=c,At.ContextConsumer=a,At.ContextProvider=o,At.Element=t,At.ForwardRef=d,At.Fragment=r,At.Lazy=w,At.Memo=x,At.Portal=n,At.Profiler=s,At.StrictMode=i,At.Suspense=g,At.isAsyncMode=function(p){return f(p)||v(p)===l},At.isConcurrentMode=f,At.isContextConsumer=function(p){return v(p)===a},At.isContextProvider=function(p){return v(p)===o},At.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},At.isForwardRef=function(p){return v(p)===d},At.isFragment=function(p){return v(p)===r},At.isLazy=function(p){return v(p)===w},At.isMemo=function(p){return v(p)===x},At.isPortal=function(p){return v(p)===n},At.isProfiler=function(p){return v(p)===s},At.isStrictMode=function(p){return v(p)===i},At.isSuspense=function(p){return v(p)===g},At.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===c||p===s||p===i||p===g||p===b||typeof p=="object"&&p!==null&&(p.$$typeof===w||p.$$typeof===x||p.$$typeof===o||p.$$typeof===a||p.$$typeof===d||p.$$typeof===E||p.$$typeof===k||p.$$typeof===u||p.$$typeof===C)},At.typeOf=v,At}var Mt={};/** @license React v16.13.1
31
- * react-is.development.js
32
- *
33
- * Copyright (c) Facebook, Inc. and its affiliates.
34
- *
35
- * This source code is licensed under the MIT license found in the
36
- * LICENSE file in the root directory of this source tree.
37
- */var j0;function KA(){return j0||(j0=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,w=e?Symbol.for("react.lazy"):60116,C=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,k=e?Symbol.for("react.responder"):60118,u=e?Symbol.for("react.scope"):60119;function v(re){return typeof re=="string"||typeof re=="function"||re===r||re===c||re===s||re===i||re===g||re===b||typeof re=="object"&&re!==null&&(re.$$typeof===w||re.$$typeof===x||re.$$typeof===o||re.$$typeof===a||re.$$typeof===d||re.$$typeof===E||re.$$typeof===k||re.$$typeof===u||re.$$typeof===C)}function f(re){if(typeof re=="object"&&re!==null){var ge=re.$$typeof;switch(ge){case t:var ne=re.type;switch(ne){case l:case c:case r:case s:case i:case g:return ne;default:var he=ne&&ne.$$typeof;switch(he){case a:case d:case w:case x:case o:return he;default:return ge}}case n:return ge}}}var p=l,y=c,h=a,_=o,I=t,A=d,R=r,D=w,B=x,N=n,F=s,j=i,H=g,L=!1;function G(re){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(re)||f(re)===l}function $(re){return f(re)===c}function Z(re){return f(re)===a}function U(re){return f(re)===o}function ee(re){return typeof re=="object"&&re!==null&&re.$$typeof===t}function se(re){return f(re)===d}function ie(re){return f(re)===r}function fe(re){return f(re)===w}function Se(re){return f(re)===x}function ve(re){return f(re)===n}function xe(re){return f(re)===s}function Y(re){return f(re)===i}function le(re){return f(re)===g}Mt.AsyncMode=p,Mt.ConcurrentMode=y,Mt.ContextConsumer=h,Mt.ContextProvider=_,Mt.Element=I,Mt.ForwardRef=A,Mt.Fragment=R,Mt.Lazy=D,Mt.Memo=B,Mt.Portal=N,Mt.Profiler=F,Mt.StrictMode=j,Mt.Suspense=H,Mt.isAsyncMode=G,Mt.isConcurrentMode=$,Mt.isContextConsumer=Z,Mt.isContextProvider=U,Mt.isElement=ee,Mt.isForwardRef=se,Mt.isFragment=ie,Mt.isLazy=fe,Mt.isMemo=Se,Mt.isPortal=ve,Mt.isProfiler=xe,Mt.isStrictMode=Y,Mt.isSuspense=le,Mt.isValidElementType=v,Mt.typeOf=f}()),Mt}process.env.NODE_ENV==="production"?Lh.exports=qA():Lh.exports=KA();var QA=Lh.exports,O1=QA,e3={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},t3={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},D1={};D1[O1.ForwardRef]=e3;D1[O1.Memo]=t3;var n3=!0;function r3(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var F1=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||n3===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},i3=function(t,n,r){F1(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+i:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function s3(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var o3={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},a3=/[A-Z]|^ms/g,l3=/_EMO_([^_]+?)_([^]*?)_EMO_/g,L1=function(t){return t.charCodeAt(1)===45},B0=function(t){return t!=null&&typeof t!="boolean"},wf=HA(function(e){return L1(e)?e:e.replace(a3,"-$&").toLowerCase()}),V0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(l3,function(r,i,s){return zr={name:i,styles:s,next:zr},i})}return o3[t]!==1&&!L1(t)&&typeof n=="number"&&n!==0?n+"px":n};function rl(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return zr={name:i.name,styles:i.styles,next:zr},i.name;var s=n;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)zr={name:o.name,styles:o.styles,next:zr},o=o.next;var a=s.styles+";";return a}return c3(e,t,n)}case"function":{if(e!==void 0){var l=zr,c=n(e);return zr=l,rl(e,t,c)}break}}var d=n;return d}function c3(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=rl(e,t,n[i])+";";else for(var s in n){var o=n[s];if(typeof o!="object"){var a=o;B0(a)&&(r+=wf(s)+":"+V0(s,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var l=0;l<o.length;l++)B0(o[l])&&(r+=wf(s)+":"+V0(s,o[l])+";");else{var c=rl(e,t,o);switch(s){case"animation":case"animationName":{r+=wf(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var z0=/label:\s*([^\s;{]+)\s*(;|$)/g,zr;function j1(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";zr=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,i+=rl(n,t,s);else{var o=s;i+=o[0]}for(var a=1;a<e.length;a++)if(i+=rl(n,t,e[a]),r){var l=s;i+=l[a]}z0.lastIndex=0;for(var c="",d;(d=z0.exec(i))!==null;)c+="-"+d[1];var g=s3(i)+c;return{name:g,styles:i,next:zr}}var u3=function(t){return t()},d3=we.useInsertionEffect?we.useInsertionEffect:!1,f3=d3||u3,B1=we.createContext(typeof HTMLElement<"u"?JA({key:"css"}):null);B1.Provider;var h3=function(t){return M.forwardRef(function(n,r){var i=M.useContext(B1);return t(n,i,r)})},g3=we.createContext({}),mp={}.hasOwnProperty,jh="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",p3=function(t,n){var r={};for(var i in n)mp.call(n,i)&&(r[i]=n[i]);return r[jh]=t,r},m3=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return F1(n,r,i),f3(function(){return i3(n,r,i)}),null},b3=h3(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[jh],s=[r],o="";typeof e.className=="string"?o=r3(t.registered,s,e.className):e.className!=null&&(o=e.className+" ");var a=j1(s,void 0,we.useContext(g3));o+=t.key+"-"+a.name;var l={};for(var c in e)mp.call(e,c)&&c!=="css"&&c!==jh&&(l[c]=e[c]);return l.className=o,n&&(l.ref=n),we.createElement(we.Fragment,null,we.createElement(m3,{cache:t,serialized:a,isStringTag:typeof i=="string"}),we.createElement(i,l))}),v3=b3,ze=function(t,n){var r=arguments;if(n==null||!mp.call(n,"css"))return we.createElement.apply(void 0,r);var i=r.length,s=new Array(i);s[0]=v3,s[1]=p3(t,n);for(var o=2;o<i;o++)s[o]=r[o];return we.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(ze||(ze={}));function bp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return j1(t)}function x3(){var e=bp.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function y3(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Bh=M.useLayoutEffect,_3=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Iu=function(){};function w3(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function C3(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var s=[].concat(r);if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&s.push("".concat(w3(e,o)));return s.filter(function(a){return a}).map(function(a){return String(a).trim()}).join(" ")}var ku=function(t){return N3(t)?t.filter(Boolean):js(t)==="object"&&t!==null?[t]:[]},V1=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=ei(t,_3);return Ge({},n)},Kt=function(t,n,r){var i=t.cx,s=t.getStyles,o=t.getClassNames,a=t.className;return{css:s(n,t),className:i(r??{},o(n,t),a)}};function Cd(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function S3(e){return Cd(e)?window.innerHeight:e.clientHeight}function z1(e){return Cd(e)?window.pageYOffset:e.scrollTop}function Au(e,t){if(Cd(e)){window.scrollTo(0,t);return}e.scrollTop=t}function E3(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function I3(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ic(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Iu,i=z1(e),s=t-i,o=10,a=0;function l(){a+=o;var c=I3(a,i,s,n);Au(e,c),a<n?window.requestAnimationFrame(l):r(e)}l()}function H0(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?Au(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&Au(e,Math.max(t.offsetTop-i,0))}function k3(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function G0(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function A3(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var H1=!1,M3={get passive(){return H1=!0}},sc=typeof window<"u"?window:{};sc.addEventListener&&sc.removeEventListener&&(sc.addEventListener("p",Iu,M3),sc.removeEventListener("p",Iu,!1));var R3=H1;function P3(e){return e!=null}function N3(e){return Array.isArray(e)}function xa(e,t,n){return e?t:n}var T3=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var s=Object.entries(t).filter(function(o){var a=Ci(o,1),l=a[0];return!r.includes(l)});return s.reduce(function(o,a){var l=Ci(a,2),c=l[0],d=l[1];return o[c]=d,o},{})},O3=["children","innerProps"],D3=["children","innerProps"];function F3(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,s=e.shouldScroll,o=e.isFixedPosition,a=e.controlHeight,l=E3(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var d=l.getBoundingClientRect(),g=d.height,b=n.getBoundingClientRect(),x=b.bottom,w=b.height,C=b.top,E=n.offsetParent.getBoundingClientRect(),k=E.top,u=o?window.innerHeight:S3(l),v=z1(l),f=parseInt(getComputedStyle(n).marginBottom,10),p=parseInt(getComputedStyle(n).marginTop,10),y=k-p,h=u-C,_=y+v,I=g-v-C,A=x-u+v+f,R=v+C-p,D=160;switch(i){case"auto":case"bottom":if(h>=w)return{placement:"bottom",maxHeight:t};if(I>=w&&!o)return s&&ic(l,A,D),{placement:"bottom",maxHeight:t};if(!o&&I>=r||o&&h>=r){s&&ic(l,A,D);var B=o?h-f:I-f;return{placement:"bottom",maxHeight:B}}if(i==="auto"||o){var N=t,F=o?y:_;return F>=r&&(N=Math.min(F-f-a,t)),{placement:"top",maxHeight:N}}if(i==="bottom")return s&&Au(l,A),{placement:"bottom",maxHeight:t};break;case"top":if(y>=w)return{placement:"top",maxHeight:t};if(_>=w&&!o)return s&&ic(l,R,D),{placement:"top",maxHeight:t};if(!o&&_>=r||o&&y>=r){var j=t;return(!o&&_>=r||o&&y>=r)&&(j=o?y-p:_-p),s&&ic(l,R,D),{placement:"top",maxHeight:j}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function L3(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var G1=function(t){return t==="auto"?"bottom":t},j3=function(t,n){var r,i=t.placement,s=t.theme,o=s.borderRadius,a=s.spacing,l=s.colors;return Ge((r={label:"menu"},va(r,L3(i),"100%"),va(r,"position","absolute"),va(r,"width","100%"),va(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},W1=M.createContext(null),B3=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,s=t.menuPlacement,o=t.menuPosition,a=t.menuShouldScrollIntoView,l=t.theme,c=M.useContext(W1)||{},d=c.setPortalPlacement,g=M.useRef(null),b=M.useState(i),x=Ci(b,2),w=x[0],C=x[1],E=M.useState(null),k=Ci(E,2),u=k[0],v=k[1],f=l.spacing.controlHeight;return Bh(function(){var p=g.current;if(p){var y=o==="fixed",h=a&&!y,_=F3({maxHeight:i,menuEl:p,minHeight:r,placement:s,shouldScroll:h,isFixedPosition:y,controlHeight:f});C(_.maxHeight),v(_.placement),d==null||d(_.placement)}},[i,s,o,a,r,d,f]),n({ref:g,placerProps:Ge(Ge({},t),{},{placement:u||G1(s),maxHeight:w})})},V3=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return ze("div",$e({},Kt(t,"menu",{menu:!0}),{ref:r},i),n)},z3=V3,H3=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return Ge({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},G3=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,s=t.isMulti;return ze("div",$e({},Kt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:i},r),n)},$1=function(t,n){var r=t.theme,i=r.spacing.baseUnit,s=r.colors;return Ge({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},W3=$1,$3=$1,X3=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,s=ei(t,O3);return ze("div",$e({},Kt(Ge(Ge({},s),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},Y3=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,s=ei(t,D3);return ze("div",$e({},Kt(Ge(Ge({},s),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},Z3=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},U3=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,s=t.innerProps,o=t.menuPlacement,a=t.menuPosition,l=M.useRef(null),c=M.useRef(null),d=M.useState(G1(o)),g=Ci(d,2),b=g[0],x=g[1],w=M.useMemo(function(){return{setPortalPlacement:x}},[]),C=M.useState(null),E=Ci(C,2),k=E[0],u=E[1],v=M.useCallback(function(){if(i){var h=k3(i),_=a==="fixed"?0:window.pageYOffset,I=h[b]+_;(I!==(k==null?void 0:k.offset)||h.left!==(k==null?void 0:k.rect.left)||h.width!==(k==null?void 0:k.rect.width))&&u({offset:I,rect:h})}},[i,a,b,k==null?void 0:k.offset,k==null?void 0:k.rect.left,k==null?void 0:k.rect.width]);Bh(function(){v()},[v]);var f=M.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&l.current&&(c.current=l1(i,l.current,v,{elementResize:"ResizeObserver"in window}))},[i,v]);Bh(function(){f()},[f]);var p=M.useCallback(function(h){l.current=h,f()},[f]);if(!n&&a!=="fixed"||!k)return null;var y=ze("div",$e({ref:p},Kt(Ge(Ge({},t),{},{offset:k.offset,position:a,rect:k.rect}),"menuPortal",{"menu-portal":!0}),s),r);return ze(W1.Provider,{value:w},n?Ur.createPortal(y,n):y)},J3=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},q3=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,s=t.isRtl;return ze("div",$e({},Kt(t,"container",{"--is-disabled":i,"--is-rtl":s}),r),n)},K3=function(t,n){var r=t.theme.spacing,i=t.isMulti,s=t.hasValue,o=t.selectProps.controlShouldRenderValue;return Ge({alignItems:"center",display:i&&s&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},Q3=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,s=t.hasValue;return ze("div",$e({},Kt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":s}),r),n)},eM=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},tM=function(t){var n=t.children,r=t.innerProps;return ze("div",$e({},Kt(t,"indicatorsContainer",{indicators:!0}),r),n)},W0,nM=["size"],rM=["innerProps","isRtl","size"];function iM(){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)."}var sM=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:iM},X1=function(t){var n=t.size,r=ei(t,nM);return ze("svg",$e({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:sM},r))},vp=function(t){return ze(X1,$e({size:20},t),ze("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Y1=function(t){return ze(X1,$e({size:20},t),ze("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Z1=function(t,n){var r=t.isFocused,i=t.theme,s=i.spacing.baseUnit,o=i.colors;return Ge({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?o.neutral60:o.neutral20,padding:s*2,":hover":{color:r?o.neutral80:o.neutral40}})},oM=Z1,aM=function(t){var n=t.children,r=t.innerProps;return ze("div",$e({},Kt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ze(Y1,null))},lM=Z1,cM=function(t){var n=t.children,r=t.innerProps;return ze("div",$e({},Kt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ze(vp,null))},uM=function(t,n){var r=t.isDisabled,i=t.theme,s=i.spacing.baseUnit,o=i.colors;return Ge({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?o.neutral10:o.neutral20,marginBottom:s*2,marginTop:s*2})},dM=function(t){var n=t.innerProps;return ze("span",$e({},n,Kt(t,"indicatorSeparator",{"indicator-separator":!0})))},fM=x3(W0||(W0=y3([`
38
- 0%, 80%, 100% { opacity: 0; }
39
- 40% { opacity: 1; }
40
- `]))),hM=function(t,n){var r=t.isFocused,i=t.size,s=t.theme,o=s.colors,a=s.spacing.baseUnit;return Ge({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?o.neutral60:o.neutral20,padding:a*2})},Cf=function(t){var n=t.delay,r=t.offset;return ze("span",{css:bp({animation:"".concat(fM," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},gM=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,s=i===void 0?4:i,o=ei(t,rM);return ze("div",$e({},Kt(Ge(Ge({},o),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ze(Cf,{delay:0,offset:r}),ze(Cf,{delay:160,offset:!0}),ze(Cf,{delay:320,offset:!r}))},pM=function(t,n){var r=t.isDisabled,i=t.isFocused,s=t.theme,o=s.colors,a=s.borderRadius,l=s.spacing;return Ge({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?o.neutral5:o.neutral0,borderColor:r?o.neutral10:i?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:i?o.primary:o.neutral30}})},mM=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,s=t.innerRef,o=t.innerProps,a=t.menuIsOpen;return ze("div",$e({ref:s},Kt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":a}),o,{"aria-disabled":r||void 0}),n)},bM=mM,vM=["data"],xM=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},yM=function(t){var n=t.children,r=t.cx,i=t.getStyles,s=t.getClassNames,o=t.Heading,a=t.headingProps,l=t.innerProps,c=t.label,d=t.theme,g=t.selectProps;return ze("div",$e({},Kt(t,"group",{group:!0}),l),ze(o,$e({},a,{selectProps:g,theme:d,getStyles:i,getClassNames:s,cx:r}),c),ze("div",null,n))},_M=function(t,n){var r=t.theme,i=r.colors,s=r.spacing;return Ge({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},wM=function(t){var n=V1(t);n.data;var r=ei(n,vM);return ze("div",$e({},Kt(t,"groupHeading",{"group-heading":!0}),r))},CM=yM,SM=["innerRef","isDisabled","isHidden","inputClassName"],EM=function(t,n){var r=t.isDisabled,i=t.value,s=t.theme,o=s.spacing,a=s.colors;return Ge(Ge({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},IM),n?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:a.neutral80})},U1={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},IM={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ge({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},U1)},kM=function(t){return Ge({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},U1)},AM=function(t){var n=t.cx,r=t.value,i=V1(t),s=i.innerRef,o=i.isDisabled,a=i.isHidden,l=i.inputClassName,c=ei(i,SM);return ze("div",$e({},Kt(t,"input",{"input-container":!0}),{"data-value":r||""}),ze("input",$e({className:n({input:!0},l),ref:s,style:kM(a),disabled:o},c)))},MM=AM,RM=function(t,n){var r=t.theme,i=r.spacing,s=r.borderRadius,o=r.colors;return Ge({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:o.neutral10,borderRadius:s/2,margin:i.baseUnit/2})},PM=function(t,n){var r=t.theme,i=r.borderRadius,s=r.colors,o=t.cropWithEllipsis;return Ge({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},NM=function(t,n){var r=t.theme,i=r.spacing,s=r.borderRadius,o=r.colors,a=t.isFocused;return Ge({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:a?o.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},J1=function(t){var n=t.children,r=t.innerProps;return ze("div",r,n)},TM=J1,OM=J1;function DM(e){var t=e.children,n=e.innerProps;return ze("div",$e({role:"button"},n),t||ze(vp,{size:14}))}var FM=function(t){var n=t.children,r=t.components,i=t.data,s=t.innerProps,o=t.isDisabled,a=t.removeProps,l=t.selectProps,c=r.Container,d=r.Label,g=r.Remove;return ze(c,{data:i,innerProps:Ge(Ge({},Kt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),s),selectProps:l},ze(d,{data:i,innerProps:Ge({},Kt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),ze(g,{data:i,innerProps:Ge(Ge({},Kt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:l}))},LM=FM,jM=function(t,n){var r=t.isDisabled,i=t.isFocused,s=t.isSelected,o=t.theme,a=o.spacing,l=o.colors;return Ge({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:s?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?l.primary:l.primary50}})},BM=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,s=t.isSelected,o=t.innerRef,a=t.innerProps;return ze("div",$e({},Kt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":s}),{ref:o,"aria-disabled":r},a),n)},VM=BM,zM=function(t,n){var r=t.theme,i=r.spacing,s=r.colors;return Ge({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},HM=function(t){var n=t.children,r=t.innerProps;return ze("div",$e({},Kt(t,"placeholder",{placeholder:!0}),r),n)},GM=HM,WM=function(t,n){var r=t.isDisabled,i=t.theme,s=i.spacing,o=i.colors;return Ge({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?o.neutral40:o.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},$M=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return ze("div",$e({},Kt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},XM=$M,Cr={ClearIndicator:cM,Control:bM,DropdownIndicator:aM,DownChevron:Y1,CrossIcon:vp,Group:CM,GroupHeading:wM,IndicatorsContainer:tM,IndicatorSeparator:dM,Input:MM,LoadingIndicator:gM,Menu:z3,MenuList:G3,MenuPortal:U3,LoadingMessage:Y3,NoOptionsMessage:X3,MultiValue:LM,MultiValueContainer:TM,MultiValueLabel:OM,MultiValueRemove:DM,Option:VM,Placeholder:GM,SelectContainer:q3,SingleValue:XM,ValueContainer:Q3},YM=function(t){return Ge(Ge({},Cr),t.components)},$0=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function ZM(e,t){return!!(e===t||$0(e)&&$0(t))}function UM(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ZM(e[n],t[n]))return!1;return!0}function JM(e,t){t===void 0&&(t=UM);var n=null;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var o=e.apply(this,i);return n={lastResult:o,lastArgs:i,lastThis:this},o}return r.clear=function(){n=null},r}function qM(){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)."}var KM=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:qM},QM=function(t){return ze("span",$e({css:KM},t))},X0=QM,e6={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,s=t.context,o=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return o?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,s=t.labels,o=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return o?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,s=t.label,o=s===void 0?"":s,a=t.selectValue,l=t.isDisabled,c=t.isSelected,d=t.isAppleDevice,g=function(C,E){return C&&C.length?"".concat(C.indexOf(E)+1," of ").concat(C.length):""};if(n==="value"&&a)return"value ".concat(o," focused, ").concat(g(a,r),".");if(n==="menu"&&d){var b=l?" disabled":"",x="".concat(c?" selected":"").concat(b);return"".concat(o).concat(x,", ").concat(g(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},t6=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,s=t.focusableOptions,o=t.isFocused,a=t.selectValue,l=t.selectProps,c=t.id,d=t.isAppleDevice,g=l.ariaLiveMessages,b=l.getOptionLabel,x=l.inputValue,w=l.isMulti,C=l.isOptionDisabled,E=l.isSearchable,k=l.menuIsOpen,u=l.options,v=l.screenReaderStatus,f=l.tabSelectsValue,p=l.isLoading,y=l["aria-label"],h=l["aria-live"],_=M.useMemo(function(){return Ge(Ge({},e6),g||{})},[g]),I=M.useMemo(function(){var F="";if(n&&_.onChange){var j=n.option,H=n.options,L=n.removedValue,G=n.removedValues,$=n.value,Z=function(ve){return Array.isArray(ve)?null:ve},U=L||j||Z($),ee=U?b(U):"",se=H||G||void 0,ie=se?se.map(b):[],fe=Ge({isDisabled:U&&C(U,a),label:ee,labels:ie},n);F=_.onChange(fe)}return F},[n,_,C,a,b]),A=M.useMemo(function(){var F="",j=r||i,H=!!(r&&a&&a.includes(r));if(j&&_.onFocus){var L={focused:j,label:b(j),isDisabled:C(j,a),isSelected:H,options:s,context:j===r?"menu":"value",selectValue:a,isAppleDevice:d};F=_.onFocus(L)}return F},[r,i,b,C,_,s,a,d]),R=M.useMemo(function(){var F="";if(k&&u.length&&!p&&_.onFilter){var j=v({count:s.length});F=_.onFilter({inputValue:x,resultsMessage:j})}return F},[s,x,k,_,u,v,p]),D=(n==null?void 0:n.action)==="initial-input-focus",B=M.useMemo(function(){var F="";if(_.guidance){var j=i?"value":k?"menu":"input";F=_.guidance({"aria-label":y,context:j,isDisabled:r&&C(r,a),isMulti:w,isSearchable:E,tabSelectsValue:f,isInitialFocus:D})}return F},[y,r,i,w,C,E,k,_,a,f,D]),N=ze(M.Fragment,null,ze("span",{id:"aria-selection"},I),ze("span",{id:"aria-focused"},A),ze("span",{id:"aria-results"},R),ze("span",{id:"aria-guidance"},B));return ze(M.Fragment,null,ze(X0,{id:c},D&&N),ze(X0,{"aria-live":h,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!D&&N))},n6=t6,Vh=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],r6=new RegExp("["+Vh.map(function(e){return e.letters}).join("")+"]","g"),q1={};for(var Sf=0;Sf<Vh.length;Sf++)for(var Ef=Vh[Sf],If=0;If<Ef.letters.length;If++)q1[Ef.letters[If]]=Ef.base;var K1=function(t){return t.replace(r6,function(n){return q1[n]})},i6=JM(K1),Y0=function(t){return t.replace(/^\s+|\s+$/g,"")},s6=function(t){return"".concat(t.label," ").concat(t.value)},o6=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=Ge({ignoreCase:!0,ignoreAccents:!0,stringify:s6,trim:!0,matchFrom:"any"},t),s=i.ignoreCase,o=i.ignoreAccents,a=i.stringify,l=i.trim,c=i.matchFrom,d=l?Y0(r):r,g=l?Y0(a(n)):a(n);return s&&(d=d.toLowerCase(),g=g.toLowerCase()),o&&(d=i6(d),g=K1(g)),c==="start"?g.substr(0,d.length)===d:g.indexOf(d)>-1}},a6=["innerRef"];function l6(e){var t=e.innerRef,n=ei(e,a6),r=T3(n,"onExited","in","enter","exit","appear");return ze("input",$e({ref:t},r,{css:bp({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var c6=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function u6(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,s=e.onTopLeave,o=M.useRef(!1),a=M.useRef(!1),l=M.useRef(0),c=M.useRef(null),d=M.useCallback(function(E,k){if(c.current!==null){var u=c.current,v=u.scrollTop,f=u.scrollHeight,p=u.clientHeight,y=c.current,h=k>0,_=f-p-v,I=!1;_>k&&o.current&&(r&&r(E),o.current=!1),h&&a.current&&(s&&s(E),a.current=!1),h&&k>_?(n&&!o.current&&n(E),y.scrollTop=f,I=!0,o.current=!0):!h&&-k>v&&(i&&!a.current&&i(E),y.scrollTop=0,I=!0,a.current=!0),I&&c6(E)}},[n,r,i,s]),g=M.useCallback(function(E){d(E,E.deltaY)},[d]),b=M.useCallback(function(E){l.current=E.changedTouches[0].clientY},[]),x=M.useCallback(function(E){var k=l.current-E.changedTouches[0].clientY;d(E,k)},[d]),w=M.useCallback(function(E){if(E){var k=R3?{passive:!1}:!1;E.addEventListener("wheel",g,k),E.addEventListener("touchstart",b,k),E.addEventListener("touchmove",x,k)}},[x,b,g]),C=M.useCallback(function(E){E&&(E.removeEventListener("wheel",g,!1),E.removeEventListener("touchstart",b,!1),E.removeEventListener("touchmove",x,!1))},[x,b,g]);return M.useEffect(function(){if(t){var E=c.current;return w(E),function(){C(E)}}},[t,w,C]),function(E){c.current=E}}var Z0=["boxSizing","height","overflow","paddingRight","position"],U0={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function J0(e){e.cancelable&&e.preventDefault()}function q0(e){e.stopPropagation()}function K0(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Q0(){return"ontouchstart"in window||navigator.maxTouchPoints}var eb=!!(typeof window<"u"&&window.document&&window.document.createElement),ra=0,ro={capture:!1,passive:!1};function d6(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=M.useRef({}),s=M.useRef(null),o=M.useCallback(function(l){if(eb){var c=document.body,d=c&&c.style;if(r&&Z0.forEach(function(w){var C=d&&d[w];i.current[w]=C}),r&&ra<1){var g=parseInt(i.current.paddingRight,10)||0,b=document.body?document.body.clientWidth:0,x=window.innerWidth-b+g||0;Object.keys(U0).forEach(function(w){var C=U0[w];d&&(d[w]=C)}),d&&(d.paddingRight="".concat(x,"px"))}c&&Q0()&&(c.addEventListener("touchmove",J0,ro),l&&(l.addEventListener("touchstart",K0,ro),l.addEventListener("touchmove",q0,ro))),ra+=1}},[r]),a=M.useCallback(function(l){if(eb){var c=document.body,d=c&&c.style;ra=Math.max(ra-1,0),r&&ra<1&&Z0.forEach(function(g){var b=i.current[g];d&&(d[g]=b)}),c&&Q0()&&(c.removeEventListener("touchmove",J0,ro),l&&(l.removeEventListener("touchstart",K0,ro),l.removeEventListener("touchmove",q0,ro)))}},[r]);return M.useEffect(function(){if(t){var l=s.current;return o(l),function(){a(l)}}},[t,o,a]),function(l){s.current=l}}function f6(){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)."}var h6=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},g6=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:f6};function p6(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,s=e.onBottomArrive,o=e.onBottomLeave,a=e.onTopArrive,l=e.onTopLeave,c=u6({isEnabled:i,onBottomArrive:s,onBottomLeave:o,onTopArrive:a,onTopLeave:l}),d=d6({isEnabled:n}),g=function(x){c(x),d(x)};return ze(M.Fragment,null,n&&ze("div",{onClick:h6,css:g6}),t(g))}function m6(){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)."}var b6=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:m6},v6=function(t){var n=t.name,r=t.onFocus;return ze("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:b6,value:"",onChange:function(){}})},x6=v6;function xp(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function y6(){return xp(/^iPhone/i)}function Q1(){return xp(/^Mac/i)}function _6(){return xp(/^iPad/i)||Q1()&&navigator.maxTouchPoints>1}function w6(){return y6()||_6()}function C6(){return Q1()||w6()}var S6=function(t){return t.label},e_=function(t){return t.label},t_=function(t){return t.value},E6=function(t){return!!t.isDisabled},I6={clearIndicator:lM,container:J3,control:pM,dropdownIndicator:oM,group:xM,groupHeading:_M,indicatorsContainer:eM,indicatorSeparator:uM,input:EM,loadingIndicator:hM,loadingMessage:$3,menu:j3,menuList:H3,menuPortal:Z3,multiValue:RM,multiValueLabel:PM,multiValueRemove:NM,noOptionsMessage:W3,option:jM,placeholder:zM,singleValue:WM,valueContainer:K3},k6={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},A6=4,n_=4,M6=38,R6=n_*2,P6={baseUnit:n_,controlHeight:M6,menuGutter:R6},kf={borderRadius:A6,colors:k6,spacing:P6},N6={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:G0(),captureMenuScroll:!G0(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:o6(),formatGroupLabel:S6,getOptionLabel:e_,getOptionValue:t_,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:E6,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!A3(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function tb(e,t,n,r){var i=s_(e,t,n),s=o_(e,t,n),o=i_(e,t),a=Mu(e,t);return{type:"option",data:t,isDisabled:i,isSelected:s,label:o,value:a,index:r}}function qc(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(o,a){return tb(e,o,t,a)}).filter(function(o){return rb(e,o)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var s=tb(e,n,t,r);return rb(e,s)?s:void 0}).filter(P3)}function r_(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,vo(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function nb(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,vo(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function T6(e,t){return r_(qc(e,t))}function rb(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,s=t.isSelected,o=t.label,a=t.value;return(!l_(e)||!s)&&a_(e,{label:o,value:a,data:i},r)}function O6(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var s=t.indexOf(n);if(s>-1)return n;if(i<t.length)return t[i]}return null}function D6(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Af=function(t,n){var r,i=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return i||null},i_=function(t,n){return t.getOptionLabel(n)},Mu=function(t,n){return t.getOptionValue(n)};function s_(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function o_(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Mu(e,t);return n.some(function(i){return Mu(e,i)===r})}function a_(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var l_=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},F6=1,yp=function(e){gA(n,e);var t=bA(n);function n(r){var i;if(fA(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,c){var d=i.props,g=d.onChange,b=d.name;c.name=b,i.ariaOnChange(l,c),g(l,c)},i.setValue=function(l,c,d){var g=i.props,b=g.closeMenuOnSelect,x=g.isMulti,w=g.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:w}),b&&(i.setState({inputIsHiddenAfterUpdate:!x}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:c,option:d})},i.selectOption=function(l){var c=i.props,d=c.blurInputOnSelect,g=c.isMulti,b=c.name,x=i.state.selectValue,w=g&&i.isOptionSelected(l,x),C=i.isOptionDisabled(l,x);if(w){var E=i.getOptionValue(l);i.setValue(x.filter(function(k){return i.getOptionValue(k)!==E}),"deselect-option",l)}else if(!C)g?i.setValue([].concat(vo(x),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:b});return}d&&i.blurInput()},i.removeValue=function(l){var c=i.props.isMulti,d=i.state.selectValue,g=i.getOptionValue(l),b=d.filter(function(w){return i.getOptionValue(w)!==g}),x=xa(c,b,b[0]||null);i.onChange(x,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(xa(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,c=i.state.selectValue,d=c[c.length-1],g=c.slice(0,c.length-1),b=xa(l,g,g[0]||null);d&&i.onChange(b,{action:"pop-value",removedValue:d})},i.getFocusedOptionId=function(l){return Af(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return nb(qc(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];return C3.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(l){return i_(i.props,l)},i.getOptionValue=function(l){return Mu(i.props,l)},i.getStyles=function(l,c){var d=i.props.unstyled,g=I6[l](c,d);g.boxSizing="border-box";var b=i.props.styles[l];return b?b(g,c):g},i.getClassNames=function(l,c){var d,g;return(d=(g=i.props.classNames)[l])===null||d===void 0?void 0:d.call(g,c)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return YM(i.props)},i.buildCategorizedOptions=function(){return qc(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return r_(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,c){i.setState({ariaSelection:Ge({value:l},c)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var c=i.props,d=c.isMulti,g=c.menuIsOpen;i.focusInput(),g?(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&Cd(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var c=l.touches,d=c&&c.item(0);d&&(i.initialTouchX=d.clientX,i.initialTouchY=d.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var c=l.touches,d=c&&c.item(0);if(d){var g=Math.abs(d.clientX-i.initialTouchX),b=Math.abs(d.clientY-i.initialTouchY),x=5;i.userIsDragging=g>x||b>x}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var c=i.props.inputValue,d=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(d,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var c=i.getFocusableOptions(),d=c.indexOf(l);i.setState({focusedOption:l,focusedOptionId:d>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return l_(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var c=i.props,d=c.isMulti,g=c.backspaceRemovesValue,b=c.escapeClearsValue,x=c.inputValue,w=c.isClearable,C=c.isDisabled,E=c.menuIsOpen,k=c.onKeyDown,u=c.tabSelectsValue,v=c.openMenuOnFocus,f=i.state,p=f.focusedOption,y=f.focusedValue,h=f.selectValue;if(!C&&!(typeof k=="function"&&(k(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!d||x)return;i.focusValue("previous");break;case"ArrowRight":if(!d||x)return;i.focusValue("next");break;case"Delete":case"Backspace":if(x)return;if(y)i.removeValue(y);else{if(!g)return;d?i.popValue():w&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!E||!u||!p||v&&i.isOptionSelected(p,h))return;i.selectOption(p);break;case"Enter":if(l.keyCode===229)break;if(E){if(!p||i.isComposing)return;i.selectOption(p);break}return;case"Escape":E?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:x}),i.onMenuClose()):w&&b&&i.clearValue();break;case" ":if(x)return;if(!E){i.openMenu("first");break}if(!p)return;i.selectOption(p);break;case"ArrowUp":E?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":E?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!E)return;i.focusOption("pageup");break;case"PageDown":if(!E)return;i.focusOption("pagedown");break;case"Home":if(!E)return;i.focusOption("first");break;case"End":if(!E)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++F6),i.state.selectValue=ku(r.value),r.menuIsOpen&&i.state.selectValue.length){var s=i.getFocusableOptionsWithIds(),o=i.buildFocusableOptions(),a=o.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=s,i.state.focusedOption=o[a],i.state.focusedOptionId=Af(s,o[a])}return i}return hA(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&H0(this.menuListRef,this.focusedOptionRef),C6()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(i){var s=this.props,o=s.isDisabled,a=s.menuIsOpen,l=this.state.isFocused;(l&&!o&&i.isDisabled||l&&a&&!i.menuIsOpen)&&this.focusInput(),l&&o&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!o&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(H0(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,s){this.props.onInputChange(i,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var s=this,o=this.state,a=o.selectValue,l=o.isFocused,c=this.buildFocusableOptions(),d=i==="first"?0:c.length-1;if(!this.props.isMulti){var g=c.indexOf(a[0]);g>-1&&(d=g)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[d],focusedOptionId:this.getFocusedOptionId(c[d])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(i){var s=this.state,o=s.selectValue,a=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=o.indexOf(a);a||(l=-1);var c=o.length-1,d=-1;if(o.length){switch(i){case"previous":l===0?d=0:l===-1?d=c:d=l-1;break;case"next":l>-1&&l<c&&(d=l+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:o[d]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,o=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,c=a.indexOf(o);o||(c=-1),i==="up"?l=c>0?c-1:a.length-1:i==="down"?l=(c+1)%a.length:i==="pageup"?(l=c-s,l<0&&(l=0)):i==="pagedown"?(l=c+s,l>a.length-1&&(l=a.length-1)):i==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(kf):Ge(Ge({},kf),this.props.theme):kf}},{key:"getCommonProps",value:function(){var i=this.clearValue,s=this.cx,o=this.getStyles,a=this.getClassNames,l=this.getValue,c=this.selectOption,d=this.setValue,g=this.props,b=g.isMulti,x=g.isRtl,w=g.options,C=this.hasValue();return{clearValue:i,cx:s,getStyles:o,getClassNames:a,getValue:l,hasValue:C,isMulti:b,isRtl:x,options:w,selectOption:c,selectProps:g,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,s=i.isClearable,o=i.isMulti;return s===void 0?o:s}},{key:"isOptionDisabled",value:function(i,s){return s_(this.props,i,s)}},{key:"isOptionSelected",value:function(i,s){return o_(this.props,i,s)}},{key:"filterOption",value:function(i,s){return a_(this.props,i,s)}},{key:"formatOptionLabel",value:function(i,s){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(i,{context:s,inputValue:o,selectValue:a})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,s=i.isDisabled,o=i.isSearchable,a=i.inputId,l=i.inputValue,c=i.tabIndex,d=i.form,g=i.menuIsOpen,b=i.required,x=this.getComponents(),w=x.Input,C=this.state,E=C.inputIsHidden,k=C.ariaSelection,u=this.commonProps,v=a||this.getElementId("input"),f=Ge(Ge(Ge({"aria-autocomplete":"list","aria-expanded":g,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":b,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},g&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(k==null?void 0:k.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?we.createElement(w,$e({},u,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:s,isHidden:E,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:d,type:"text",value:l},f)):we.createElement(l6,$e({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Iu,onFocus:this.onInputFocus,disabled:s,tabIndex:c,inputMode:"none",form:d,value:""},f))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,s=this.getComponents(),o=s.MultiValue,a=s.MultiValueContainer,l=s.MultiValueLabel,c=s.MultiValueRemove,d=s.SingleValue,g=s.Placeholder,b=this.commonProps,x=this.props,w=x.controlShouldRenderValue,C=x.isDisabled,E=x.isMulti,k=x.inputValue,u=x.placeholder,v=this.state,f=v.selectValue,p=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!w)return k?null:we.createElement(g,$e({},b,{key:"placeholder",isDisabled:C,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),u);if(E)return f.map(function(_,I){var A=_===p,R="".concat(i.getOptionLabel(_),"-").concat(i.getOptionValue(_));return we.createElement(o,$e({},b,{components:{Container:a,Label:l,Remove:c},isFocused:A,isDisabled:C,key:R,index:I,removeProps:{onClick:function(){return i.removeValue(_)},onTouchEnd:function(){return i.removeValue(_)},onMouseDown:function(B){B.preventDefault()}},data:_}),i.formatOptionLabel(_,"value"))});if(k)return null;var h=f[0];return we.createElement(d,$e({},b,{data:h,isDisabled:C}),this.formatOptionLabel(h,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),s=i.ClearIndicator,o=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,d=this.state.isFocused;if(!this.isClearable()||!s||l||!this.hasValue()||c)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return we.createElement(s,$e({},o,{innerProps:g,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),s=i.LoadingIndicator,o=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,d=this.state.isFocused;if(!s||!c)return null;var g={"aria-hidden":"true"};return we.createElement(s,$e({},o,{innerProps:g,isDisabled:l,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),s=i.DropdownIndicator,o=i.IndicatorSeparator;if(!s||!o)return null;var a=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return we.createElement(o,$e({},a,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),s=i.DropdownIndicator;if(!s)return null;var o=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return we.createElement(s,$e({},o,{innerProps:c,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,s=this.getComponents(),o=s.Group,a=s.GroupHeading,l=s.Menu,c=s.MenuList,d=s.MenuPortal,g=s.LoadingMessage,b=s.NoOptionsMessage,x=s.Option,w=this.commonProps,C=this.state.focusedOption,E=this.props,k=E.captureMenuScroll,u=E.inputValue,v=E.isLoading,f=E.loadingMessage,p=E.minMenuHeight,y=E.maxMenuHeight,h=E.menuIsOpen,_=E.menuPlacement,I=E.menuPosition,A=E.menuPortalTarget,R=E.menuShouldBlockScroll,D=E.menuShouldScrollIntoView,B=E.noOptionsMessage,N=E.onMenuScrollToTop,F=E.onMenuScrollToBottom;if(!h)return null;var j=function(ee,se){var ie=ee.type,fe=ee.data,Se=ee.isDisabled,ve=ee.isSelected,xe=ee.label,Y=ee.value,le=C===fe,re=Se?void 0:function(){return i.onOptionHover(fe)},ge=Se?void 0:function(){return i.selectOption(fe)},ne="".concat(i.getElementId("option"),"-").concat(se),he={id:ne,onClick:ge,onMouseMove:re,onMouseOver:re,tabIndex:-1,role:"option","aria-selected":i.state.isAppleDevice?void 0:ve};return we.createElement(x,$e({},w,{innerProps:he,data:fe,isDisabled:Se,isSelected:ve,key:ne,label:xe,type:ie,value:Y,isFocused:le,innerRef:le?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(ee.data,"menu"))},H;if(this.hasOptions())H=this.getCategorizedOptions().map(function(U){if(U.type==="group"){var ee=U.data,se=U.options,ie=U.index,fe="".concat(i.getElementId("group"),"-").concat(ie),Se="".concat(fe,"-heading");return we.createElement(o,$e({},w,{key:fe,data:ee,options:se,Heading:a,headingProps:{id:Se,data:U.data},label:i.formatGroupLabel(U.data)}),U.options.map(function(ve){return j(ve,"".concat(ie,"-").concat(ve.index))}))}else if(U.type==="option")return j(U,"".concat(U.index))});else if(v){var L=f({inputValue:u});if(L===null)return null;H=we.createElement(g,w,L)}else{var G=B({inputValue:u});if(G===null)return null;H=we.createElement(b,w,G)}var $={minMenuHeight:p,maxMenuHeight:y,menuPlacement:_,menuPosition:I,menuShouldScrollIntoView:D},Z=we.createElement(B3,$e({},w,$),function(U){var ee=U.ref,se=U.placerProps,ie=se.placement,fe=se.maxHeight;return we.createElement(l,$e({},w,$,{innerRef:ee,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:v,placement:ie}),we.createElement(p6,{captureEnabled:k,onTopArrive:N,onBottomArrive:F,lockEnabled:R},function(Se){return we.createElement(c,$e({},w,{innerRef:function(xe){i.getMenuListRef(xe),Se(xe)},innerProps:{role:"listbox","aria-multiselectable":w.isMulti,id:i.getElementId("listbox")},isLoading:v,maxHeight:fe,focusedOption:C}),H)}))});return A||I==="fixed"?we.createElement(d,$e({},w,{appendTo:A,controlElement:this.controlRef,menuPlacement:_,menuPosition:I}),Z):Z}},{key:"renderFormField",value:function(){var i=this,s=this.props,o=s.delimiter,a=s.isDisabled,l=s.isMulti,c=s.name,d=s.required,g=this.state.selectValue;if(d&&!this.hasValue()&&!a)return we.createElement(x6,{name:c,onFocus:this.onValueInputFocus});if(!(!c||a))if(l)if(o){var b=g.map(function(C){return i.getOptionValue(C)}).join(o);return we.createElement("input",{name:c,type:"hidden",value:b})}else{var x=g.length>0?g.map(function(C,E){return we.createElement("input",{key:"i-".concat(E),name:c,type:"hidden",value:i.getOptionValue(C)})}):we.createElement("input",{name:c,type:"hidden",value:""});return we.createElement("div",null,x)}else{var w=g[0]?this.getOptionValue(g[0]):"";return we.createElement("input",{name:c,type:"hidden",value:w})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,s=this.state,o=s.ariaSelection,a=s.focusedOption,l=s.focusedValue,c=s.isFocused,d=s.selectValue,g=this.getFocusableOptions();return we.createElement(n6,$e({},i,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:a,focusedValue:l,isFocused:c,selectValue:d,focusableOptions:g,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),s=i.Control,o=i.IndicatorsContainer,a=i.SelectContainer,l=i.ValueContainer,c=this.props,d=c.className,g=c.id,b=c.isDisabled,x=c.menuIsOpen,w=this.state.isFocused,C=this.commonProps=this.getCommonProps();return we.createElement(a,$e({},C,{className:d,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:b,isFocused:w}),this.renderLiveRegion(),we.createElement(s,$e({},C,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:b,isFocused:w,menuIsOpen:x}),we.createElement(l,$e({},C,{isDisabled:b}),this.renderPlaceholderOrValue(),this.renderInput()),we.createElement(o,$e({},C,{isDisabled:b}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,s){var o=s.prevProps,a=s.clearFocusValueOnUpdate,l=s.inputIsHiddenAfterUpdate,c=s.ariaSelection,d=s.isFocused,g=s.prevWasFocused,b=s.instancePrefix,x=i.options,w=i.value,C=i.menuIsOpen,E=i.inputValue,k=i.isMulti,u=ku(w),v={};if(o&&(w!==o.value||x!==o.options||C!==o.menuIsOpen||E!==o.inputValue)){var f=C?T6(i,u):[],p=C?nb(qc(i,u),"".concat(b,"-option")):[],y=a?O6(s,u):null,h=D6(s,f),_=Af(p,h);v={selectValue:u,focusedOption:h,focusedOptionId:_,focusableOptionsWithIds:p,focusedValue:y,clearFocusValueOnUpdate:!1}}var I=l!=null&&i!==o?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},A=c,R=d&&g;return d&&!R&&(A={value:xa(k,u,u[0]||null),options:u,action:"initial-input-focus"},R=!g),(c==null?void 0:c.action)==="initial-input-focus"&&(A=null),Ge(Ge(Ge({},v),I),{},{prevProps:i,ariaSelection:A,prevWasFocused:R})}}]),n}(M.Component);yp.defaultProps=N6;var L6=M.forwardRef(function(e,t){var n=E1(e);return we.createElement(yp,$e({ref:t},n))}),c_=L6,j6=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],ib=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),s=String(r.getOptionValue(n)).toLowerCase(),o=String(r.getOptionLabel(n)).toLowerCase();return s===i||o===i},Mf={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(s){return ib(t,s,i)})||r.some(function(s){return ib(t,s,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function B6(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,s=e.formatCreateLabel,o=s===void 0?Mf.formatCreateLabel:s,a=e.isValidNewOption,l=a===void 0?Mf.isValidNewOption:a,c=e.getNewOptionData,d=c===void 0?Mf.getNewOptionData:c,g=e.onCreateOption,b=e.options,x=b===void 0?[]:b,w=e.onChange,C=ei(e,j6),E=C.getOptionValue,k=E===void 0?t_:E,u=C.getOptionLabel,v=u===void 0?e_:u,f=C.inputValue,p=C.isLoading,y=C.isMulti,h=C.value,_=C.name,I=M.useMemo(function(){return l(f,ku(h),x,{getOptionValue:k,getOptionLabel:v})?d(f,o(f)):void 0},[o,d,v,k,f,l,x,h]),A=M.useMemo(function(){return(n||!p)&&I?i==="first"?[I].concat(vo(x)):[].concat(vo(x),[I]):x},[n,i,p,I,x]),R=M.useCallback(function(D,B){if(B.action!=="select-option")return w(D,B);var N=Array.isArray(D)?D:[D];if(N[N.length-1]===I){if(g)g(f);else{var F=d(f,f),j={action:"create-option",name:_,option:F};w(xa(y,[].concat(vo(ku(h)),[F]),F),j)}return}w(D,B)},[d,f,y,_,I,g,w,h]);return Ge(Ge({},C),{},{options:A,onChange:R})}var V6=M.forwardRef(function(e,t){var n=E1(e),r=B6(n);return we.createElement(yp,$e({ref:t},r))}),z6=V6;const il=({label:e,placeholder:t,options:n,selectedOptions:r,handleChange:i,className:s="",creatable:o=!1,disabled:a,isMulti:l=!0,customStyles:c,menuPosition:d="fixed",alwaysShowPlaceholder:g=!1,isClearable:b=!1,selectInputClassname:x="",closeMenuOnSelect:w=!0,customOptionRenderer:C,menuPortalTarget:E,onInputChange:k,isLoading:u=!1,noOptionsMessage:v,includeApply:f,onApply:p})=>{const y=o?z6:c_,[h,_]=M.useState(!1),I=M.useRef(null);M.useEffect(()=>{if(w)return;const L=G=>{var $;($=I.current)!=null&&$.contains(G.target)?_(Z=>!Z):_(!1)};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[w]);const A=[...r,...n.filter(L=>!r.some(G=>G.value===L.value))],R=L=>O.jsxs(Cr.Control,{...L,children:[!L.getValue().length&&O.jsx(Cr.Placeholder,{...L,children:L.selectProps.placeholder}),L.children]}),D=L=>{const{data:G,isSelected:$}=L;if(C){const Z=C;return O.jsx(Cr.Option,{...L,children:O.jsx(Z,{data:G,isSelected:$})})}return f?O.jsx(Cr.Option,{...L,children:O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("input",{type:"checkbox",checked:$,readOnly:!0,style:{accentColor:"var(--brand-orange)",marginRight:8}}),G.icon&&O.jsx("span",{className:"",children:G.icon}),O.jsx("span",{children:G.label})]})}):O.jsx(Cr.Option,{...L,children:O.jsxs("div",{className:"flex items-center flex-1 gap-2",children:[G.icon&&O.jsx("span",{className:"option-icon",children:G.icon}),O.jsx("span",{children:G.label})]})})},B=L=>{const{data:G}=L;if(C){const $=C;return O.jsx(Cr.SingleValue,{...L,children:O.jsx($,{data:G})})}return O.jsx(Cr.SingleValue,{...L,children:O.jsx("div",{className:"flex items-center gap-2",children:O.jsx("span",{children:G.label})})})},N=L=>{const{data:G}=L;return O.jsx(Cr.MultiValue,{...L,children:O.jsx("div",{className:"flex items-center gap-1",children:O.jsx("span",{children:G.label})})})},F=L=>{const{children:G}=L;return O.jsxs(Cr.Menu,{...L,children:[G,f&&O.jsx("div",{style:{padding:"8px"},children:O.jsx("button",{onClick:$=>{$.stopPropagation(),p==null||p(),_(!1)},style:{width:"100%",padding:"8px",background:"var(--brand-orange)",color:"white",border:"none",cursor:"pointer",borderRadius:"4px"},onMouseEnter:$=>$.currentTarget.style.opacity="0.9",onMouseLeave:$=>$.currentTarget.style.opacity="1",children:"Apply"})})]})},j=L=>O.jsx(Cr.DropdownIndicator,{...L}),H=()=>g?{Control:R,SingleValue:L=>L.selectProps.menuIsOpen?O.jsx(B,{...L}):O.jsx("div",{style:{position:"absolute",left:"10px"},children:t}),Option:D,MultiValue:N,DropdownIndicator:j,Menu:F}:{Option:D,SingleValue:B,MultiValue:N,DropdownIndicator:j,Menu:F};return O.jsxs("div",{ref:I,className:`${s} flex flex-col gap-1`,children:[e&&O.jsx("label",{className:"block text-sm font-medium",style:{color:"var(--text-color)"},children:e}),O.jsx(y,{isMulti:l,isClearable:b,value:r,onChange:i,options:A,placeholder:t,isDisabled:a,className:`${x} react-select-container w-full text-sm`,classNamePrefix:"react-select",menuPosition:d,menuPortalTarget:E,components:H(),...!w&&{menuIsOpen:h},onInputChange:k,isLoading:u,noOptionsMessage:v,styles:{control:(L,G)=>({...L,borderColor:G.isFocused?"var(--brand-orange)":"var(--border-color)",borderRadius:"0.25rem",cursor:"pointer",backgroundColor:"var(--bg-color)",color:"var(--text-color)",boxShadow:G.isFocused?"0 0 0 1px var(--brand-orange)":"none",":hover":{borderColor:"var(--brand-orange)"}}),input:L=>({...L,color:"var(--text-color)",boxShadow:"none",border:"none"}),singleValue:L=>({...L,color:"var(--text-color)"}),multiValue:L=>({...L,backgroundColor:"var(--brand-light)",borderRadius:"0.25rem"}),multiValueLabel:L=>({...L,color:"var(--brand-dark)"}),multiValueRemove:L=>({...L,color:"var(--brand-dark)",cursor:"pointer",":hover":{backgroundColor:"var(--brand-orange)",color:"white"}}),placeholder:L=>({...L,color:"var(--secondary-text-color)"}),option:(L,G)=>({...L,backgroundColor:G.isSelected?"var(--brand-orange)":G.isFocused?"var(--hover-bg-color)":"var(--bg-color)",color:G.isSelected?"white":"var(--text-color)",cursor:"pointer",":active":{backgroundColor:"var(--brand-orange)"}}),menu:L=>({...L,backgroundColor:"var(--bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)",zIndex:9999}),dropdownIndicator:L=>({...L,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),clearIndicator:L=>({...L,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),indicatorSeparator:L=>({...L,backgroundColor:"var(--border-color)"}),...c},...o&&{formatCreateLabel:L=>L.trim()?`Create "${L}"`:null,isValidNewOption:L=>L.trim().length>0,noOptionsMessage:()=>`Type to create a new ${e==null?void 0:e.toLowerCase()}`}})]})};/**
41
- * table-core
42
- *
43
- * Copyright (c) TanStack
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- */function Hi(e,t){return typeof e=="function"?e(t):e}function tr(e,t){return n=>{t.setState(r=>({...r,[e]:Hi(n,r[e])}))}}function Sd(e){return e instanceof Function}function H6(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function G6(e,t){const n=[],r=i=>{i.forEach(s=>{n.push(s);const o=t(s);o!=null&&o.length&&r(o)})};return r(e),n}function Ue(e,t,n){let r=[],i;return s=>{let o;n.key&&n.debug&&(o=Date.now());const a=e(s);if(!(a.length!==r.length||a.some((d,g)=>r[g]!==d)))return i;r=a;let c;if(n.key&&n.debug&&(c=Date.now()),i=t(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-o)*100)/100,g=Math.round((Date.now()-c)*100)/100,b=g/16,x=(w,C)=>{for(w=String(w);w.length<C;)w=" "+w;return w};console.info(`%c⏱ ${x(g,5)} /${x(d,5)} ms`,`
50
- font-size: .6rem;
51
- font-weight: bold;
52
- color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function Je(e,t,n,r){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function W6(e,t,n,r){const i=()=>{var o;return(o=s.getValue())!=null?o:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:Ue(()=>[e,n,t,s],(o,a,l,c)=>({table:o,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),Je(e.options,"debugCells","cell.getContext"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(s,n,t,e)},{}),s}function $6(e,t,n,r){var i,s;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(i=(s=a.id)!=null?s:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,d;if(a.accessorFn?d=a.accessorFn:l&&(l.includes(".")?d=b=>{let x=b;for(const C of l.split(".")){var w;x=(w=x)==null?void 0:w[C],process.env.NODE_ENV!=="production"&&x===void 0&&console.warn(`"${C}" in deeply nested key "${l}" returned undefined.`)}return x}:d=b=>b[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let g={id:`${String(c)}`,accessorFn:d,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:Ue(()=>[!0],()=>{var b;return[g,...(b=g.columns)==null?void 0:b.flatMap(x=>x.getFlatColumns())]},Je(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Ue(()=>[e._getOrderColumnsFn()],b=>{var x;if((x=g.columns)!=null&&x.length){let w=g.columns.flatMap(C=>C.getLeafColumns());return b(w)}return[g]},Je(e.options,"debugColumns","column.getLeafColumns"))};for(const b of e._features)b.createColumn==null||b.createColumn(g,e);return g}const In="debugHeaders";function sb(e,t,n){var r;let s={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const o=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),o.push(l)};return a(s),o},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(s,e)}),s}const X6={createTable:e=>{e.getHeaderGroups=Ue(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var s,o;const a=(s=r==null?void 0:r.map(g=>n.find(b=>b.id===g)).filter(Boolean))!=null?s:[],l=(o=i==null?void 0:i.map(g=>n.find(b=>b.id===g)).filter(Boolean))!=null?o:[],c=n.filter(g=>!(r!=null&&r.includes(g.id))&&!(i!=null&&i.includes(g.id)));return oc(t,[...a,...c,...l],e)},Je(e.options,In,"getHeaderGroups")),e.getCenterHeaderGroups=Ue(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(i!=null&&i.includes(s.id))),oc(t,n,e,"center")),Je(e.options,In,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Ue(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const s=(i=r==null?void 0:r.map(o=>n.find(a=>a.id===o)).filter(Boolean))!=null?i:[];return oc(t,s,e,"left")},Je(e.options,In,"getLeftHeaderGroups")),e.getRightHeaderGroups=Ue(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const s=(i=r==null?void 0:r.map(o=>n.find(a=>a.id===o)).filter(Boolean))!=null?i:[];return oc(t,s,e,"right")},Je(e.options,In,"getRightHeaderGroups")),e.getFooterGroups=Ue(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Je(e.options,In,"getFooterGroups")),e.getLeftFooterGroups=Ue(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Je(e.options,In,"getLeftFooterGroups")),e.getCenterFooterGroups=Ue(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Je(e.options,In,"getCenterFooterGroups")),e.getRightFooterGroups=Ue(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Je(e.options,In,"getRightFooterGroups")),e.getFlatHeaders=Ue(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Je(e.options,In,"getFlatHeaders")),e.getLeftFlatHeaders=Ue(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Je(e.options,In,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Ue(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Je(e.options,In,"getCenterFlatHeaders")),e.getRightFlatHeaders=Ue(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Je(e.options,In,"getRightFlatHeaders")),e.getCenterLeafHeaders=Ue(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Je(e.options,In,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Ue(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Je(e.options,In,"getLeftLeafHeaders")),e.getRightLeafHeaders=Ue(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Je(e.options,In,"getRightLeafHeaders")),e.getLeafHeaders=Ue(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,s,o,a,l,c;return[...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(o=(a=n[0])==null?void 0:a.headers)!=null?o:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(d=>d.getLeafHeaders()).flat()},Je(e.options,In,"getLeafHeaders"))}};function oc(e,t,n,r){var i,s;let o=0;const a=function(b,x){x===void 0&&(x=1),o=Math.max(o,x),b.filter(w=>w.getIsVisible()).forEach(w=>{var C;(C=w.columns)!=null&&C.length&&a(w.columns,x+1)},0)};a(e);let l=[];const c=(b,x)=>{const w={depth:x,id:[r,`${x}`].filter(Boolean).join("_"),headers:[]},C=[];b.forEach(E=>{const k=[...C].reverse()[0],u=E.column.depth===w.depth;let v,f=!1;if(u&&E.column.parent?v=E.column.parent:(v=E.column,f=!0),k&&(k==null?void 0:k.column)===v)k.subHeaders.push(E);else{const p=sb(n,v,{id:[r,x,v.id,E==null?void 0:E.id].filter(Boolean).join("_"),isPlaceholder:f,placeholderId:f?`${C.filter(y=>y.column===v).length}`:void 0,depth:x,index:C.length});p.subHeaders.push(E),C.push(p)}w.headers.push(E),E.headerGroup=w}),l.push(w),x>0&&c(C,x-1)},d=t.map((b,x)=>sb(n,b,{depth:o,index:x}));c(d,o-1),l.reverse();const g=b=>b.filter(w=>w.column.getIsVisible()).map(w=>{let C=0,E=0,k=[0];w.subHeaders&&w.subHeaders.length?(k=[],g(w.subHeaders).forEach(v=>{let{colSpan:f,rowSpan:p}=v;C+=f,k.push(p)})):C=1;const u=Math.min(...k);return E=E+u,w.colSpan=C,w.rowSpan=E,{colSpan:C,rowSpan:E}});return g((i=(s=l[0])==null?void 0:s.headers)!=null?i:[]),l}const Y6=(e,t,n,r,i,s,o)=>{let a={id:t,index:r,original:n,depth:i,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>G6(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const d=c.getParentRow();if(!d)break;l.push(d),c=d}return l.reverse()},getAllCells:Ue(()=>[e.getAllLeafColumns()],l=>l.map(c=>W6(e,a,c,c.id)),Je(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:Ue(()=>[a.getAllCells()],l=>l.reduce((c,d)=>(c[d.column.id]=d,c),{}),Je(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},Z6={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},u_=(e,t,n)=>{var r,i;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};u_.autoRemove=e=>Ar(e);const d_=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};d_.autoRemove=e=>Ar(e);const f_=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};f_.autoRemove=e=>Ar(e);const h_=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};h_.autoRemove=e=>Ar(e);const g_=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});g_.autoRemove=e=>Ar(e)||!(e!=null&&e.length);const p_=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});p_.autoRemove=e=>Ar(e)||!(e!=null&&e.length);const m_=(e,t,n)=>e.getValue(t)===n;m_.autoRemove=e=>Ar(e);const b_=(e,t,n)=>e.getValue(t)==n;b_.autoRemove=e=>Ar(e);const _p=(e,t,n)=>{let[r,i]=n;const s=e.getValue(t);return s>=r&&s<=i};_p.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(r)?-1/0:r,o=n===null||Number.isNaN(i)?1/0:i;if(s>o){const a=s;s=o,o=a}return[s,o]};_p.autoRemove=e=>Ar(e)||Ar(e[0])&&Ar(e[1]);const ui={includesString:u_,includesStringSensitive:d_,equalsString:f_,arrIncludes:h_,arrIncludesAll:g_,arrIncludesSome:p_,equals:m_,weakEquals:b_,inNumberRange:_p};function Ar(e){return e==null||e===""}const U6={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:tr("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?ui.includesString:typeof r=="number"?ui.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?ui.equals:Array.isArray(r)?ui.arrIncludes:ui.weakEquals},e.getFilterFn=()=>{var n,r;return Sd(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:ui[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),s=r==null?void 0:r.find(d=>d.id===e.id),o=Hi(n,s?s.value:void 0);if(ob(i,o,e)){var a;return(a=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?a:[]}const l={id:e.id,value:o};if(s){var c;return(c=r==null?void 0:r.map(d=>d.id===e.id?l:d))!=null?c:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var s;return(s=Hi(t,i))==null?void 0:s.filter(o=>{const a=n.find(l=>l.id===o.id);if(a){const l=a.getFilterFn();if(ob(l,o.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function ob(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const J6=(e,t,n)=>n.reduce((r,i)=>{const s=i.getValue(e);return r+(typeof s=="number"?s:0)},0),q6=(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},K6=(e,t,n)=>{let r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},Q6=(e,t,n)=>{let r,i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(r===void 0?o>=o&&(r=i=o):(r>o&&(r=o),i<o&&(i=o)))}),[r,i]},eR=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let s=i.getValue(e);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},tR=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!H6(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((s,o)=>s-o);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},nR=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),rR=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,iR=(e,t)=>t.length,Rf={sum:J6,min:q6,max:K6,extent:Q6,mean:eR,median:tR,unique:nR,uniqueCount:rR,count:iR},sR={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:tr("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return Rf.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Rf.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Sd(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:Rf[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function oR(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(o=>o.id===s)).filter(Boolean),...r]}const aR={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:tr("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Ue(n=>[Oa(t,n)],n=>n.findIndex(r=>r.id===e.id),Je(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=Oa(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=Oa(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Ue(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let s=[];if(!(t!=null&&t.length))s=i;else{const o=[...t],a=[...i];for(;a.length&&o.length;){const l=o.shift(),c=a.findIndex(d=>d.id===l);c>-1&&s.push(a.splice(c,1)[0])}s=[...s,...a]}return oR(s,n,r)},Je(e.options,"debugTable","_getOrderColumnsFn"))}},Pf=()=>({left:[],right:[]}),lR={getInitialState:e=>({columnPinning:Pf(),...e}),getDefaultOptions:e=>({onColumnPinningChange:tr("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var s,o;if(n==="right"){var a,l;return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((l=i==null?void 0:i.right)!=null?l:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(n==="left"){var c,d;return{left:[...((c=i==null?void 0:i.left)!=null?c:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((d=i==null?void 0:i.right)!=null?d:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(g=>!(r!=null&&r.includes(g))),right:((o=i==null?void 0:i.right)!=null?o:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,s,o;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((s=(o=t.options.enableColumnPinning)!=null?o:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:i}=t.getState().columnPinning,s=n.some(a=>r==null?void 0:r.includes(a)),o=n.some(a=>i==null?void 0:i.includes(a));return s?"left":o?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Ue(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const s=[...r??[],...i??[]];return n.filter(o=>!s.includes(o.column.id))},Je(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=Ue(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(o=>o.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),Je(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=Ue(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(o=>o.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),Je(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?Pf():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Pf())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,s;return!!((i=r.left)!=null&&i.length||(s=r.right)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Ue(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Je(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=Ue(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Je(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=Ue(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(s=>!i.includes(s.id))},Je(e.options,"debugColumns","getCenterLeafColumns"))}};function cR(e){return e||(typeof document<"u"?document:null)}const ac={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Nf=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),uR={getDefaultColumnDef:()=>ac,getInitialState:e=>({columnSizing:{},columnSizingInfo:Nf(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:tr("columnSizing",e),onColumnSizingInfoChange:tr("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:ac.minSize,(r=s??e.columnDef.size)!=null?r:ac.size),(i=e.columnDef.maxSize)!=null?i:ac.maxSize)},e.getStart=Ue(n=>[n,Oa(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),Je(t.options,"debugColumns","getStart")),e.getAfter=Ue(n=>[n,Oa(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),Je(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r==null?void 0:r.getCanResize();return s=>{if(!r||!i||(s.persist==null||s.persist(),Tf(s)&&s.touches&&s.touches.length>1))return;const o=e.getSize(),a=e?e.getLeafHeaders().map(k=>[k.column.id,k.column.getSize()]):[[r.id,r.getSize()]],l=Tf(s)?Math.round(s.touches[0].clientX):s.clientX,c={},d=(k,u)=>{typeof u=="number"&&(t.setColumnSizingInfo(v=>{var f,p;const y=t.options.columnResizeDirection==="rtl"?-1:1,h=(u-((f=v==null?void 0:v.startOffset)!=null?f:0))*y,_=Math.max(h/((p=v==null?void 0:v.startSize)!=null?p:0),-.999999);return v.columnSizingStart.forEach(I=>{let[A,R]=I;c[A]=Math.round(Math.max(R+R*_,0)*100)/100}),{...v,deltaOffset:h,deltaPercentage:_}}),(t.options.columnResizeMode==="onChange"||k==="end")&&t.setColumnSizing(v=>({...v,...c})))},g=k=>d("move",k),b=k=>{d("end",k),t.setColumnSizingInfo(u=>({...u,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},x=cR(n),w={moveHandler:k=>g(k.clientX),upHandler:k=>{x==null||x.removeEventListener("mousemove",w.moveHandler),x==null||x.removeEventListener("mouseup",w.upHandler),b(k.clientX)}},C={moveHandler:k=>(k.cancelable&&(k.preventDefault(),k.stopPropagation()),g(k.touches[0].clientX),!1),upHandler:k=>{var u;x==null||x.removeEventListener("touchmove",C.moveHandler),x==null||x.removeEventListener("touchend",C.upHandler),k.cancelable&&(k.preventDefault(),k.stopPropagation()),b((u=k.touches[0])==null?void 0:u.clientX)}},E=dR()?{passive:!1}:!1;Tf(s)?(x==null||x.addEventListener("touchmove",C.moveHandler,E),x==null||x.addEventListener("touchend",C.upHandler,E)):(x==null||x.addEventListener("mousemove",w.moveHandler,E),x==null||x.addEventListener("mouseup",w.upHandler,E)),t.setColumnSizingInfo(k=>({...k,startOffset:l,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Nf():(n=e.initialState.columnSizingInfo)!=null?n:Nf())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let lc=null;function dR(){if(typeof lc=="boolean")return lc;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return lc=e,lc}function Tf(e){return e.type==="touchstart"}const fR={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:tr("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(s=>s.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Ue(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Je(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=Ue(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Je(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>Ue(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),Je(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Oa(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const hR={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},gR={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:tr("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>ui.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Sd(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:ui[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},pR={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:tr("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,s;e.setExpanded(r?{}:(i=(s=e.initialState)==null?void 0:s.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const o=s.split(".");r=Math.max(r,o.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const s=r===!0?!0:!!(r!=null&&r[e.id]);let o={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{o[a]=!0}):o=r,n=(i=n)!=null?i:!s,!s&&n)return{...o,[e.id]:!0};if(s&&!n){const{[e.id]:a,...l}=o;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},zh=0,Hh=10,Of=()=>({pageIndex:zh,pageSize:Hh}),mR={getInitialState:e=>({...e,pagination:{...Of(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:tr("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=s=>Hi(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?Of():(i=e.initialState.pagination)!=null?i:Of())},e.setPageIndex=r=>{e.setPagination(i=>{let s=Hi(r,i.pageIndex);const o=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,o)),{...i,pageIndex:s}})},e.resetPageIndex=r=>{var i,s;e.setPageIndex(r?zh:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:zh)},e.resetPageSize=r=>{var i,s;e.setPageSize(r?Hh:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:Hh)},e.setPageSize=r=>{e.setPagination(i=>{const s=Math.max(1,Hi(r,i.pageSize)),o=i.pageSize*i.pageIndex,a=Math.floor(o/s);return{...i,pageIndex:a,pageSize:s}})},e.setPageCount=r=>e.setPagination(i=>{var s;let o=Hi(r,(s=e.options.pageCount)!=null?s:-1);return typeof o=="number"&&(o=Math.max(-1,o)),{...i,pageCount:o}}),e.getPageOptions=Ue(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((s,o)=>o)),i},Je(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Df=()=>({top:[],bottom:[]}),bR={getInitialState:e=>({rowPinning:Df(),...e}),getDefaultOptions:e=>({onRowPinningChange:tr("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const s=r?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],o=i?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...o,e.id,...s]);t.setRowPinning(l=>{var c,d;if(n==="bottom"){var g,b;return{top:((g=l==null?void 0:l.top)!=null?g:[]).filter(C=>!(a!=null&&a.has(C))),bottom:[...((b=l==null?void 0:l.bottom)!=null?b:[]).filter(C=>!(a!=null&&a.has(C))),...Array.from(a)]}}if(n==="top"){var x,w;return{top:[...((x=l==null?void 0:l.top)!=null?x:[]).filter(C=>!(a!=null&&a.has(C))),...Array.from(a)],bottom:((w=l==null?void 0:l.bottom)!=null?w:[]).filter(C=>!(a!=null&&a.has(C)))}}return{top:((c=l==null?void 0:l.top)!=null?c:[]).filter(C=>!(a!=null&&a.has(C))),bottom:((d=l==null?void 0:l.bottom)!=null?d:[]).filter(C=>!(a!=null&&a.has(C)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,s=n.some(a=>r==null?void 0:r.includes(a)),o=n.some(a=>i==null?void 0:i.includes(a));return s?"top":o?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const s=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(o=>{let{id:a}=o;return a});return(r=s==null?void 0:s.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?Df():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:Df())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,s;return!!((i=r.top)!=null&&i.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(o=>{const a=e.getRow(o,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(o=>t.find(a=>a.id===o))).filter(Boolean).map(o=>({...o,position:r}))},e.getTopRows=Ue(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Je(e.options,"debugRows","getTopRows")),e.getBottomRows=Ue(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Je(e.options,"debugRows","getBottomRows")),e.getCenterRows=Ue(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(s=>!i.has(s.id))},Je(e.options,"debugRows","getCenterRows"))}},vR={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:tr("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):i.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(s=>{Gh(i,s.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Ue(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Ff(e,n):{rows:[],flatRows:[],rowsById:{}},Je(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=Ue(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Ff(e,n):{rows:[],flatRows:[],rowsById:{}},Je(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=Ue(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Ff(e,n):{rows:[],flatRows:[],rowsById:{}},Je(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(s=>{var o;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return s;const a={...s};return Gh(a,e.id,n,(o=r==null?void 0:r.selectChildren)!=null?o:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return wp(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Wh(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Wh(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},Gh=(e,t,n,r,i)=>{var s;const o=i.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),o.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(s=o.subRows)!=null&&s.length&&o.getCanSelectSubRows()&&o.subRows.forEach(a=>Gh(e,a.id,n,r,i))};function Ff(e,t){const n=e.getState().rowSelection,r=[],i={},s=function(o,a){return o.map(l=>{var c;const d=wp(l,n);if(d&&(r.push(l),i[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:s(l.subRows)}),d)return l}).filter(Boolean)};return{rows:s(t.rows),flatRows:r,rowsById:i}}function wp(e,t){var n;return(n=t[e.id])!=null?n:!1}function Wh(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,s=!1;return e.subRows.forEach(o=>{if(!(s&&!i)&&(o.getCanSelect()&&(wp(o,t)?s=!0:i=!1),o.subRows&&o.subRows.length)){const a=Wh(o,t);a==="all"?s=!0:(a==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const $h=/([0-9]+)/gm,xR=(e,t,n)=>v_(Ki(e.getValue(n)).toLowerCase(),Ki(t.getValue(n)).toLowerCase()),yR=(e,t,n)=>v_(Ki(e.getValue(n)),Ki(t.getValue(n))),_R=(e,t,n)=>Cp(Ki(e.getValue(n)).toLowerCase(),Ki(t.getValue(n)).toLowerCase()),wR=(e,t,n)=>Cp(Ki(e.getValue(n)),Ki(t.getValue(n))),CR=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},SR=(e,t,n)=>Cp(e.getValue(n),t.getValue(n));function Cp(e,t){return e===t?0:e>t?1:-1}function Ki(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function v_(e,t){const n=e.split($h).filter(Boolean),r=t.split($h).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),s=r.shift(),o=parseInt(i,10),a=parseInt(s,10),l=[o,a].sort();if(isNaN(l[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(l[1]))return isNaN(o)?-1:1;if(o>a)return 1;if(a>o)return-1}return n.length-r.length}const ia={alphanumeric:xR,alphanumericCaseSensitive:yR,text:_R,textCaseSensitive:wR,datetime:CR,basic:SR},ER={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:tr("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const s=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return ia.datetime;if(typeof s=="string"&&(r=!0,s.split($h).length>1))return ia.alphanumeric}return r?ia.text:ia.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Sd(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:ia[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(o=>{const a=o==null?void 0:o.find(x=>x.id===e.id),l=o==null?void 0:o.findIndex(x=>x.id===e.id);let c=[],d,g=s?n:i==="desc";if(o!=null&&o.length&&e.getCanMultiSort()&&r?a?d="toggle":d="add":o!=null&&o.length&&l!==o.length-1?d="replace":a?d="toggle":d="replace",d==="toggle"&&(s||i||(d="remove")),d==="add"){var b;c=[...o,{id:e.id,desc:g}],c.splice(0,c.length-((b=t.options.maxMultiSortColCount)!=null?b:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=o.map(x=>x.id===e.id?{...x,desc:g}:x):d==="remove"?c=o.filter(x=>x.id!==e.id):c=[{id:e.id,desc:g}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const s=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==s&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:o==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},IR=[X6,fR,aR,lR,Z6,U6,hR,gR,ER,sR,pR,mR,bR,vR,uR];function kR(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...IR,...(t=e._features)!=null?t:[]];let i={_features:r};const s=i._features.reduce((b,x)=>Object.assign(b,x.getDefaultOptions==null?void 0:x.getDefaultOptions(i)),{}),o=b=>i.options.mergeOptions?i.options.mergeOptions(s,b):{...s,...b};let l={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(b=>{var x;l=(x=b.getInitialState==null?void 0:b.getInitialState(l))!=null?x:l});const c=[];let d=!1;const g={_features:r,options:{...s,...e},initialState:l,_queue:b=>{c.push(b),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(x=>setTimeout(()=>{throw x})))},reset:()=>{i.setState(i.initialState)},setOptions:b=>{const x=Hi(b,i.options);i.options=o(x)},getState:()=>i.options.state,setState:b=>{i.options.onStateChange==null||i.options.onStateChange(b)},_getRowId:(b,x,w)=>{var C;return(C=i.options.getRowId==null?void 0:i.options.getRowId(b,x,w))!=null?C:`${w?[w.id,x].join("."):x}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(b,x)=>{let w=(x?i.getPrePaginationRowModel():i.getRowModel()).rowsById[b];if(!w&&(w=i.getCoreRowModel().rowsById[b],!w))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${b}`):new Error;return w},_getDefaultColumnDef:Ue(()=>[i.options.defaultColumn],b=>{var x;return b=(x=b)!=null?x:{},{header:w=>{const C=w.header.column.columnDef;return C.accessorKey?C.accessorKey:C.accessorFn?C.id:null},cell:w=>{var C,E;return(C=(E=w.renderValue())==null||E.toString==null?void 0:E.toString())!=null?C:null},...i._features.reduce((w,C)=>Object.assign(w,C.getDefaultColumnDef==null?void 0:C.getDefaultColumnDef()),{}),...b}},Je(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:Ue(()=>[i._getColumnDefs()],b=>{const x=function(w,C,E){return E===void 0&&(E=0),w.map(k=>{const u=$6(i,k,E,C),v=k;return u.columns=v.columns?x(v.columns,u,E+1):[],u})};return x(b)},Je(e,"debugColumns","getAllColumns")),getAllFlatColumns:Ue(()=>[i.getAllColumns()],b=>b.flatMap(x=>x.getFlatColumns()),Je(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:Ue(()=>[i.getAllFlatColumns()],b=>b.reduce((x,w)=>(x[w.id]=w,x),{}),Je(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:Ue(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(b,x)=>{let w=b.flatMap(C=>C.getLeafColumns());return x(w)},Je(e,"debugColumns","getAllLeafColumns")),getColumn:b=>{const x=i._getAllFlatColumnsById()[b];return process.env.NODE_ENV!=="production"&&!x&&console.error(`[Table] Column with id '${b}' does not exist.`),x}};Object.assign(i,g);for(let b=0;b<i._features.length;b++){const x=i._features[b];x==null||x.createTable==null||x.createTable(i)}return i}function AR(){return e=>Ue(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,s,o){s===void 0&&(s=0);const a=[];for(let c=0;c<i.length;c++){const d=Y6(e,e._getRowId(i[c],c,o),i[c],c,s,void 0,o==null?void 0:o.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,a.push(d),e.options.getSubRows){var l;d.originalSubRows=e.options.getSubRows(i[c],c),(l=d.originalSubRows)!=null&&l.length&&(d.subRows=r(d.originalSubRows,s+1,d))}}return a};return n.rows=r(t),n},Je(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function MR(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function RR(e){return t=>Ue(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:s}=n;let{rows:o,flatRows:a,rowsById:l}=r;const c=i*s,d=c+i;o=o.slice(c,d);let g;t.options.paginateExpandedRows?g={rows:o,flatRows:a,rowsById:l}:g=MR({rows:o,flatRows:a,rowsById:l}),g.flatRows=[];const b=x=>{g.flatRows.push(x),x.subRows.length&&x.subRows.forEach(b)};return g.rows.forEach(b),g},Je(t.options,"debugTable","getPaginationRowModel"))}/**
53
- * react-table
54
- *
55
- * Copyright (c) TanStack
56
- *
57
- * This source code is licensed under the MIT license found in the
58
- * LICENSE.md file in the root directory of this source tree.
59
- *
60
- * @license MIT
61
- */function ab(e,t){return e?PR(e)?we.createElement(e,t):e:null}function PR(e){return NR(e)||typeof e=="function"||TR(e)}function NR(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function TR(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function OR(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=we.useState(()=>({current:kR(t)})),[r,i]=we.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...r,...e.state},onStateChange:o=>{i(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}function DR(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"},child:[]}]})(e)}function x_(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function y_(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function Sp(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"},child:[]}]})(e)}function FR(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m6 18 8.5-6L6 6v12zM16 6v12h2V6h-2z"},child:[]}]})(e)}function LR(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"},child:[]}]})(e)}function jR(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 10 5 5 5-5z"},child:[]}]})(e)}function BR(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 14 5-5 5 5z"},child:[]}]})(e)}function VR(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"},child:[]}]})(e)}function zR(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"},child:[]}]})(e)}function HR(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function GR(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function WR(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function $R(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12.01",y2:"16"},child:[]}]})(e)}function XR(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"20",x2:"18",y2:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"20",x2:"12",y2:"4"},child:[]},{tag:"line",attr:{x1:"6",y1:"20",x2:"6",y2:"14"},child:[]}]})(e)}function YR(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(e)}function ZR(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}function UR(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"18 15 12 9 6 15"},child:[]}]})(e)}function JR(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"ellipse",attr:{cx:"12",cy:"5",rx:"9",ry:"3"},child:[]},{tag:"path",attr:{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"},child:[]},{tag:"path",attr:{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"},child:[]}]})(e)}function Ru(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function qR(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"line",attr:{x1:"12",y1:"18",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"9",y1:"15",x2:"15",y2:"15"},child:[]}]})(e)}function KR(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"polyline",attr:{points:"1 20 1 14 7 14"},child:[]},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"},child:[]}]})(e)}function lb(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"},child:[]}]})(e)}function QR(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}const __=M.createContext(void 0),w_=({children:e,onToastShow:t})=>{const[n,r]=M.useState(!1),[i,s]=M.useState(ln.INFO),[o,a]=M.useState(""),l=M.useCallback((c,d,g)=>{if(t)try{t(c,d,g)}catch(b){console.warn("Toast external integration failed:",b)}s(c),a(d),r(!0)},[t]);return O.jsx(__.Provider,{value:{toast:n,toastMessage:o,toastType:i,setToast:r,setToastMessage:a,setToastType:s,showToast:l},children:e})},Ep=()=>{const e=M.useContext(__);if(!e)throw new Error("useToast must be used within a ToastProvider");return e};let Pu=null,Nu=null,cb=!1;function Ip(){if(!cb){cb=!0;try{const e=require("react-redux");Pu=e.useDispatch,Nu=e.useSelector}catch{}}}const C_=()=>(Ip(),Pu?Pu():(console.warn("[useAppDispatch] Redux is not installed. Install @reduxjs/toolkit and react-redux to use this hook."),null)),S_=(e,t)=>(Ip(),Nu?Nu(e,t):(console.warn("[useAppSelector] Redux is not installed. Install @reduxjs/toolkit and react-redux to use this hook."),null)),E_=()=>(Ip(),Pu!==null&&Nu!==null),I_=M.createContext(void 0),k_=({children:e})=>{const[t,n]=M.useState(!1),r=()=>n(!0),i=()=>n(!1);return O.jsx(I_.Provider,{value:{isLoading:t,showLoader:r,hideLoader:i},children:e})},Ed=()=>{const e=M.useContext(I_);if(!e)throw new Error("useLoader must be used within a LoaderProvider");return e},A_=(e,t={})=>{const[n,r]=M.useState(t),[i,s]=M.useState(null),[o,a]=M.useState(!1),[l,c]=M.useState(null);return{filters:n,filteredData:i,loading:o,error:l,updateFilters:b=>{r(x=>({...x,...b}))},clearFilters:()=>{r(t),s(null)},setFilteredData:s,setLoading:a,setError:c}},Kc=10,Qc=0,Xh=8,Yh=`w-4 h-4 appearance-none border
62
- border-gray-500 rounded-sm checked:bg-brand-primary
63
- checked:border-[#0b86cf] checked:relative
64
- checked:after:content-['✔'] checked:after:absolute
65
- checked:after:text-white checked:after:font-bold
66
- checked:after:left-1/2 checked:after:top-1/2
67
- checked:after:-translate-x-1/2 checked:after:-translate-y-1/2
68
- checked:after:text-xs`,Zh=({type:e,options:t,columns:n,data:r,fetchTableData:i,searchEnabled:s=!1,filtersEnabled:o,filterFields:a,setTableData:l,refreshTable:c,paginationEnabled:d=!0,exportEnabled:g=!0,bulkActions:b={},handleBulkAction:x,onRowClick:w,columnBorders:C,showConnectorsSummary:E=!1,connectorScanObject:k,connectorDetail:u,scanDetails:v,isDeletedItemsList:f=!1,onViewDeletedItemsClick:p,showViewDeleteButton:y=!1,refreshData:h,setRefreshData:_,tableWrapperClass:I,searchColumns:A=[],onExport:R,FilterModal:D,ConnectorSummaryAccordion:B})=>{var kt,Pt,Fn,Ni,ri;const N=C_(),F=E_(),j=S_(ue=>!F||!(ue!=null&&ue.tableData)?null:ue.tableData[e]||null),[H,L]=M.useState(""),[G,$]=M.useState(()=>(j==null?void 0:j.sorting)??[]),[Z,U]=M.useState(new Set),[ee,se]=M.useState(),[ie,fe]=M.useState(!0),[Se,ve]=M.useState(!1),[xe,Y]=M.useState(0),{filters:le}=A_(),[re,ge]=M.useState({}),[ne,he]=M.useState(()=>j!=null&&j.pagination?{...j.pagination}:{pageIndex:Qc,pageSize:Kc}),{showToast:be}=Ep(),{showLoader:ye,hideLoader:q}=Ed(),[Ie,Le]=M.useState(),Me=M.useRef(null),je=M.useRef(""),gt=M.useRef(""),Ve=M.useRef(!1),_e=OR({data:r,columns:n,state:{columnVisibility:{actions:ie},globalFilter:H,sorting:G,pagination:ne},onColumnVisibilityChange:()=>fe(!ie),onGlobalFilterChange:L,onSortingChange:$,getCoreRowModel:AR(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,pageCount:Math.ceil(xe/ne.pageSize),onPaginationChange:he,...d&&{getPaginationRowModel:RR()}}),Oe=((kt=_e.getState().pagination)==null?void 0:kt.pageIndex)+1||1,[nt,pt]=M.useState(!1),[Qt,Dn]=M.useState(!1),[vt,ft]=M.useState(Oe),_t=M.useMemo(()=>!xe||xe===0||isNaN(xe)?1:Math.max(Math.ceil(xe/ne.pageSize),1),[xe,ne.pageSize,ne.pageIndex,nt,f]);M.useEffect(()=>{h&&(bn(),_&&_(!1))},[h]),M.useEffect(()=>{if(e&&F&&N)try{const{setPagination:ue}=require("../../redux/slices/tableDataSlice");N(ue({tableType:e,pagination:ne}))}catch{}},[ne.pageIndex,ne.pageSize,e]),M.useEffect(()=>{ft(Oe)},[Oe]),M.useEffect(()=>{if(F&&N)try{const{setGlobalSorting:ue}=require("../../redux/slices/tableDataSlice");N(ue({tableType:e,sorting:G}))}catch{}},[(Pt=G[0])==null?void 0:Pt.desc,(Fn=G[0])==null?void 0:Fn.id]);const Ot=M.useMemo(()=>{var mt,Lt,en;const ue={pageNumber:_e.getState().pagination.pageIndex,pageSize:_e.getState().pagination.pageSize},He={sortBy:G.length&&(mt=G[0])!=null&&mt.id?(Lt=G[0])==null?void 0:Lt.id:void 0,order:G.length&&(en=G[0])!=null&&en.desc?"desc":"asc"},Re={searchTerm:H,searchColumns:A.length>0?A:void 0};return{options:t,filters:Object.keys(le).length>0?le:re,...Re,...ue,...He,fetchDeleted:f}},[H,le,G,_e.getState().pagination.pageIndex,_e.getState().pagination.pageSize,(Ni=G[0])==null?void 0:Ni.id,(ri=G[0])==null?void 0:ri.desc,f,nt,t==null?void 0:t.arg,A]),dn=ue=>{if(ue){const He=r.filter(Re=>!Re.isDisabled).map(Re=>Re.id);U(new Set(He))}else U(new Set)};M.useEffect(()=>()=>{var ue;Ie&&((ue=window.api)!=null&&ue.deleteExportedFile)&&window.api.deleteExportedFile((Ie??"").replace("download:\\",""))},[Ie]),M.useEffect(()=>{const ue=async()=>{if(i){Ve.current=!0;try{ye();let mt=0;if(e===Za.SCANRESULT&&(t!=null&&t.usePermanentCache)){const en=`scandetails_count_${JSON.stringify({...Ot,pageNumber:void 0,pageSize:void 0})}`,Un=localStorage.getItem(en)||sessionStorage.getItem(en);if(Un)try{const Jn=JSON.parse(Un);Jn&&typeof Jn.totalRecords=="number"&&(mt=Jn.totalRecords)}catch{}mt||(mt=(await i({...Ot,usePermanentCache:(t==null?void 0:t.usePermanentCache)||!1})).totalRecords??0)}else mt=(await i({...Ot,...t!=null&&t.usePermanentCache?{usePermanentCache:t.usePermanentCache}:{}})).totalRecords??0;const Lt=Math.max(Math.ceil(mt/ne.pageSize)-1,0);r.length===0&&ne.pageIndex>0?he(en=>({...en,pageIndex:Math.min(ne.pageIndex,Lt)})):ne.pageIndex>Lt&&he(en=>({...en,pageIndex:Lt})),_e.setPageCount(Math.ceil(mt/ne.pageSize))}catch(mt){console.error("Failed to update total count",mt)}finally{Ve.current=!1;const mt=JSON.stringify({pagination:ne,searchApplied:Qt,sorting:G,isDeletedItemsList:f});mt!==je.current&&(je.current=mt,bn()),q()}}},He=JSON.stringify({options:t,filters:le,searchTerm:H,searchColumns:A,sorting:G,isDeletedItemsList:f,pageSize:ne.pageSize});He!==gt.current&&(ue(),gt.current=He)},[t,le,H,e,G,f,ne.pageSize,A]);const mn=ue=>{var He;ue.key==="Enter"&&((He=Me.current)==null||He.click())},on=(ue,He)=>{U(Re=>{const mt=new Set(Re);return He?mt.add(ue):mt.delete(ue),mt})},ir=async()=>{var He;if(!e)return;let ue="";try{if(ye(),R)ue=await R(e,re,t,f);else if((He=window.api)!=null&&He.exportTable)ue=t?await window.api.exportTable(e,re,t,f):await window.api.exportTable(e,re,{},f);else{be(ln.ERROR,"Export functionality is not available. Please provide an onExport handler.");return}Le(ue);const Re=document.createElement("a");Re.href=ue,Re.download=`export-${e}.csv`,document.body.appendChild(Re),Re.click(),document.body.removeChild(Re),be(ln.SUCCESS,"Export initiated successfully")}catch(Re){console.error("Export error",Re),be(ln.ERROR,"Export failed")}finally{q(),ue&&ue.startsWith("blob:")&&URL.revokeObjectURL(ue)}},vr=()=>{let ue=0;return r.forEach(He=>{He.isDisabled||ue++}),ue},xr=async()=>{if(!(!i||!l)){ye(),he(ue=>({...ue,pageIndex:0}));try{Dn(H!==""),await bn()}catch(ue){console.error("Search error:",ue),be(ln.ERROR,"Search operation failed.")}finally{q()}}},bn=async()=>{if(!(!i||!l)){ye();try{const ue=await i({...Ot,...t!=null&&t.usePermanentCache?{usePermanentCache:t.usePermanentCache}:{}}),He=ue.totalRecords;if(Y(He),l(ue.data),F&&N)try{const{setTotalCount:Re,setTableData:mt}=require("../../redux/slices/tableDataSlice");N(Re({tableType:e,totalCount:He})),N(mt({tableType:e,data:ue.data}))}catch{}}catch(ue){console.error("Failed to fetch data",ue),be(ln.ERROR,"Failed to fetch data!")}finally{q()}}};M.useEffect(()=>{const ue=JSON.stringify({pagination:ne,searchApplied:Qt,sorting:G,isDeletedItemsList:f});ue!==je.current&&!Ve.current&&(je.current=ue,bn())},[ne.pageIndex,ne.pageSize,Qt,G,f]);const zn=Object.entries(b).map(([ue,He])=>({value:ue,label:He})),Ee=()=>U(new Set),De=()=>se(""),Pe=M.useMemo(()=>!!x,[x]),Qe=Z.size>0,Ht=ue=>{let He=0,Re=!1;return Pe&&(He+=57),_e.getHeaderGroups().forEach(mt=>{mt.headers.forEach(Lt=>{if(!Re&&Lt.column.columnDef.fixedColumn){if(Lt.id===ue){Re=!0;return}Lt.getSize()?He+=Lt.getSize()+16:He+=150}})}),`${He}px`},vn=D,Yt=B;return O.jsxs("div",{className:"py-0 px-0 flex flex-col gap-2 mt-2",children:[O.jsxs("div",{className:"main-action-wrapper flex gap-2 relative justify-end",children:[g&&!!e&&O.jsxs("button",{onClick:ir,className:"flex items-center shadow-sm gap-2 px-4 py-2 text-sm border border-transparent bg-brand-primary rounded-md transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-[var(--brand-orange)] focus:ring-offset-2",children:[O.jsx(Ru,{className:"h-4 w-4"}),O.jsx("span",{children:"Export"})]}),o&&O.jsxs("button",{onClick:()=>ve(!0),className:"filters flex items-center shadow-sm gap-2 px-4 py-2 text-sm border border-1 border-[var(--border-color)] rounded-md hover:bg-brand-surface-subtle dark:text-gray-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-[var(--brand-orange)]",children:[nt&&O.jsx("span",{className:"h-2 w-2 bg-brand-primary rounded-full"}),O.jsx(y4,{className:"h-3 w-3 text-brand-primary"}),O.jsx("span",{children:"Filters"})]}),Pe&&Qe&&O.jsx("div",{className:"rounded-md text-gray-500 dark:text-gray-400 text-sm appearance-none absolute top-0 left-0 z-30",children:O.jsx(c_,{placeholder:"Bulk Actions",className:"w-[10rem] bulk-actions-select",value:zn.find(ue=>ue.value===ee)||null,options:zn,onChange:ue=>{ue&&(se(ue.value),x&&(x(ue.value,Z,Ee,De),se("")))},isClearable:!0,styles:{control:(ue,He)=>({...ue,borderColor:He.isFocused?"var(--brand-orange)":"var(--border-color)",borderRadius:"0.25rem",cursor:"pointer",backgroundColor:"var(--bg-color)",color:"var(--text-color)",boxShadow:He.isFocused?"0 0 0 1px var(--brand-orange)":"none",":hover":{borderColor:"var(--brand-orange)"}}),input:ue=>({...ue,color:"var(--text-color)"}),singleValue:ue=>({...ue,color:"var(--text-color)"}),placeholder:ue=>({...ue,color:"var(--secondary-text-color)"}),option:(ue,He)=>({...ue,backgroundColor:He.isSelected?"var(--brand-orange)":He.isFocused?"var(--hover-bg-color)":"var(--bg-color)",color:He.isSelected?"white":"var(--text-color)",cursor:"pointer",":active":{backgroundColor:"var(--brand-orange)"}}),menu:ue=>({...ue,backgroundColor:"var(--bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)",zIndex:9999}),dropdownIndicator:ue=>({...ue,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),clearIndicator:ue=>({...ue,cursor:"pointer",color:"var(--secondary-text-color)",":hover":{color:"var(--brand-orange)"}}),indicatorSeparator:ue=>({...ue,backgroundColor:"var(--border-color)"})}})}),s&&O.jsxs("div",{className:"flex max-w-xs w-full border rounded-md overflow-hidden shadow-sm main-search-input",style:{borderColor:"var(--border-color)"},children:[O.jsx("input",{type:"text","data-testid":"table-search-input",placeholder:"Search...",value:H,onKeyDown:mn,onChange:ue=>L(ue.target.value),className:"flex-grow px-4 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none",style:{backgroundColor:"var(--bg-color)",color:"var(--text-color)"}}),O.jsx("button",{ref:Me,"data-testid":"table-search-button",className:"px-4 py-0 transition-colors",style:{backgroundColor:"var(--brand-light)",color:"var(--brand-dark)"},onMouseEnter:ue=>ue.currentTarget.style.backgroundColor="var(--hover-bg-color)",onMouseLeave:ue=>ue.currentTarget.style.backgroundColor="var(--brand-light)",onClick:xr,children:O.jsx(y_,{size:22})})]})]}),E&&Yt&&O.jsx(Yt,{connectorDetail:u,scanDetails:v,scanObjects:k??[]}),O.jsx("div",{className:"main-table-wrapper flex-grow overflow-hidden rounded-md table-container",children:O.jsx("div",{className:`overflow-auto${I?` ${I}`:""}`,style:I?{}:{maxHeight:"calc(100vh - 21rem)"},children:O.jsxs("table",{className:"table-auto w-full text-left border-collapse border dark:border-gray-700 main-table",children:[O.jsx("thead",{className:"sticky -top-1 z-20 bg-brand-surface-subtle dark:bg-gray-800",children:_e.getHeaderGroups().map((ue,He)=>O.jsxs("tr",{children:[Pe&&O.jsx("th",{className:"sticky -left-1 z-20 table-header checkbox font-bold cursor-pointer",style:{width:"40px"},children:O.jsx("input",{type:"checkbox",className:`${Yh} dark:border-gray-600`,checked:_e.getRowModel().rows.length>0&&Z.size===vr()&&vr()>0,onChange:Re=>{Re.stopPropagation(),dn(Re.target.checked)}})}),ue.headers.map((Re,mt)=>{var Un,Jn;let Lt="";const en=["actions"].includes((Un=Re==null?void 0:Re.column)==null?void 0:Un.id);return Re.column.columnDef.fixedColumn&&(Lt+=" sticky z-10"),Re.column.columnDef.centerAlign&&(Lt+=" text-center"),en&&(Lt+=" right-fixed"),["#","id"].includes((Jn=Re==null?void 0:Re.column)==null?void 0:Jn.id)&&(Lt+=" id-column"),O.jsxs("th",{className:`table-header ${C?"border dark:border-gray-600":""} font-bold whitespace-nowrap text-ellipsis cursor-pointer ${Lt}`,style:{minWidth:Re.column.columnDef.minSize||"auto",maxWidth:Re.column.columnDef.maxSize||"auto",left:Re.column.columnDef.fixedColumn?Ht(Re.id):void 0,right:en?0:void 0},onClick:()=>{Re.column.getCanSort()&&Re.column.toggleSorting()},children:[Re.isPlaceholder?null:ab(Re.column.columnDef.header,Re.getContext()),O.jsxs("span",{className:"ml-0",children:[Re.column.getIsSorted()==="asc"&&O.jsx(BR,{size:24,className:"inline-block pb-1"}),Re.column.getIsSorted()==="desc"&&O.jsx(jR,{size:24,className:"inline-block pb-1"})]})]},`${Re.id}_${mt}`)})]},`${ue.id}_${He}`))}),O.jsx("tbody",{children:_e.getRowModel().rows.length===0?O.jsx("tr",{children:O.jsx("td",{colSpan:n.length+(Pe?1:0),className:"text-center text-sm py-4 text-gray-600 dark:text-gray-400",children:"No data available"})}):_e.getRowModel().rows.map((ue,He)=>O.jsxs("tr",{className:`table-data${w?" cursor-pointer":""}`,onClick:Re=>{w&&!Re.target.closest('input[type="checkbox"]')&&w(ue.original)},children:[Pe&&O.jsx("td",{className:"table-padding checkbox sticky -left-1 z-10",style:{width:"40px"},onClick:Re=>{Re.stopPropagation();const mt=Re.currentTarget.querySelector('input[type="checkbox"]');mt&&mt.click()},children:O.jsx("input",{type:"checkbox",disabled:ue.original.isDisabled,className:`${Yh} dark:border-gray-600`,checked:Z.has(ue.original.id)&&!ue.original.isDisabled,onChange:Re=>{ue.original.isDisabled||on(ue.original.id,Re.target.checked)},onClick:Re=>Re.stopPropagation()})}),ue.getVisibleCells().map((Re,mt)=>{var Un;let Lt="";const en=["actions","startTime","endTime","created_at","updated_at","created","updated"].includes((Un=Re==null?void 0:Re.column)==null?void 0:Un.id);return Re.column.columnDef.preLine&&(Lt+=" pre-line"),Re.column.columnDef.fixedColumn&&(Lt+=" sticky z-10"),Re.column.columnDef.centerAlign&&(Lt+=" text-center"),en&&(Lt+=" right-fixed"),O.jsx("td",{className:`table-padding ${Lt} ${C?"border":""} whitespace-nowrap text-ellipsis`,style:{minWidth:Re.column.columnDef.minSize||"auto",maxWidth:Re.column.columnDef.maxSize||"auto",left:Re.column.columnDef.fixedColumn?Ht(Re.column.id):void 0,right:en?0:void 0,backgroundColor:Re.column.columnDef.fixedColumn?"var(--bg-color)":void 0,borderColor:C?"var(--border-color)":void 0,color:"var(--text-color)"},onClick:Jn=>{Re.column.columnDef.disableClick&&Jn.stopPropagation()},children:ab(Re.column.columnDef.cell,Re.getContext())},`${Re.id}_${mt}`)})]},`${ue.id}_${He}`))})]})})}),d&&O.jsxs("div",{className:"sticky bottom-0 z-10 bg-brand-surface py-2 flex justify-between items-center pagination-container dark:text-gray-300 main-table-footer",children:[O.jsxs("div",{className:"flex items-center space-x-1",children:[O.jsx("button",{onClick:()=>_e.setPageIndex(0),disabled:ne.pageIndex===0,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:ue=>!ue.currentTarget.disabled&&(ue.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:ue=>ue.currentTarget.style.color="var(--secondary-text-color)",children:O.jsx(LR,{size:20})}),O.jsx("button",{onClick:()=>_e.previousPage(),disabled:ne.pageIndex===0,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:ue=>!ue.currentTarget.disabled&&(ue.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:ue=>ue.currentTarget.style.color="var(--secondary-text-color)",children:O.jsx(VR,{size:20})}),O.jsxs("span",{className:"pagination-content",style:{color:"var(--text-color)"},children:["Page",O.jsx("input",{type:"number",value:vt,onChange:ue=>{const He=ue.target.value.replace(/^0+/,"");ft(He===""?"":Number(He))},onBlur:()=>{const ue=Math.min(Math.max(Number(vt),1),_t);ft(ue),_e.setPageIndex(ue-1)},onKeyDown:ue=>{if(ue.key==="Enter"){const He=Math.min(Math.max(Number(vt),1),_t);ft(He),_e.setPageIndex(He-1)}},className:"px-2 py-1 rounded text-center mx-2",style:{width:`${String(vt||Xh).length+Xh}ch`,backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)",color:"var(--text-color)"}}),"of ",O.jsx("span",{className:"mx-1",children:_t})]}),O.jsx("button",{onClick:()=>_e.nextPage(),disabled:ne.pageIndex+1===_t,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:ue=>!ue.currentTarget.disabled&&(ue.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:ue=>ue.currentTarget.style.color="var(--secondary-text-color)",children:O.jsx(zR,{size:20})}),O.jsx("button",{onClick:()=>_e.setPageIndex(_t),disabled:ne.pageIndex+1===_t,className:"disabled:opacity-50 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:ue=>!ue.currentTarget.disabled&&(ue.currentTarget.style.color="var(--brand-orange)"),onMouseLeave:ue=>ue.currentTarget.style.color="var(--secondary-text-color)",children:O.jsx(FR,{size:20})})]}),y&&O.jsx("button",{"data-testid":f?"view-active-items-button":"view-deleted-items-button",onClick:()=>{if(U(new Set),ne.pageIndex=Qc,ne.pageSize=Kc,F&&N)try{const{setPagination:ue}=require("../../redux/slices/tableDataSlice");N(ue({tableType:e,pagination:{pageIndex:Qc,pageSize:Kc}}));try{const{setFilters:He}=require("../../redux/slices/filterSlice");N(He({tableType:e,filters:{}}))}catch{}}catch{}pt(!1),p==null||p()},className:`toggle-delete text-xs px-2 py-1 min-w-24 rounded flex items-center gap-1 font-semibold justify-center ${f?"bg-gray-600 text-white hover:bg-gray-700 dark:bg-gray-500 dark:text-gray-200 dark:hover:bg-gray-400":"bg-white text-gray-600 hover:bg-gray-100 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"} border border-gray-300 text-gray-700 dark:border-gray-500 focus:outline-none`,children:f?"View Active Items":"View Deleted Items"}),O.jsxs("div",{className:"flex items-center space-x-2 pagination-content",style:{color:"var(--text-color)"},children:[O.jsx("span",{children:"Rows per page"}),O.jsx("div",{style:{width:"90px"},children:O.jsx(il,{placeholder:"",options:[10,25,50,100].map(ue=>({label:ue.toString(),value:ue.toString()})),selectedOptions:[{label:ne.pageSize.toString(),value:ne.pageSize.toString()}],handleChange:ue=>{ue&&he(He=>({...He,pageSize:+ue.value}))},isMulti:!1,closeMenuOnSelect:!0,isClearable:!1,menuPosition:"fixed",customStyles:{control:(ue,He)=>({...ue,minHeight:"34px",height:"34px",backgroundColor:"var(--bg-color)",borderColor:He.isFocused?"var(--brand-orange)":"var(--border-color)",boxShadow:He.isFocused?"0 0 0 1px var(--brand-orange)":ue.boxShadow})}})})]})]}),o&&a&&l&&c&&vn&&O.jsx(vn,{type:e,fields:a,inlineRowFields:a==null?void 0:a.filter(ue=>ue.inline===!0),visible:Se,onClose:()=>ve(!1),title:"Filters",okText:"Apply Filters",cancelText:"Clear",data:r,setFilteredData:l,filtersApplied:nt,toggleFilterApply:pt,fetchTableData:i,pageNumber:ne.pageIndex,pageSize:ne.pageSize,setTotalRowCount:Y,setPagination:he,options:t,sorting:G,setSorting:$,showDeletedItems:f,setExportFilters:ge,searchTerm:H})]})},e9=({isOpen:e,onClose:t,onConfirm:n,title:r,message:i,confirmText:s="Confirm",cancelText:o="Cancel",type:a="warning",isLoading:l=!1})=>{if(!e)return null;const c=()=>{switch(a){case"danger":return"text-red-500";case"warning":return"text-yellow-500";case"info":return"text-brand-primary";default:return"text-yellow-500"}},d=()=>{switch(a){case"danger":return"bg-red-600 hover:bg-red-700 focus:ring-red-500";case"warning":return"bg-yellow-600 hover:bg-yellow-700 focus:ring-yellow-500";case"info":return"bg-brand-primary hover:bg-[var(--brand-orange)]/90 focus:ring-[var(--brand-orange)]";default:return"bg-yellow-600 hover:bg-yellow-700 focus:ring-yellow-500"}};return O.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[O.jsx("div",{className:"absolute inset-0 bg-gray-500 bg-opacity-75 transition-opacity",onClick:t}),O.jsxs("div",{className:"relative rounded-lg text-left overflow-hidden shadow-xl transform transition-all max-w-lg w-full mx-4",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:[O.jsx("div",{className:"px-4 pt-5 pb-4 sm:p-6 sm:pb-4",style:{backgroundColor:"var(--bg-color)"},children:O.jsxs("div",{className:"sm:flex sm:items-start",children:[O.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full sm:mx-0 sm:h-10 sm:w-10",style:{backgroundColor:"var(--hover-bg-color)"},children:O.jsx(fy,{className:`h-6 w-6 ${c()}`})}),O.jsxs("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[O.jsx("h3",{className:"text-lg leading-6 font-medium",style:{color:"var(--text-color)"},children:r}),O.jsx("div",{className:"mt-2",children:O.jsx("p",{className:"text-sm whitespace-pre-line",style:{color:"var(--secondary-text-color)"},children:i})})]})]})}),O.jsxs("div",{className:"px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",style:{backgroundColor:"var(--hover-bg-color)"},children:[O.jsx("button",{type:"button",className:`w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white ${d()} focus:outline-none focus:ring-2 focus:ring-offset-2 sm:ml-3 sm:w-auto sm:text-sm disabled:opacity-50 disabled:cursor-not-allowed`,onClick:n,disabled:l,children:l?"Processing...":s}),O.jsx("button",{type:"button",className:"mt-3 w-full inline-flex justify-center rounded-md shadow-sm px-4 py-2 text-base font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",style:{backgroundColor:"var(--bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)"},onMouseEnter:g=>g.currentTarget.style.backgroundColor="var(--hover-bg-color)",onMouseLeave:g=>g.currentTarget.style.backgroundColor="var(--bg-color)",onClick:t,disabled:l,children:o})]})]})]})};var M_={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(gd,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",c="day",d="week",g="month",b="quarter",x="year",w="date",C="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var F=["th","st","nd","rd"],j=N%100;return"["+N+(F[(j-20)%10]||F[j]||F[0])+"]"}},v=function(N,F,j){var H=String(N);return!H||H.length>=F?N:""+Array(F+1-H.length).join(j)+N},f={s:v,z:function(N){var F=-N.utcOffset(),j=Math.abs(F),H=Math.floor(j/60),L=j%60;return(F<=0?"+":"-")+v(H,2,"0")+":"+v(L,2,"0")},m:function N(F,j){if(F.date()<j.date())return-N(j,F);var H=12*(j.year()-F.year())+(j.month()-F.month()),L=F.clone().add(H,g),G=j-L<0,$=F.clone().add(H+(G?-1:1),g);return+(-(H+(j-L)/(G?L-$:$-L))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:g,y:x,w:d,d:c,D:w,h:l,m:a,s:o,ms:s,Q:b}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},p="en",y={};y[p]=u;var h="$isDayjsObject",_=function(N){return N instanceof D||!(!N||!N[h])},I=function N(F,j,H){var L;if(!F)return p;if(typeof F=="string"){var G=F.toLowerCase();y[G]&&(L=G),j&&(y[G]=j,L=G);var $=F.split("-");if(!L&&$.length>1)return N($[0])}else{var Z=F.name;y[Z]=F,L=Z}return!H&&L&&(p=L),L||!H&&p},A=function(N,F){if(_(N))return N.clone();var j=typeof F=="object"?F:{};return j.date=N,j.args=arguments,new D(j)},R=f;R.l=I,R.i=_,R.w=function(N,F){return A(N,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var D=function(){function N(j){this.$L=I(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[h]=!0}var F=N.prototype;return F.parse=function(j){this.$d=function(H){var L=H.date,G=H.utc;if(L===null)return new Date(NaN);if(R.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var $=L.match(E);if($){var Z=$[2]-1||0,U=($[7]||"0").substring(0,3);return G?new Date(Date.UTC($[1],Z,$[3]||1,$[4]||0,$[5]||0,$[6]||0,U)):new Date($[1],Z,$[3]||1,$[4]||0,$[5]||0,$[6]||0,U)}}return new Date(L)}(j),this.init()},F.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},F.$utils=function(){return R},F.isValid=function(){return this.$d.toString()!==C},F.isSame=function(j,H){var L=A(j);return this.startOf(H)<=L&&L<=this.endOf(H)},F.isAfter=function(j,H){return A(j)<this.startOf(H)},F.isBefore=function(j,H){return this.endOf(H)<A(j)},F.$g=function(j,H,L){return R.u(j)?this[H]:this.set(L,j)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(j,H){var L=this,G=!!R.u(H)||H,$=R.p(j),Z=function(xe,Y){var le=R.w(L.$u?Date.UTC(L.$y,Y,xe):new Date(L.$y,Y,xe),L);return G?le:le.endOf(c)},U=function(xe,Y){return R.w(L.toDate()[xe].apply(L.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(Y)),L)},ee=this.$W,se=this.$M,ie=this.$D,fe="set"+(this.$u?"UTC":"");switch($){case x:return G?Z(1,0):Z(31,11);case g:return G?Z(1,se):Z(0,se+1);case d:var Se=this.$locale().weekStart||0,ve=(ee<Se?ee+7:ee)-Se;return Z(G?ie-ve:ie+(6-ve),se);case c:case w:return U(fe+"Hours",0);case l:return U(fe+"Minutes",1);case a:return U(fe+"Seconds",2);case o:return U(fe+"Milliseconds",3);default:return this.clone()}},F.endOf=function(j){return this.startOf(j,!1)},F.$set=function(j,H){var L,G=R.p(j),$="set"+(this.$u?"UTC":""),Z=(L={},L[c]=$+"Date",L[w]=$+"Date",L[g]=$+"Month",L[x]=$+"FullYear",L[l]=$+"Hours",L[a]=$+"Minutes",L[o]=$+"Seconds",L[s]=$+"Milliseconds",L)[G],U=G===c?this.$D+(H-this.$W):H;if(G===g||G===x){var ee=this.clone().set(w,1);ee.$d[Z](U),ee.init(),this.$d=ee.set(w,Math.min(this.$D,ee.daysInMonth())).$d}else Z&&this.$d[Z](U);return this.init(),this},F.set=function(j,H){return this.clone().$set(j,H)},F.get=function(j){return this[R.p(j)]()},F.add=function(j,H){var L,G=this;j=Number(j);var $=R.p(H),Z=function(se){var ie=A(G);return R.w(ie.date(ie.date()+Math.round(se*j)),G)};if($===g)return this.set(g,this.$M+j);if($===x)return this.set(x,this.$y+j);if($===c)return Z(1);if($===d)return Z(7);var U=(L={},L[a]=r,L[l]=i,L[o]=n,L)[$]||1,ee=this.$d.getTime()+j*U;return R.w(ee,this)},F.subtract=function(j,H){return this.add(-1*j,H)},F.format=function(j){var H=this,L=this.$locale();if(!this.isValid())return L.invalidDate||C;var G=j||"YYYY-MM-DDTHH:mm:ssZ",$=R.z(this),Z=this.$H,U=this.$m,ee=this.$M,se=L.weekdays,ie=L.months,fe=L.meridiem,Se=function(Y,le,re,ge){return Y&&(Y[le]||Y(H,G))||re[le].slice(0,ge)},ve=function(Y){return R.s(Z%12||12,Y,"0")},xe=fe||function(Y,le,re){var ge=Y<12?"AM":"PM";return re?ge.toLowerCase():ge};return G.replace(k,function(Y,le){return le||function(re){switch(re){case"YY":return String(H.$y).slice(-2);case"YYYY":return R.s(H.$y,4,"0");case"M":return ee+1;case"MM":return R.s(ee+1,2,"0");case"MMM":return Se(L.monthsShort,ee,ie,3);case"MMMM":return Se(ie,ee);case"D":return H.$D;case"DD":return R.s(H.$D,2,"0");case"d":return String(H.$W);case"dd":return Se(L.weekdaysMin,H.$W,se,2);case"ddd":return Se(L.weekdaysShort,H.$W,se,3);case"dddd":return se[H.$W];case"H":return String(Z);case"HH":return R.s(Z,2,"0");case"h":return ve(1);case"hh":return ve(2);case"a":return xe(Z,U,!0);case"A":return xe(Z,U,!1);case"m":return String(U);case"mm":return R.s(U,2,"0");case"s":return String(H.$s);case"ss":return R.s(H.$s,2,"0");case"SSS":return R.s(H.$ms,3,"0");case"Z":return $}return null}(Y)||$.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(j,H,L){var G,$=this,Z=R.p(H),U=A(j),ee=(U.utcOffset()-this.utcOffset())*r,se=this-U,ie=function(){return R.m($,U)};switch(Z){case x:G=ie()/12;break;case g:G=ie();break;case b:G=ie()/3;break;case d:G=(se-ee)/6048e5;break;case c:G=(se-ee)/864e5;break;case l:G=se/i;break;case a:G=se/r;break;case o:G=se/n;break;default:G=se}return L?G:R.a(G)},F.daysInMonth=function(){return this.endOf(g).$D},F.$locale=function(){return y[this.$L]},F.locale=function(j,H){if(!j)return this.$L;var L=this.clone(),G=I(j,H,!0);return G&&(L.$L=G),L},F.clone=function(){return R.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},N}(),B=D.prototype;return A.prototype=B,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",c],["$M",g],["$y",x],["$D",w]].forEach(function(N){B[N[1]]=function(F){return this.$g(F,N[0],N[1])}}),A.extend=function(N,F){return N.$i||(N(F,D,A),N.$i=!0),A},A.locale=I,A.isDayjs=_,A.unix=function(N){return A(1e3*N)},A.en=y[p],A.Ls=y,A.p={},A})})(M_);var t9=M_.exports;const Tu=kl(t9);var R_={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(gd,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,o,a){var l=o.prototype;a.utc=function(C){var E={date:C,utc:!0,args:arguments};return new o(E)},l.utc=function(C){var E=a(this.toDate(),{locale:this.$L,utc:!0});return C?E.add(this.utcOffset(),n):E},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(C){C.utc&&(this.$u=!0),this.$utils().u(C.$offset)||(this.$offset=C.$offset),c.call(this,C)};var d=l.init;l.init=function(){if(this.$u){var C=this.$d;this.$y=C.getUTCFullYear(),this.$M=C.getUTCMonth(),this.$D=C.getUTCDate(),this.$W=C.getUTCDay(),this.$H=C.getUTCHours(),this.$m=C.getUTCMinutes(),this.$s=C.getUTCSeconds(),this.$ms=C.getUTCMilliseconds()}else d.call(this)};var g=l.utcOffset;l.utcOffset=function(C,E){var k=this.$utils().u;if(k(C))return this.$u?0:k(this.$offset)?g.call(this):this.$offset;if(typeof C=="string"&&(C=function(p){p===void 0&&(p="");var y=p.match(r);if(!y)return null;var h=(""+y[0]).match(i)||["-",0,0],_=h[0],I=60*+h[1]+ +h[2];return I===0?0:_==="+"?I:-I}(C),C===null))return this;var u=Math.abs(C)<=16?60*C:C;if(u===0)return this.utc(E);var v=this.clone();if(E)return v.$offset=u,v.$u=!1,v;var f=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(v=this.local().add(u+f,n)).$offset=u,v.$x.$localOffset=f,v};var b=l.format;l.format=function(C){var E=C||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return b.call(this,E)},l.valueOf=function(){var C=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*C},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var x=l.toDate;l.toDate=function(C){return C==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():x.call(this)};var w=l.diff;l.diff=function(C,E,k){if(C&&this.$u===C.$u)return w.call(this,C,E,k);var u=this.local(),v=a(C).local();return w.call(u,v,E,k)}}})})(R_);var n9=R_.exports;const r9=kl(n9);Tu.extend(r9);const i9=({seconds:e,pauseOnMount:t=!1,startDateTime:n,runningTime:r=!0})=>{const[i,s]=M.useState(e),[o,a]=M.useState(0);M.useEffect(()=>{!n&&typeof e=="number"&&!isNaN(e)&&s(e)},[e,n]),M.useEffect(()=>{let g;if(n){const b=Tu.utc(n,"YYYY-MM-DD HH:mm:ss");g=setInterval(()=>{const w=Tu.utc().diff(b,"second");a(w)},1e3)}else!t&&typeof i=="number"&&(g=setInterval(()=>{s(b=>typeof b=="number"?b-1:b)},1e3));return()=>{g&&clearInterval(g)}},[n,t,i]);const l=g=>{const b=Math.abs(g),x=Math.floor(b/3600),w=Math.floor(b%3600/60),C=b%60,E=[];return x>0&&E.push(`${x}h`),E.push(`${w}m`),E.push(`${C}s`),E.join(" ")},c=g=>n?"text-green-500 dark:text-green-400 text-[11px]":t?r?"text-[11px] dark:text-gray-300":"text-[12px] dark:text-gray-300":g<0?"text-[10px] text-red-500 dark:text-red-400":g<=60?"text-[10px] text-yellow-500 dark:text-yellow-400":"text-[10px] text-green-500 dark:text-green-400",d=n?o:i;return typeof d!="number"||isNaN(d)?O.jsx("span",{className:"text-gray-400 dark:text-gray-500 text-sm font-mono",children:"-- --"}):O.jsx("span",{className:`font-mono ${c(d)}`,children:l(d)})},s9=({error:e,onRetry:t,fallbackPath:n})=>{const[r,i]=M.useState(!1),[s,o]=M.useState(!1),a=async()=>{o(!0);try{n?window.location.href=n:window.location.reload()}finally{o(!1)}},l=()=>{t()};return M.useEffect(()=>{typeof window<"u"&&window.Sentry&&window.Sentry.captureException(e)},[e]),O.jsx("div",{className:"fixed inset-0 z-[9999] overflow-auto",style:{backgroundColor:"var(--app-bg-color, #ffffff)"},children:O.jsx("div",{className:"flex items-center justify-center min-h-screen w-full p-4 sm:p-8 font-sans",children:O.jsxs("div",{className:"shadow-md dark:shadow-lg rounded-lg p-6 sm:p-10 max-w-xl w-full text-center focus:outline-none my-8",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:[O.jsxs("div",{className:"mb-8",children:[O.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full mb-5",style:{backgroundColor:"rgba(255, 101, 3, 0.1)",color:"var(--brand-orange)"},children:O.jsx(Sp,{size:32})}),O.jsx("h2",{className:"text-xl font-semibold mb-3 leading-snug",style:{color:"var(--text-color)"},children:"Something went wrong"}),O.jsx("p",{className:"text-base leading-relaxed max-w-md mx-auto",style:{color:"var(--secondary-text-color)"},children:"An unexpected error occurred. Please try refreshing the page"})]}),O.jsxs("div",{className:"flex flex-wrap justify-center gap-3 mb-8",children:[O.jsxs("button",{className:"bg-brand-primary inline-flex items-center justify-center gap-2 px-5 py-3 rounded-md font-medium text-sm transition-all duration-150 min-w-[120px] focus:outline-none disabled:opacity-65 disabled:cursor-not-allowed disabled:pointer-events-none",onClick:l,disabled:s,children:[O.jsx(WR,{size:16,className:s?"animate-spin ":""}),"Try Again"]}),O.jsxs("button",{className:"inline-flex items-center justify-center gap-2 px-5 py-3 rounded-md font-medium text-sm transition-all duration-150 min-w-[120px] focus:outline-none disabled:opacity-65 disabled:cursor-not-allowed disabled:pointer-events-none",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)"},onMouseEnter:c=>{c.currentTarget.style.backgroundColor="var(--border-color)"},onMouseLeave:c=>{c.currentTarget.style.backgroundColor="var(--hover-bg-color)"},onClick:a,disabled:s,children:[O.jsx(DR,{size:16}),n?"Go to Home":"Refresh Page"]})]}),process.env.NODE_ENV!=="production"&&O.jsxs("div",{className:"pt-6",style:{borderTop:"1px solid var(--border-color)"},children:[O.jsxs("button",{className:"inline-flex items-center gap-2 text-sm font-medium py-2 px-3 rounded transition-colors",style:{color:"var(--brand-orange)"},onMouseEnter:c=>{c.currentTarget.style.backgroundColor="var(--hover-bg-color)"},onMouseLeave:c=>{c.currentTarget.style.backgroundColor="transparent"},onClick:()=>i(!r),children:[r?O.jsx(HR,{size:16}):O.jsx(GR,{size:16}),r?"Hide":"Show"," Error Details"]}),r&&O.jsxs("div",{className:"mt-5 text-left p-5 rounded-md max-h-[400px] overflow-auto",style:{backgroundColor:"var(--hover-bg-color)",border:"1px solid var(--border-color)"},children:[O.jsxs("div",{className:"mb-4 flex flex-col gap-2",children:[O.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-color)"},children:"Error Message:"}),O.jsx("code",{className:"text-sm leading-snug break-words p-2 rounded font-mono",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",color:"#dc2626",border:"1px solid rgba(239, 68, 68, 0.3)"},children:e.message})]}),O.jsxs("div",{className:"mb-4 flex flex-col gap-2",children:[O.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-color)"},children:"Timestamp:"}),O.jsx("span",{className:"text-sm leading-snug break-words",style:{color:"var(--text-color)"},children:new Date().toLocaleString()})]}),e.stack&&O.jsxs("div",{className:"mb-0 flex flex-col gap-2",children:[O.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-color)"},children:"Stack Trace:"}),O.jsx("pre",{className:"text-sm leading-snug break-words p-4 rounded font-mono text-xs leading-relaxed overflow-auto whitespace-pre-wrap max-h-[300px]",style:{backgroundColor:"var(--brand-dark)",color:"#f9fafb",border:"1px solid var(--border-color)"},children:e.stack})]})]})]})]})})})};class P_ extends M.Component{constructor(t){super(t),this.handleReset=()=>{this.setState({hasError:!1,error:null,errorInfo:null}),this.props.onReset&&this.props.onReset()},this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){typeof window<"u"&&window.Sentry&&window.Sentry.captureException(t),this.setState({errorInfo:{componentStack:n.componentStack||""}}),this.props.onError&&this.props.onError(t,{componentStack:n.componentStack||""})}render(){return this.state.hasError&&this.state.error?O.jsx(s9,{error:this.state.error,onRetry:this.handleReset,fallbackPath:this.props.fallbackPath}):this.props.children}}class o9 extends M.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){var r,i;console.error("Component error:",t,n),(i=(r=this.props).onError)==null||i.call(r,t,n),typeof window<"u"&&window.Sentry&&window.Sentry.captureException(t,{contexts:{react:{componentStack:n.componentStack}}})}render(){var t;return this.state.hasError?this.props.fallback?this.props.fallback:O.jsxs("div",{className:"p-4 rounded",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)"},children:[O.jsx("p",{className:"text-sm",style:{color:"#dc2626"},children:"Something went wrong displaying this component."}),process.env.NODE_ENV==="development"&&O.jsxs("details",{className:"mt-2",children:[O.jsx("summary",{className:"cursor-pointer text-xs",style:{color:"var(--text-color)"},children:"Error details"}),O.jsx("pre",{className:"mt-1 text-xs overflow-auto",style:{color:"var(--text-color)"},children:(t=this.state.error)==null?void 0:t.toString()})]})]}):this.props.children}}const a9=({used:e,max:t,resourceName:n,warningThreshold:r=5,className:i=""})=>{const s=t-e;if(!t)return null;const a=s<=0?"exhausted":s<=r?"warning":"available",l=()=>{switch(a){case"exhausted":return{backgroundColor:"var(--status-error-bg)",color:"var(--status-error-text)",border:"1px solid var(--status-error-border)"};case"warning":return{backgroundColor:"var(--status-warning-bg)",color:"var(--status-warning-text)",border:"1px solid var(--status-warning-border)"};case"available":default:return{backgroundColor:"var(--status-success-bg)",color:"var(--status-success-text)",border:"1px solid var(--status-success-border)"}}};return O.jsxs("div",{className:`ml-2 px-2 py-1 rounded flex items-center gap-1 text-xs font-semibold ${i}`,style:l(),children:[O.jsxs("span",{children:[e," / ",t," (",s," available)"]}),a==="exhausted"&&O.jsxs("span",{className:"ml-2 font-semibold",children:["No more ",n," can be added."]})]})},l9=({displayText:e,hasMoreData:t,restDataLength:n,onClick:r,isTruncatedData:i,tooltipText:s="",customButtonEl:o})=>O.jsxs("div",{className:"flex gap-2 items-center",children:[O.jsx("div",{children:O.jsx("span",{children:O.jsx(jo,{text:s,isVisible:i,children:e})})}),t&&O.jsx("button",{className:"rounded px-[3px] flex items-center justify-center cursor-pointer transition border-brand-primary text-brand-primary hover:bg-brand-surface-subtle",style:{border:"1px solid var(--brand-orange)",color:"var(--brand-orange)"},onMouseEnter:a=>a.currentTarget.style.backgroundColor="var(--brand-light)",onMouseLeave:a=>a.currentTarget.style.backgroundColor="transparent",onClick:a=>{a.stopPropagation(),r()},children:o||O.jsx(O.Fragment,{children:O.jsxs("span",{className:"text-xs",children:["+",n&&Number(n)>0?n:""]})})})]}),Cs={low:{label:"Low"},medium:{min:40,label:"Medium"},high:{min:70,label:"High"},critical:{min:90,label:"Critical"}},c9={low:{level:"low",label:Cs.low.label,color:"text-white",backgroundColor:"bg-green-500"},medium:{level:"medium",label:Cs.medium.label,color:"text-white",backgroundColor:"bg-yellow-500"},high:{level:"high",label:Cs.high.label,color:"text-white",backgroundColor:"bg-orange-500"},critical:{level:"critical",label:Cs.critical.label,color:"text-white",backgroundColor:"bg-red-500"}},kp=e=>e>=Cs.critical.min?"critical":e>=Cs.high.min?"high":e>=Cs.medium.min?"medium":"low",N_=e=>{const t=kp(e);return c9[t]},u9=e=>{const t=kp(e);return t==="high"||t==="critical"},d9=({score:e,customStyles:t})=>{const{label:n,backgroundColor:r,color:i}=N_(e);return O.jsx("span",{className:er("px-2 py-1 rounded text-xs font-semibold",r,i,t),children:n})},T_=(e={})=>{const{fallbackPath:t="/assets",basePath:n=e.basePath||t}=e;return{getAssetPath:M.useMemo(()=>i=>{if(!i)return n;const s=i.startsWith("/")?i.slice(1):i;return`${n.endsWith("/")?n.slice(0,-1):n}/${s}`},[n]),basePath:n}},O_=e=>{const{getAssetPath:t}=T_(),n=M.useMemo(()=>!e||e.trim()===""?t("files/unknown_file.svg"):t(`files/${e.toLowerCase()}.svg`),[e,t]),r=M.useMemo(()=>t("files/unknown_file.svg"),[t]);return{iconPath:n,fallbackPath:r}},f9=({category:e,className:t="w-3 h-4 object-cover"})=>{const{iconPath:n,fallbackPath:r}=O_(e),[i,s]=M.useState(!1),o=M.useCallback(()=>{s(!0)},[]),a=i?r:n;return O.jsx("img",{src:a,alt:e||"unknown file",className:t,onError:o})},D_=({message:e="No Active Attributes Present!"})=>O.jsxs("div",{className:"flex gap-2 align-center p-2 text-xs font-medium rounded-sm bg-yellow-200 text-yellow-700 w-full",children:[O.jsx(Sp,{role:"img",size:14}),O.jsx("span",{children:e})]}),h9=({icon:e,title:t="Select Country"})=>{const n=M.useRef(null),[r,i]=M.useState(!1);M.useEffect(()=>{const o=n.current;o&&i(o.scrollWidth>o.clientWidth)},[t]);const s=O.jsx("p",{ref:n,className:"overflow-hidden text-ellipsis whitespace-nowrap max-w-36",children:t});return O.jsxs("div",{className:"px-2 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-800 text-gray-400 dark:text-gray-300 text-sm text-center h-[30px] flex items-center justify-center",children:[O.jsx("img",{src:e,alt:t,className:"w-4 h-4 mr-2 rounded-full object-cover"}),r?O.jsx(jo,{text:t,children:s}):s]})},g9=({isOpen:e,onDismiss:t,summaryData:n,errors:r=[],onDownload:i,onRetry:s,title:o,dataType:a})=>{if(M.useEffect(()=>{if(!e)return;const g=b=>{b.key==="Escape"&&t()};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[e,t]),!e)return null;const l=n.total>0?n.success/n.total*100:0,[c,d]=M.useState(!0);return O.jsx("div",{role:"dialog",className:"fixed inset-0 z-[1000] flex items-center justify-center bg-black/40",onClick:t,children:O.jsxs("div",{className:"relative w-full min-w-[320px] max-w-[600px] rounded-lg shadow-2xl",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},onClick:g=>g.stopPropagation(),children:[O.jsx("button",{onClick:t,"aria-label":"Close",className:"absolute right-4 top-4 text-xl",style:{color:"var(--secondary-text-color)"},onMouseEnter:g=>g.currentTarget.style.color="var(--text-color)",onMouseLeave:g=>g.currentTarget.style.color="var(--secondary-text-color)",children:"×"}),O.jsxs("div",{className:"p-4 border-b",style:{borderColor:"var(--border-color)"},children:[O.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[O.jsx(qR,{className:"text-blue-500",size:20}),O.jsx("h3",{className:"text-lg font-semibold",style:{color:"var(--text-color)"},children:o??"Result"})]}),O.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-4",children:[O.jsxs("div",{className:"text-center",children:[O.jsx("div",{className:"text-2xl font-bold",style:{color:"var(--text-color)"},children:n.total}),O.jsx("div",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:"Total"})]}),O.jsxs("div",{className:"text-center",children:[O.jsx("div",{className:"text-2xl font-bold text-green-600 dark:text-green-400",children:n.success}),O.jsx("div",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:"Success"})]}),O.jsxs("div",{className:"text-center",children:[O.jsx("div",{className:"text-2xl font-bold text-red-600 dark:text-red-400",children:n.failed}),O.jsx("div",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:"Failed"})]})]}),O.jsx("div",{className:"w-full rounded-full h-2",style:{backgroundColor:"var(--brand-light)"},children:O.jsx("div",{className:"bg-green-600 dark:bg-green-400 h-2 rounded-full transition-all duration-500",style:{width:`${l}%`}})}),O.jsxs("div",{className:"text-sm font-bold mt-2",style:{color:"var(--secondary-text-color)"},children:[l.toFixed(0),"% successful"]})]}),r.length>0&&O.jsxs("div",{className:"p-4 border-b",style:{borderColor:"var(--border-color)"},children:[O.jsxs("button",{onClick:()=>d(!c),className:"flex items-center justify-between w-full text-left hover:bg-opacity-50 rounded p-2 -m-2 transition-colors",style:{backgroundColor:"transparent"},onMouseEnter:g=>g.currentTarget.style.backgroundColor="var(--hover-bg-color)",onMouseLeave:g=>g.currentTarget.style.backgroundColor="transparent",children:[O.jsxs("h4",{className:"text-md font-medium flex items-center gap-2",style:{color:"var(--text-color)"},children:[O.jsx($R,{className:"text-amber-500"}),"Error Details (",r.length," issues)"]}),c?O.jsx(UR,{style:{color:"var(--secondary-text-color)"}}):O.jsx(ZR,{style:{color:"var(--secondary-text-color)"}})]}),c&&O.jsx("div",{className:"mt-4 space-y-2 max-h-60 overflow-y-auto",children:r.map(g=>O.jsxs("div",{className:"p-3 rounded text-sm",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)"},children:[O.jsxs("div",{className:"font-medium",style:{color:"#dc2626"},children:[g.field?`${g.field}: `:"",g.error]}),g.value&&O.jsxs("div",{className:"mt-1 text-xs",style:{color:"var(--secondary-text-color)"},children:["Value: ",g.value]})]},g.id))})]}),O.jsxs("div",{className:"p-4 flex flex-wrap justify-end gap-2",children:[i&&O.jsxs("button",{onClick:i,className:"px-4 py-2 rounded-md flex items-center gap-2 transition-colors",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)"},onMouseEnter:g=>g.currentTarget.style.backgroundColor="var(--brand-light)",onMouseLeave:g=>g.currentTarget.style.backgroundColor="var(--hover-bg-color)",children:[O.jsx(Ru,{}),"Download Errors"]}),s&&O.jsxs("button",{onClick:s,className:"px-4 py-2 rounded-md flex items-center gap-2 bg-brand-primary text-white hover:bg-opacity-90 transition-colors",children:[O.jsx(KR,{}),"Retry"]}),O.jsx("button",{onClick:t,className:"px-4 py-2 rounded-md transition-colors",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--text-color)",border:"1px solid var(--border-color)"},onMouseEnter:g=>g.currentTarget.style.backgroundColor="var(--brand-light)",onMouseLeave:g=>g.currentTarget.style.backgroundColor="var(--hover-bg-color)",children:"Close"})]})]})})},p9=({isVisible:e,currentStep:t,error:n,onDismiss:r})=>{if(!e)return null;const i=(s,o)=>o?O.jsx(YR,{className:"w-6 h-6 text-green-600 dark:text-green-400"}):s?O.jsx("div",{className:"animate-spin rounded-full h-6 w-6",style:{borderWidth:"2px",borderStyle:"solid",borderColor:"var(--brand-light)",borderTopColor:"var(--brand-orange)"}}):O.jsx("div",{className:"w-6 h-6 border-2 rounded-full",style:{borderColor:"var(--border-color)"}});return O.jsx("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-sm flex items-center justify-center z-50",children:O.jsxs("div",{className:"rounded-lg shadow-2xl p-8 max-w-md w-full mx-4 relative",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},children:[n&&r&&O.jsx("button",{onClick:r,className:"absolute top-4 right-4 p-2 transition-colors",style:{color:"var(--secondary-text-color)"},onMouseEnter:s=>s.currentTarget.style.color="var(--text-color)",onMouseLeave:s=>s.currentTarget.style.color="var(--secondary-text-color)",children:O.jsx(QR,{className:"w-5 h-5"})}),O.jsxs("div",{className:"text-center mb-8",children:[O.jsx("div",{className:"flex items-center justify-center mb-4",children:O.jsx(Ru,{className:"w-12 h-12 text-brand-primary"})}),O.jsx("h2",{className:"text-2xl font-bold mb-2",style:{color:"var(--text-color)"},children:"Installing Update"}),O.jsx("p",{style:{color:"var(--secondary-text-color)"},children:"Please wait while we install the update safely"})]}),n&&O.jsxs("div",{className:"mb-6 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:[O.jsxs("div",{className:"flex items-center space-x-2",children:[O.jsx(lb,{className:"w-5 h-5 text-red-600 dark:text-red-400"}),O.jsx("p",{className:"text-sm text-red-700 dark:text-red-300 font-medium",children:"Installation Failed"})]}),O.jsx("p",{className:"text-sm text-red-600 dark:text-red-400 mt-1",children:n}),O.jsx("div",{className:"mt-3 flex space-x-2",children:O.jsx("button",{onClick:r,className:"px-3 py-1.5 bg-red-600 text-white text-sm rounded hover:bg-red-700 transition-colors",children:"Close"})})]}),O.jsxs("div",{className:"space-y-4",children:[O.jsxs("div",{className:"flex items-center space-x-3",children:[i(t==="backup",t==="install"||t==="complete"),O.jsxs("div",{className:"flex-1",children:[O.jsxs("div",{className:"flex items-center space-x-2",children:[O.jsx(JR,{className:"w-4 h-4",style:{color:"var(--secondary-text-color)"}}),O.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-color)"},children:"Database Backup"})]}),O.jsx("p",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:t==="backup"?"Creating secure backup...":t==="install"||t==="complete"?"Backup completed":"Pending"})]})]}),O.jsxs("div",{className:"flex items-center space-x-3",children:[i(t==="install",t==="complete"),O.jsxs("div",{className:"flex-1",children:[O.jsxs("div",{className:"flex items-center space-x-2",children:[O.jsx(Ru,{className:"w-4 h-4",style:{color:"var(--secondary-text-color)"}}),O.jsx("span",{className:"text-sm font-medium",style:{color:"var(--text-color)"},children:"Update Installation"})]}),O.jsx("p",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:t==="install"?"Installing update...":t==="complete"?"Installation completed":"Pending"})]})]})]}),O.jsx("div",{className:"mt-6",children:O.jsx("div",{className:"w-full rounded-full h-2",style:{backgroundColor:"var(--brand-light)"},children:O.jsx("div",{className:"h-2 rounded-full transition-all duration-500",style:{width:t==="backup"?"50%":"100%",backgroundColor:"var(--brand-orange)"}})})}),O.jsx("div",{className:"mt-6 p-3 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg",children:O.jsxs("div",{className:"flex items-start space-x-2",children:[O.jsx(lb,{className:"w-4 h-4 text-yellow-600 dark:text-yellow-400 mt-0.5 flex-shrink-0"}),O.jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-300",children:[O.jsx("strong",{children:"Important:"})," Do not close the application during this process. The app will restart automatically after installation."]})]})})]})})},F_=({confidenceData:e,children:t,position:n="top"})=>{const[r,i]=M.useState(!1),[s,o]=M.useState({}),[a,l]=M.useState({}),c=M.useRef(null),d=M.useRef(null);M.useEffect(()=>{if(!r||!c.current)return;const C=c.current.getBoundingClientRect(),E=d.current;if(!E)return;const k=E.getBoundingClientRect(),u=window.innerWidth,v=window.innerHeight;let f=n,p=0,y=0,h=0,_=0;switch(n==="top"&&C.top-k.height<10?f="bottom":n==="bottom"&&C.bottom+k.height>v-10?f="top":n==="left"&&C.left-k.width<10?f="right":n==="right"&&C.right+k.width>u-10&&(f="left"),f){case"top":p=C.top-k.height-8,y=C.left+C.width/2-k.width/2,h=k.height-4,_=k.width/2-5;break;case"bottom":p=C.bottom+8,y=C.left+C.width/2-k.width/2,h=-5,_=k.width/2-5;break;case"left":p=C.top+C.height/2-k.height/2,y=C.left-k.width-8,h=k.height/2-5,_=k.width-4;break;case"right":p=C.top+C.height/2-k.height/2,y=C.right+8,h=k.height/2-5,_=-5;break}o({top:`${p}px`,left:`${y}px`,opacity:1,visibility:"visible"}),l({top:`${h}px`,left:`${_}px`,transform:"rotate(45deg)"})},[r,n]);const g=C=>C>=.8?"text-green-600":C>=.6?"text-yellow-600":"text-red-600",b=C=>C>=.8?"High":C>=.6?"Medium":"Low",x=C=>{switch(C){case"column_name":return"Based on column name analysis";case"sample_data":return"Based on sample data analysis";default:return"Confidence score available"}},w=()=>{const{confidence_score:C,classification_reason:E,sample_data_preview:k,confidence_reason:u}=e;return O.jsxs("div",{className:"confidence-tooltip-content",children:[O.jsx("div",{className:"confidence-tooltip-header",children:O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(x_,{className:"h-4 w-4 text-blue-500"}),O.jsx("span",{className:"font-semibold",style:{color:"var(--text-color)"},children:"Classification Details"})]})}),O.jsxs("div",{className:"confidence-tooltip-body",children:[C!==void 0&&O.jsx("div",{className:"confidence-score-section",children:O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsx("span",{className:"text-sm font-medium",style:{color:"var(--secondary-text-color)"},children:"Confidence Score:"}),O.jsxs("span",{className:`text-sm font-bold ${g(C)}`,children:[b(C)," (",(C*100).toFixed(0),"%)"]})]})}),O.jsx("div",{className:"classification-reason-section",children:O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsx("span",{className:"text-sm font-medium",style:{color:"var(--secondary-text-color)"},children:"Classification Method:"}),O.jsx("span",{className:"text-sm",style:{color:"var(--text-color)"},children:x(E)})]})}),E==="sample_data"&&k&&O.jsxs("div",{className:"sample-data-section",children:[O.jsx("div",{className:"text-sm font-medium mb-1",style:{color:"var(--text-color)"},children:"Sample Data Preview:"}),O.jsx("div",{className:"text-xs p-2 rounded border max-w-xs",style:{color:"var(--text-color)",backgroundColor:"var(--hover-bg-color)",borderColor:"var(--border-color)"},children:O.jsx("div",{className:"truncate",title:k,children:k})})]}),u&&O.jsxs("div",{className:"confidence-reason-section",children:[O.jsx("div",{className:"text-sm font-medium mb-1",style:{color:"var(--text-color)"},children:"Additional Details:"}),O.jsx("div",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:u})]})]})]})};return O.jsxs("div",{className:"confidence-tooltip-wrapper",ref:c,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[t,r&&Ur.createPortal(O.jsxs("div",{ref:d,className:"confidence-tooltip",style:s,children:[w(),O.jsx("span",{className:"confidence-tooltip-arrow",style:a})]}),document.body)]})},m9=({isOpen:e,imagePath:t,imageSrc:n,loadImageFromPath:r,onClose:i})=>{const[s,o]=M.useState(""),[a,l]=M.useState(!1),[c,d]=M.useState("");if(Ug(e),M.useEffect(()=>{if(!e){o(""),d(""),l(!1);return}if(n){o(n),d(""),l(!1);return}t?(async()=>{l(!0),d(""),o("");try{if(r){const x=await r(t);o(x)}else o(t)}catch(x){const w=x instanceof Error?x.message:"Failed to load image";d(w),console.error("[ImagePreviewModal] Failed to load image:",x)}finally{l(!1)}})():d("No image source provided")},[e,t,n,r]),M.useEffect(()=>{if(!e)return;const b=x=>{x.key==="Escape"&&i()};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[e,i]),!e)return null;const g=O.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-[40] p-4 overflow-y-auto",onClick:i,children:O.jsxs("div",{className:"relative py-4 rounded-lg shadow-lg w-[95%] sm:w-[90%] md:w-[85%] lg:w-auto max-w-screen-2xl min-w-[320px] sm:min-w-[400px]",style:{backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)"},onClick:b=>b.stopPropagation(),children:[O.jsx("div",{className:"px-4",children:O.jsxs("div",{className:"flex justify-between items-center",children:[O.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--text-color)"},children:"Image Preview"}),O.jsx("button",{onClick:i,className:"text-brand-primary hover:opacity-80 transition-opacity","aria-label":"Close",children:O.jsx(hy,{size:16})})]})}),O.jsxs("div",{className:"px-4 mt-4 pb-4",children:[a&&O.jsx("div",{className:"flex justify-center items-center py-8",style:{color:"var(--text-color)"},children:O.jsx("span",{children:"Loading image..."})}),c&&O.jsx("div",{className:"flex justify-center items-center py-8",style:{color:"var(--text-color)"},children:O.jsxs("div",{className:"text-center",children:[O.jsx("p",{className:"text-red-500 mb-2",children:"Error loading image"}),O.jsx("p",{className:"text-sm",style:{color:"var(--secondary-text-color)"},children:c})]})}),!a&&!c&&s&&O.jsx("div",{className:"flex justify-center items-center max-h-[70vh] overflow-auto",children:O.jsx("img",{src:s,alt:"Preview",className:"max-w-full max-h-[70vh] object-contain rounded",style:{border:"1px solid var(--border-color)"},onError:()=>d("Failed to load image")})})]})]})});return Ur.createPortal(g,document.getElementById("modal-root")||document.body)};var L_={exports:{}};/* @license
69
- Papa Parse
70
- v5.5.3
71
- https://github.com/mholt/PapaParse
72
- License: MIT
73
- */(function(e,t){((n,r)=>{e.exports=r()})(gd,function n(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},i,s=!r.document&&!!r.postMessage,o=r.IS_PAPA_WORKER||!1,a={},l=0,c={};function d(_){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(I){var A=p(I);A.chunkSize=parseInt(A.chunkSize),I.step||I.chunk||(A.chunkSize=null),this._handle=new C(A),(this._handle.streamer=this)._config=A}).call(this,_),this.parseChunk=function(I,A){var R=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<R){let B=this._config.newline;B||(D=this._config.quoteChar||'"',B=this._handle.guessLineEndings(I,D)),I=[...I.split(B).slice(R)].join(B)}this.isFirstChunk&&h(this._config.beforeFirstChunk)&&(D=this._config.beforeFirstChunk(I))!==void 0&&(I=D),this.isFirstChunk=!1,this._halted=!1;var R=this._partialLine+I,D=(this._partialLine="",this._handle.parse(R,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(I=D.meta.cursor,R=(this._finished||(this._partialLine=R.substring(I-this._baseIndex),this._baseIndex=I),D&&D.data&&(this._rowCount+=D.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),o)r.postMessage({results:D,workerId:c.WORKER_ID,finished:R});else if(h(this._config.chunk)&&!A){if(this._config.chunk(D,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=D=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(D.data),this._completeResults.errors=this._completeResults.errors.concat(D.errors),this._completeResults.meta=D.meta),this._completed||!R||!h(this._config.complete)||D&&D.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),R||D&&D.meta.paused||this._nextChunk(),D}this._halted=!0},this._sendError=function(I){h(this._config.error)?this._config.error(I):o&&this._config.error&&r.postMessage({workerId:c.WORKER_ID,error:I,finished:!1})}}function g(_){var I;(_=_||{}).chunkSize||(_.chunkSize=c.RemoteChunkSize),d.call(this,_),this._nextChunk=s?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(A){this._input=A,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(I=new XMLHttpRequest,this._config.withCredentials&&(I.withCredentials=this._config.withCredentials),s||(I.onload=y(this._chunkLoaded,this),I.onerror=y(this._chunkError,this)),I.open(this._config.downloadRequestBody?"POST":"GET",this._input,!s),this._config.downloadRequestHeaders){var A,R=this._config.downloadRequestHeaders;for(A in R)I.setRequestHeader(A,R[A])}var D;this._config.chunkSize&&(D=this._start+this._config.chunkSize-1,I.setRequestHeader("Range","bytes="+this._start+"-"+D));try{I.send(this._config.downloadRequestBody)}catch(B){this._chunkError(B.message)}s&&I.status===0&&this._chunkError()}},this._chunkLoaded=function(){I.readyState===4&&(I.status<200||400<=I.status?this._chunkError():(this._start+=this._config.chunkSize||I.responseText.length,this._finished=!this._config.chunkSize||this._start>=(A=>(A=A.getResponseHeader("Content-Range"))!==null?parseInt(A.substring(A.lastIndexOf("/")+1)):-1)(I),this.parseChunk(I.responseText)))},this._chunkError=function(A){A=I.statusText||A,this._sendError(new Error(A))}}function b(_){(_=_||{}).chunkSize||(_.chunkSize=c.LocalChunkSize),d.call(this,_);var I,A,R=typeof FileReader<"u";this.stream=function(D){this._input=D,A=D.slice||D.webkitSlice||D.mozSlice,R?((I=new FileReader).onload=y(this._chunkLoaded,this),I.onerror=y(this._chunkError,this)):I=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var D=this._input,B=(this._config.chunkSize&&(B=Math.min(this._start+this._config.chunkSize,this._input.size),D=A.call(D,this._start,B)),I.readAsText(D,this._config.encoding));R||this._chunkLoaded({target:{result:B}})},this._chunkLoaded=function(D){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(D.target.result)},this._chunkError=function(){this._sendError(I.error)}}function x(_){var I;d.call(this,_=_||{}),this.stream=function(A){return I=A,this._nextChunk()},this._nextChunk=function(){var A,R;if(!this._finished)return A=this._config.chunkSize,I=A?(R=I.substring(0,A),I.substring(A)):(R=I,""),this._finished=!I,this.parseChunk(R)}}function w(_){d.call(this,_=_||{});var I=[],A=!0,R=!1;this.pause=function(){d.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){d.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(D){this._input=D,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){R&&I.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),I.length?this.parseChunk(I.shift()):A=!0},this._streamData=y(function(D){try{I.push(typeof D=="string"?D:D.toString(this._config.encoding)),A&&(A=!1,this._checkIsFinished(),this.parseChunk(I.shift()))}catch(B){this._streamError(B)}},this),this._streamError=y(function(D){this._streamCleanUp(),this._sendError(D)},this),this._streamEnd=y(function(){this._streamCleanUp(),R=!0,this._streamData("")},this),this._streamCleanUp=y(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function C(_){var I,A,R,D,B=Math.pow(2,53),N=-B,F=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,j=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,H=this,L=0,G=0,$=!1,Z=!1,U=[],ee={data:[],errors:[],meta:{}};function se(ve){return _.skipEmptyLines==="greedy"?ve.join("").trim()==="":ve.length===1&&ve[0].length===0}function ie(){if(ee&&R&&(Se("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),R=!1),_.skipEmptyLines&&(ee.data=ee.data.filter(function(le){return!se(le)})),fe()){let le=function(re,ge){h(_.transformHeader)&&(re=_.transformHeader(re,ge)),U.push(re)};if(ee)if(Array.isArray(ee.data[0])){for(var ve=0;fe()&&ve<ee.data.length;ve++)ee.data[ve].forEach(le);ee.data.splice(0,1)}else ee.data.forEach(le)}function xe(le,re){for(var ge=_.header?{}:[],ne=0;ne<le.length;ne++){var he=ne,be=le[ne],be=((ye,q)=>(Ie=>(_.dynamicTypingFunction&&_.dynamicTyping[Ie]===void 0&&(_.dynamicTyping[Ie]=_.dynamicTypingFunction(Ie)),(_.dynamicTyping[Ie]||_.dynamicTyping)===!0))(ye)?q==="true"||q==="TRUE"||q!=="false"&&q!=="FALSE"&&((Ie=>{if(F.test(Ie)&&(Ie=parseFloat(Ie),N<Ie&&Ie<B))return 1})(q)?parseFloat(q):j.test(q)?new Date(q):q===""?null:q):q)(he=_.header?ne>=U.length?"__parsed_extra":U[ne]:he,be=_.transform?_.transform(be,he):be);he==="__parsed_extra"?(ge[he]=ge[he]||[],ge[he].push(be)):ge[he]=be}return _.header&&(ne>U.length?Se("FieldMismatch","TooManyFields","Too many fields: expected "+U.length+" fields but parsed "+ne,G+re):ne<U.length&&Se("FieldMismatch","TooFewFields","Too few fields: expected "+U.length+" fields but parsed "+ne,G+re)),ge}var Y;ee&&(_.header||_.dynamicTyping||_.transform)&&(Y=1,!ee.data.length||Array.isArray(ee.data[0])?(ee.data=ee.data.map(xe),Y=ee.data.length):ee.data=xe(ee.data,0),_.header&&ee.meta&&(ee.meta.fields=U),G+=Y)}function fe(){return _.header&&U.length===0}function Se(ve,xe,Y,le){ve={type:ve,code:xe,message:Y},le!==void 0&&(ve.row=le),ee.errors.push(ve)}h(_.step)&&(D=_.step,_.step=function(ve){ee=ve,fe()?ie():(ie(),ee.data.length!==0&&(L+=ve.data.length,_.preview&&L>_.preview?A.abort():(ee.data=ee.data[0],D(ee,H))))}),this.parse=function(ve,xe,Y){var le=_.quoteChar||'"',le=(_.newline||(_.newline=this.guessLineEndings(ve,le)),R=!1,_.delimiter?h(_.delimiter)&&(_.delimiter=_.delimiter(ve),ee.meta.delimiter=_.delimiter):((le=((re,ge,ne,he,be)=>{var ye,q,Ie,Le;be=be||[","," ","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var Me=0;Me<be.length;Me++){for(var je,gt=be[Me],Ve=0,_e=0,Oe=0,nt=(Ie=void 0,new k({comments:he,delimiter:gt,newline:ge,preview:10}).parse(re)),pt=0;pt<nt.data.length;pt++)ne&&se(nt.data[pt])?Oe++:(je=nt.data[pt].length,_e+=je,Ie===void 0?Ie=je:0<je&&(Ve+=Math.abs(je-Ie),Ie=je));0<nt.data.length&&(_e/=nt.data.length-Oe),(q===void 0||Ve<=q)&&(Le===void 0||Le<_e)&&1.99<_e&&(q=Ve,ye=gt,Le=_e)}return{successful:!!(_.delimiter=ye),bestDelimiter:ye}})(ve,_.newline,_.skipEmptyLines,_.comments,_.delimitersToGuess)).successful?_.delimiter=le.bestDelimiter:(R=!0,_.delimiter=c.DefaultDelimiter),ee.meta.delimiter=_.delimiter),p(_));return _.preview&&_.header&&le.preview++,I=ve,A=new k(le),ee=A.parse(I,xe,Y),ie(),$?{meta:{paused:!0}}:ee||{meta:{paused:!1}}},this.paused=function(){return $},this.pause=function(){$=!0,A.abort(),I=h(_.chunk)?"":I.substring(A.getCharIndex())},this.resume=function(){H.streamer._halted?($=!1,H.streamer.parseChunk(I,!0)):setTimeout(H.resume,3)},this.aborted=function(){return Z},this.abort=function(){Z=!0,A.abort(),ee.meta.aborted=!0,h(_.complete)&&_.complete(ee),I=""},this.guessLineEndings=function(re,le){re=re.substring(0,1048576);var le=new RegExp(E(le)+"([^]*?)"+E(le),"gm"),Y=(re=re.replace(le,"")).split("\r"),le=re.split(`
74
- `),re=1<le.length&&le[0].length<Y[0].length;if(Y.length===1||re)return`
75
- `;for(var ge=0,ne=0;ne<Y.length;ne++)Y[ne][0]===`
76
- `&&ge++;return ge>=Y.length/2?`\r
77
- `:"\r"}}function E(_){return _.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function k(_){var I=(_=_||{}).delimiter,A=_.newline,R=_.comments,D=_.step,B=_.preview,N=_.fastMode,F=null,j=!1,H=_.quoteChar==null?'"':_.quoteChar,L=H;if(_.escapeChar!==void 0&&(L=_.escapeChar),(typeof I!="string"||-1<c.BAD_DELIMITERS.indexOf(I))&&(I=","),R===I)throw new Error("Comment character same as delimiter");R===!0?R="#":(typeof R!="string"||-1<c.BAD_DELIMITERS.indexOf(R))&&(R=!1),A!==`
78
- `&&A!=="\r"&&A!==`\r
79
- `&&(A=`
80
- `);var G=0,$=!1;this.parse=function(Z,U,ee){if(typeof Z!="string")throw new Error("Input must be a string");var se=Z.length,ie=I.length,fe=A.length,Se=R.length,ve=h(D),xe=[],Y=[],le=[],re=G=0;if(!Z)return Ve();if(N||N!==!1&&Z.indexOf(H)===-1){for(var ge=Z.split(A),ne=0;ne<ge.length;ne++){if(le=ge[ne],G+=le.length,ne!==ge.length-1)G+=A.length;else if(ee)return Ve();if(!R||le.substring(0,Se)!==R){if(ve){if(xe=[],Le(le.split(I)),_e(),$)return Ve()}else Le(le.split(I));if(B&&B<=ne)return xe=xe.slice(0,B),Ve(!0)}}return Ve()}for(var he=Z.indexOf(I,G),be=Z.indexOf(A,G),ye=new RegExp(E(L)+E(H),"g"),q=Z.indexOf(H,G);;)if(Z[G]===H)for(q=G,G++;;){if((q=Z.indexOf(H,q+1))===-1)return ee||Y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:xe.length,index:G}),je();if(q===se-1)return je(Z.substring(G,q).replace(ye,H));if(H===L&&Z[q+1]===L)q++;else if(H===L||q===0||Z[q-1]!==L){he!==-1&&he<q+1&&(he=Z.indexOf(I,q+1));var Ie=Me((be=be!==-1&&be<q+1?Z.indexOf(A,q+1):be)===-1?he:Math.min(he,be));if(Z.substr(q+1+Ie,ie)===I){le.push(Z.substring(G,q).replace(ye,H)),Z[G=q+1+Ie+ie]!==H&&(q=Z.indexOf(H,G)),he=Z.indexOf(I,G),be=Z.indexOf(A,G);break}if(Ie=Me(be),Z.substring(q+1+Ie,q+1+Ie+fe)===A){if(le.push(Z.substring(G,q).replace(ye,H)),gt(q+1+Ie+fe),he=Z.indexOf(I,G),q=Z.indexOf(H,G),ve&&(_e(),$))return Ve();if(B&&xe.length>=B)return Ve(!0);break}Y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:xe.length,index:G}),q++}}else if(R&&le.length===0&&Z.substring(G,G+Se)===R){if(be===-1)return Ve();G=be+fe,be=Z.indexOf(A,G),he=Z.indexOf(I,G)}else if(he!==-1&&(he<be||be===-1))le.push(Z.substring(G,he)),G=he+ie,he=Z.indexOf(I,G);else{if(be===-1)break;if(le.push(Z.substring(G,be)),gt(be+fe),ve&&(_e(),$))return Ve();if(B&&xe.length>=B)return Ve(!0)}return je();function Le(Oe){xe.push(Oe),re=G}function Me(Oe){var nt=0;return nt=Oe!==-1&&(Oe=Z.substring(q+1,Oe))&&Oe.trim()===""?Oe.length:nt}function je(Oe){return ee||(Oe===void 0&&(Oe=Z.substring(G)),le.push(Oe),G=se,Le(le),ve&&_e()),Ve()}function gt(Oe){G=Oe,Le(le),le=[],be=Z.indexOf(A,G)}function Ve(Oe){if(_.header&&!U&&xe.length&&!j){var nt=xe[0],pt=Object.create(null),Qt=new Set(nt);let Dn=!1;for(let vt=0;vt<nt.length;vt++){let ft=nt[vt];if(pt[ft=h(_.transformHeader)?_.transformHeader(ft,vt):ft]){let _t,Ot=pt[ft];for(;_t=ft+"_"+Ot,Ot++,Qt.has(_t););Qt.add(_t),nt[vt]=_t,pt[ft]++,Dn=!0,(F=F===null?{}:F)[_t]=ft}else pt[ft]=1,nt[vt]=ft;Qt.add(ft)}Dn&&console.warn("Duplicate headers found and renamed."),j=!0}return{data:xe,errors:Y,meta:{delimiter:I,linebreak:A,aborted:$,truncated:!!Oe,cursor:re+(U||0),renamedHeaders:F}}}function _e(){D(Ve()),xe=[],Y=[]}},this.abort=function(){$=!0},this.getCharIndex=function(){return G}}function u(_){var I=_.data,A=a[I.workerId],R=!1;if(I.error)A.userError(I.error,I.file);else if(I.results&&I.results.data){var D={abort:function(){R=!0,v(I.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:f,resume:f};if(h(A.userStep)){for(var B=0;B<I.results.data.length&&(A.userStep({data:I.results.data[B],errors:I.results.errors,meta:I.results.meta},D),!R);B++);delete I.results}else h(A.userChunk)&&(A.userChunk(I.results,D,I.file),delete I.results)}I.finished&&!R&&v(I.workerId,I.results)}function v(_,I){var A=a[_];h(A.userComplete)&&A.userComplete(I),A.terminate(),delete a[_]}function f(){throw new Error("Not implemented.")}function p(_){if(typeof _!="object"||_===null)return _;var I,A=Array.isArray(_)?[]:{};for(I in _)A[I]=p(_[I]);return A}function y(_,I){return function(){_.apply(I,arguments)}}function h(_){return typeof _=="function"}return c.parse=function(_,I){var A=(I=I||{}).dynamicTyping||!1;if(h(A)&&(I.dynamicTypingFunction=A,A={}),I.dynamicTyping=A,I.transform=!!h(I.transform)&&I.transform,!I.worker||!c.WORKERS_SUPPORTED)return A=null,c.NODE_STREAM_INPUT,typeof _=="string"?(_=(R=>R.charCodeAt(0)!==65279?R:R.slice(1))(_),A=new(I.download?g:x)(I)):_.readable===!0&&h(_.read)&&h(_.on)?A=new w(I):(r.File&&_ instanceof File||_ instanceof Object)&&(A=new b(I)),A.stream(_);(A=(()=>{var R;return!!c.WORKERS_SUPPORTED&&(R=(()=>{var D=r.URL||r.webkitURL||null,B=n.toString();return c.BLOB_URL||(c.BLOB_URL=D.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",B,")();"],{type:"text/javascript"})))})(),(R=new r.Worker(R)).onmessage=u,R.id=l++,a[R.id]=R)})()).userStep=I.step,A.userChunk=I.chunk,A.userComplete=I.complete,A.userError=I.error,I.step=h(I.step),I.chunk=h(I.chunk),I.complete=h(I.complete),I.error=h(I.error),delete I.worker,A.postMessage({input:_,config:I,workerId:A.id})},c.unparse=function(_,I){var A=!1,R=!0,D=",",B=`\r
81
- `,N='"',F=N+N,j=!1,H=null,L=!1,G=((()=>{if(typeof I=="object"){if(typeof I.delimiter!="string"||c.BAD_DELIMITERS.filter(function(U){return I.delimiter.indexOf(U)!==-1}).length||(D=I.delimiter),typeof I.quotes!="boolean"&&typeof I.quotes!="function"&&!Array.isArray(I.quotes)||(A=I.quotes),typeof I.skipEmptyLines!="boolean"&&typeof I.skipEmptyLines!="string"||(j=I.skipEmptyLines),typeof I.newline=="string"&&(B=I.newline),typeof I.quoteChar=="string"&&(N=I.quoteChar),typeof I.header=="boolean"&&(R=I.header),Array.isArray(I.columns)){if(I.columns.length===0)throw new Error("Option columns is empty");H=I.columns}I.escapeChar!==void 0&&(F=I.escapeChar+N),I.escapeFormulae instanceof RegExp?L=I.escapeFormulae:typeof I.escapeFormulae=="boolean"&&I.escapeFormulae&&(L=/^[=+\-@\t\r].*$/)}})(),new RegExp(E(N),"g"));if(typeof _=="string"&&(_=JSON.parse(_)),Array.isArray(_)){if(!_.length||Array.isArray(_[0]))return $(null,_,j);if(typeof _[0]=="object")return $(H||Object.keys(_[0]),_,j)}else if(typeof _=="object")return typeof _.data=="string"&&(_.data=JSON.parse(_.data)),Array.isArray(_.data)&&(_.fields||(_.fields=_.meta&&_.meta.fields||H),_.fields||(_.fields=Array.isArray(_.data[0])?_.fields:typeof _.data[0]=="object"?Object.keys(_.data[0]):[]),Array.isArray(_.data[0])||typeof _.data[0]=="object"||(_.data=[_.data])),$(_.fields||[],_.data||[],j);throw new Error("Unable to serialize unrecognized input");function $(U,ee,se){var ie="",fe=(typeof U=="string"&&(U=JSON.parse(U)),typeof ee=="string"&&(ee=JSON.parse(ee)),Array.isArray(U)&&0<U.length),Se=!Array.isArray(ee[0]);if(fe&&R){for(var ve=0;ve<U.length;ve++)0<ve&&(ie+=D),ie+=Z(U[ve],ve);0<ee.length&&(ie+=B)}for(var xe=0;xe<ee.length;xe++){var Y=(fe?U:ee[xe]).length,le=!1,re=fe?Object.keys(ee[xe]).length===0:ee[xe].length===0;if(se&&!fe&&(le=se==="greedy"?ee[xe].join("").trim()==="":ee[xe].length===1&&ee[xe][0].length===0),se==="greedy"&&fe){for(var ge=[],ne=0;ne<Y;ne++){var he=Se?U[ne]:ne;ge.push(ee[xe][he])}le=ge.join("").trim()===""}if(!le){for(var be=0;be<Y;be++){0<be&&!re&&(ie+=D);var ye=fe&&Se?U[be]:be;ie+=Z(ee[xe][ye],be)}xe<ee.length-1&&(!se||0<Y&&!re)&&(ie+=B)}}return ie}function Z(U,ee){var se,ie;return U==null?"":U.constructor===Date?JSON.stringify(U).slice(1,25):(ie=!1,L&&typeof U=="string"&&L.test(U)&&(U="'"+U,ie=!0),se=U.toString().replace(G,F),(ie=ie||A===!0||typeof A=="function"&&A(U,ee)||Array.isArray(A)&&A[ee]||((fe,Se)=>{for(var ve=0;ve<Se.length;ve++)if(-1<fe.indexOf(Se[ve]))return!0;return!1})(se,c.BAD_DELIMITERS)||-1<se.indexOf(D)||se.charAt(0)===" "||se.charAt(se.length-1)===" ")?N+se+N:se)}},c.RECORD_SEP="",c.UNIT_SEP="",c.BYTE_ORDER_MARK="\uFEFF",c.BAD_DELIMITERS=["\r",`
82
- `,'"',c.BYTE_ORDER_MARK],c.WORKERS_SUPPORTED=!s&&!!r.Worker,c.NODE_STREAM_INPUT=1,c.LocalChunkSize=10485760,c.RemoteChunkSize=5242880,c.DefaultDelimiter=",",c.Parser=k,c.ParserHandle=C,c.NetworkStreamer=g,c.FileStreamer=b,c.StringStreamer=x,c.ReadableStreamStreamer=w,r.jQuery&&((i=r.jQuery).fn.parse=function(_){var I=_.config||{},A=[];return this.each(function(B){if(!(i(this).prop("tagName").toUpperCase()==="INPUT"&&i(this).attr("type").toLowerCase()==="file"&&r.FileReader)||!this.files||this.files.length===0)return!0;for(var N=0;N<this.files.length;N++)A.push({file:this.files[N],inputElem:this,instanceConfig:i.extend({},I)})}),R(),this;function R(){if(A.length===0)h(_.complete)&&_.complete();else{var B,N,F,j,H=A[0];if(h(_.before)){var L=_.before(H.file,H.inputElem);if(typeof L=="object"){if(L.action==="abort")return B="AbortError",N=H.file,F=H.inputElem,j=L.reason,void(h(_.error)&&_.error({name:B},N,F,j));if(L.action==="skip")return void D();typeof L.config=="object"&&(H.instanceConfig=i.extend(H.instanceConfig,L.config))}else if(L==="skip")return void D()}var G=H.instanceConfig.complete;H.instanceConfig.complete=function($){h(G)&&G($,H.file,H.inputElem),D()},c.parse(H.file,H.instanceConfig)}}function D(){A.splice(0,1),R()}}),o&&(r.onmessage=function(_){_=_.data,c.WORKER_ID===void 0&&_&&(c.WORKER_ID=_.workerId),typeof _.input=="string"?r.postMessage({workerId:c.WORKER_ID,results:c.parse(_.input,_.config),finished:!0}):(r.File&&_.input instanceof File||_.input instanceof Object)&&(_=c.parse(_.input,_.config))&&r.postMessage({workerId:c.WORKER_ID,results:_,finished:!0})}),(g.prototype=Object.create(d.prototype)).constructor=g,(b.prototype=Object.create(d.prototype)).constructor=b,(x.prototype=Object.create(x.prototype)).constructor=x,(w.prototype=Object.create(d.prototype)).constructor=w,c})})(L_);var b9=L_.exports;const v9=kl(b9),x9=(e="database")=>{let t=[],n=[];e==="database"?(t=["Connection Name","Port","Username","Password","Database Name","Server URL","Scan Order","Scan Scope","Scan Scope Value","Department","Country ISO2"],n=[["ExampleConnection1","3306","admin","pass123","server1","http://server1.com","Sequential","Number","200","Finance","CL"],["ExampleConnection2","5432","root","securePass","example_db","http://server2.com","Random","Number","100","Accounting","US"],["ExampleConnection3","1521","oracle_admin","oraclePass","oracle_db","http://server3.com","Random","Percentage","50","Information Technology (IT)","IN"]]):e==="shared_drive"&&(t=["Connection Name","IP Address","Username","Password","Host Name","Mount Path","Department","Country ISO2"],n=[["SharedDriveConn1","192.168.1.10","shared_admin","fin@123","finance-server-01","/mnt/finance","Finance","CL"],["SharedDriveConn2","10.0.0.25","acc_user","acc@secure","accounting-host","/mnt/accounting","Accounting","US"],["SharedDriveConn3","172.16.0.5","it_admin","it!pass2024","it-nfs-01","/mnt/it_shared","Information Technology (IT)","IN"]]);const r=[t.join(","),...n.map(a=>a.join(","))].join(`
83
- `),i=new Blob([r],{type:"text/csv"}),s=window.URL.createObjectURL(i),o=document.createElement("a");o.href=s,o.setAttribute("download","sample.csv"),document.body.appendChild(o),o.click(),document.body.removeChild(o)},y9=(e,t="database")=>t==="database"?e.map(n=>{var r,i,s,o,a,l,c,d,g,b,x;return{"Connection Name":((r=n["Connection Name"])==null?void 0:r.trim())||"",Port:((i=n.Port)==null?void 0:i.trim())||"",Username:((s=n.Username)==null?void 0:s.trim())||"",Password:((o=n.Password)==null?void 0:o.trim())||"","Database Name":((a=n["Database Name"])==null?void 0:a.trim())||"","Server URL":((l=n["Server URL"])==null?void 0:l.trim())||"","Scan Order":((c=n["Scan Order"])==null?void 0:c.trim())||"","Scan Scope":((d=n["Scan Scope"])==null?void 0:d.trim())||"","Scan Scope Value":((g=n["Scan Scope Value"])==null?void 0:g.trim())||"",Department:((b=n.Department)==null?void 0:b.trim())||"","Country ISO2":((x=n["Country ISO2"])==null?void 0:x.trim())||""}}):t==="shared_drive"?e.map(n=>{var r,i,s,o,a,l,c,d;return{"Connection Name":((r=n["Connection Name"])==null?void 0:r.trim())||"","IP Address":((i=n["IP Address"])==null?void 0:i.trim())||"",Department:((s=n.Department)==null?void 0:s.trim())||"","Country ISO2":((o=n["Country ISO2"])==null?void 0:o.trim())||"",Username:((a=n.Username)==null?void 0:a.trim())||"",Password:((l=n.Password)==null?void 0:l.trim())||"","Host Name":((c=n["Host Name"])==null?void 0:c.trim())||"","Mount Path":((d=n["Mount Path"])==null?void 0:d.trim())||""}}):[],_9="••••••••••",w9=({csvType:e="database",connectionType:t,onClose:n,onConfirm:r,TestConnection:i})=>{const[s,o]=M.useState(null),[a,l]=M.useState([]),[c,d]=M.useState(new Set),g=x=>{if(x.target.files){const w=x.target.files[0];o(w),b(w)}},b=x=>{const w=new FileReader;w.onload=({target:C})=>{C!=null&&C.result&&v9.parse(C.result,{header:!0,skipEmptyLines:!0,complete:E=>{l(y9(E.data,e))}})},w.readAsText(x)};return O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"fixed inset-0 z-40 bg-gray-900 bg-opacity-50 backdrop-blur-sm"}),O.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-40",children:O.jsxs("div",{className:`p-8 rounded-lg shadow-2xl w-full ${a.length>0?"max-w-[78vw]":"w-full max-w-3xl"} relative`,style:{backgroundColor:"var(--bg-color)"},children:[O.jsxs("div",{className:"flex justify-between items-center",children:[O.jsx("h3",{className:"text-xl font-semibold",style:{color:"var(--text-color)",fontFamily:"'Afacad', 'Rubik', sans-serif"},children:"Import Connectors"}),O.jsx("button",{className:"text-2xl transition-colors text-brand-primary hover:opacity-80",onClick:n,children:"×"})]}),e==="database"?O.jsx("div",{className:"w-full max-w-2xl bg-yellow-100 dark:bg-yellow-900/30 border border-yellow-400 dark:border-yellow-700 text-yellow-800 dark:text-yellow-200 px-4 py-2 rounded relative mt-2",role:"alert",children:O.jsxs("strong",{className:"font-bold flex gap-2 text-sm items-center",children:[O.jsx(Sp,{}),"Import connectors works only for connection without SSH Configuration"]})}):O.jsx("div",{className:"w-full max-w-2xl px-4 py-2 rounded relative mt-2",style:{backgroundColor:"var(--brand-light)",border:"1px solid var(--brand-orange)",color:"var(--brand-dark)"},role:"alert",children:O.jsxs("strong",{className:"font-normal flex gap-2 text-sm items-center",children:[O.jsx(x_,{style:{color:"var(--brand-orange)"}}),"Please refer to the sample CSV before uploading"]})}),a.length>0&&O.jsx("div",{className:"max-h-[60vh] overflow-auto border rounded-md shadow-sm mt-4",children:O.jsxs("table",{className:"min-w-full max-h-[60vh] border-collapse",children:[O.jsx("thead",{children:O.jsxs("tr",{className:"sticky top-0 z-10",style:{backgroundColor:"var(--brand-light)"},children:[Object.keys(a[0]).map((x,w)=>O.jsx("th",{className:"p-3 text-left",style:{border:"1px solid var(--border-color)",color:"var(--brand-dark)"},children:x},w)),t&&i&&O.jsx("th",{style:{border:"1px solid var(--border-color)",color:"var(--brand-dark)"},children:"Test Status"})]})}),O.jsx("tbody",{children:a.map((x,w)=>O.jsxs("tr",{className:`${c.has(w)?"bg-red-50 dark:bg-red-900/20":w%2===0?"bg-white dark:bg-[#23272f]":"bg-gray-50 dark:bg-[#1e293b]"}`,children:[Object.entries(x).map(([C,E],k)=>O.jsx("td",{className:"border p-3 text-gray-600 dark:text-gray-200",children:C.toLowerCase().includes("password")?_9:E},k)),t&&i&&O.jsx("td",{className:"border p-3 text-gray-600 dark:text-gray-200",children:O.jsx("div",{className:"flex justify-center",children:O.jsx(i,{type:t,host:x["Server URL"],port:parseInt(x.PORT?x.PORT:"3306",10),ipAddress:x["IP Address"],username:x.Username,password:x.Password,database:x["Database Name"],mountPath:x["Mount Path"],hostName:x["Host Name"],onTestResult:C=>{C.success?d(E=>{const k=new Set(E);return k.delete(w),k}):d(E=>new Set([...E,w]))},enableCopy:!1,enableTechnicalDetails:!1,customStyles:"mb-0"})})})]},w))})]})}),O.jsxs("div",{className:"flex flex-col items-center mt-6",children:[O.jsx("label",{htmlFor:"file-upload",className:"px-4 py-2 bg-brand-primary text-sm text-white rounded-md cursor-pointer hover:bg-[var(--brand-orange)]/90 transition-all shadow",children:s?s.name:"Add File"}),O.jsx("input",{type:"file",id:"file-upload",className:"hidden",accept:".csv",onChange:g})]}),O.jsxs("div",{className:"flex justify-between items-center mt-6",children:[O.jsx("button",{onClick:()=>x9(e),className:"text-sm text-brand-primary hover:opacity-80 underline transition-colors",children:"Download Sample CSV"}),a.length>0&&O.jsx("button",{className:"px-4 py-2 bg-brand-primary text-sm text-white rounded-md shadow hover:bg-[var(--brand-orange)]/90 transition-all",onClick:()=>{r(a),n()},children:"Confirm Import"})]})]})})]})},C9=({title:e})=>O.jsxs("div",{className:"nochartdata-container w-full h-full flex flex-col items-center justify-center text-center select-none",children:[O.jsx("div",{className:"items-center top-0 left-0 p-[1.25rem] absolute justify-center select-none text-[18px] font-[600] p-3",style:{color:"var(--chart-text-color)",fontFamily:"'Afacad', 'Rubik', sans-serif"},children:e}),O.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full",children:[O.jsx(XR,{size:80,style:{color:"var(--brand-color-orange)",opacity:.2}}),O.jsx("span",{className:"mt-4 text-[1rem]",style:{color:"var(--secondary-text-color)"},children:"No data to display"})]})]}),S9=({title:e,mainClassname:t,rightContent:n})=>O.jsxs("div",{className:`${t} flex items-center justify-between`,children:[O.jsx("span",{className:"flex flex-1 select-none md:text-xl 2xl:text-2xl font-[600]",style:{color:"var(--chart-text-color)",fontFamily:"'Afacad', 'Rubik', sans-serif"},children:e}),O.jsx("div",{children:n})]}),Ap=({legends:e,maxDisplayLegends:t=8,dataValues:n,colors:r,showAllLegends:i=!1,onClick:s})=>{const o=Math.min(e.length,t),a=(n==null?void 0:n.reduce((l,c)=>l+c,0))??0;return O.jsxs("div",{className:"flex flex-col",style:{minWidth:"150px",maxWidth:"100%"},children:[O.jsx("div",{className:"flex-1 overflow-y-auto",children:e.slice(0,o).map((l,c)=>O.jsxs("div",{className:"flex items-center mb-2 min-w-0",children:[O.jsx("div",{className:"mr-2 flex-shrink-0",style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:r[c%r.length]}}),O.jsx("span",{className:"text-sm font-medium flex-1 min-w-0",style:{color:"var(--chart-text-color)",wordBreak:"break-word",overflowWrap:"break-word"},children:l}),n&&O.jsxs("span",{className:"text-xs ml-2 flex-shrink-0",style:{color:"var(--secondary-text-color)"},children:["(",(n[c]/a*100).toFixed(2),"%)"]})]},c))}),e.length>t&&O.jsx("div",{className:"mt-1 text-right",children:i?O.jsx("button",{className:"px-2 py-1 text-xs text-white rounded transition-colors",style:{backgroundColor:"var(--secondary-text-color)"},onMouseEnter:l=>l.currentTarget.style.opacity="0.9",onMouseLeave:l=>l.currentTarget.style.opacity="1",onClick:s,children:"Show Less"}):O.jsxs("button",{className:"px-2 py-1 text-xs text-white rounded transition-colors",style:{backgroundColor:"var(--brand-orange)"},onMouseEnter:l=>l.currentTarget.style.opacity="0.9",onMouseLeave:l=>l.currentTarget.style.opacity="1",onClick:s,children:["View All (",e.length-t," more)"]})})]})};/*!
84
- * @kurkle/color v0.3.4
85
- * https://github.com/kurkle/color#readme
86
- * (c) 2024 Jukka Kurkela
87
- * Released under the MIT License
88
- */function Pl(e){return e+.5|0}const Gi=(e,t,n)=>Math.max(Math.min(e,n),t);function ya(e){return Gi(Pl(e*2.55),0,255)}function Zi(e){return Gi(Pl(e*255),0,255)}function di(e){return Gi(Pl(e/2.55)/100,0,1)}function ub(e){return Gi(Pl(e*100),0,100)}const lr={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},Uh=[..."0123456789ABCDEF"],E9=e=>Uh[e&15],I9=e=>Uh[(e&240)>>4]+Uh[e&15],cc=e=>(e&240)>>4===(e&15),k9=e=>cc(e.r)&&cc(e.g)&&cc(e.b)&&cc(e.a);function A9(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&lr[e[1]]*17,g:255&lr[e[2]]*17,b:255&lr[e[3]]*17,a:t===5?lr[e[4]]*17:255}:(t===7||t===9)&&(n={r:lr[e[1]]<<4|lr[e[2]],g:lr[e[3]]<<4|lr[e[4]],b:lr[e[5]]<<4|lr[e[6]],a:t===9?lr[e[7]]<<4|lr[e[8]]:255})),n}const M9=(e,t)=>e<255?t(e):"";function R9(e){var t=k9(e)?E9:I9;return e?"#"+t(e.r)+t(e.g)+t(e.b)+M9(e.a,t):void 0}const P9=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function j_(e,t,n){const r=t*Math.min(n,1-n),i=(s,o=(s+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function N9(e,t,n){const r=(i,s=(i+e/60)%6)=>n-n*t*Math.max(Math.min(s,4-s,1),0);return[r(5),r(3),r(1)]}function T9(e,t,n){const r=j_(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function O9(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function Mp(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=(s+o)/2;let l,c,d;return s!==o&&(d=s-o,c=a>.5?d/(2-s-o):d/(s+o),l=O9(n,r,i,d,s),l=l*60+.5),[l|0,c||0,a]}function Rp(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Zi)}function Pp(e,t,n){return Rp(j_,e,t,n)}function D9(e,t,n){return Rp(T9,e,t,n)}function F9(e,t,n){return Rp(N9,e,t,n)}function B_(e){return(e%360+360)%360}function L9(e){const t=P9.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?ya(+t[5]):Zi(+t[5]));const i=B_(+t[2]),s=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=D9(i,s,o):t[1]==="hsv"?r=F9(i,s,o):r=Pp(i,s,o),{r:r[0],g:r[1],b:r[2],a:n}}function j9(e,t){var n=Mp(e);n[0]=B_(n[0]+t),n=Pp(n),e.r=n[0],e.g=n[1],e.b=n[2]}function B9(e){if(!e)return;const t=Mp(e),n=t[0],r=ub(t[1]),i=ub(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${di(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const db={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"},fb={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 V9(){const e={},t=Object.keys(fb),n=Object.keys(db);let r,i,s,o,a;for(r=0;r<t.length;r++){for(o=a=t[r],i=0;i<n.length;i++)s=n[i],a=a.replace(s,db[s]);s=parseInt(fb[o],16),e[a]=[s>>16&255,s>>8&255,s&255]}return e}let uc;function z9(e){uc||(uc=V9(),uc.transparent=[0,0,0,0]);const t=uc[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const H9=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function G9(e){const t=H9.exec(e);let n=255,r,i,s;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?ya(o):Gi(o*255,0,255)}return r=+t[1],i=+t[3],s=+t[5],r=255&(t[2]?ya(r):Gi(r,0,255)),i=255&(t[4]?ya(i):Gi(i,0,255)),s=255&(t[6]?ya(s):Gi(s,0,255)),{r,g:i,b:s,a:n}}}function W9(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${di(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Lf=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,io=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function $9(e,t,n){const r=io(di(e.r)),i=io(di(e.g)),s=io(di(e.b));return{r:Zi(Lf(r+n*(io(di(t.r))-r))),g:Zi(Lf(i+n*(io(di(t.g))-i))),b:Zi(Lf(s+n*(io(di(t.b))-s))),a:e.a+n*(t.a-e.a)}}function dc(e,t,n){if(e){let r=Mp(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=Pp(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function V_(e,t){return e&&Object.assign(t||{},e)}function hb(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Zi(e[3]))):(t=V_(e,{r:0,g:0,b:0,a:1}),t.a=Zi(t.a)),t}function X9(e){return e.charAt(0)==="r"?G9(e):L9(e)}let z_=class Jh{constructor(t){if(t instanceof Jh)return t;const n=typeof t;let r;n==="object"?r=hb(t):n==="string"&&(r=A9(t)||z9(t)||X9(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=V_(this._rgb);return t&&(t.a=di(t.a)),t}set rgb(t){this._rgb=hb(t)}rgbString(){return this._valid?W9(this._rgb):void 0}hexString(){return this._valid?R9(this._rgb):void 0}hslString(){return this._valid?B9(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let s;const o=n===s?.5:n,a=2*o-1,l=r.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-c,r.r=255&c*r.r+s*i.r+.5,r.g=255&c*r.g+s*i.g+.5,r.b=255&c*r.b+s*i.b+.5,r.a=o*r.a+(1-o)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=$9(this._rgb,t._rgb,n)),this}clone(){return new Jh(this.rgb)}alpha(t){return this._rgb.a=Zi(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Pl(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return dc(this._rgb,2,t),this}darken(t){return dc(this._rgb,2,-t),this}saturate(t){return dc(this._rgb,1,t),this}desaturate(t){return dc(this._rgb,1,-t),this}rotate(t){return j9(this._rgb,t),this}};/*!
89
- * Chart.js v4.5.1
90
- * https://www.chartjs.org
91
- * (c) 2025 Chart.js Contributors
92
- * Released under the MIT License
93
- */function oi(){}const Y9=(()=>{let e=0;return()=>e++})();function it(e){return e==null}function Wt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function dt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Jt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function qn(e,t){return Jt(e)?e:t}function qe(e,t){return typeof e>"u"?t:e}const Z9=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,H_=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Dt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Rt(e,t,n,r){let i,s,o;if(Wt(e))for(s=e.length,i=0;i<s;i++)t.call(n,e[i],i);else if(dt(e))for(o=Object.keys(e),s=o.length,i=0;i<s;i++)t.call(n,e[o[i]],o[i])}function Ou(e,t){let n,r,i,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],s=t[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function Du(e){if(Wt(e))return e.map(Du);if(dt(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=Du(e[n[i]]);return t}return e}function G_(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function U9(e,t,n,r){if(!G_(e))return;const i=t[e],s=n[e];dt(i)&&dt(s)?gn(i,s,r):t[e]=Du(s)}function gn(e,t,n){const r=Wt(t)?t:[t],i=r.length;if(!dt(e))return e;n=n||{};const s=n.merger||U9;let o;for(let a=0;a<i;++a){if(o=r[a],!dt(o))continue;const l=Object.keys(o);for(let c=0,d=l.length;c<d;++c)s(l[c],e,o,n)}return e}function Da(e,t){return gn(e,t,{merger:J9})}function J9(e,t,n){if(!G_(e))return;const r=t[e],i=n[e];dt(r)&&dt(i)?Da(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Du(i))}const gb={"":e=>e,x:e=>e.x,y:e=>e.y};function q9(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function K9(e){const t=q9(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Qi(e,t){return(gb[t]||(gb[t]=K9(t)))(e)}function Np(e){return e.charAt(0).toUpperCase()+e.slice(1)}const sl=e=>typeof e<"u",es=e=>typeof e=="function",pb=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function Q9(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ct=Math.PI,$t=2*Ct,e8=$t+Ct,Fu=Number.POSITIVE_INFINITY,t8=Ct/180,tn=Ct/2,ds=Ct/4,mb=Ct*2/3,Wi=Math.log10,Xr=Math.sign;function Fa(e,t,n){return Math.abs(e-t)<n}function bb(e){const t=Math.round(e);e=Fa(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Wi(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function n8(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,s)=>i-s).pop(),t}function r8(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function ko(e){return!r8(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function i8(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function W_(e,t,n){let r,i,s;for(r=0,i=e.length;r<i;r++)s=e[r][n],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function kr(e){return e*(Ct/180)}function Tp(e){return e*(180/Ct)}function vb(e){if(!Jt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function $_(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*Ct&&(s+=$t),{angle:s,distance:i}}function qh(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function s8(e,t){return(e-t+e8)%$t-Ct}function Rn(e){return(e%$t+$t)%$t}function ol(e,t,n,r){const i=Rn(e),s=Rn(t),o=Rn(n),a=Rn(s-i),l=Rn(o-i),c=Rn(i-s),d=Rn(i-o);return i===s||i===o||r&&s===o||a>l&&c<d}function hn(e,t,n){return Math.max(t,Math.min(n,e))}function o8(e){return hn(e,-32768,32767)}function mi(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Op(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,i=0,s;for(;r-i>1;)s=i+r>>1,n(s)?i=s:r=s;return{lo:i,hi:r}}const bi=(e,t,n,r)=>Op(e,n,r?i=>{const s=e[i][t];return s<n||s===n&&e[i+1][t]===n}:i=>e[i][t]<n),a8=(e,t,n)=>Op(e,n,r=>e[r][t]>=n);function l8(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const X_=["push","pop","shift","splice","unshift"];function c8(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),X_.forEach(n=>{const r="_onData"+Np(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const o=i.apply(this,s);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...s)}),o}})})}function xb(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(X_.forEach(s=>{delete e[s]}),delete e._chartjs)}function Y_(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const Z_=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function U_(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,Z_.call(window,()=>{r=!1,e.apply(t,n)}))}}function u8(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const Dp=e=>e==="start"?"left":e==="end"?"right":"center",An=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,d8=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function J_(e,t,n){const r=t.length;let i=0,s=r;if(e._sorted){const{iScale:o,vScale:a,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,d=o.axis,{min:g,max:b,minDefined:x,maxDefined:w}=o.getUserBounds();if(x){if(i=Math.min(bi(l,d,g).lo,n?r:bi(t,d,o.getPixelForValue(g)).lo),c){const C=l.slice(0,i+1).reverse().findIndex(E=>!it(E[a.axis]));i-=Math.max(0,C)}i=hn(i,0,r-1)}if(w){let C=Math.max(bi(l,o.axis,b,!0).hi+1,n?0:bi(t,d,o.getPixelForValue(b),!0).hi+1);if(c){const E=l.slice(C-1).findIndex(k=>!it(k[a.axis]));C+=Math.max(0,E)}s=hn(C,i,r)-i}else s=r-i}return{start:i,count:s}}function q_(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const s=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),s}const fc=e=>e===0||e===1,yb=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*$t/n)),_b=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*$t/n)+1,La={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*tn)+1,easeOutSine:e=>Math.sin(e*tn),easeInOutSine:e=>-.5*(Math.cos(Ct*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>fc(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>fc(e)?e:yb(e,.075,.3),easeOutElastic:e=>fc(e)?e:_b(e,.075,.3),easeInOutElastic(e){return fc(e)?e:e<.5?.5*yb(e*2,.1125,.45):.5+.5*_b(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-La.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?La.easeInBounce(e*2)*.5:La.easeOutBounce(e*2-1)*.5+.5};function Fp(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function wb(e){return Fp(e)?e:new z_(e)}function jf(e){return Fp(e)?e:new z_(e).saturate(.5).darken(.1).hexString()}const f8=["x","y","borderWidth","radius","tension"],h8=["color","borderColor","backgroundColor"];function g8(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:h8},numbers:{type:"number",properties:f8}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function p8(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Cb=new Map;function m8(e,t){t=t||{};const n=e+JSON.stringify(t);let r=Cb.get(n);return r||(r=new Intl.NumberFormat(e,t),Cb.set(n,r)),r}function Nl(e,t,n){return m8(t,n).format(e)}const K_={values(e){return Wt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,s=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),s=b8(e,n)}const o=Wi(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Nl(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(Wi(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?K_.numeric.call(this,e,t,n):""}};function b8(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Id={formatters:K_};function v8(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.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:Id.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Bs=Object.create(null),Kh=Object.create(null);function ja(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const s=n[r];e=e[s]||(e[s]=Object.create(null))}return e}function Bf(e,t,n){return typeof t=="string"?gn(ja(e,t),n):gn(ja(e,""),t)}class x8{constructor(t,n){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=r=>r.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=(r,i)=>jf(i.backgroundColor),this.hoverBorderColor=(r,i)=>jf(i.borderColor),this.hoverColor=(r,i)=>jf(i.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(t),this.apply(n)}set(t,n){return Bf(this,t,n)}get(t){return ja(this,t)}describe(t,n){return Bf(Kh,t,n)}override(t,n){return Bf(Bs,t,n)}route(t,n,r,i){const s=ja(this,t),o=ja(this,r),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=o[i];return dt(l)?Object.assign({},c,l):qe(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var Xt=new x8({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[g8,p8,v8]);function y8(e){return!e||it(e.size)||it(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Lu(e,t,n,r,i){let s=t[i];return s||(s=t[i]=e.measureText(i).width,n.push(i)),s>r&&(r=s),r}function _8(e,t,n,r){r=r||{};let i=r.data=r.data||{},s=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},s=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0;const a=n.length;let l,c,d,g,b;for(l=0;l<a;l++)if(g=n[l],g!=null&&!Wt(g))o=Lu(e,i,s,o,g);else if(Wt(g))for(c=0,d=g.length;c<d;c++)b=g[c],b!=null&&!Wt(b)&&(o=Lu(e,i,s,o,b));e.restore();const x=s.length/2;if(x>n.length){for(l=0;l<x;l++)delete i[s[l]];s.splice(0,x)}return o}function fs(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function Sb(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function ju(e,t,n,r){Q_(e,t,n,r,null)}function Q_(e,t,n,r,i){let s,o,a,l,c,d,g,b;const x=t.pointStyle,w=t.rotation,C=t.radius;let E=(w||0)*t8;if(x&&typeof x=="object"&&(s=x.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(E),e.drawImage(x,-x.width/2,-x.height/2,x.width,x.height),e.restore();return}if(!(isNaN(C)||C<=0)){switch(e.beginPath(),x){default:i?e.ellipse(n,r,i/2,C,0,0,$t):e.arc(n,r,C,0,$t),e.closePath();break;case"triangle":d=i?i/2:C,e.moveTo(n+Math.sin(E)*d,r-Math.cos(E)*C),E+=mb,e.lineTo(n+Math.sin(E)*d,r-Math.cos(E)*C),E+=mb,e.lineTo(n+Math.sin(E)*d,r-Math.cos(E)*C),e.closePath();break;case"rectRounded":c=C*.516,l=C-c,o=Math.cos(E+ds)*l,g=Math.cos(E+ds)*(i?i/2-c:l),a=Math.sin(E+ds)*l,b=Math.sin(E+ds)*(i?i/2-c:l),e.arc(n-g,r-a,c,E-Ct,E-tn),e.arc(n+b,r-o,c,E-tn,E),e.arc(n+g,r+a,c,E,E+tn),e.arc(n-b,r+o,c,E+tn,E+Ct),e.closePath();break;case"rect":if(!w){l=Math.SQRT1_2*C,d=i?i/2:l,e.rect(n-d,r-l,2*d,2*l);break}E+=ds;case"rectRot":g=Math.cos(E)*(i?i/2:C),o=Math.cos(E)*C,a=Math.sin(E)*C,b=Math.sin(E)*(i?i/2:C),e.moveTo(n-g,r-a),e.lineTo(n+b,r-o),e.lineTo(n+g,r+a),e.lineTo(n-b,r+o),e.closePath();break;case"crossRot":E+=ds;case"cross":g=Math.cos(E)*(i?i/2:C),o=Math.cos(E)*C,a=Math.sin(E)*C,b=Math.sin(E)*(i?i/2:C),e.moveTo(n-g,r-a),e.lineTo(n+g,r+a),e.moveTo(n+b,r-o),e.lineTo(n-b,r+o);break;case"star":g=Math.cos(E)*(i?i/2:C),o=Math.cos(E)*C,a=Math.sin(E)*C,b=Math.sin(E)*(i?i/2:C),e.moveTo(n-g,r-a),e.lineTo(n+g,r+a),e.moveTo(n+b,r-o),e.lineTo(n-b,r+o),E+=ds,g=Math.cos(E)*(i?i/2:C),o=Math.cos(E)*C,a=Math.sin(E)*C,b=Math.sin(E)*(i?i/2:C),e.moveTo(n-g,r-a),e.lineTo(n+g,r+a),e.moveTo(n+b,r-o),e.lineTo(n-b,r+o);break;case"line":o=i?i/2:Math.cos(E)*C,a=Math.sin(E)*C,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(E)*(i?i/2:C),r+Math.sin(E)*C);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function vi(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function ks(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function As(e){e.restore()}function w8(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const s=(t.x+n.x)/2;e.lineTo(s,t.y),e.lineTo(s,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function C8(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function S8(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),it(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function E8(e,t,n,r,i){if(i.strikethrough||i.underline){const s=e.measureText(r),o=t-s.actualBoundingBoxLeft,a=t+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,d=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,d),e.lineTo(a,d),e.stroke()}}function I8(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Vs(e,t,n,r,i,s={}){const o=Wt(t)?t:[t],a=s.strokeWidth>0&&s.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,S8(e,s),l=0;l<o.length;++l)c=o[l],s.backdrop&&I8(e,s.backdrop),a&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),it(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(c,n,r,s.maxWidth)),e.fillText(c,n,r,s.maxWidth),E8(e,n,r,c,s),r+=Number(i.lineHeight);e.restore()}function al(e,t){const{x:n,y:r,w:i,h:s,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*Ct,Ct,!0),e.lineTo(n,r+s-o.bottomLeft),e.arc(n+o.bottomLeft,r+s-o.bottomLeft,o.bottomLeft,Ct,tn,!0),e.lineTo(n+i-o.bottomRight,r+s),e.arc(n+i-o.bottomRight,r+s-o.bottomRight,o.bottomRight,tn,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-tn,!0),e.lineTo(n+o.topLeft,r)}const k8=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,A8=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function M8(e,t){const n=(""+e).match(k8);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const R8=e=>+e||0;function Lp(e,t){const n={},r=dt(t),i=r?Object.keys(t):t,s=dt(e)?r?o=>qe(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=R8(s(o));return n}function e2(e){return Lp(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Ms(e){return Lp(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Cn(e){const t=e2(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function sn(e,t){e=e||{},t=t||Xt.font;let n=qe(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=qe(e.style,t.style);r&&!(""+r).match(A8)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:qe(e.family,t.family),lineHeight:M8(qe(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:qe(e.weight,t.weight),string:""};return i.string=y8(i),i}function Gt(e,t,n,r){let i,s,o;for(i=0,s=e.length;i<s;++i)if(o=e[i],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t)),n!==void 0&&Wt(o)&&(o=o[n%o.length]),o!==void 0))return o}function P8(e,t,n){const{min:r,max:i}=e,s=H_(t,(i-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(s)),max:o(i,s)}}function is(e,t){return Object.assign(Object.create(e),t)}function jp(e,t=[""],n,r,i=()=>e[0]){const s=n||e;typeof r>"u"&&(r=i2("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:r,_getTarget:i,override:a=>jp([a,...e],t,s,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return n2(a,l,()=>B8(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Ib(a).includes(l)},ownKeys(a){return Ib(a)},set(a,l,c){const d=a._storage||(a._storage=i());return a[l]=d[l]=c,delete a._keys,!0}})}function Ao(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:t2(e,r),setContext:s=>Ao(e,s,n,r),override:s=>Ao(e.override(s),t,n,r)};return new Proxy(i,{deleteProperty(s,o){return delete s[o],delete e[o],!0},get(s,o,a){return n2(s,o,()=>T8(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(s,o,a){return e[o]=a,delete s[o],!0}})}function t2(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:es(n)?n:()=>n,isIndexable:es(r)?r:()=>r}}const N8=(e,t)=>e?e+Np(t):t,Bp=(e,t)=>dt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function n2(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function T8(e,t,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:o}=e;let a=r[t];return es(a)&&o.isScriptable(t)&&(a=O8(t,a,e,n)),Wt(a)&&a.length&&(a=D8(t,a,e,o.isIndexable)),Bp(t,a)&&(a=Ao(a,i,s&&s[t],o)),a}function O8(e,t,n,r){const{_proxy:i,_context:s,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(s,o||r);return a.delete(e),Bp(e,l)&&(l=Vp(i._scopes,i,e,l)),l}function D8(e,t,n,r){const{_proxy:i,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index<"u"&&r(e))return t[s.index%t.length];if(dt(t[0])){const l=t,c=i._scopes.filter(d=>d!==l);t=[];for(const d of l){const g=Vp(c,i,e,d);t.push(Ao(g,s,o&&o[e],a))}}return t}function r2(e,t,n){return es(e)?e(t,n):e}const F8=(e,t)=>e===!0?t:typeof e=="string"?Qi(t,e):void 0;function L8(e,t,n,r,i){for(const s of t){const o=F8(n,s);if(o){e.add(o);const a=r2(o._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function Vp(e,t,n,r){const i=t._rootScopes,s=r2(t._fallback,n,r),o=[...e,...i],a=new Set;a.add(r);let l=Eb(a,o,n,s||n,r);return l===null||typeof s<"u"&&s!==n&&(l=Eb(a,o,s,l,r),l===null)?!1:jp(Array.from(a),[""],i,s,()=>j8(t,n,r))}function Eb(e,t,n,r,i){for(;n;)n=L8(e,t,n,r,i);return n}function j8(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Wt(i)&&dt(n)?n:i||{}}function B8(e,t,n,r){let i;for(const s of t)if(i=i2(N8(s,e),n),typeof i<"u")return Bp(e,i)?Vp(n,r,e,i):i}function i2(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function Ib(e){let t=e._keys;return t||(t=e._keys=V8(e._scopes)),t}function V8(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function s2(e,t,n,r){const{iScale:i}=e,{key:s="r"}=this._parsing,o=new Array(r);let a,l,c,d;for(a=0,l=r;a<l;++a)c=a+n,d=t[c],o[a]={r:i.parse(Qi(d,s),c)};return o}const z8=Number.EPSILON||1e-14,Mo=(e,t)=>t<e.length&&!e[t].skip&&e[t],o2=e=>e==="x"?"y":"x";function H8(e,t,n,r){const i=e.skip?t:e,s=t,o=n.skip?t:n,a=qh(s,i),l=qh(o,s);let c=a/(a+l),d=l/(a+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const g=r*c,b=r*d;return{previous:{x:s.x-g*(o.x-i.x),y:s.y-g*(o.y-i.y)},next:{x:s.x+b*(o.x-i.x),y:s.y+b*(o.y-i.y)}}}function G8(e,t,n){const r=e.length;let i,s,o,a,l,c=Mo(e,0);for(let d=0;d<r-1;++d)if(l=c,c=Mo(e,d+1),!(!l||!c)){if(Fa(t[d],0,z8)){n[d]=n[d+1]=0;continue}i=n[d]/t[d],s=n[d+1]/t[d],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[d]=i*o*t[d],n[d+1]=s*o*t[d])}}function W8(e,t,n="x"){const r=o2(n),i=e.length;let s,o,a,l=Mo(e,0);for(let c=0;c<i;++c){if(o=a,a=l,l=Mo(e,c+1),!a)continue;const d=a[n],g=a[r];o&&(s=(d-o[n])/3,a[`cp1${n}`]=d-s,a[`cp1${r}`]=g-s*t[c]),l&&(s=(l[n]-d)/3,a[`cp2${n}`]=d+s,a[`cp2${r}`]=g+s*t[c])}}function $8(e,t="x"){const n=o2(t),r=e.length,i=Array(r).fill(0),s=Array(r);let o,a,l,c=Mo(e,0);for(o=0;o<r;++o)if(a=l,l=c,c=Mo(e,o+1),!!l){if(c){const d=c[t]-l[t];i[o]=d!==0?(c[n]-l[n])/d:0}s[o]=a?c?Xr(i[o-1])!==Xr(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}G8(e,i,s),W8(e,s,t)}function hc(e,t,n){return Math.max(Math.min(e,n),t)}function X8(e,t){let n,r,i,s,o,a=vi(e[0],t);for(n=0,r=e.length;n<r;++n)o=s,s=a,a=n<r-1&&vi(e[n+1],t),s&&(i=e[n],o&&(i.cp1x=hc(i.cp1x,t.left,t.right),i.cp1y=hc(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=hc(i.cp2x,t.left,t.right),i.cp2y=hc(i.cp2y,t.top,t.bottom)))}function Y8(e,t,n,r,i){let s,o,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")$8(e,i);else{let c=r?e[e.length-1]:e[0];for(s=0,o=e.length;s<o;++s)a=e[s],l=H8(c,a,e[Math.min(s+1,o-(r?0:1))%o],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&X8(e,n)}function zp(){return typeof window<"u"&&typeof document<"u"}function Hp(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Bu(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const kd=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Z8(e,t){return kd(e).getPropertyValue(t)}const U8=["top","right","bottom","left"];function Rs(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=U8[i];r[s]=parseFloat(e[t+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const J8=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function q8(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:s}=r;let o=!1,a,l;if(J8(i,s,e.target))a=i,l=s;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function ps(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=kd(n),s=i.boxSizing==="border-box",o=Rs(i,"padding"),a=Rs(i,"border","width"),{x:l,y:c,box:d}=q8(e,n),g=o.left+(d&&a.left),b=o.top+(d&&a.top);let{width:x,height:w}=t;return s&&(x-=o.width+a.width,w-=o.height+a.height),{x:Math.round((l-g)/x*n.width/r),y:Math.round((c-b)/w*n.height/r)}}function K8(e,t,n){let r,i;if(t===void 0||n===void 0){const s=e&&Hp(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{const o=s.getBoundingClientRect(),a=kd(s),l=Rs(a,"border","width"),c=Rs(a,"padding");t=o.width-c.width-l.width,n=o.height-c.height-l.height,r=Bu(a.maxWidth,s,"clientWidth"),i=Bu(a.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:r||Fu,maxHeight:i||Fu}}const $i=e=>Math.round(e*10)/10;function Q8(e,t,n,r){const i=kd(e),s=Rs(i,"margin"),o=Bu(i.maxWidth,e,"clientWidth")||Fu,a=Bu(i.maxHeight,e,"clientHeight")||Fu,l=K8(e,t,n);let{width:c,height:d}=l;if(i.boxSizing==="content-box"){const b=Rs(i,"border","width"),x=Rs(i,"padding");c-=x.width+b.width,d-=x.height+b.height}return c=Math.max(0,c-s.width),d=Math.max(0,r?c/r:d-s.height),c=$i(Math.min(c,o,l.maxWidth)),d=$i(Math.min(d,a,l.maxHeight)),c&&!d&&(d=$i(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&d>l.height&&(d=l.height,c=$i(Math.floor(d*r))),{width:c,height:d}}function kb(e,t,n){const r=t||1,i=$i(e.height*r),s=$i(e.width*r);e.height=$i(e.height),e.width=$i(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==s?(e.currentDevicePixelRatio=r,o.height=i,o.width=s,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const eP=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};zp()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function Ab(e,t){const n=Z8(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function ms(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function tP(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function nP(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},s={x:t.cp1x,y:t.cp1y},o=ms(e,i,n),a=ms(i,s,n),l=ms(s,t,n),c=ms(o,a,n),d=ms(a,l,n);return ms(c,d,n)}const rP=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},iP=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function yo(e,t,n){return e?rP(t,n):iP()}function a2(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function l2(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function c2(e){return e==="angle"?{between:ol,compare:s8,normalize:Rn}:{between:mi,compare:(t,n)=>t-n,normalize:t=>t}}function Mb({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function sP(e,t,n){const{property:r,start:i,end:s}=n,{between:o,normalize:a}=c2(r),l=t.length;let{start:c,end:d,loop:g}=e,b,x;if(g){for(c+=l,d+=l,b=0,x=l;b<x&&o(a(t[c%l][r]),i,s);++b)c--,d--;c%=l,d%=l}return d<c&&(d+=l),{start:c,end:d,loop:g,style:e.style}}function u2(e,t,n){if(!n)return[e];const{property:r,start:i,end:s}=n,o=t.length,{compare:a,between:l,normalize:c}=c2(r),{start:d,end:g,loop:b,style:x}=sP(e,t,n),w=[];let C=!1,E=null,k,u,v;const f=()=>l(i,v,k)&&a(i,v)!==0,p=()=>a(s,k)===0||l(s,v,k),y=()=>C||f(),h=()=>!C||p();for(let _=d,I=d;_<=g;++_)u=t[_%o],!u.skip&&(k=c(u[r]),k!==v&&(C=l(k,i,s),E===null&&y()&&(E=a(k,i)===0?_:I),E!==null&&h()&&(w.push(Mb({start:E,end:_,loop:b,count:o,style:x})),E=null),I=_,v=k));return E!==null&&w.push(Mb({start:E,end:g,loop:b,count:o,style:x})),w}function d2(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const s=u2(r[i],e.points,t);s.length&&n.push(...s)}return n}function oP(e,t,n,r){let i=0,s=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(s+=i);s>i&&e[s%t].skip;)s--;return s%=t,{start:i,end:s}}function aP(e,t,n,r){const i=e.length,s=[];let o=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,s.push({start:t%i,end:(l-1)%i,loop:r}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&s.push({start:t%i,end:o%i,loop:r}),s}function lP(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const s=!!e._loop,{start:o,end:a}=oP(n,i,s,r);if(r===!0)return Rb(e,[{start:o,end:a,loop:s}],n,t);const l=a<o?a+i:a,c=!!e._fullLoop&&o===0&&a===i-1;return Rb(e,aP(n,o,l,c),n,t)}function Rb(e,t,n,r){return!r||!r.setContext||!n?t:cP(e,t,n,r)}function cP(e,t,n,r){const i=e._chart.getContext(),s=Pb(e.options),{_datasetIndex:o,options:{spanGaps:a}}=e,l=n.length,c=[];let d=s,g=t[0].start,b=g;function x(w,C,E,k){const u=a?-1:1;if(w!==C){for(w+=l;n[w%l].skip;)w-=u;for(;n[C%l].skip;)C+=u;w%l!==C%l&&(c.push({start:w%l,end:C%l,loop:E,style:k}),d=k,g=C%l)}}for(const w of t){g=a?g:w.start;let C=n[g%l],E;for(b=g+1;b<=w.end;b++){const k=n[b%l];E=Pb(r.setContext(is(i,{type:"segment",p0:C,p1:k,p0DataIndex:(b-1)%l,p1DataIndex:b%l,datasetIndex:o}))),uP(E,d)&&x(g,b-1,w.loop,d),C=k,d=E}g<b-1&&x(g,b-1,w.loop,d)}return c}function Pb(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function uP(e,t){if(!t)return!1;const n=[],r=function(i,s){return Fp(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function gc(e,t,n){return e.options.clip?e[n]:t[n]}function dP(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:gc(n,t,"left"),right:gc(n,t,"right"),top:gc(r,t,"top"),bottom:gc(r,t,"bottom")}:t}function f2(e,t){const n=t._clip;if(n.disabled)return!1;const r=dP(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
94
- * Chart.js v4.5.1
95
- * https://www.chartjs.org
96
- * (c) 2025 Chart.js Contributors
97
- * Released under the MIT License
98
- */class fP{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const s=n.listeners[i],o=n.duration;s.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Z_.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const s=r.items;let o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),s.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var li=new fP;const Nb="transparent",hP={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=wb(e||Nb),i=r.valid&&wb(t||Nb);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class gP{constructor(t,n,r,i){const s=n[r];i=Gt([t.to,i,s,t.from]);const o=Gt([t.from,s,i]);this._active=!0,this._fn=t.fn||hP[t.type||typeof o],this._easing=La[t.easing]||La.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],s=r-this._start,o=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Gt([t.to,n,i,t.from]),this._from=Gt([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,s=this._from,o=this._loop,a=this._to;let l;if(this._active=s!==a&&(o||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=s;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(s,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class h2{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!dt(t))return;const n=Object.keys(Xt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!dt(s))return;const o={};for(const a of n)o[a]=s[a];(Wt(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,i=mP(t,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&pP(t.options.$animations,r).then(()=>{t.options=r},()=>{}),s}_createAnimations(t,n){const r=this._properties,i=[],s=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const d=n[c];let g=s[c];const b=r.get(c);if(g)if(b&&g.active()){g.update(b,d,a);continue}else g.cancel();if(!b||!b.duration){t[c]=d;continue}s[c]=g=new gP(b,t,c,d),i.push(g)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return li.add(this._chart,r),!0}}function pP(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const s=e[r[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function mP(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Tb(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,s=n.max===void 0?t:0;return{start:r?s:i,end:r?i:s}}function bP(e,t,n){if(n===!1)return!1;const r=Tb(e,n),i=Tb(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function vP(e){let t,n,r,i;return dt(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function g2(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,s;for(i=0,s=r.length;i<s;++i)n.push(r[i].index);return n}function Ob(e,t,n,r={}){const i=e.keys,s=r.mode==="single";let o,a,l,c;if(t===null)return;let d=!1;for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(d=!0,r.all)continue;break}c=e.values[l],Jt(c)&&(s||t===0||Xr(t)===Xr(c))&&(t+=c)}return!d&&!r.all?0:t}function xP(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",o=Object.keys(e),a=new Array(o.length);let l,c,d;for(l=0,c=o.length;l<c;++l)d=o[l],a[l]={[i]:d,[s]:e[d]};return a}function Vf(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function yP(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function _P(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function wP(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Db(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const s=e[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function Fb(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=r,l=s.axis,c=o.axis,d=yP(s,o,r),g=t.length;let b;for(let x=0;x<g;++x){const w=t[x],{[l]:C,[c]:E}=w,k=w._stacks||(w._stacks={});b=k[c]=wP(i,d,C),b[a]=E,b._top=Db(b,o,!0,r.type),b._bottom=Db(b,o,!1,r.type);const u=b._visualValues||(b._visualValues={});u[a]=E}}function zf(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function CP(e,t){return is(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function SP(e,t,n){return is(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function sa(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const s=i._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const Hf=e=>e==="reset"||e==="none",Lb=(e,t)=>t?e:Object.assign({},e),EP=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:g2(n,!0),values:null};class gr{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Vf(t.vScale,t),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(t){this.index!==t&&sa(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(g,b,x,w)=>g==="x"?b:g==="r"?w:x,s=n.xAxisID=qe(r.xAxisID,zf(t,"x")),o=n.yAxisID=qe(r.yAxisID,zf(t,"y")),a=n.rAxisID=qe(r.rAxisID,zf(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,s,o,a),d=n.vAxisID=i(l,o,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&xb(this._data,this),t._stacked&&sa(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(dt(n)){const i=this._cachedMeta;this._data=xP(n,i)}else if(r!==n){if(r){xb(r,this);const i=this._cachedMeta;sa(i),i._parsed=[]}n&&Object.isExtensible(n)&&c8(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=Vf(n.vScale,n),n.stack!==r.stack&&(i=!0,sa(n),n.stack=r.stack),this._resyncElements(t),(i||s!==n._stacked)&&(Fb(this,n._parsed),n._stacked=Vf(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:s,_stacked:o}=r,a=s.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],d,g,b;if(this._parsing===!1)r._parsed=i,r._sorted=!0,b=i;else{Wt(i[t])?b=this.parseArrayData(r,i,t,n):dt(i[t])?b=this.parseObjectData(r,i,t,n):b=this.parsePrimitiveData(r,i,t,n);const x=()=>g[a]===null||c&&g[a]<c[a];for(d=0;d<n;++d)r._parsed[d+t]=g=b[d],l&&(x()&&(l=!1),c=g);r._sorted=l}o&&Fb(this,b)}parsePrimitiveData(t,n,r,i){const{iScale:s,vScale:o}=t,a=s.axis,l=o.axis,c=s.getLabels(),d=s===o,g=new Array(i);let b,x,w;for(b=0,x=i;b<x;++b)w=b+r,g[b]={[a]:d||s.parse(c[w],w),[l]:o.parse(n[w],w)};return g}parseArrayData(t,n,r,i){const{xScale:s,yScale:o}=t,a=new Array(i);let l,c,d,g;for(l=0,c=i;l<c;++l)d=l+r,g=n[d],a[l]={x:s.parse(g[0],d),y:o.parse(g[1],d)};return a}parseObjectData(t,n,r,i){const{xScale:s,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let d,g,b,x;for(d=0,g=i;d<g;++d)b=d+r,x=n[b],c[d]={x:s.parse(Qi(x,a),b),y:o.parse(Qi(x,l),b)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,s=this._cachedMeta,o=n[t.axis],a={keys:g2(i,!0),values:n._stacks[t.axis]._visualValues};return Ob(a,o,s.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const s=r[n.axis];let o=s===null?NaN:s;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,o=Ob(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,s=r._sorted&&t===r.iScale,o=i.length,a=this._getOtherScale(t),l=EP(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:g}=_P(a);let b,x;function w(){x=i[b];const C=x[a.axis];return!Jt(x[t.axis])||d>C||g<C}for(b=0;b<o&&!(!w()&&(this.updateRangeFromParsed(c,t,x,l),s));++b);if(s){for(b=o-1;b>=0;--b)if(!w()){this.updateRangeFromParsed(c,t,x,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,s,o;for(i=0,s=n.length;i<s;++i)o=n[i][t.axis],Jt(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,s=this.getParsed(t);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=vP(qe(this.options.clip,bP(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],s=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let d;for(r.dataset&&r.dataset.draw(t,s,a,l),d=a;d<a+l;++d){const g=i[d];g.hidden||(g.active&&c?o.push(g):g.draw(t,s))}for(d=0;d<o.length;++d)o[d].draw(t,s)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];s=o.$context||(o.$context=SP(this.getContext(),t,o)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=CP(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",s=this._cachedDataOpts,o=t+"-"+n,a=s[o],l=this.enableOptionSharing&&sl(r);if(a)return Lb(a,l);const c=this.chart.config,d=c.datasetElementScopeKeys(this._type,t),g=i?[`${t}Hover`,"hover",t,""]:[t,""],b=c.getOptionScopes(this.getDataset(),d),x=Object.keys(Xt.elements[t]),w=()=>this.getContext(r,i,n),C=c.resolveNamedOptions(b,x,w,g);return C.$shared&&(C.$shared=l,s[o]=Object.freeze(Lb(C,l))),C}_resolveAnimations(t,n,r){const i=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,a=s[o];if(a)return a;let l;if(i.options.animation!==!1){const d=this.chart.config,g=d.datasetAnimationScopeKeys(this._type,n),b=d.getOptionScopes(this.getDataset(),g);l=d.createResolver(b,this.getContext(t,r,n))}const c=new h2(i,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Hf(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,s=this.getSharedOptions(r),o=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:o}}updateElement(t,n,r,i){Hf(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Hf(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,s=n.length,o=Math.min(s,i);o&&this.parse(0,o),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,n,r=!0){const i=this._cachedMeta,s=i.data,o=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(s),a=t;a<o;++a)s[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(s,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&sa(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Ae(gr,"defaults",{}),Ae(gr,"datasetElementType",null),Ae(gr,"dataElementType",null);function IP(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,s=n.length;i<s;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=Y_(r.sort((i,s)=>i-s))}return e._cache.$bar}function kP(e){const t=e.iScale,n=IP(t,e.type);let r=t._length,i,s,o,a;const l=()=>{o===32767||o===-32768||(sl(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(i=0,s=n.length;i<s;++i)o=t.getPixelForValue(n[i]),l();for(a=void 0,i=0,s=t.ticks.length;i<s;++i)o=t.getPixelForTick(i),l();return r}function AP(e,t,n,r){const i=n.barThickness;let s,o;return it(i)?(s=t.min*n.categoryPercentage,o=n.barPercentage):(s=i*r,o=1),{chunk:s/r,ratio:o,start:t.pixels[e]-s/2}}function MP(e,t,n,r){const i=t.pixels,s=i[e];let o=e>0?i[e-1]:null,a=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;o===null&&(o=s-(a===null?t.end-t.start:a-s)),a===null&&(a=s+s-o);const c=s-(s-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/r,ratio:n.barPercentage,start:c}}function RP(e,t,n,r){const i=n.parse(e[0],r),s=n.parse(e[1],r),o=Math.min(i,s),a=Math.max(i,s);let l=o,c=a;Math.abs(o)>Math.abs(a)&&(l=a,c=o),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:s,min:o,max:a}}function p2(e,t,n,r){return Wt(e)?RP(e,t,n,r):t[n.axis]=n.parse(e,r),t}function jb(e,t,n,r){const i=e.iScale,s=e.vScale,o=i.getLabels(),a=i===s,l=[];let c,d,g,b;for(c=n,d=n+r;c<d;++c)b=t[c],g={},g[i.axis]=a||i.parse(o[c],c),l.push(p2(b,g,s,c));return l}function Gf(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function PP(e,t,n){return e!==0?Xr(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function NP(e){let t,n,r,i,s;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",s="start"):(i="start",s="end"),{start:n,end:r,reverse:t,top:i,bottom:s}}function TP(e,t,n,r){let i=t.borderSkipped;const s={};if(!i){e.borderSkipped=s;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:l,top:c,bottom:d}=NP(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=d:(s[Bb(d,o,a,l)]=!0,i=c)),s[Bb(i,o,a,l)]=!0,e.borderSkipped=s}function Bb(e,t,n,r){return r?(e=OP(e,t,n),e=Vb(e,n,t)):e=Vb(e,t,n),e}function OP(e,t,n){return e===t?n:e===n?t:e}function Vb(e,t,n){return e==="start"?t:e==="end"?n:e}function DP(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Ba extends gr{parsePrimitiveData(t,n,r,i){return jb(t,n,r,i)}parseArrayData(t,n,r,i){return jb(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:s,vScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=s.axis==="x"?a:l,d=o.axis==="x"?a:l,g=[];let b,x,w,C;for(b=r,x=r+i;b<x;++b)C=n[b],w={},w[s.axis]=s.parse(Qi(C,c),b),g.push(p2(Qi(C,d),w,o,b));return g}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const s=r._custom;s&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,s=this.getParsed(t),o=s._custom,a=Gf(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+r.getLabelForValue(s[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const s=i==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),d=this._getRuler(),{sharedOptions:g,includeOptions:b}=this._getSharedOptions(n,i);for(let x=n;x<n+r;x++){const w=this.getParsed(x),C=s||it(w[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(x),E=this._calculateBarIndexPixels(x,d),k=(w._stacks||{})[a.axis],u={horizontal:c,base:C.base,enableBorderRadius:!k||Gf(w._custom)||o===k._top||o===k._bottom,x:c?C.head:E.center,y:c?E.center:C.head,height:c?E.size:Math.abs(C.size),width:c?Math.abs(C.size):E.size};b&&(u.options=g||this.resolveDataElementOptions(x,t[x].active?"active":i));const v=u.options||t[x].options;TP(u,v,k,o),DP(u,v,d.ratio),this.updateElement(t[x],x,u,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),s=r.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[r.axis],c=d=>{const g=d._parsed.find(x=>x[r.axis]===l),b=g&&g[d.vScale.axis];if(it(b)||isNaN(b))return!0};for(const d of i)if(!(n!==void 0&&c(d))&&((s===!1||o.indexOf(d.stack)===-1||s===void 0&&d.stack===void 0)&&o.push(d.stack),d.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[qe(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let s,o;for(s=0,o=n.data.length;s<o;++s)i.push(r.getPixelForValue(this.getParsed(s)[r.axis],s));const a=t.barThickness;return{min:a||kP(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:s,minBarLength:o}}=this,a=s||0,l=this.getParsed(t),c=l._custom,d=Gf(c);let g=l[n.axis],b=0,x=r?this.applyStack(n,l,r):g,w,C;x!==g&&(b=x-g,x=g),d&&(g=c.barStart,x=c.barEnd-c.barStart,g!==0&&Xr(g)!==Xr(c.barEnd)&&(b=0),b+=g);const E=!it(s)&&!d?s:b;let k=n.getPixelForValue(E);if(this.chart.getDataVisibility(t)?w=n.getPixelForValue(b+x):w=k,C=w-k,Math.abs(C)<o){C=PP(C,n,a)*o,g===a&&(k-=C/2);const u=n.getPixelForDecimal(0),v=n.getPixelForDecimal(1),f=Math.min(u,v),p=Math.max(u,v);k=Math.max(Math.min(k,p),f),w=k+C,r&&!d&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(w)-n.getValueForPixel(k))}if(k===n.getPixelForValue(a)){const u=Xr(C)*n.getLineWidthForValue(a)/2;k+=u,C-=u}return{size:C,base:k,head:w,center:w+C/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,s=i.skipNull,o=qe(i.maxBarThickness,1/0);let a,l;const c=this._getAxisCount();if(n.grouped){const d=s?this._getStackCount(t):n.stackCount,g=i.barThickness==="flex"?MP(t,n,i,d*c):AP(t,n,i,d*c),b=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,x=this._getAxis().indexOf(qe(b,this.getFirstScaleIdForIndexAxis())),w=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0)+x;a=g.start+g.chunk*w+g.chunk/2,l=Math.min(o,g.chunk*g.ratio)}else a=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(o,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&!r[s].hidden&&r[s].draw(this._ctx)}}Ae(Ba,"id","bar"),Ae(Ba,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Ae(Ba,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class eu extends gr{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,r,i){const s=super.parsePrimitiveData(t,n,r,i);for(let o=0;o<s.length;o++)s[o]._custom=this.resolveDataElementOptions(o+r).radius;return s}parseArrayData(t,n,r,i){const s=super.parseArrayData(t,n,r,i);for(let o=0;o<s.length;o++){const a=n[r+o];s[o]._custom=qe(a[2],this.resolveDataElementOptions(o+r).radius)}return s}parseObjectData(t,n,r,i){const s=super.parseObjectData(t,n,r,i);for(let o=0;o<s.length;o++){const a=n[r+o];s[o]._custom=qe(a&&a.r&&+a.r,this.resolveDataElementOptions(o+r).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let r=t.length-1;r>=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:s}=n,o=this.getParsed(t),a=i.getLabelForValue(o.x),l=s.getLabelForValue(o.y),c=o._custom;return{label:r[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const s=i==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),d=o.axis,g=a.axis;for(let b=n;b<n+r;b++){const x=t[b],w=!s&&this.getParsed(b),C={},E=C[d]=s?o.getPixelForDecimal(.5):o.getPixelForValue(w[d]),k=C[g]=s?a.getBasePixel():a.getPixelForValue(w[g]);C.skip=isNaN(E)||isNaN(k),c&&(C.options=l||this.resolveDataElementOptions(b,x.active?"active":i),s&&(C.options.radius=0)),this.updateElement(x,b,C,i)}}resolveDataElementOptions(t,n){const r=this.getParsed(t);let i=super.resolveDataElementOptions(t,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return n!=="active"&&(i.radius=0),i.radius+=qe(r&&r._custom,s),i}}Ae(eu,"id","bubble"),Ae(eu,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),Ae(eu,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function FP(e,t,n){let r=1,i=1,s=0,o=0;if(t<$t){const a=e,l=a+t,c=Math.cos(a),d=Math.sin(a),g=Math.cos(l),b=Math.sin(l),x=(v,f,p)=>ol(v,a,l,!0)?1:Math.max(f,f*n,p,p*n),w=(v,f,p)=>ol(v,a,l,!0)?-1:Math.min(f,f*n,p,p*n),C=x(0,c,g),E=x(tn,d,b),k=w(Ct,c,g),u=w(Ct+tn,d,b);r=(C-k)/2,i=(E-u)/2,s=-(C+k)/2,o=-(E+u)/2}return{ratioX:r,ratioY:i,offsetX:s,offsetY:o}}class Xi extends gr{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let s=l=>+r[l];if(dt(r[t])){const{key:l="value"}=this._parsing;s=c=>+Qi(r[c],l)}let o,a;for(o=t,a=t+n;o<a;++o)i._parsed[o]=s(o)}}_getRotation(){return kr(this.options.rotation-90)}_getCircumference(){return kr(this.options.circumference)}_getRotationExtents(){let t=$t,n=-$t;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,s=i._getRotation(),o=i._getCircumference();t=Math.min(t,s),n=Math.max(n,s+o)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,s=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,a=Math.max((Math.min(r.width,r.height)-o)/2,0),l=Math.min(Z9(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:d,rotation:g}=this._getRotationExtents(),{ratioX:b,ratioY:x,offsetX:w,offsetY:C}=FP(g,d,l),E=(r.width-o)/b,k=(r.height-o)/x,u=Math.max(Math.min(E,k)/2,0),v=H_(this.options.radius,u),f=Math.max(v*l,0),p=(v-f)/this._getVisibleDatasetWeightTotal();this.offsetX=w*v,this.offsetY=C*v,i.total=this.calculateTotal(),this.outerRadius=v-p*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-p*c,0),this.updateElements(s,0,s.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,s=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*s/$t)}updateElements(t,n,r,i){const s=i==="reset",o=this.chart,a=o.chartArea,c=o.options.animation,d=(a.left+a.right)/2,g=(a.top+a.bottom)/2,b=s&&c.animateScale,x=b?0:this.innerRadius,w=b?0:this.outerRadius,{sharedOptions:C,includeOptions:E}=this._getSharedOptions(n,i);let k=this._getRotation(),u;for(u=0;u<n;++u)k+=this._circumference(u,s);for(u=n;u<n+r;++u){const v=this._circumference(u,s),f=t[u],p={x:d+this.offsetX,y:g+this.offsetY,startAngle:k,endAngle:k+v,circumference:v,outerRadius:w,innerRadius:x};E&&(p.options=C||this.resolveDataElementOptions(u,f.active?"active":i)),k+=v,this.updateElement(f,u,p,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const s=t._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?$t*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],s=Nl(n._parsed[t],r.options.locale);return{label:i[t]||"",value:s}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,s,o,a,l;if(!t){for(i=0,s=r.data.datasets.length;i<s;++i)if(r.isDatasetVisible(i)){o=r.getDatasetMeta(i),t=o.data,a=o.controller;break}}if(!t)return 0;for(i=0,s=t.length;i<s;++i)l=a.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const s=this.resolveDataElementOptions(r);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(qe(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Ae(Xi,"id","doughnut"),Ae(Xi,"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"}),Ae(Xi,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),Ae(Xi,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data,{labels:{pointStyle:r,textAlign:i,color:s,useBorderRadius:o,borderRadius:a}}=t.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((l,c)=>{const g=t.getDatasetMeta(0).controller.getStyle(c);return{text:l,fillStyle:g.backgroundColor,fontColor:s,hidden:!t.getDataVisibility(c),lineDash:g.borderDash,lineDashOffset:g.borderDashOffset,lineJoin:g.borderJoinStyle,lineWidth:g.borderWidth,strokeStyle:g.borderColor,textAlign:i,pointStyle:r,borderRadius:o&&(a||g.borderRadius),index:c}}):[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class tu extends gr{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:s}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=J_(n,i,o);this._drawStart=a,this._drawCount=l,q_(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:d,includeOptions:g}=this._getSharedOptions(n,i),b=o.axis,x=a.axis,{spanGaps:w,segment:C}=this.options,E=ko(w)?w:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||s||i==="none",u=n+r,v=t.length;let f=n>0&&this.getParsed(n-1);for(let p=0;p<v;++p){const y=t[p],h=k?y:{};if(p<n||p>=u){h.skip=!0;continue}const _=this.getParsed(p),I=it(_[x]),A=h[b]=o.getPixelForValue(_[b],p),R=h[x]=s||I?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,_,l):_[x],p);h.skip=isNaN(A)||isNaN(R)||I,h.stop=p>0&&Math.abs(_[b]-f[b])>E,C&&(h.parsed=_,h.raw=c.data[p]),g&&(h.options=d||this.resolveDataElementOptions(p,y.active?"active":i)),k||this.updateElement(y,p,h,i),f=_}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const s=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Ae(tu,"id","line"),Ae(tu,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Ae(tu,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Va extends gr{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],s=Nl(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:s}}parseObjectData(t,n,r,i){return s2.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<n.min&&(n.min=s),s>n.max&&(n.max=s))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),s=Math.max(i/2,0),o=Math.max(r.cutoutPercentage?s/100*r.cutoutPercentage:1,0),a=(s-o)/t.getVisibleDatasetCount();this.outerRadius=s-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,r,i){const s=i==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,d=c.xCenter,g=c.yCenter,b=c.getIndexAngle(0)-.5*Ct;let x=b,w;const C=360/this.countVisibleElements();for(w=0;w<n;++w)x+=this._computeAngle(w,i,C);for(w=n;w<n+r;w++){const E=t[w];let k=x,u=x+this._computeAngle(w,i,C),v=o.getDataVisibility(w)?c.getDistanceFromCenterForValue(this.getParsed(w).r):0;x=u,s&&(l.animateScale&&(v=0),l.animateRotate&&(k=u=b));const f={x:d,y:g,innerRadius:0,outerRadius:v,startAngle:k,endAngle:u,options:this.resolveDataElementOptions(w,E.active?"active":i)};this.updateElement(E,w,f,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?kr(this.resolveDataElementOptions(t,n).angle||r):0}}Ae(Va,"id","polarArea"),Ae(Va,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),Ae(Va,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((s,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Vu extends Xi{}Ae(Vu,"id","pie"),Ae(Vu,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class nu extends gr{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return s2.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(r.points=i,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:o};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const s=this._cachedMeta.rScale,o=i==="reset";for(let a=n;a<n+r;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":i),d=s.getPointPositionForValue(a,this.getParsed(a).r),g=o?s.xCenter:d.x,b=o?s.yCenter:d.y,x={x:g,y:b,angle:d.angle,skip:isNaN(g)||isNaN(b),options:c};this.updateElement(l,a,x,i)}}}Ae(nu,"id","radar"),Ae(nu,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),Ae(nu,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class ru extends gr{getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:s}=n,o=this.getParsed(t),a=i.getLabelForValue(o.x),l=s.getLabelForValue(o.y);return{label:r[t]||"",value:"("+a+", "+l+")"}}update(t){const n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled;let{start:s,count:o}=J_(n,r,i);if(this._drawStart=s,this._drawCount=o,q_(n)&&(s=0,o=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=r;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:c},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,s,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,d=this.resolveDataElementOptions(n,i),g=this.getSharedOptions(d),b=this.includeOptions(i,g),x=o.axis,w=a.axis,{spanGaps:C,segment:E}=this.options,k=ko(C)?C:Number.POSITIVE_INFINITY,u=this.chart._animationsDisabled||s||i==="none";let v=n>0&&this.getParsed(n-1);for(let f=n;f<n+r;++f){const p=t[f],y=this.getParsed(f),h=u?p:{},_=it(y[w]),I=h[x]=o.getPixelForValue(y[x],f),A=h[w]=s||_?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,y,l):y[w],f);h.skip=isNaN(I)||isNaN(A)||_,h.stop=f>0&&Math.abs(y[x]-v[x])>k,E&&(h.parsed=y,h.raw=c.data[f]),b&&(h.options=g||this.resolveDataElementOptions(f,p.active?"active":i)),u||this.updateElement(p,f,h,i),v=y}this.updateSharedOptions(g,i,d)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}}Ae(ru,"id","scatter"),Ae(ru,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Ae(ru,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var LP=Object.freeze({__proto__:null,BarController:Ba,BubbleController:eu,DoughnutController:Xi,LineController:tu,PieController:Vu,PolarAreaController:Va,RadarController:nu,ScatterController:ru});function hs(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Gp{constructor(t){Ae(this,"options");this.options=t||{}}static override(t){Object.assign(Gp.prototype,t)}init(){}formats(){return hs()}parse(){return hs()}format(){return hs()}add(){return hs()}diff(){return hs()}startOf(){return hs()}endOf(){return hs()}}var jP={_date:Gp};function BP(e,t,n,r){const{controller:i,data:s,_sorted:o}=e,a=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&s.length){const c=a._reversePixels?a8:bi;if(r){if(i._sharedOptions){const d=s[0],g=typeof d.getRange=="function"&&d.getRange(t);if(g){const b=c(s,t,n-g),x=c(s,t,n+g);return{lo:b.lo,hi:x.hi}}}}else{const d=c(s,t,n);if(l){const{vScale:g}=i._cachedMeta,{_parsed:b}=e,x=b.slice(0,d.lo+1).reverse().findIndex(C=>!it(C[g.axis]));d.lo-=Math.max(0,x);const w=b.slice(d.hi).findIndex(C=>!it(C[g.axis]));d.hi+=Math.max(0,w)}return d}}return{lo:0,hi:s.length-1}}function Ad(e,t,n,r,i){const s=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=s.length;a<l;++a){const{index:c,data:d}=s[a],{lo:g,hi:b}=BP(s[a],t,o,i);for(let x=g;x<=b;++x){const w=d[x];w.skip||r(w,c,x)}}}function VP(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const s=t?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function Wf(e,t,n,r,i){const s=[];return!i&&!e.isPointInArea(t)||Ad(e,n,t,function(a,l,c){!i&&!vi(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&s.push({element:a,datasetIndex:l,index:c})},!0),s}function zP(e,t,n,r){let i=[];function s(o,a,l){const{startAngle:c,endAngle:d}=o.getProps(["startAngle","endAngle"],r),{angle:g}=$_(o,{x:t.x,y:t.y});ol(g,c,d)&&i.push({element:o,datasetIndex:a,index:l})}return Ad(e,n,t,s),i}function HP(e,t,n,r,i,s){let o=[];const a=VP(n);let l=Number.POSITIVE_INFINITY;function c(d,g,b){const x=d.inRange(t.x,t.y,i);if(r&&!x)return;const w=d.getCenterPoint(i);if(!(!!s||e.isPointInArea(w))&&!x)return;const E=a(t,w);E<l?(o=[{element:d,datasetIndex:g,index:b}],l=E):E===l&&o.push({element:d,datasetIndex:g,index:b})}return Ad(e,n,t,c),o}function $f(e,t,n,r,i,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!r?zP(e,t,n,i):HP(e,t,n,r,i,s)}function zb(e,t,n,r,i){const s=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Ad(e,n,t,(l,c,d)=>{l[o]&&l[o](t[n],i)&&(s.push({element:l,datasetIndex:c,index:d}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:s}var GP={modes:{index(e,t,n,r){const i=ps(t,e),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Wf(e,i,s,r,o):$f(e,i,s,!1,r,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const d=a[0].index,g=c.data[d];g&&!g.skip&&l.push({element:g,datasetIndex:c.index,index:d})}),l):[]},dataset(e,t,n,r){const i=ps(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Wf(e,i,s,r,o):$f(e,i,s,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let d=0;d<c.length;++d)a.push({element:c[d],datasetIndex:l,index:d})}return a},point(e,t,n,r){const i=ps(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return Wf(e,i,s,r,o)},nearest(e,t,n,r){const i=ps(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return $f(e,i,s,n.intersect,r,o)},x(e,t,n,r){const i=ps(t,e);return zb(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=ps(t,e);return zb(e,i,"y",n.intersect,r)}}};const m2=["left","top","right","bottom"];function oa(e,t){return e.filter(n=>n.pos===t)}function Hb(e,t){return e.filter(n=>m2.indexOf(n.pos)===-1&&n.box.axis===t)}function aa(e,t){return e.sort((n,r)=>{const i=t?r:n,s=t?n:r;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function WP(e){const t=[];let n,r,i,s,o,a;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:s,options:{stack:o,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&s+o,stackWeight:a});return t}function $P(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!m2.includes(i))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return t}function XP(e,t){const n=$P(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let s,o,a;for(s=0,o=e.length;s<o;++s){a=e[s];const{fullSize:l}=a.box,c=n[a.stack],d=c&&a.stackWeight/c.weight;a.horizontal?(a.width=d?d*r:l&&t.availableWidth,a.height=i):(a.width=r,a.height=d?d*i:l&&t.availableHeight)}return n}function YP(e){const t=WP(e),n=aa(t.filter(c=>c.box.fullSize),!0),r=aa(oa(t,"left"),!0),i=aa(oa(t,"right")),s=aa(oa(t,"top"),!0),o=aa(oa(t,"bottom")),a=Hb(t,"x"),l=Hb(t,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:oa(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(o).concat(a)}}function Gb(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function b2(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function ZP(e,t,n,r){const{pos:i,box:s}=n,o=e.maxPadding;if(!dt(i)){n.size&&(e[i]-=n.size);const g=r[n.stack]||{size:0,count:1};g.size=Math.max(g.size,n.horizontal?s.height:s.width),n.size=g.size/g.count,e[i]+=n.size}s.getPadding&&b2(o,s.getPadding());const a=Math.max(0,t.outerWidth-Gb(o,e,"left","right")),l=Math.max(0,t.outerHeight-Gb(o,e,"top","bottom")),c=a!==e.w,d=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:d}:{same:d,other:c}}function UP(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function JP(e,t){const n=t.maxPadding;function r(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{s[o]=Math.max(t[o],n[o])}),s}return r(e?["left","right"]:["top","bottom"])}function _a(e,t,n,r){const i=[];let s,o,a,l,c,d;for(s=0,o=e.length,c=0;s<o;++s){a=e[s],l=a.box,l.update(a.width||t.w,a.height||t.h,JP(a.horizontal,t));const{same:g,other:b}=ZP(t,n,a,r);c|=g&&i.length,d=d||b,l.fullSize||i.push(a)}return c&&_a(i,t,n,r)||d}function pc(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function Wb(e,t,n,r){const i=n.padding;let{x:s,y:o}=t;for(const a of e){const l=a.box,c=r[a.stack]||{placed:0,weight:1},d=a.stackWeight/c.weight||1;if(a.horizontal){const g=t.w*d,b=c.size||l.height;sl(c.start)&&(o=c.start),l.fullSize?pc(l,i.left,o,n.outerWidth-i.right-i.left,b):pc(l,t.left+c.placed,o,g,b),c.start=o,c.placed+=g,o=l.bottom}else{const g=t.h*d,b=c.size||l.width;sl(c.start)&&(s=c.start),l.fullSize?pc(l,s,i.top,b,n.outerHeight-i.bottom-i.top):pc(l,s,t.top+c.placed,b,g),c.start=s,c.placed+=g,s=l.right}}t.x=s,t.y=o}var Tn={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Cn(e.options.layout.padding),s=Math.max(t-i.width,0),o=Math.max(n-i.height,0),a=YP(e.boxes),l=a.vertical,c=a.horizontal;Rt(e.boxes,C=>{typeof C.beforeLayout=="function"&&C.beforeLayout()});const d=l.reduce((C,E)=>E.box.options&&E.box.options.display===!1?C:C+1,0)||1,g=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/d,hBoxMaxHeight:o/2}),b=Object.assign({},i);b2(b,Cn(r));const x=Object.assign({maxPadding:b,w:s,h:o,x:i.left,y:i.top},i),w=XP(l.concat(c),g);_a(a.fullSize,x,g,w),_a(l,x,g,w),_a(c,x,g,w)&&_a(l,x,g,w),UP(x),Wb(a.leftAndTop,x,g,w),x.x+=x.w,x.y+=x.h,Wb(a.rightAndBottom,x,g,w),e.chartArea={left:x.left,top:x.top,right:x.left+x.w,bottom:x.top+x.h,height:x.h,width:x.w},Rt(a.chartArea,C=>{const E=C.box;Object.assign(E,e.chartArea),E.update(x.w,x.h,{left:0,top:0,right:0,bottom:0})})}};class v2{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class qP extends v2{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const iu="$chartjs",KP={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},$b=e=>e===null||e==="";function QP(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[iu]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",$b(i)){const s=Ab(e,"width");s!==void 0&&(e.width=s)}if($b(r))if(e.style.height==="")e.height=e.width/(t||2);else{const s=Ab(e,"height");s!==void 0&&(e.height=s)}return e}const x2=eP?{passive:!0}:!1;function eN(e,t,n){e&&e.addEventListener(t,n,x2)}function tN(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,x2)}function nN(e,t){const n=KP[e.type]||e.type,{x:r,y:i}=ps(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function zu(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function rN(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||zu(a.addedNodes,r),o=o&&!zu(a.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function iN(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||zu(a.removedNodes,r),o=o&&!zu(a.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const ll=new Map;let Xb=0;function y2(){const e=window.devicePixelRatio;e!==Xb&&(Xb=e,ll.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function sN(e,t){ll.size||window.addEventListener("resize",y2),ll.set(e,t)}function oN(e){ll.delete(e),ll.size||window.removeEventListener("resize",y2)}function aN(e,t,n){const r=e.canvas,i=r&&Hp(r);if(!i)return;const s=U_((a,l)=>{const c=i.clientWidth;n(a,l),c<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||s(c,d)});return o.observe(i),sN(e,s),o}function Xf(e,t,n){n&&n.disconnect(),t==="resize"&&oN(e)}function lN(e,t,n){const r=e.canvas,i=U_(s=>{e.ctx!==null&&n(nN(s,e))},e);return eN(r,t,i),i}class cN extends v2{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(QP(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[iu])return!1;const r=n[iu].initial;["height","width"].forEach(s=>{const o=r[s];it(o)?n.removeAttribute(s):n.setAttribute(s,o)});const i=r.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[iu],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:rN,detach:iN,resize:aN}[n]||lN;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Xf,detach:Xf,resize:Xf}[n]||tN)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return Q8(t,n,r,i)}isAttached(t){const n=t&&Hp(t);return!!(n&&n.isConnected)}}function uN(e){return!zp()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?qP:cN}var Wc;let ti=(Wc=class{constructor(){Ae(this,"x");Ae(this,"y");Ae(this,"active",!1);Ae(this,"options");Ae(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return ko(this.x)&&ko(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(s=>{i[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),i}},Ae(Wc,"defaults",{}),Ae(Wc,"defaultRoutes"),Wc);function dN(e,t){const n=e.options.ticks,r=fN(e),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?gN(t):[],o=s.length,a=s[0],l=s[o-1],c=[];if(o>i)return pN(t,c,s,o/i),c;const d=hN(s,t,i);if(o>0){let g,b;const x=o>1?Math.round((l-a)/(o-1)):null;for(mc(t,c,d,it(x)?0:a-x,a),g=0,b=o-1;g<b;g++)mc(t,c,d,s[g],s[g+1]);return mc(t,c,d,l,it(x)?t.length:l+x),c}return mc(t,c,d),c}function fN(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function hN(e,t,n){const r=mN(e),i=t.length/n;if(!r)return Math.max(i,1);const s=n8(r);for(let o=0,a=s.length-1;o<a;o++){const l=s[o];if(l>i)return l}return Math.max(i,1)}function gN(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function pN(e,t,n,r){let i=0,s=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===s&&(t.push(e[o]),i++,s=n[i*r])}function mc(e,t,n,r,i){const s=qe(r,0),o=Math.min(qe(i,e.length),e.length);let a=0,l,c,d;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),d=s;d<0;)a++,d=Math.round(s+a*n);for(c=Math.max(s,0);c<o;c++)c===d&&(t.push(e[c]),a++,d=Math.round(s+a*n))}function mN(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const bN=e=>e==="left"?"right":e==="right"?"left":e,Yb=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Zb=(e,t)=>Math.min(t||e,e);function Ub(e,t){const n=[],r=e.length/t,i=e.length;let s=0;for(;s<i;s+=r)n.push(e[Math.floor(s)]);return n}function vN(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),s=e._startPixel,o=e._endPixel,a=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-s,o-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<s-a||l>o+a)))return l}function xN(e,t){Rt(e,n=>{const r=n.gc,i=r.length/2;let s;if(i>t){for(s=0;s<i;++s)delete n.data[r[s]];r.splice(0,i)}})}function la(e){return e.drawTicks?e.tickLength:0}function Jb(e,t){if(!e.display)return 0;const n=sn(e.font,t),r=Cn(e.padding);return(Wt(e.text)?e.text.length:1)*n.lineHeight+r.height}function yN(e,t){return is(e,{scale:t,type:"scale"})}function _N(e,t,n){return is(e,{tick:n,index:t,type:"tick"})}function wN(e,t,n){let r=Dp(e);return(n&&t!=="right"||!n&&t==="right")&&(r=bN(r)),r}function CN(e,t,n,r){const{top:i,left:s,bottom:o,right:a,chart:l}=e,{chartArea:c,scales:d}=l;let g=0,b,x,w;const C=o-i,E=a-s;if(e.isHorizontal()){if(x=An(r,s,a),dt(n)){const k=Object.keys(n)[0],u=n[k];w=d[k].getPixelForValue(u)+C-t}else n==="center"?w=(c.bottom+c.top)/2+C-t:w=Yb(e,n,t);b=a-s}else{if(dt(n)){const k=Object.keys(n)[0],u=n[k];x=d[k].getPixelForValue(u)-E+t}else n==="center"?x=(c.left+c.right)/2-E+t:x=Yb(e,n,t);w=An(r,o,i),g=n==="left"?-tn:tn}return{titleX:x,titleY:w,maxWidth:b,rotation:g}}class ss extends ti{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=qn(t,Number.POSITIVE_INFINITY),n=qn(n,Number.NEGATIVE_INFINITY),r=qn(r,Number.POSITIVE_INFINITY),i=qn(i,Number.NEGATIVE_INFINITY),{min:qn(t,r),max:qn(n,i),minDefined:Jt(t),maxDefined:Jt(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:s}=this.getUserBounds(),o;if(i&&s)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)o=a[l].controller.getMinMax(this,t),i||(n=Math.min(n,o.min)),s||(r=Math.max(r,o.max));return n=s&&n>r?r:n,r=i&&n>r?n:r,{min:qn(n,qn(r,n)),max:qn(r,qn(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Dt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=P8(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Ub(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=dN(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Dt(this.options.afterUpdate,[this])}beforeSetDimensions(){Dt(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(){Dt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Dt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Dt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,s;for(r=0,i=t.length;r<i;r++)s=t[r],s.label=Dt(n.callback,[s.value,r,t],this)}afterTickToLabelConversion(){Dt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Dt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Zb(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let o=i,a,l,c;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),g=d.widest.width,b=d.highest.height,x=hn(this.chart.width-g,0,this.maxWidth);a=t.offset?this.maxWidth/r:x/(r-1),g+6>a&&(a=x/(r-(t.offset?.5:1)),l=this.maxHeight-la(t.grid)-n.padding-Jb(t.title,this.chart.options.font),c=Math.sqrt(g*g+b*b),o=Tp(Math.min(Math.asin(hn((d.highest.height+6)/a,-1,1)),Math.asin(hn(l/c,-1,1))-Math.asin(hn(b/c,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){Dt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Dt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=Jb(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=la(s)+l):(t.height=this.maxHeight,t.width=la(s)+l),r.display&&this.ticks.length){const{first:c,last:d,widest:g,highest:b}=this._getLabelSizes(),x=r.padding*2,w=kr(this.labelRotation),C=Math.cos(w),E=Math.sin(w);if(a){const k=r.mirror?0:E*g.width+C*b.height;t.height=Math.min(this.maxHeight,t.height+k+x)}else{const k=r.mirror?0:C*g.width+E*b.height;t.width=Math.min(this.maxWidth,t.width+k+x)}this._calculatePadding(c,d,E,C)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,g=this.right-this.getPixelForTick(this.ticks.length-1);let b=0,x=0;l?c?(b=i*t.width,x=r*n.height):(b=r*t.height,x=i*n.width):s==="start"?x=n.width:s==="end"?b=t.width:s!=="inner"&&(b=t.width/2,x=n.width/2),this.paddingLeft=Math.max((b-d+o)*this.width/(this.width-d),0),this.paddingRight=Math.max((x-g+o)*this.width/(this.width-g),0)}else{let d=n.height/2,g=t.height/2;s==="start"?(d=0,g=t.height):s==="end"&&(d=n.height,g=0),this.paddingTop=d+o,this.paddingBottom=g+o}}_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(){Dt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)it(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Ub(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:s}=this,o=[],a=[],l=Math.floor(n/Zb(n,r));let c=0,d=0,g,b,x,w,C,E,k,u,v,f,p;for(g=0;g<n;g+=l){if(w=t[g].label,C=this._resolveTickFontOptions(g),i.font=E=C.string,k=s[E]=s[E]||{data:{},gc:[]},u=C.lineHeight,v=f=0,!it(w)&&!Wt(w))v=Lu(i,k.data,k.gc,v,w),f=u;else if(Wt(w))for(b=0,x=w.length;b<x;++b)p=w[b],!it(p)&&!Wt(p)&&(v=Lu(i,k.data,k.gc,v,p),f+=u);o.push(v),a.push(f),c=Math.max(v,c),d=Math.max(f,d)}xN(s,n);const y=o.indexOf(c),h=a.indexOf(d),_=I=>({width:o[I]||0,height:a[I]||0});return{first:_(0),last:_(n-1),widest:_(y),highest:_(h),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return o8(this._alignToPixels?fs(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=_N(this.getContext(),t,r))}return this.$context||(this.$context=yN(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=kr(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,a=s?s.widest.width+o:0,l=s?s.highest.height+o:0;return this.isHorizontal()?l*r>a*i?a/r:l/i:l*i<a*r?l/r:a/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:s,position:o,border:a}=i,l=s.offset,c=this.isHorizontal(),g=this.ticks.length+(l?1:0),b=la(s),x=[],w=a.setContext(this.getContext()),C=w.display?w.width:0,E=C/2,k=function(j){return fs(r,j,C)};let u,v,f,p,y,h,_,I,A,R,D,B;if(o==="top")u=k(this.bottom),h=this.bottom-b,I=u-E,R=k(t.top)+E,B=t.bottom;else if(o==="bottom")u=k(this.top),R=t.top,B=k(t.bottom)-E,h=u+E,I=this.top+b;else if(o==="left")u=k(this.right),y=this.right-b,_=u-E,A=k(t.left)+E,D=t.right;else if(o==="right")u=k(this.left),A=t.left,D=k(t.right)-E,y=u+E,_=this.left+b;else if(n==="x"){if(o==="center")u=k((t.top+t.bottom)/2+.5);else if(dt(o)){const j=Object.keys(o)[0],H=o[j];u=k(this.chart.scales[j].getPixelForValue(H))}R=t.top,B=t.bottom,h=u+E,I=h+b}else if(n==="y"){if(o==="center")u=k((t.left+t.right)/2);else if(dt(o)){const j=Object.keys(o)[0],H=o[j];u=k(this.chart.scales[j].getPixelForValue(H))}y=u-E,_=y-b,A=t.left,D=t.right}const N=qe(i.ticks.maxTicksLimit,g),F=Math.max(1,Math.ceil(g/N));for(v=0;v<g;v+=F){const j=this.getContext(v),H=s.setContext(j),L=a.setContext(j),G=H.lineWidth,$=H.color,Z=L.dash||[],U=L.dashOffset,ee=H.tickWidth,se=H.tickColor,ie=H.tickBorderDash||[],fe=H.tickBorderDashOffset;f=vN(this,v,l),f!==void 0&&(p=fs(r,f,G),c?y=_=A=D=p:h=I=R=B=p,x.push({tx1:y,ty1:h,tx2:_,ty2:I,x1:A,y1:R,x2:D,y2:B,width:G,color:$,borderDash:Z,borderDashOffset:U,tickWidth:ee,tickColor:se,tickBorderDash:ie,tickBorderDashOffset:fe}))}return this._ticksLength=g,this._borderValue=u,x}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:s}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:d,mirror:g}=s,b=la(r.grid),x=b+d,w=g?-d:x,C=-kr(this.labelRotation),E=[];let k,u,v,f,p,y,h,_,I,A,R,D,B="middle";if(i==="top")y=this.bottom-w,h=this._getXAxisLabelAlignment();else if(i==="bottom")y=this.top+w,h=this._getXAxisLabelAlignment();else if(i==="left"){const F=this._getYAxisLabelAlignment(b);h=F.textAlign,p=F.x}else if(i==="right"){const F=this._getYAxisLabelAlignment(b);h=F.textAlign,p=F.x}else if(n==="x"){if(i==="center")y=(t.top+t.bottom)/2+x;else if(dt(i)){const F=Object.keys(i)[0],j=i[F];y=this.chart.scales[F].getPixelForValue(j)+x}h=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")p=(t.left+t.right)/2-x;else if(dt(i)){const F=Object.keys(i)[0],j=i[F];p=this.chart.scales[F].getPixelForValue(j)}h=this._getYAxisLabelAlignment(b).textAlign}n==="y"&&(l==="start"?B="top":l==="end"&&(B="bottom"));const N=this._getLabelSizes();for(k=0,u=a.length;k<u;++k){v=a[k],f=v.label;const F=s.setContext(this.getContext(k));_=this.getPixelForTick(k)+s.labelOffset,I=this._resolveTickFontOptions(k),A=I.lineHeight,R=Wt(f)?f.length:1;const j=R/2,H=F.color,L=F.textStrokeColor,G=F.textStrokeWidth;let $=h;o?(p=_,h==="inner"&&(k===u-1?$=this.options.reverse?"left":"right":k===0?$=this.options.reverse?"right":"left":$="center"),i==="top"?c==="near"||C!==0?D=-R*A+A/2:c==="center"?D=-N.highest.height/2-j*A+A:D=-N.highest.height+A/2:c==="near"||C!==0?D=A/2:c==="center"?D=N.highest.height/2-j*A:D=N.highest.height-R*A,g&&(D*=-1),C!==0&&!F.showLabelBackdrop&&(p+=A/2*Math.sin(C))):(y=_,D=(1-R)*A/2);let Z;if(F.showLabelBackdrop){const U=Cn(F.backdropPadding),ee=N.heights[k],se=N.widths[k];let ie=D-U.top,fe=0-U.left;switch(B){case"middle":ie-=ee/2;break;case"bottom":ie-=ee;break}switch(h){case"center":fe-=se/2;break;case"right":fe-=se;break;case"inner":k===u-1?fe-=se:k>0&&(fe-=se/2);break}Z={left:fe,top:ie,width:se+U.width,height:ee+U.height,color:F.backdropColor}}E.push({label:f,font:I,textOffset:D,options:{rotation:C,color:H,strokeColor:L,strokeWidth:G,textAlign:$,textBaseline:B,translation:[p,y],backdrop:Z}})}return E}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-kr(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:s}}=this.options,o=this._getLabelSizes(),a=t+s,l=o.widest.width;let c,d;return n==="left"?i?(d=this.right+s,r==="near"?c="left":r==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-a,r==="near"?c="right":r==="center"?(c="center",d-=l/2):(c="left",d=this.left)):n==="right"?i?(d=this.left+s,r==="near"?c="right":r==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+a,r==="near"?c="left":r==="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 t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:s,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,s,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const a=(l,c,d)=>{!d.width||!d.color||(r.save(),r.lineWidth=d.width,r.strokeStyle=d.color,r.setLineDash(d.borderDash||[]),r.lineDashOffset=d.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(s=0,o=i.length;s<o;++s){const l=i[s];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,s=r.setContext(this.getContext()),o=r.display?s.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,d,g,b;this.isHorizontal()?(c=fs(t,this.left,o)-o/2,d=fs(t,this.right,a)+a/2,g=b=l):(g=fs(t,this.top,o)-o/2,b=fs(t,this.bottom,a)+a/2,c=d=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(c,g),n.lineTo(d,b),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&ks(r,i);const s=this.getLabelItems(t);for(const o of s){const a=o.options,l=o.font,c=o.label,d=o.textOffset;Vs(r,c,0,d,l,a)}i&&As(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=sn(r.font),o=Cn(r.padding),a=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||dt(n)?(l+=o.bottom,Wt(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:c,titleY:d,maxWidth:g,rotation:b}=CN(this,l,n,a);Vs(t,r.text,0,0,s,{color:r.color,maxWidth:g,rotation:b,textAlign:wN(a,n,i),textBaseline:"middle",translation:[c,d]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=qe(t.grid&&t.grid.z,-1),i=qe(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==ss.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let s,o;for(s=0,o=n.length;s<o;++s){const a=n[s];a[r]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return sn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class bc{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;IN(n)&&(r=this.register(n));const i=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,SN(t,o,r),this.override&&Xt.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in Xt[i]&&(delete Xt[i][r],this.override&&delete Bs[r])}}function SN(e,t,n){const r=gn(Object.create(null),[n?Xt.get(n):{},Xt.get(t),e.defaults]);Xt.set(t,r),e.defaultRoutes&&EN(t,e.defaultRoutes),e.descriptors&&Xt.describe(t,e.descriptors)}function EN(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),s=[e].concat(r).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");Xt.route(s,i,l,a)})}function IN(e){return"id"in e&&"defaults"in e}class kN{constructor(){this.controllers=new bc(gr,"datasets",!0),this.elements=new bc(ti,"elements"),this.plugins=new bc(Object,"plugins"),this.scales=new bc(ss,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const s=r||this._getRegistryForType(i);r||s.isForType(i)||s===this.plugins&&i.id?this._exec(t,s,i):Rt(i,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const i=Np(t);Dt(r["before"+i],[],r),n[t](r),Dt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Bn=new kN;class AN{constructor(){this._init=void 0}notify(t,n,r,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;const s=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(s,t,n,r);return n==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,n,r,i){i=i||{};for(const s of t){const o=s.plugin,a=o[r],l=[n,i,s.options];if(Dt(a,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){it(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=qe(r.options&&r.options.plugins,{}),s=MN(r);return i===!1&&!n?[]:PN(t,s,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(s,o)=>s.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function MN(e){const t={},n=[],r=Object.keys(Bn.plugins.items);for(let s=0;s<r.length;s++)n.push(Bn.getPlugin(r[s]));const i=e.plugins||[];for(let s=0;s<i.length;s++){const o=i[s];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function RN(e,t){return!t&&e===!1?null:e===!0?{}:e}function PN(e,{plugins:t,localIds:n},r,i){const s=[],o=e.getContext();for(const a of t){const l=a.id,c=RN(r[l],i);c!==null&&s.push({plugin:a,options:NN(e.config,{plugin:a,local:n[l]},c,o)})}return s}function NN(e,{plugin:t,local:n},r,i){const s=e.pluginScopeKeys(t),o=e.getOptionScopes(r,s);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Qh(e,t){const n=Xt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function TN(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function ON(e,t){return e===t?"_index_":"_value_"}function qb(e){if(e==="x"||e==="y"||e==="r")return e}function DN(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function eg(e,...t){if(qb(e))return e;for(const n of t){const r=n.axis||DN(n.position)||e.length>1&&qb(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Kb(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function FN(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Kb(e,"x",n[0])||Kb(e,"y",n[0])}return{}}function LN(e,t){const n=Bs[e.type]||{scales:{}},r=t.scales||{},i=Qh(e.type,t),s=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!dt(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=eg(o,a,FN(o,e),Xt.scales[a.type]),c=ON(l,i),d=n.scales||{};s[o]=Da(Object.create(null),[{axis:l},a,d[l],d[c]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||Qh(a,t),d=(Bs[a]||{}).scales||{};Object.keys(d).forEach(g=>{const b=TN(g,l),x=o[b+"AxisID"]||b;s[x]=s[x]||Object.create(null),Da(s[x],[{axis:b},r[x],d[g]])})}),Object.keys(s).forEach(o=>{const a=s[o];Da(a,[Xt.scales[a.type],Xt.scale])}),s}function _2(e){const t=e.options||(e.options={});t.plugins=qe(t.plugins,{}),t.scales=LN(e,t)}function w2(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function jN(e){return e=e||{},e.data=w2(e.data),_2(e),e}const Qb=new Map,C2=new Set;function vc(e,t){let n=Qb.get(e);return n||(n=t(),Qb.set(e,n),C2.add(n)),n}const ca=(e,t,n)=>{const r=Qi(t,n);r!==void 0&&e.add(r)};class BN{constructor(t){this._config=jN(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=w2(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),_2(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return vc(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return vc(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return vc(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return vc(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:s}=this,o=this._cachedScopes(t,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(d=>{t&&(l.add(t),d.forEach(g=>ca(l,t,g))),d.forEach(g=>ca(l,i,g)),d.forEach(g=>ca(l,Bs[s]||{},g)),d.forEach(g=>ca(l,Xt,g)),d.forEach(g=>ca(l,Kh,g))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),C2.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Bs[n]||{},Xt.datasets[n]||{},{type:n},Xt,Kh]}resolveNamedOptions(t,n,r,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=ev(this._resolverCache,t,i);let l=o;if(zN(o,n)){s.$shared=!1,r=es(r)?r():r;const c=this.createResolver(t,r,a);l=Ao(o,r,c)}for(const c of n)s[c]=l[c];return s}createResolver(t,n,r=[""],i){const{resolver:s}=ev(this._resolverCache,t,r);return dt(n)?Ao(s,n,void 0,i):s}}function ev(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let s=r.get(i);return s||(s={resolver:jp(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,s)),s}const VN=e=>dt(e)&&Object.getOwnPropertyNames(e).some(t=>es(e[t]));function zN(e,t){const{isScriptable:n,isIndexable:r}=t2(e);for(const i of t){const s=n(i),o=r(i),a=(o||s)&&e[i];if(s&&(es(a)||VN(a))||o&&Wt(a))return!0}return!1}var HN="4.5.1";const GN=["top","bottom","left","right","chartArea"];function tv(e,t){return e==="top"||e==="bottom"||GN.indexOf(e)===-1&&t==="x"}function nv(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function rv(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Dt(n&&n.onComplete,[e],t)}function WN(e){const t=e.chart,n=t.options.animation;Dt(n&&n.onProgress,[e],t)}function S2(e){return zp()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const su={},iv=e=>{const t=S2(e);return Object.values(su).filter(n=>n.canvas===t).pop()};function $N(e,t,n){const r=Object.keys(e);for(const i of r){const s=+i;if(s>=t){const o=e[i];delete e[i],(n>0||s>t)&&(e[s+n]=o)}}}function XN(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var ji;let pn=(ji=class{static register(...t){Bn.add(...t),sv()}static unregister(...t){Bn.remove(...t),sv()}constructor(t,n){const r=this.config=new BN(n),i=S2(t),s=iv(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||uN(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,d=l&&l.width;if(this.id=Y9(),this.ctx=a,this.canvas=l,this.width=d,this.height=c,this._options=o,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 AN,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=u8(g=>this.update(g),o.resizeDelay||0),this._dataChanges=[],su[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}li.listen(this,"complete",rv),li.listen(this,"progress",WN),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return it(t)?n&&s?s:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Bn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():kb(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Sb(this.canvas,this.ctx),this}stop(){return li.stop(this),this}resize(t,n){li.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,n,s),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,kb(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Dt(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Rt(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const a=n[o],l=eg(o,a),c=l==="r",d=l==="x";return{options:a,dposition:c?"chartArea":d?"bottom":"left",dtype:c?"radialLinear":d?"category":"linear"}}))),Rt(s,o=>{const a=o.options,l=a.id,c=eg(l,a),d=qe(a.type,o.dtype);(a.position===void 0||tv(a.position,c)!==tv(o.dposition))&&(a.position=o.dposition),i[l]=!0;let g=null;if(l in r&&r[l].type===d)g=r[l];else{const b=Bn.getScale(d);g=new b({id:l,type:d,ctx:this.ctx,chart:this}),r[g.id]=g}g.init(a,t)}),Rt(i,(o,a)=>{o||delete r[a]}),Rt(r,o=>{Tn.configure(this,o,o.options),Tn.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,s)=>i.index-s.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(nv("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const s=n[r];let o=this.getDatasetMeta(r);const a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=s.indexAxis||Qh(a,this.options),o.order=s.order||0,o.index=r,o.label=""+s.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Bn.getController(a),{datasetElementType:c,dataElementType:d}=Xt.datasets[a];Object.assign(l,{dataElementType:Bn.getElement(d),datasetElementType:c&&Bn.getElement(c)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Rt(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,d=this.data.datasets.length;c<d;c++){const{controller:g}=this.getDatasetMeta(c),b=!i&&s.indexOf(g)===-1;g.buildOrUpdateElements(b),o=Math.max(+g.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||Rt(s,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(nv("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Rt(this.scales,t=>{Tn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!pb(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:s}of n){const o=r==="_removeElements"?-s:s;$N(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(t.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),i=r(0);for(let s=1;s<n;s++)if(!pb(i,r(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Tn.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Rt(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,es(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(li.has(this)?this.attached&&!li.running(this)&&li.start(this):(this.draw(),rv({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,s;for(i=0,s=n.length;i<s;++i){const o=n[i];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=f2(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&ks(n,i),t.controller.draw(),i&&As(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return vi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const s=GP.modes[n];return typeof s=="function"?s(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=is(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,i);sl(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(s,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),li.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Sb(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete su[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(s,o)=>{n.addEventListener(this,s,o),t[s]=o},i=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};Rt(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},s=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",s),r("detach",o)};o=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Rt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Rt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:s,index:o})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!Ou(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,s=(l,c)=>l.filter(d=>!c.some(g=>d.datasetIndex===g.datasetIndex&&d.index===g.index)),o=s(n,t),a=r?t:s(t,n);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const s=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(s||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:s}=this,o=n,a=this._getActiveElements(t,i,r,o),l=Q9(t),c=XN(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Dt(s.onHover,[t,a,this],this),l&&Dt(s.onClick,[t,a,this],this));const d=!Ou(a,i);return(d||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,d}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}},Ae(ji,"defaults",Xt),Ae(ji,"instances",su),Ae(ji,"overrides",Bs),Ae(ji,"registry",Bn),Ae(ji,"version",HN),Ae(ji,"getChart",iv),ji);function sv(){return Rt(pn.instances,e=>e._plugins.invalidate())}function YN(e,t,n){const{startAngle:r,x:i,y:s,outerRadius:o,innerRadius:a,options:l}=t,{borderWidth:c,borderJoinStyle:d}=l,g=Math.min(c/o,Rn(r-n));if(e.beginPath(),e.arc(i,s,o-c/2,r+g/2,n-g/2),a>0){const b=Math.min(c/a,Rn(r-n));e.arc(i,s,a+c/2,n-b/2,r+b/2,!0)}else{const b=Math.min(c/2,o*Rn(r-n));if(d==="round")e.arc(i,s,b,n-Ct/2,r+Ct/2,!0);else if(d==="bevel"){const x=2*b*b,w=-x*Math.cos(n+Ct/2)+i,C=-x*Math.sin(n+Ct/2)+s,E=x*Math.cos(r+Ct/2)+i,k=x*Math.sin(r+Ct/2)+s;e.lineTo(w,C),e.lineTo(E,k)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function ZN(e,t,n){const{startAngle:r,pixelMargin:i,x:s,y:o,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(s,o,a,r-c,n+c),l>i?(c=i/l,e.arc(s,o,l,n+c,r-c,!0)):e.arc(s,o,i,n+tn,r-tn),e.closePath(),e.clip()}function UN(e){return Lp(e,["outerStart","outerEnd","innerStart","innerEnd"])}function JN(e,t,n,r){const i=UN(e.options.borderRadius),s=(n-t)/2,o=Math.min(s,r*t/2),a=l=>{const c=(n-Math.min(s,l))*r/2;return hn(l,0,Math.min(s,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:hn(i.innerStart,0,o),innerEnd:hn(i.innerEnd,0,o)}}function so(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Hu(e,t,n,r,i,s){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:d}=t,g=Math.max(t.outerRadius+r+n-c,0),b=d>0?d+r+n+c:0;let x=0;const w=i-l;if(r){const F=d>0?d-r:0,j=g>0?g-r:0,H=(F+j)/2,L=H!==0?w*H/(H+r):w;x=(w-L)/2}const C=Math.max(.001,w*g-n/Ct)/g,E=(w-C)/2,k=l+E+x,u=i-E-x,{outerStart:v,outerEnd:f,innerStart:p,innerEnd:y}=JN(t,b,g,u-k),h=g-v,_=g-f,I=k+v/h,A=u-f/_,R=b+p,D=b+y,B=k+p/R,N=u-y/D;if(e.beginPath(),s){const F=(I+A)/2;if(e.arc(o,a,g,I,F),e.arc(o,a,g,F,A),f>0){const G=so(_,A,o,a);e.arc(G.x,G.y,f,A,u+tn)}const j=so(D,u,o,a);if(e.lineTo(j.x,j.y),y>0){const G=so(D,N,o,a);e.arc(G.x,G.y,y,u+tn,N+Math.PI)}const H=(u-y/b+(k+p/b))/2;if(e.arc(o,a,b,u-y/b,H,!0),e.arc(o,a,b,H,k+p/b,!0),p>0){const G=so(R,B,o,a);e.arc(G.x,G.y,p,B+Math.PI,k-tn)}const L=so(h,k,o,a);if(e.lineTo(L.x,L.y),v>0){const G=so(h,I,o,a);e.arc(G.x,G.y,v,k-tn,I)}}else{e.moveTo(o,a);const F=Math.cos(I)*g+o,j=Math.sin(I)*g+a;e.lineTo(F,j);const H=Math.cos(A)*g+o,L=Math.sin(A)*g+a;e.lineTo(H,L)}e.closePath()}function qN(e,t,n,r,i){const{fullCircles:s,startAngle:o,circumference:a}=t;let l=t.endAngle;if(s){Hu(e,t,n,r,l,i);for(let c=0;c<s;++c)e.fill();isNaN(a)||(l=o+(a%$t||$t))}return Hu(e,t,n,r,l,i),e.fill(),l}function KN(e,t,n,r,i){const{fullCircles:s,startAngle:o,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:d,borderDash:g,borderDashOffset:b,borderRadius:x}=l,w=l.borderAlign==="inner";if(!c)return;e.setLineDash(g||[]),e.lineDashOffset=b,w?(e.lineWidth=c*2,e.lineJoin=d||"round"):(e.lineWidth=c,e.lineJoin=d||"bevel");let C=t.endAngle;if(s){Hu(e,t,n,r,C,i);for(let E=0;E<s;++E)e.stroke();isNaN(a)||(C=o+(a%$t||$t))}w&&ZN(e,t,C),l.selfJoin&&C-o>=Ct&&x===0&&d!=="miter"&&YN(e,t,C),s||(Hu(e,t,n,r,C,i),e.stroke())}class xi extends ti{constructor(n){super();Ae(this,"circumference");Ae(this,"endAngle");Ae(this,"fullCircles");Ae(this,"innerRadius");Ae(this,"outerRadius");Ae(this,"pixelMargin");Ae(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,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.getProps(["x","y"],i),{angle:o,distance:a}=$_(s,{x:n,y:r}),{startAngle:l,endAngle:c,innerRadius:d,outerRadius:g,circumference:b}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),x=(this.options.spacing+this.options.borderWidth)/2,w=qe(b,c-l),C=ol(o,l,c)&&l!==c,E=w>=$t||C,k=mi(a,d+x,g+x);return E&&k}getCenterPoint(n){const{x:r,y:i,startAngle:s,endAngle:o,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:d}=this.options,g=(s+o)/2,b=(a+l+d+c)/2;return{x:r+Math.cos(g)*b,y:i+Math.sin(g)*b}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,s=(r.offset||0)/4,o=(r.spacing||0)/2,a=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>$t?Math.floor(i/$t):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*s,Math.sin(l)*s);const c=1-Math.sin(Math.min(Ct,i||0)),d=s*c;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,qN(n,this,d,o,a),KN(n,this,d,o,a),n.restore()}}Ae(xi,"id","arc"),Ae(xi,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),Ae(xi,"defaultRoutes",{backgroundColor:"backgroundColor"}),Ae(xi,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function E2(e,t,n=t){e.lineCap=qe(n.borderCapStyle,t.borderCapStyle),e.setLineDash(qe(n.borderDash,t.borderDash)),e.lineDashOffset=qe(n.borderDashOffset,t.borderDashOffset),e.lineJoin=qe(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=qe(n.borderWidth,t.borderWidth),e.strokeStyle=qe(n.borderColor,t.borderColor)}function QN(e,t,n){e.lineTo(n.x,n.y)}function eT(e){return e.stepped?w8:e.tension||e.cubicInterpolationMode==="monotone"?C8:QN}function I2(e,t,n={}){const r=e.length,{start:i=0,end:s=r-1}=n,{start:o,end:a}=t,l=Math.max(i,o),c=Math.min(s,a),d=i<o&&s<o||i>a&&s>a;return{count:r,start:l,loop:t.loop,ilen:c<l&&!d?r+c-l:c-l}}function tT(e,t,n,r){const{points:i,options:s}=t,{count:o,start:a,loop:l,ilen:c}=I2(i,n,r),d=eT(s);let{move:g=!0,reverse:b}=r||{},x,w,C;for(x=0;x<=c;++x)w=i[(a+(b?c-x:x))%o],!w.skip&&(g?(e.moveTo(w.x,w.y),g=!1):d(e,C,w,b,s.stepped),C=w);return l&&(w=i[(a+(b?c:0))%o],d(e,C,w,b,s.stepped)),!!l}function nT(e,t,n,r){const i=t.points,{count:s,start:o,ilen:a}=I2(i,n,r),{move:l=!0,reverse:c}=r||{};let d=0,g=0,b,x,w,C,E,k;const u=f=>(o+(c?a-f:f))%s,v=()=>{C!==E&&(e.lineTo(d,E),e.lineTo(d,C),e.lineTo(d,k))};for(l&&(x=i[u(0)],e.moveTo(x.x,x.y)),b=0;b<=a;++b){if(x=i[u(b)],x.skip)continue;const f=x.x,p=x.y,y=f|0;y===w?(p<C?C=p:p>E&&(E=p),d=(g*d+f)/++g):(v(),e.lineTo(f,p),w=y,g=0,C=E=p),k=p}v()}function tg(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?nT:tT}function rT(e){return e.stepped?tP:e.tension||e.cubicInterpolationMode==="monotone"?nP:ms}function iT(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),E2(e,t.options),e.stroke(i)}function sT(e,t,n,r){const{segments:i,options:s}=t,o=tg(t);for(const a of i)E2(e,s,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const oT=typeof Path2D=="function";function aT(e,t,n,r){oT&&!t.options.segment?iT(e,t,n,r):sT(e,t,n,r)}class yi extends ti{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;Y8(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=lP(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],s=this.points,o=d2(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],l=rT(r);let c,d;for(c=0,d=o.length;c<d;++c){const{start:g,end:b}=o[c],x=s[g],w=s[b];if(x===w){a.push(x);continue}const C=Math.abs((i-x[n])/(w[n]-x[n])),E=l(x,w,C,r.stepped);E[n]=t[n],a.push(E)}return a.length===1?a[0]:a}pathSegment(t,n,r){return tg(this)(t,this,n,r)}path(t,n,r){const i=this.segments,s=tg(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)o&=s(t,this,a,{start:n,end:n+r-1});return!!o}draw(t,n,r,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),aT(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Ae(yi,"id","line"),Ae(yi,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Ae(yi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Ae(yi,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function ov(e,t,n,r){const i=e.options,{[n]:s}=e.getProps([n],r);return Math.abs(t-s)<i.radius+i.hitRadius}class Ps extends ti{constructor(n){super();Ae(this,"parsed");Ae(this,"skip");Ae(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.options,{x:o,y:a}=this.getProps(["x","y"],i);return Math.pow(n-o,2)+Math.pow(r-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return ov(this,n,"x",r)}inYRange(n,r){return ov(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!vi(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,ju(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Ae(Ps,"id","point"),Ae(Ps,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Ae(Ps,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function k2(e,t){const{x:n,y:r,base:i,width:s,height:o}=e.getProps(["x","y","base","width","height"],t);let a,l,c,d,g;return e.horizontal?(g=o/2,a=Math.min(n,i),l=Math.max(n,i),c=r-g,d=r+g):(g=s/2,a=n-g,l=n+g,c=Math.min(r,i),d=Math.max(r,i)),{left:a,top:c,right:l,bottom:d}}function Yi(e,t,n,r){return e?0:hn(t,n,r)}function lT(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,s=e2(r);return{t:Yi(i.top,s.top,0,n),r:Yi(i.right,s.right,0,t),b:Yi(i.bottom,s.bottom,0,n),l:Yi(i.left,s.left,0,t)}}function cT(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,s=Ms(i),o=Math.min(t,n),a=e.borderSkipped,l=r||dt(i);return{topLeft:Yi(!l||a.top||a.left,s.topLeft,0,o),topRight:Yi(!l||a.top||a.right,s.topRight,0,o),bottomLeft:Yi(!l||a.bottom||a.left,s.bottomLeft,0,o),bottomRight:Yi(!l||a.bottom||a.right,s.bottomRight,0,o)}}function uT(e){const t=k2(e),n=t.right-t.left,r=t.bottom-t.top,i=lT(e,n/2,r/2),s=cT(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:s},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function Yf(e,t,n,r){const i=t===null,s=n===null,a=e&&!(i&&s)&&k2(e,r);return a&&(i||mi(t,a.left,a.right))&&(s||mi(n,a.top,a.bottom))}function dT(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function fT(e,t){e.rect(t.x,t.y,t.w,t.h)}function Zf(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,s=(e.x+e.w!==n.x+n.w?t:0)-r,o=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+s,h:e.h+o,radius:e.radius}}class Yr extends ti{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:s,outer:o}=uT(this),a=dT(o.radius)?al:fT;t.save(),(o.w!==s.w||o.h!==s.h)&&(t.beginPath(),a(t,Zf(o,n,s)),t.clip(),a(t,Zf(s,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,Zf(s,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return Yf(this,t,n,r)}inXRange(t,n){return Yf(this,t,null,n)}inYRange(t,n){return Yf(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(n+i)/2:n,y:s?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}Ae(Yr,"id","bar"),Ae(Yr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Ae(Yr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var hT=Object.freeze({__proto__:null,ArcElement:xi,BarElement:Yr,LineElement:yi,PointElement:Ps});const ng=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],av=ng.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function A2(e){return ng[e%ng.length]}function M2(e){return av[e%av.length]}function gT(e,t){return e.borderColor=A2(t),e.backgroundColor=M2(t),++t}function pT(e,t){return e.backgroundColor=e.data.map(()=>A2(t++)),t}function mT(e,t){return e.backgroundColor=e.data.map(()=>M2(t++)),t}function bT(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof Xi?t=pT(n,t):i instanceof Va?t=mT(n,t):i&&(t=gT(n,t))}}function lv(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function vT(e){return e&&(e.borderColor||e.backgroundColor)}function xT(){return Xt.borderColor!=="rgba(0,0,0,0.1)"||Xt.backgroundColor!=="rgba(0,0,0,0.1)"}var yT={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:s}=i,o=lv(r)||vT(i)||s&&lv(s)||xT();if(!n.forceOverride&&o)return;const a=bT(e);r.forEach(a)}};function _T(e,t,n,r,i){const s=i.samples||r;if(s>=n)return e.slice(t,t+n);const o=[],a=(n-2)/(s-2);let l=0;const c=t+n-1;let d=t,g,b,x,w,C;for(o[l++]=e[d],g=0;g<s-2;g++){let E=0,k=0,u;const v=Math.floor((g+1)*a)+1+t,f=Math.min(Math.floor((g+2)*a)+1,n)+t,p=f-v;for(u=v;u<f;u++)E+=e[u].x,k+=e[u].y;E/=p,k/=p;const y=Math.floor(g*a)+1+t,h=Math.min(Math.floor((g+1)*a)+1,n)+t,{x:_,y:I}=e[d];for(x=w=-1,u=y;u<h;u++)w=.5*Math.abs((_-E)*(e[u].y-I)-(_-e[u].x)*(k-I)),w>x&&(x=w,b=e[u],C=u);o[l++]=b,d=C}return o[l++]=e[c],o}function wT(e,t,n,r){let i=0,s=0,o,a,l,c,d,g,b,x,w,C;const E=[],k=t+n-1,u=e[t].x,f=e[k].x-u;for(o=t;o<t+n;++o){a=e[o],l=(a.x-u)/f*r,c=a.y;const p=l|0;if(p===d)c<w?(w=c,g=o):c>C&&(C=c,b=o),i=(s*i+a.x)/++s;else{const y=o-1;if(!it(g)&&!it(b)){const h=Math.min(g,b),_=Math.max(g,b);h!==x&&h!==y&&E.push({...e[h],x:i}),_!==x&&_!==y&&E.push({...e[_],x:i})}o>0&&y!==x&&E.push(e[y]),E.push(a),d=p,s=0,w=C=c,g=b=x=o}}return E}function R2(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function cv(e){e.data.datasets.forEach(t=>{R2(t)})}function CT(e,t){const n=t.length;let r=0,i;const{iScale:s}=e,{min:o,max:a,minDefined:l,maxDefined:c}=s.getUserBounds();return l&&(r=hn(bi(t,s.axis,o).lo,0,n-1)),c?i=hn(bi(t,s.axis,a).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var ST={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){cv(e);return}const r=e.width;e.data.datasets.forEach((i,s)=>{const{_data:o,indexAxis:a}=i,l=e.getDatasetMeta(s),c=o||i.data;if(Gt([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const d=e.scales[l.xAxisID];if(d.type!=="linear"&&d.type!=="time"||e.options.parsing)return;let{start:g,count:b}=CT(l,c);const x=n.threshold||4*r;if(b<=x){R2(i);return}it(o)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(C){this._data=C}}));let w;switch(n.algorithm){case"lttb":w=_T(c,g,b,r,n);break;case"min-max":w=wT(c,g,b,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=w})},destroy(e){cv(e)}};function ET(e,t,n){const r=e.segments,i=e.points,s=t.points,o=[];for(const a of r){let{start:l,end:c}=a;c=Md(l,c,i);const d=rg(n,i[l],i[c],a.loop);if(!t.segments){o.push({source:a,target:d,start:i[l],end:i[c]});continue}const g=d2(t,d);for(const b of g){const x=rg(n,s[b.start],s[b.end],b.loop),w=u2(a,i,x);for(const C of w)o.push({source:C,target:b,start:{[n]:uv(d,x,"start",Math.max)},end:{[n]:uv(d,x,"end",Math.min)}})}}return o}function rg(e,t,n,r){if(r)return;let i=t[e],s=n[e];return e==="angle"&&(i=Rn(i),s=Rn(s)),{property:e,start:i,end:s}}function IT(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,s=[];return t.segments.forEach(({start:o,end:a})=>{a=Md(o,a,i);const l=i[o],c=i[a];r!==null?(s.push({x:l.x,y:r}),s.push({x:c.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:c.y}))}),s}function Md(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function uv(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function P2(e,t){let n=[],r=!1;return Wt(e)?(r=!0,n=e):n=IT(e,t),n.length?new yi({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function dv(e){return e&&e.fill!==!1}function kT(e,t,n){let i=e[t].fill;const s=[t];let o;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!Jt(i))return i;if(o=e[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function AT(e,t,n){const r=NT(e);if(dt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Jt(i)&&Math.floor(i)===i?MT(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function MT(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function RT(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:dt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function PT(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:dt(e)?r=e.value:r=t.getBaseValue(),r}function NT(e){const t=e.options,n=t.fill;let r=qe(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function TT(e){const{scale:t,index:n,line:r}=e,i=[],s=r.segments,o=r.points,a=OT(t,n);a.push(P2({x:null,y:t.bottom},r));for(let l=0;l<s.length;l++){const c=s[l];for(let d=c.start;d<=c.end;d++)DT(i,o[d],a)}return new yi({points:i,options:{}})}function OT(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const s=r[i];if(s.index===t)break;s.hidden||n.unshift(s.dataset)}return n}function DT(e,t,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:o,last:a,point:l}=FT(s,t,"x");if(!(!l||o&&a)){if(o)r.unshift(l);else if(e.push(l),!a)break}}e.push(...r)}function FT(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],s=e.segments,o=e.points;let a=!1,l=!1;for(let c=0;c<s.length;c++){const d=s[c],g=o[d.start][n],b=o[d.end][n];if(mi(i,g,b)){a=i===g,l=i===b;break}}return{first:a,last:l,point:r}}class N2{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:i,y:s,radius:o}=this;return n=n||{start:0,end:$t},t.arc(i,s,o,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:i}=this,s=t.angle;return{x:n+Math.cos(s)*i,y:r+Math.sin(s)*i,angle:s}}}function LT(e){const{chart:t,fill:n,line:r}=e;if(Jt(n))return jT(t,n);if(n==="stack")return TT(e);if(n==="shape")return!0;const i=BT(e);return i instanceof N2?i:P2(i,r)}function jT(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function BT(e){return(e.scale||{}).getPointPositionForValue?zT(e):VT(e)}function VT(e){const{scale:t={},fill:n}=e,r=RT(n,t);if(Jt(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function zT(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,s=r.reverse?t.max:t.min,o=PT(n,t,s),a=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,s);return new N2({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(o)})}for(let l=0;l<i;++l)a.push(t.getPointPositionForValue(l,o));return a}function Uf(e,t,n){const r=LT(t),{chart:i,index:s,line:o,scale:a,axis:l}=t,c=o.options,d=c.fill,g=c.backgroundColor,{above:b=g,below:x=g}=d||{},w=i.getDatasetMeta(s),C=f2(i,w);r&&o.points.length&&(ks(e,n),HT(e,{line:o,target:r,above:b,below:x,area:n,scale:a,axis:l,clip:C}),As(e))}function HT(e,t){const{line:n,target:r,above:i,below:s,area:o,scale:a,clip:l}=t,c=n._loop?"angle":t.axis;e.save();let d=s;s!==i&&(c==="x"?(fv(e,r,o.top),Jf(e,{line:n,target:r,color:i,scale:a,property:c,clip:l}),e.restore(),e.save(),fv(e,r,o.bottom)):c==="y"&&(hv(e,r,o.left),Jf(e,{line:n,target:r,color:s,scale:a,property:c,clip:l}),e.restore(),e.save(),hv(e,r,o.right),d=i)),Jf(e,{line:n,target:r,color:d,scale:a,property:c,clip:l}),e.restore()}function fv(e,t,n){const{segments:r,points:i}=t;let s=!0,o=!1;e.beginPath();for(const a of r){const{start:l,end:c}=a,d=i[l],g=i[Md(l,c,i)];s?(e.moveTo(d.x,d.y),s=!1):(e.lineTo(d.x,n),e.lineTo(d.x,d.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(g.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function hv(e,t,n){const{segments:r,points:i}=t;let s=!0,o=!1;e.beginPath();for(const a of r){const{start:l,end:c}=a,d=i[l],g=i[Md(l,c,i)];s?(e.moveTo(d.x,d.y),s=!1):(e.lineTo(n,d.y),e.lineTo(d.x,d.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(n,g.y)}e.lineTo(n,t.first().y),e.closePath(),e.clip()}function Jf(e,t){const{line:n,target:r,property:i,color:s,scale:o,clip:a}=t,l=ET(n,r,i);for(const{source:c,target:d,start:g,end:b}of l){const{style:{backgroundColor:x=s}={}}=c,w=r!==!0;e.save(),e.fillStyle=x,GT(e,o,a,w&&rg(i,g,b)),e.beginPath();const C=!!n.pathSegment(e,c);let E;if(w){C?e.closePath():gv(e,r,b,i);const k=!!r.pathSegment(e,d,{move:C,reverse:!0});E=C&&k,E||gv(e,r,g,i)}e.closePath(),e.fill(E?"evenodd":"nonzero"),e.restore()}}function GT(e,t,n,r){const i=t.chart.chartArea,{property:s,start:o,end:a}=r||{};if(s==="x"||s==="y"){let l,c,d,g;s==="x"?(l=o,c=i.top,d=a,g=i.bottom):(l=i.left,c=o,d=i.right,g=a),e.beginPath(),n&&(l=Math.max(l,n.left),d=Math.min(d,n.right),c=Math.max(c,n.top),g=Math.min(g,n.bottom)),e.rect(l,c,d-l,g-c),e.clip()}}function gv(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var WT={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let s,o,a,l;for(o=0;o<r;++o)s=e.getDatasetMeta(o),a=s.dataset,l=null,a&&a.options&&a instanceof yi&&(l={visible:e.isDatasetVisible(o),index:o,fill:AT(a,o,r),chart:e,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,i.push(l);for(o=0;o<r;++o)l=i[o],!(!l||l.fill===!1)&&(l.fill=kT(i,o,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),s=e.chartArea;for(let o=i.length-1;o>=0;--o){const a=i[o].$filler;a&&(a.line.updateControlPoints(s,a.axis),r&&a.fill&&Uf(e.ctx,a,s))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;dv(s)&&Uf(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!dv(r)||n.drawTime!=="beforeDatasetDraw"||Uf(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const pv=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},$T=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class mv extends ti{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Dt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=sn(r.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=pv(r,s);let c,d;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(o,s,a,l)+10):(d=this.maxHeight,c=this._fitCols(o,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(d,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=i+a;let g=t;s.textAlign="left",s.textBaseline="middle";let b=-1,x=-d;return this.legendItems.forEach((w,C)=>{const E=r+n/2+s.measureText(w.text).width;(C===0||c[c.length-1]+E+2*a>o)&&(g+=d,c[c.length-(C>0?0:1)]=0,x+=d,b++),l[C]={left:0,top:x,row:b,width:E,height:i},c[c.length-1]+=E+a}),g}_fitCols(t,n,r,i){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=o-t;let g=a,b=0,x=0,w=0,C=0;return this.legendItems.forEach((E,k)=>{const{itemWidth:u,itemHeight:v}=XT(r,n,s,E,i);k>0&&x+v+2*a>d&&(g+=b+a,c.push({width:b,height:x}),w+=b+a,C++,b=x=0),l[k]={left:w,top:x,col:C,width:u,height:v},b=Math.max(b,u),x+=v+a}),g+=b,c.push({width:b,height:x}),g}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:s}}=this,o=yo(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=An(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=An(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+i}else{let a=0,l=An(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=An(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;ks(t,this),this._draw(),As(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:o}=t,a=Xt.color,l=yo(t.rtl,this.left,this.width),c=sn(o.font),{padding:d}=o,g=c.size,b=g/2;let x;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:w,boxHeight:C,itemHeight:E}=pv(o,g),k=function(y,h,_){if(isNaN(w)||w<=0||isNaN(C)||C<0)return;i.save();const I=qe(_.lineWidth,1);if(i.fillStyle=qe(_.fillStyle,a),i.lineCap=qe(_.lineCap,"butt"),i.lineDashOffset=qe(_.lineDashOffset,0),i.lineJoin=qe(_.lineJoin,"miter"),i.lineWidth=I,i.strokeStyle=qe(_.strokeStyle,a),i.setLineDash(qe(_.lineDash,[])),o.usePointStyle){const A={radius:C*Math.SQRT2/2,pointStyle:_.pointStyle,rotation:_.rotation,borderWidth:I},R=l.xPlus(y,w/2),D=h+b;Q_(i,A,R,D,o.pointStyleWidth&&w)}else{const A=h+Math.max((g-C)/2,0),R=l.leftForLtr(y,w),D=Ms(_.borderRadius);i.beginPath(),Object.values(D).some(B=>B!==0)?al(i,{x:R,y:A,w,h:C,radius:D}):i.rect(R,A,w,C),i.fill(),I!==0&&i.stroke()}i.restore()},u=function(y,h,_){Vs(i,_.text,y,h+E/2,c,{strikethrough:_.hidden,textAlign:l.textAlign(_.textAlign)})},v=this.isHorizontal(),f=this._computeTitleHeight();v?x={x:An(s,this.left+d,this.right-r[0]),y:this.top+d+f,line:0}:x={x:this.left+d,y:An(s,this.top+f+d,this.bottom-n[0].height),line:0},a2(this.ctx,t.textDirection);const p=E+d;this.legendItems.forEach((y,h)=>{i.strokeStyle=y.fontColor,i.fillStyle=y.fontColor;const _=i.measureText(y.text).width,I=l.textAlign(y.textAlign||(y.textAlign=o.textAlign)),A=w+b+_;let R=x.x,D=x.y;l.setWidth(this.width),v?h>0&&R+A+d>this.right&&(D=x.y+=p,x.line++,R=x.x=An(s,this.left+d,this.right-r[x.line])):h>0&&D+p>this.bottom&&(R=x.x=R+n[x.line].width+d,x.line++,D=x.y=An(s,this.top+f+d,this.bottom-n[x.line].height));const B=l.x(R);if(k(B,D,y),R=d8(I,R+w+b,v?R+A:this.right,t.rtl),u(l.x(R),D,y),v)x.x+=A+d;else if(typeof y.text!="string"){const N=c.lineHeight;x.y+=T2(y,N)+d}else x.y+=p}),l2(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=sn(n.font),i=Cn(n.padding);if(!n.display)return;const s=yo(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let d,g=this.left,b=this.width;if(this.isHorizontal())b=Math.max(...this.lineWidths),d=this.top+c,g=An(t.align,g,this.right-b);else{const w=this.columnSizes.reduce((C,E)=>Math.max(C,E.height),0);d=c+An(t.align,this.top,this.bottom-w-t.labels.padding-this._computeTitleHeight())}const x=An(a,g,g+b);o.textAlign=s.textAlign(Dp(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Vs(o,n.text,x,d,r)}_computeTitleHeight(){const t=this.options.title,n=sn(t.font),r=Cn(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,s;if(mi(t,this.left,this.right)&&mi(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],mi(t,i.left,i.left+i.width)&&mi(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!UT(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,s=$T(i,r);i&&!s&&Dt(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!s&&Dt(n.onHover,[t,r,this],this)}else r&&Dt(n.onClick,[t,r,this],this)}}function XT(e,t,n,r,i){const s=YT(r,e,t,n),o=ZT(i,r,t.lineHeight);return{itemWidth:s,itemHeight:o}}function YT(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((s,o)=>s.length>o.length?s:o)),t+n.size/2+r.measureText(i).width}function ZT(e,t,n){let r=e;return typeof t.text!="string"&&(r=T2(t,n)),r}function T2(e,t){const n=e.text?e.text.length:0;return t*n}function UT(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Ys={id:"legend",_element:mv,start(e,t,n){const r=e.legend=new mv({ctx:e.ctx,options:n,chart:e});Tn.configure(e,r,n),Tn.addBox(e,r)},stop(e){Tn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Tn.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:s,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),d=Cn(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:s,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:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Wp extends ti{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=Wt(r.text)?r.text.length:1;this._padding=Cn(r.padding);const s=i*sn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:s,options:o}=this,a=o.align;let l=0,c,d,g;return this.isHorizontal()?(d=An(a,r,s),g=n+t,c=s-r):(o.position==="left"?(d=r+t,g=An(a,i,n),l=Ct*-.5):(d=s-t,g=An(a,n,i),l=Ct*.5),c=i-n),{titleX:d,titleY:g,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=sn(n.font),s=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(s);Vs(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:Dp(n.align),textBaseline:"middle",translation:[o,a]})}}function JT(e,t){const n=new Wp({ctx:e.ctx,options:t,chart:e});Tn.configure(e,n,t),Tn.addBox(e,n),e.titleBlock=n}var $p={id:"title",_element:Wp,start(e,t,n){JT(e,n)},stop(e){const t=e.titleBlock;Tn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Tn.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const xc=new WeakMap;var qT={id:"subtitle",start(e,t,n){const r=new Wp({ctx:e.ctx,options:n,chart:e});Tn.configure(e,r,n),Tn.addBox(e,r),xc.set(e,r)},stop(e){Tn.removeBox(e,xc.get(e)),xc.delete(e)},beforeUpdate(e,t,n){const r=xc.get(e);Tn.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const wa={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,s=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),i+=l.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:i/s}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=e.length;s<o;++s){const l=e[s].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),d=qh(t,c);d<i&&(i=d,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Br(e,t){return t&&(Wt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function ci(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
99
- `)>-1?e.split(`
100
- `):e}function KT(e,t){const{element:n,datasetIndex:r,index:i}=t,s=e.getDatasetMeta(r).controller,{label:o,value:a}=s.getLabelAndValue(i);return{chart:e,label:o,parsed:s.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:s.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function bv(e,t){const n=e.chart.ctx,{body:r,footer:i,title:s}=e,{boxWidth:o,boxHeight:a}=t,l=sn(t.bodyFont),c=sn(t.titleFont),d=sn(t.footerFont),g=s.length,b=i.length,x=r.length,w=Cn(t.padding);let C=w.height,E=0,k=r.reduce((f,p)=>f+p.before.length+p.lines.length+p.after.length,0);if(k+=e.beforeBody.length+e.afterBody.length,g&&(C+=g*c.lineHeight+(g-1)*t.titleSpacing+t.titleMarginBottom),k){const f=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;C+=x*f+(k-x)*l.lineHeight+(k-1)*t.bodySpacing}b&&(C+=t.footerMarginTop+b*d.lineHeight+(b-1)*t.footerSpacing);let u=0;const v=function(f){E=Math.max(E,n.measureText(f).width+u)};return n.save(),n.font=c.string,Rt(e.title,v),n.font=l.string,Rt(e.beforeBody.concat(e.afterBody),v),u=t.displayColors?o+2+t.boxPadding:0,Rt(r,f=>{Rt(f.before,v),Rt(f.lines,v),Rt(f.after,v)}),u=0,n.font=d.string,Rt(e.footer,v),n.restore(),E+=w.width,{width:E,height:C}}function QT(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function eO(e,t,n,r){const{x:i,width:s}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&i+s+o>t.width||e==="right"&&i-s-o<0)return!0}function tO(e,t,n,r){const{x:i,width:s}=n,{width:o,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=s/2?c="left":i>=o-s/2&&(c="right"),eO(c,e,t,n)&&(c="center"),c}function vv(e,t,n){const r=n.yAlign||t.yAlign||QT(e,n);return{xAlign:n.xAlign||t.xAlign||tO(e,t,n,r),yAlign:r}}function nO(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function rO(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function xv(e,t,n,r){const{caretSize:i,caretPadding:s,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,c=i+s,{topLeft:d,topRight:g,bottomLeft:b,bottomRight:x}=Ms(o);let w=nO(t,a);const C=rO(t,l,c);return l==="center"?a==="left"?w+=c:a==="right"&&(w-=c):a==="left"?w-=Math.max(d,b)+i:a==="right"&&(w+=Math.max(g,x)+i),{x:hn(w,0,r.width-t.width),y:hn(C,0,r.height-t.height)}}function yc(e,t,n){const r=Cn(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function yv(e){return Br([],ci(e))}function iO(e,t,n){return is(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function _v(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const O2={beforeTitle:oi,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:oi,beforeBody:oi,beforeLabel:oi,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return it(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:oi,afterBody:oi,beforeFooter:oi,footer:oi,afterFooter:oi};function Wn(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?O2[t].call(n,r):i}class ig extends ti{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,s=new h2(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=iO(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Wn(r,"beforeTitle",this,t),s=Wn(r,"title",this,t),o=Wn(r,"afterTitle",this,t);let a=[];return a=Br(a,ci(i)),a=Br(a,ci(s)),a=Br(a,ci(o)),a}getBeforeBody(t,n){return yv(Wn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Rt(t,s=>{const o={before:[],lines:[],after:[]},a=_v(r,s);Br(o.before,ci(Wn(a,"beforeLabel",this,s))),Br(o.lines,Wn(a,"label",this,s)),Br(o.after,ci(Wn(a,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(t,n){return yv(Wn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Wn(r,"beforeFooter",this,t),s=Wn(r,"footer",this,t),o=Wn(r,"afterFooter",this,t);let a=[];return a=Br(a,ci(i)),a=Br(a,ci(s)),a=Br(a,ci(o)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],s=[],o=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(KT(this.chart,n[l]));return t.filter&&(a=a.filter((d,g,b)=>t.filter(d,g,b,r))),t.itemSort&&(a=a.sort((d,g)=>t.itemSort(d,g,r))),Rt(a,d=>{const g=_v(t.callbacks,d);i.push(Wn(g,"labelColor",this,d)),s.push(Wn(g,"labelPointStyle",this,d)),o.push(Wn(g,"labelTextColor",this,d))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let s,o=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const a=wa[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=bv(this,r),c=Object.assign({},a,l),d=vv(this.chart,r,c),g=xv(r,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,s={opacity:1,x:g.x,y:g.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const s=this.getCaretPosition(t,r,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:s}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:g}=Ms(a),{x:b,y:x}=t,{width:w,height:C}=n;let E,k,u,v,f,p;return s==="center"?(f=x+C/2,i==="left"?(E=b,k=E-o,v=f+o,p=f-o):(E=b+w,k=E+o,v=f-o,p=f+o),u=E):(i==="left"?k=b+Math.max(l,d)+o:i==="right"?k=b+w-Math.max(c,g)-o:k=this.caretX,s==="top"?(v=x,f=v-o,E=k-o,u=k+o):(v=x+C,f=v+o,E=k+o,u=k-o),p=v),{x1:E,x2:k,x3:u,y1:v,y2:f,y3:p}}drawTitle(t,n,r){const i=this.title,s=i.length;let o,a,l;if(s){const c=yo(r.rtl,this.x,this.width);for(t.x=yc(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",o=sn(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(i[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===s&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,i,s){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=s,d=sn(s.bodyFont),g=yc(this,"left",s),b=i.x(g),x=l<d.lineHeight?(d.lineHeight-l)/2:0,w=n.y+x;if(s.usePointStyle){const C={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},E=i.leftForLtr(b,c)+c/2,k=w+l/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,ju(t,C,E,k),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,ju(t,C,E,k)}else{t.lineWidth=dt(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const C=i.leftForLtr(b,c),E=i.leftForLtr(i.xPlus(b,1),c-2),k=Ms(o.borderRadius);Object.values(k).some(u=>u!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,al(t,{x:C,y:w,w:c,h:l,radius:k}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),al(t,{x:E,y:w+1,w:c-2,h:l-2,radius:k}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(C,w,c,l),t.strokeRect(C,w,c,l),t.fillStyle=o.backgroundColor,t.fillRect(E,w+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:d}=r,g=sn(r.bodyFont);let b=g.lineHeight,x=0;const w=yo(r.rtl,this.x,this.width),C=function(_){n.fillText(_,w.x(t.x+x),t.y+b/2),t.y+=b+s},E=w.textAlign(o);let k,u,v,f,p,y,h;for(n.textAlign=o,n.textBaseline="middle",n.font=g.string,t.x=yc(this,E,r),n.fillStyle=r.bodyColor,Rt(this.beforeBody,C),x=a&&E!=="right"?o==="center"?c/2+d:c+2+d:0,f=0,y=i.length;f<y;++f){for(k=i[f],u=this.labelTextColors[f],n.fillStyle=u,Rt(k.before,C),v=k.lines,a&&v.length&&(this._drawColorBox(n,t,f,w,r),b=Math.max(g.lineHeight,l)),p=0,h=v.length;p<h;++p)C(v[p]),b=g.lineHeight;Rt(k.after,C)}x=0,b=g.lineHeight,Rt(this.afterBody,C),t.y-=s}drawFooter(t,n,r){const i=this.footer,s=i.length;let o,a;if(s){const l=yo(r.rtl,this.x,this.width);for(t.x=yc(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=sn(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<s;++a)n.fillText(i[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:s,yAlign:o}=this,{x:a,y:l}=t,{width:c,height:d}=r,{topLeft:g,topRight:b,bottomLeft:x,bottomRight:w}=Ms(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+g,l),o==="top"&&this.drawCaret(t,n,r,i),n.lineTo(a+c-b,l),n.quadraticCurveTo(a+c,l,a+c,l+b),o==="center"&&s==="right"&&this.drawCaret(t,n,r,i),n.lineTo(a+c,l+d-w),n.quadraticCurveTo(a+c,l+d,a+c-w,l+d),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+x,l+d),n.quadraticCurveTo(a,l+d,a,l+d-x),o==="center"&&s==="left"&&this.drawCaret(t,n,r,i),n.lineTo(a,l+g),n.quadraticCurveTo(a,l,a+g,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,s=r&&r.y;if(i||s){const o=wa[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=bv(this,t),l=Object.assign({},o,this._size),c=vv(n,t,l),d=xv(t,l,c,n);(i._to!==d.x||s._to!==d.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=Cn(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(s,t,i,n),a2(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),l2(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),s=!Ou(r,i),o=this._positionChanged(i,n);(s||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],o=this._getActiveElements(t,s,n,r),a=this._positionChanged(o,t),l=n||!Ou(o,s)||a;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const s=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,s.mode,s,r);return s.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:i,options:s}=this,o=wa[s.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}}Ae(ig,"positioners",wa);var Zs={id:"tooltip",_element:ig,positioners:wa,afterInit(e,t,n){n&&(e.tooltip=new ig({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:O2},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},sO=Object.freeze({__proto__:null,Colors:yT,Decimation:ST,Filler:WT,Legend:Ys,SubTitle:qT,Title:$p,Tooltip:Zs});const oO=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function aO(e,t,n,r){const i=e.indexOf(t);if(i===-1)return oO(e,t,n,r);const s=e.lastIndexOf(t);return i!==s?n:i}const lO=(e,t)=>e===null?null:hn(Math.round(e),0,t);function wv(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Ro extends ss{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:s}of n)r[i]===s&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(it(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:aO(r,t,qe(n,t),this._addedLabels),lO(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){return wv.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}Ae(Ro,"id","category"),Ae(Ro,"defaults",{ticks:{callback:wv}});function cO(e,t){const n=[],{bounds:i,step:s,min:o,max:a,precision:l,count:c,maxTicks:d,maxDigits:g,includeBounds:b}=e,x=s||1,w=d-1,{min:C,max:E}=t,k=!it(o),u=!it(a),v=!it(c),f=(E-C)/(g+1);let p=bb((E-C)/w/x)*x,y,h,_,I;if(p<1e-14&&!k&&!u)return[{value:C},{value:E}];I=Math.ceil(E/p)-Math.floor(C/p),I>w&&(p=bb(I*p/w/x)*x),it(l)||(y=Math.pow(10,l),p=Math.ceil(p*y)/y),i==="ticks"?(h=Math.floor(C/p)*p,_=Math.ceil(E/p)*p):(h=C,_=E),k&&u&&s&&i8((a-o)/s,p/1e3)?(I=Math.round(Math.min((a-o)/p,d)),p=(a-o)/I,h=o,_=a):v?(h=k?o:h,_=u?a:_,I=c-1,p=(_-h)/I):(I=(_-h)/p,Fa(I,Math.round(I),p/1e3)?I=Math.round(I):I=Math.ceil(I));const A=Math.max(vb(p),vb(h));y=Math.pow(10,it(l)?A:l),h=Math.round(h*y)/y,_=Math.round(_*y)/y;let R=0;for(k&&(b&&h!==o?(n.push({value:o}),h<o&&R++,Fa(Math.round((h+R*p)*y)/y,o,Cv(o,f,e))&&R++):h<o&&R++);R<I;++R){const D=Math.round((h+R*p)*y)/y;if(u&&D>a)break;n.push({value:D})}return u&&b&&_!==a?n.length&&Fa(n[n.length-1].value,a,Cv(a,f,e))?n[n.length-1].value=a:n.push({value:a}):(!u||_===a)&&n.push({value:_}),n}function Cv(e,t,{horizontal:n,minRotation:r}){const i=kr(r),s=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}class Gu extends ss{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return it(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:s}=this;const o=l=>i=n?i:l,a=l=>s=r?s:l;if(t){const l=Xr(i),c=Xr(s);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(i===s){let l=s===0?1:Math.abs(s*.05);a(s+l),t||o(i-l)}this.min=i,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=cO(i,s);return t.bounds==="ticks"&&W_(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Nl(t,this.chart.options.locale,this.options.ticks.format)}}class Ei extends Gu{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Jt(t)?t:0,this.max=Jt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=kr(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Ae(Ei,"id","linear"),Ae(Ei,"defaults",{ticks:{callback:Id.formatters.numeric}});const cl=e=>Math.floor(Wi(e)),gs=(e,t)=>Math.pow(10,cl(e)+t);function Sv(e){return e/Math.pow(10,cl(e))===1}function Ev(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function uO(e,t){const n=t-e;let r=cl(n);for(;Ev(e,t,r)>10;)r++;for(;Ev(e,t,r)<10;)r--;return Math.min(r,cl(e))}function dO(e,{min:t,max:n}){t=qn(e.min,t);const r=[],i=cl(t);let s=uO(t,n),o=s<0?Math.pow(10,Math.abs(s)):1;const a=Math.pow(10,s),l=i>s?Math.pow(10,i):0,c=Math.round((t-l)*o)/o,d=Math.floor((t-l)/a/10)*a*10;let g=Math.floor((c-d)/Math.pow(10,s)),b=qn(e.min,Math.round((l+d+g*Math.pow(10,s))*o)/o);for(;b<n;)r.push({value:b,major:Sv(b),significand:g}),g>=10?g=g<15?15:20:g++,g>=20&&(s++,g=2,o=s>=0?1:o),b=Math.round((l+d+g*Math.pow(10,s))*o)/o;const x=qn(e.max,b);return r.push({value:x,major:Sv(x),significand:g}),r}class zs extends ss{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Gu.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Jt(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Jt(t)?Math.max(0,t):null,this.max=Jt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Jt(this._userMin)&&(this.min=t===gs(this.min,0)?gs(this.min,-1):gs(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const s=a=>r=t?r:a,o=a=>i=n?i:a;r===i&&(r<=0?(s(1),o(10)):(s(gs(r,-1)),o(gs(i,1)))),r<=0&&s(gs(i,-1)),i<=0&&o(gs(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=dO(n,this);return t.bounds==="ticks"&&W_(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":Nl(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Wi(t),this._valueRange=Wi(this.max)-Wi(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Wi(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Ae(zs,"id","logarithmic"),Ae(zs,"defaults",{ticks:{callback:Id.formatters.logarithmic,major:{enabled:!0}}});function sg(e){const t=e.ticks;if(t.display&&e.display){const n=Cn(t.backdropPadding);return qe(t.font&&t.font.size,Xt.font.size)+n.height}return 0}function fO(e,t,n){return n=Wt(n)?n:[n],{w:_8(e,t.string,n),h:n.length*t.lineHeight}}function Iv(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function hO(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],s=e._pointLabels.length,o=e.options.pointLabels,a=o.centerPointLabels?Ct/s:0;for(let l=0;l<s;l++){const c=o.setContext(e.getPointLabelContext(l));i[l]=c.padding;const d=e.getPointPosition(l,e.drawingArea+i[l],a),g=sn(c.font),b=fO(e.ctx,g,e._pointLabels[l]);r[l]=b;const x=Rn(e.getIndexAngle(l)+a),w=Math.round(Tp(x)),C=Iv(w,d.x,b.w,0,180),E=Iv(w,d.y,b.h,90,270);gO(n,t,x,C,E)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=bO(e,r,i)}function gO(e,t,n,r,i){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,l=0;r.start<t.l?(a=(t.l-r.start)/s,e.l=Math.min(e.l,t.l-a)):r.end>t.r&&(a=(r.end-t.r)/s,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(l=(t.t-i.start)/o,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+l))}function pO(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:s,padding:o,size:a}=n,l=e.getPointPosition(t,r+i+o,s),c=Math.round(Tp(Rn(l.angle+tn))),d=yO(l.y,a.h,c),g=vO(c),b=xO(l.x,a.w,g);return{visible:!0,x:l.x,y:d,textAlign:g,left:b,top:d,right:b+a.w,bottom:d+a.h}}function mO(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:s}=e;return!(vi({x:n,y:r},t)||vi({x:n,y:s},t)||vi({x:i,y:r},t)||vi({x:i,y:s},t))}function bO(e,t,n){const r=[],i=e._pointLabels.length,s=e.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:sg(s)/2,additionalAngle:o?Ct/i:0};let c;for(let d=0;d<i;d++){l.padding=n[d],l.size=t[d];const g=pO(e,d,l);r.push(g),a==="auto"&&(g.visible=mO(g,c),g.visible&&(c=g))}return r}function vO(e){return e===0||e===180?"center":e<180?"left":"right"}function xO(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function yO(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function _O(e,t,n){const{left:r,top:i,right:s,bottom:o}=n,{backdropColor:a}=t;if(!it(a)){const l=Ms(t.borderRadius),c=Cn(t.backdropPadding);e.fillStyle=a;const d=r-c.left,g=i-c.top,b=s-r+c.width,x=o-i+c.height;Object.values(l).some(w=>w!==0)?(e.beginPath(),al(e,{x:d,y:g,w:b,h:x,radius:l}),e.fill()):e.fillRect(d,g,b,x)}}function wO(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const s=e._pointLabelItems[i];if(!s.visible)continue;const o=r.setContext(e.getPointLabelContext(i));_O(n,o,s);const a=sn(o.font),{x:l,y:c,textAlign:d}=s;Vs(n,e._pointLabels[i],l,c+a.lineHeight/2,a,{color:o.color,textAlign:d,textBaseline:"middle"})}}function D2(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,$t);else{let s=e.getPointPosition(0,t);i.moveTo(s.x,s.y);for(let o=1;o<r;o++)s=e.getPointPosition(o,t),i.lineTo(s.x,s.y)}}function CO(e,t,n,r,i){const s=e.ctx,o=t.circular,{color:a,lineWidth:l}=t;!o&&!r||!a||!l||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(i.dash||[]),s.lineDashOffset=i.dashOffset,s.beginPath(),D2(e,n,o,r),s.closePath(),s.stroke(),s.restore())}function SO(e,t,n){return is(e,{label:n,index:t,type:"pointLabel"})}class Ca extends Gu{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Cn(sg(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=Jt(t)&&!isNaN(t)?t:0,this.max=Jt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/sg(this.options))}generateTickLabels(t){Gu.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=Dt(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?hO(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=$t/(this._pointLabels.length||1),r=this.options.startAngle||0;return Rn(t*n+kr(r))}getDistanceFromCenterForValue(t){if(it(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(it(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return SO(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-tn+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:s}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),D2(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i,border:s}=n,o=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&wO(this,o),i.display&&this.ticks.forEach((d,g)=>{if(g!==0||g===0&&this.min<0){l=this.getDistanceFromCenterForValue(d.value);const b=this.getContext(g),x=i.setContext(b),w=s.setContext(b);CO(this,x,l,o,w)}}),r.display){for(t.save(),a=o-1;a>=0;a--){const d=r.setContext(this.getPointLabelContext(a)),{color:g,lineWidth:b}=d;!b||!g||(t.lineWidth=b,t.strokeStyle=g,t.setLineDash(d.borderDash),t.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),d=sn(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=d.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const g=Cn(c.backdropPadding);t.fillRect(-o/2-g.left,-s-d.size/2-g.top,o+g.width,d.size+g.height)}Vs(t,a.label,0,-s,d,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}Ae(Ca,"id","radialLinear"),Ae(Ca,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Id.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),Ae(Ca,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Ae(Ca,"descriptors",{angleLines:{_fallback:"grid"}});const Rd={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}},Xn=Object.keys(Rd);function kv(e,t){return e-t}function Av(e,t){if(it(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:s}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),Jt(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(ko(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,i)),+o)}function Mv(e,t,n,r){const i=Xn.length;for(let s=Xn.indexOf(e);s<i-1;++s){const o=Rd[Xn[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return Xn[s]}return Xn[i-1]}function EO(e,t,n,r,i){for(let s=Xn.length-1;s>=Xn.indexOf(n);s--){const o=Xn[s];if(Rd[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return Xn[n?Xn.indexOf(n):0]}function IO(e){for(let t=Xn.indexOf(e)+1,n=Xn.length;t<n;++t)if(Rd[Xn[t]].common)return Xn[t]}function Rv(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Op(n,t),s=n[r]>=t?n[r]:n[i];e[s]=!0}}function kO(e,t,n,r){const i=e._adapter,s=+i.startOf(t[0].value,r),o=t[t.length-1].value;let a,l;for(a=s;a<=o;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function Pv(e,t,n){const r=[],i={},s=t.length;let o,a;for(o=0;o<s;++o)a=t[o],i[a]=o,r.push({value:a,major:!1});return s===0||!n?r:kO(e,r,i,n)}class ul extends ss{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new jP._date(t.adapters.date);i.init(n),Da(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Av(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Jt(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),s=Jt(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,o=this.max,a=l8(i,s,o);return this._unit=n.unit||(r.autoSkip?Mv(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):EO(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:IO(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),Pv(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,s;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?r=s:r=(s-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=hn(n,0,o),r=hn(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,s=i.time,o=s.unit||Mv(s.minUnit,n,r,this._getLabelCapacity(n)),a=qe(i.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,c=ko(l)||l===!0,d={};let g=n,b,x;if(c&&(g=+t.startOf(g,"isoWeek",l)),g=+t.startOf(g,c?"day":o),t.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const w=i.ticks.source==="data"&&this.getDataTimestamps();for(b=g,x=0;b<r;b=+t.add(b,a,o),x++)Rv(d,b,w);return(b===r||i.bounds==="ticks"||x===1)&&Rv(d,b,w),Object.keys(d).sort(kv).map(C=>+C)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,s=this._unit,o=n||i[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const s=this.options,o=s.ticks.callback;if(o)return Dt(o,[t,n,r],this);const a=s.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&a[l],g=c&&a[c],b=r[n],x=c&&g&&b&&b.major;return this._adapter.format(t,i||(x?g:d))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=kr(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),o=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*s+a*o,h:r*o+a*s}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,s=this._tickFormatFunction(t,0,Pv(this,[t],this._majorUnit),i),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(Av(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Y_(t.sort(kv))}}Ae(ul,"id","time"),Ae(ul,"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 _c(e,t,n){let r=0,i=e.length-1,s,o,a,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=bi(e,"pos",t)),{pos:s,time:a}=e[r],{pos:o,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=bi(e,"time",t)),{time:s,pos:a}=e[r],{time:o,pos:l}=e[i]);const c=o-s;return c?a+(l-a)*(t-s)/c:a}class og extends ul{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=_c(n,this.min),this._tableRange=_c(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],s=[];let o,a,l,c,d;for(o=0,a=t.length;o<a;++o)c=t[o],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=i.length;o<a;++o)d=i[o+1],l=i[o-1],c=i[o],Math.round((d+l)/2)!==c&&s.push({time:c,pos:o/(a-1)});return s}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,s)=>i-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(_c(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return _c(this._table,r*this._tableRange+this._minPos,!0)}}Ae(og,"id","timeseries"),Ae(og,"defaults",ul.defaults);var AO=Object.freeze({__proto__:null,CategoryScale:Ro,LinearScale:Ei,LogarithmicScale:zs,RadialLinearScale:Ca,TimeScale:ul,TimeSeriesScale:og});const MO=[LP,hT,sO,AO],F2="label";function Nv(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function RO(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function L2(e,t){e.labels=t}function j2(e,t,n=F2){const r=[];e.datasets=t.map(i=>{const s=e.datasets.find(o=>o[n]===i[n]);return!s||!i.data||r.includes(s)?{...i}:(r.push(s),Object.assign(s,i),s)})}function PO(e,t=F2){const n={labels:[],datasets:[]};return L2(n,e.labels),j2(n,e.datasets,t),n}function NO(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:s,type:o,data:a,options:l,plugins:c=[],fallbackContent:d,updateMode:g,...b}=e,x=M.useRef(null),w=M.useRef(null),C=()=>{x.current&&(w.current=new pn(x.current,{type:o,data:PO(a,s),options:l&&{...l},plugins:c}),Nv(t,w.current))},E=()=>{Nv(t,null),w.current&&(w.current.destroy(),w.current=null)};return M.useEffect(()=>{!i&&w.current&&l&&RO(w.current,l)},[i,l]),M.useEffect(()=>{!i&&w.current&&L2(w.current.config.data,a.labels)},[i,a.labels]),M.useEffect(()=>{!i&&w.current&&a.datasets&&j2(w.current.config.data,a.datasets,s)},[i,a.datasets]),M.useEffect(()=>{w.current&&(i?(E(),setTimeout(C)):w.current.update(g))},[i,l,a.labels,a.datasets,g]),M.useEffect(()=>{w.current&&(E(),setTimeout(C))},[o]),M.useEffect(()=>(C(),()=>E()),[]),O.jsx("canvas",{ref:x,role:"img",height:n,width:r,...b,children:d})}const Xp=M.forwardRef(NO);function Yp(e,t){return pn.register(t),M.forwardRef((n,r)=>O.jsx(Xp,{...n,ref:r,type:e}))}const TO=Yp("bar",Ba),B2=Yp("doughnut",Xi),OO=Yp("pie",Vu);/*!
101
- * chartjs-plugin-datalabels v2.2.0
102
- * https://chartjs-plugin-datalabels.netlify.app
103
- * (c) 2017-2022 chartjs-plugin-datalabels contributors
104
- * Released under the MIT license
105
- */var Tv=function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var e=window.screen;if(e)return(e.deviceXDPI||1)/(e.logicalXDPI||1)}return 1}(),za={toTextLines:function(e){var t=[],n;for(e=[].concat(e);e.length;)n=e.pop(),typeof n=="string"?t.unshift.apply(t,n.split(`
106
- `)):Array.isArray(n)?e.push.apply(e,n):it(e)||t.unshift(""+n);return t},textSize:function(e,t,n){var r=[].concat(t),i=r.length,s=e.font,o=0,a;for(e.font=n.string,a=0;a<i;++a)o=Math.max(e.measureText(r[a]).width,o);return e.font=s,{height:i*n.lineHeight,width:o}},bound:function(e,t,n){return Math.max(e,Math.min(t,n))},arrayDiff:function(e,t){var n=e.slice(),r=[],i,s,o,a;for(i=0,o=t.length;i<o;++i)a=t[i],s=n.indexOf(a),s===-1?r.push([a,1]):n.splice(s,1);for(i=0,o=n.length;i<o;++i)r.push([n[i],-1]);return r},rasterize:function(e){return Math.round(e*Tv)/Tv}};function qf(e,t){var n=t.x,r=t.y;if(n===null)return{x:0,y:-1};if(r===null)return{x:1,y:0};var i=e.x-n,s=e.y-r,o=Math.sqrt(i*i+s*s);return{x:o?i/o:0,y:o?s/o:-1}}function DO(e,t,n,r,i){switch(i){case"center":n=r=0;break;case"bottom":n=0,r=1;break;case"right":n=1,r=0;break;case"left":n=-1,r=0;break;case"top":n=0,r=-1;break;case"start":n=-n,r=-r;break;case"end":break;default:i*=Math.PI/180,n=Math.cos(i),r=Math.sin(i);break}return{x:e,y:t,vx:n,vy:r}}var FO=0,V2=1,z2=2,H2=4,G2=8;function wc(e,t,n){var r=FO;return e<n.left?r|=V2:e>n.right&&(r|=z2),t<n.top?r|=G2:t>n.bottom&&(r|=H2),r}function LO(e,t){for(var n=e.x0,r=e.y0,i=e.x1,s=e.y1,o=wc(n,r,t),a=wc(i,s,t),l,c,d;!(!(o|a)||o&a);)l=o||a,l&G2?(c=n+(i-n)*(t.top-r)/(s-r),d=t.top):l&H2?(c=n+(i-n)*(t.bottom-r)/(s-r),d=t.bottom):l&z2?(d=r+(s-r)*(t.right-n)/(i-n),c=t.right):l&V2&&(d=r+(s-r)*(t.left-n)/(i-n),c=t.left),l===o?(n=c,r=d,o=wc(n,r,t)):(i=c,s=d,a=wc(i,s,t));return{x0:n,x1:i,y0:r,y1:s}}function Cc(e,t){var n=t.anchor,r=e,i,s;return t.clamp&&(r=LO(r,t.area)),n==="start"?(i=r.x0,s=r.y0):n==="end"?(i=r.x1,s=r.y1):(i=(r.x0+r.x1)/2,s=(r.y0+r.y1)/2),DO(i,s,e.vx,e.vy,t.align)}var Sc={arc:function(e,t){var n=(e.startAngle+e.endAngle)/2,r=Math.cos(n),i=Math.sin(n),s=e.innerRadius,o=e.outerRadius;return Cc({x0:e.x+r*s,y0:e.y+i*s,x1:e.x+r*o,y1:e.y+i*o,vx:r,vy:i},t)},point:function(e,t){var n=qf(e,t.origin),r=n.x*e.options.radius,i=n.y*e.options.radius;return Cc({x0:e.x-r,y0:e.y-i,x1:e.x+r,y1:e.y+i,vx:n.x,vy:n.y},t)},bar:function(e,t){var n=qf(e,t.origin),r=e.x,i=e.y,s=0,o=0;return e.horizontal?(r=Math.min(e.x,e.base),s=Math.abs(e.base-e.x)):(i=Math.min(e.y,e.base),o=Math.abs(e.base-e.y)),Cc({x0:r,y0:i+o,x1:r+s,y1:i,vx:n.x,vy:n.y},t)},fallback:function(e,t){var n=qf(e,t.origin);return Cc({x0:e.x,y0:e.y,x1:e.x+(e.width||0),y1:e.y+(e.height||0),vx:n.x,vy:n.y},t)}},_i=za.rasterize;function jO(e){var t=e.borderWidth||0,n=e.padding,r=e.size.height,i=e.size.width,s=-i/2,o=-r/2;return{frame:{x:s-n.left-t,y:o-n.top-t,w:i+n.width+t*2,h:r+n.height+t*2},text:{x:s,y:o,w:i,h:r}}}function BO(e,t){var n=t.chart.getDatasetMeta(t.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return e.horizontal?{x:r,y:null}:{x:null,y:r}}function VO(e){return e instanceof xi?Sc.arc:e instanceof Ps?Sc.point:e instanceof Yr?Sc.bar:Sc.fallback}function zO(e,t,n,r,i,s){var o=Math.PI/2;if(s){var a=Math.min(s,i/2,r/2),l=t+a,c=n+a,d=t+r-a,g=n+i-a;e.moveTo(t,c),l<d&&c<g?(e.arc(l,c,a,-Math.PI,-o),e.arc(d,c,a,-o,0),e.arc(d,g,a,0,o),e.arc(l,g,a,o,Math.PI)):l<d?(e.moveTo(l,n),e.arc(d,c,a,-o,o),e.arc(l,c,a,o,Math.PI+o)):c<g?(e.arc(l,c,a,-Math.PI,0),e.arc(l,g,a,0,Math.PI)):e.arc(l,c,a,-Math.PI,Math.PI),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,r,i)}function HO(e,t,n){var r=n.backgroundColor,i=n.borderColor,s=n.borderWidth;!r&&(!i||!s)||(e.beginPath(),zO(e,_i(t.x)+s/2,_i(t.y)+s/2,_i(t.w)-s,_i(t.h)-s,n.borderRadius),e.closePath(),r&&(e.fillStyle=r,e.fill()),i&&s&&(e.strokeStyle=i,e.lineWidth=s,e.lineJoin="miter",e.stroke()))}function GO(e,t,n){var r=n.lineHeight,i=e.w,s=e.x,o=e.y+r/2;return t==="center"?s+=i/2:(t==="end"||t==="right")&&(s+=i),{h:r,w:i,x:s,y:o}}function WO(e,t,n){var r=e.shadowBlur,i=n.stroked,s=_i(n.x),o=_i(n.y),a=_i(n.w);i&&e.strokeText(t,s,o,a),n.filled&&(r&&i&&(e.shadowBlur=0),e.fillText(t,s,o,a),r&&i&&(e.shadowBlur=r))}function $O(e,t,n,r){var i=r.textAlign,s=r.color,o=!!s,a=r.font,l=t.length,c=r.textStrokeColor,d=r.textStrokeWidth,g=c&&d,b;if(!(!l||!o&&!g))for(n=GO(n,i,a),e.font=a.string,e.textAlign=i,e.textBaseline="middle",e.shadowBlur=r.textShadowBlur,e.shadowColor=r.textShadowColor,o&&(e.fillStyle=s),g&&(e.lineJoin="round",e.lineWidth=d,e.strokeStyle=c),b=0,l=t.length;b<l;++b)WO(e,t[b],{stroked:g,filled:o,w:n.w,x:n.x,y:n.y+n.h*b})}var W2=function(e,t,n,r){var i=this;i._config=e,i._index=r,i._model=null,i._rects=null,i._ctx=t,i._el=n};gn(W2.prototype,{_modelize:function(e,t,n,r){var i=this,s=i._index,o=sn(Gt([n.font,{}],r,s)),a=Gt([n.color,Xt.color],r,s);return{align:Gt([n.align,"center"],r,s),anchor:Gt([n.anchor,"center"],r,s),area:r.chart.chartArea,backgroundColor:Gt([n.backgroundColor,null],r,s),borderColor:Gt([n.borderColor,null],r,s),borderRadius:Gt([n.borderRadius,0],r,s),borderWidth:Gt([n.borderWidth,0],r,s),clamp:Gt([n.clamp,!1],r,s),clip:Gt([n.clip,!1],r,s),color:a,display:e,font:o,lines:t,offset:Gt([n.offset,4],r,s),opacity:Gt([n.opacity,1],r,s),origin:BO(i._el,r),padding:Cn(Gt([n.padding,4],r,s)),positioner:VO(i._el),rotation:Gt([n.rotation,0],r,s)*(Math.PI/180),size:za.textSize(i._ctx,t,o),textAlign:Gt([n.textAlign,"start"],r,s),textShadowBlur:Gt([n.textShadowBlur,0],r,s),textShadowColor:Gt([n.textShadowColor,a],r,s),textStrokeColor:Gt([n.textStrokeColor,a],r,s),textStrokeWidth:Gt([n.textStrokeWidth,0],r,s)}},update:function(e){var t=this,n=null,r=null,i=t._index,s=t._config,o,a,l,c=Gt([s.display,!0],e,i);c&&(o=e.dataset.data[i],a=qe(Dt(s.formatter,[o,e]),o),l=it(a)?[]:za.toTextLines(a),l.length&&(n=t._modelize(c,l,s,e),r=jO(n))),t._model=n,t._rects=r},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(e,t){var n=this,r=e.ctx,i=n._model,s=n._rects,o;this.visible()&&(r.save(),i.clip&&(o=i.area,r.beginPath(),r.rect(o.left,o.top,o.right-o.left,o.bottom-o.top),r.clip()),r.globalAlpha=za.bound(0,i.opacity,1),r.translate(_i(t.x),_i(t.y)),r.rotate(i.rotation),HO(r,s.frame,i),$O(r,i.lines,s.text,i),r.restore())}});var XO=Number.MIN_SAFE_INTEGER||-9007199254740991,YO=Number.MAX_SAFE_INTEGER||9007199254740991;function ua(e,t,n){var r=Math.cos(n),i=Math.sin(n),s=t.x,o=t.y;return{x:s+r*(e.x-s)-i*(e.y-o),y:o+i*(e.x-s)+r*(e.y-o)}}function Ov(e,t){var n=YO,r=XO,i=t.origin,s,o,a,l,c;for(s=0;s<e.length;++s)o=e[s],a=o.x-i.x,l=o.y-i.y,c=t.vx*a+t.vy*l,n=Math.min(n,c),r=Math.max(r,c);return{min:n,max:r}}function Ec(e,t){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);return{vx:(t.x-e.x)/i,vy:(t.y-e.y)/i,origin:e,ln:i}}var $2=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};gn($2.prototype,{center:function(){var e=this._rect;return{x:e.x+e.w/2,y:e.y+e.h/2}},update:function(e,t,n){this._rotation=n,this._rect={x:t.x+e.x,y:t.y+e.y,w:t.w,h:t.h}},contains:function(e){var t=this,n=1,r=t._rect;return e=ua(e,t.center(),-t._rotation),!(e.x<r.x-n||e.y<r.y-n||e.x>r.x+r.w+n*2||e.y>r.y+r.h+n*2)},intersects:function(e){var t=this._points(),n=e._points(),r=[Ec(t[0],t[1]),Ec(t[0],t[3])],i,s,o;for(this._rotation!==e._rotation&&r.push(Ec(n[0],n[1]),Ec(n[0],n[3])),i=0;i<r.length;++i)if(s=Ov(t,r[i]),o=Ov(n,r[i]),s.max<o.min||o.max<s.min)return!1;return!0},_points:function(){var e=this,t=e._rect,n=e._rotation,r=e.center();return[ua({x:t.x,y:t.y},r,n),ua({x:t.x+t.w,y:t.y},r,n),ua({x:t.x+t.w,y:t.y+t.h},r,n),ua({x:t.x,y:t.y+t.h},r,n)]}});function X2(e,t,n){var r=t.positioner(e,t),i=r.vx,s=r.vy;if(!i&&!s)return{x:r.x,y:r.y};var o=n.w,a=n.h,l=t.rotation,c=Math.abs(o/2*Math.cos(l))+Math.abs(a/2*Math.sin(l)),d=Math.abs(o/2*Math.sin(l))+Math.abs(a/2*Math.cos(l)),g=1/Math.max(Math.abs(i),Math.abs(s));return c*=i*g,d*=s*g,c+=t.offset*i,d+=t.offset*s,{x:r.x+c,y:r.y+d}}function ZO(e,t){var n,r,i,s;for(n=e.length-1;n>=0;--n)for(i=e[n].$layout,r=n-1;r>=0&&i._visible;--r)s=e[r].$layout,s._visible&&i._box.intersects(s._box)&&t(i,s);return e}function UO(e){var t,n,r,i,s,o,a;for(t=0,n=e.length;t<n;++t)r=e[t],i=r.$layout,i._visible&&(a=new Proxy(r._el,{get:(l,c)=>l.getProps([c],!0)[c]}),s=r.geometry(),o=X2(a,r.model(),s),i._box.update(o,s,r.rotation()));return ZO(e,function(l,c){var d=l._hidable,g=c._hidable;d&&g||g?c._visible=!1:d&&(l._visible=!1)})}var Ha={prepare:function(e){var t=[],n,r,i,s,o;for(n=0,i=e.length;n<i;++n)for(r=0,s=e[n].length;r<s;++r)o=e[n][r],t.push(o),o.$layout={_box:new $2,_hidable:!1,_visible:!0,_set:n,_idx:o._index};return t.sort(function(a,l){var c=a.$layout,d=l.$layout;return c._idx===d._idx?d._set-c._set:d._idx-c._idx}),this.update(t),t},update:function(e){var t=!1,n,r,i,s,o;for(n=0,r=e.length;n<r;++n)i=e[n],s=i.model(),o=i.$layout,o._hidable=s&&s.display==="auto",o._visible=i.visible(),t|=o._hidable;t&&UO(e)},lookup:function(e,t){var n,r;for(n=e.length-1;n>=0;--n)if(r=e[n].$layout,r&&r._visible&&r._box.contains(t))return e[n];return null},draw:function(e,t){var n,r,i,s,o,a;for(n=0,r=t.length;n<r;++n)i=t[n],s=i.$layout,s._visible&&(o=i.geometry(),a=X2(i._el,i.model(),o),s._box.update(a,o,i.rotation()),i.draw(e,a))}},JO=function(e){if(it(e))return null;var t=e,n,r,i;if(dt(e))if(!it(e.label))t=e.label;else if(!it(e.r))t=e.r;else for(t="",n=Object.keys(e),i=0,r=n.length;i<r;++i)t+=(i!==0?", ":"")+n[i]+": "+e[n[i]];return""+t},qO={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:JO,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},$n="$datalabels",Y2="$default";function KO(e,t){var n=e.datalabels,r={},i=[],s,o;return n===!1?null:(n===!0&&(n={}),t=gn({},[t,n]),s=t.labels||{},o=Object.keys(s),delete t.labels,o.length?o.forEach(function(a){s[a]&&i.push(gn({},[t,s[a],{_key:a}]))}):i.push(t),r=i.reduce(function(a,l){return Rt(l.listeners||{},function(c,d){a[d]=a[d]||{},a[d][l._key||Y2]=c}),delete l.listeners,a},{}),{labels:i,listeners:r})}function ag(e,t,n,r){if(t){var i=n.$context,s=n.$groups,o;t[s._set]&&(o=t[s._set][s._key],o&&Dt(o,[i,r])===!0&&(e[$n]._dirty=!0,n.update(i)))}}function QO(e,t,n,r,i){var s,o;!n&&!r||(n?r?n!==r&&(o=s=!0):o=!0:s=!0,o&&ag(e,t.leave,n,i),s&&ag(e,t.enter,r,i))}function eD(e,t){var n=e[$n],r=n._listeners,i,s;if(!(!r.enter&&!r.leave)){if(t.type==="mousemove")s=Ha.lookup(n._labels,t);else if(t.type!=="mouseout")return;i=n._hovered,n._hovered=s,QO(e,r,i,s,t)}}function tD(e,t){var n=e[$n],r=n._listeners.click,i=r&&Ha.lookup(n._labels,t);i&&ag(e,r,i,t)}var Z2={id:"datalabels",defaults:qO,beforeInit:function(e){e[$n]={_actives:[]}},beforeUpdate:function(e){var t=e[$n];t._listened=!1,t._listeners={},t._datasets=[],t._labels=[]},afterDatasetUpdate:function(e,t,n){var r=t.index,i=e[$n],s=i._datasets[r]=[],o=e.isDatasetVisible(r),a=e.data.datasets[r],l=KO(a,n),c=t.meta.data||[],d=e.ctx,g,b,x,w,C,E,k,u;for(d.save(),g=0,x=c.length;g<x;++g)if(k=c[g],k[$n]=[],o&&k&&e.getDataVisibility(g)&&!k.skip)for(b=0,w=l.labels.length;b<w;++b)C=l.labels[b],E=C._key,u=new W2(C,d,k,g),u.$groups={_set:r,_key:E||Y2},u.$context={active:!1,chart:e,dataIndex:g,dataset:a,datasetIndex:r},u.update(u.$context),k[$n].push(u),s.push(u);d.restore(),gn(i._listeners,l.listeners,{merger:function(v,f,p){f[v]=f[v]||{},f[v][t.index]=p[v],i._listened=!0}})},afterUpdate:function(e){e[$n]._labels=Ha.prepare(e[$n]._datasets)},afterDatasetsDraw:function(e){Ha.draw(e,e[$n]._labels)},beforeEvent:function(e,t){if(e[$n]._listened){var n=t.event;switch(n.type){case"mousemove":case"mouseout":eD(e,n);break;case"click":tD(e,n);break}}},afterEvent:function(e){var t=e[$n],n=t._actives,r=t._actives=e.getActiveElements(),i=za.arrayDiff(n,r),s,o,a,l,c,d,g;for(s=0,o=i.length;s<o;++s)if(c=i[s],c[1])for(g=c[0].element[$n]||[],a=0,l=g.length;a<l;++a)d=g[a],d.$context.active=c[1]===1,d.update(d.$context);(t._dirty||i.length)&&(Ha.update(t._labels),e.render()),delete t._dirty}};pn.register(xi,Zs,Ys,Z2);pn.defaults.font.family="'Rubik', 'Inter', sans-serif";const nD=({labels:e,dataValues:t,colors:n,title:r,tableHeader:i="",renderLegendTable:s})=>{const[o,a]=M.useState(!1),l=["#ff6503","#ff8533","#ffa366","#3a3a3a","#4a4a4a","#5a5a5a","#dae0e8","#c5cdd7","#b0b8c6","#9ba5b5"],c=n||l.slice(0,e.length>l.length?l.length:e.length),d={labels:e,datasets:[{data:t,backgroundColor:c,hoverBackgroundColor:c.map(C=>C+"CC"),borderWidth:2}]},g=t.reduce((C,E)=>C+E,0),b={responsive:!0,cutout:"70%",maintainAspectRatio:!1,plugins:{title:{display:!1},legend:{display:!1},datalabels:{color:"var(--chart-text-color)",formatter:(C,E)=>{const k=E.chart.data.datasets[0].data.reduce((v,f)=>v+f,0);return`${(C/k*100).toFixed(2)+"%"}
107
- (${C})`},font:function(C){const E=C.chart.width,k=Math.round(E/32);return{weight:"bold",size:k>12?12:k}},backgroundColor:"var(--brand-light)",borderRadius:24,padding:{top:8,bottom:8,left:10,right:10},anchor:"end",display:!1},tooltip:{callbacks:{label:C=>{const E=C.raw;return`${(E/g*100).toFixed(2)}% (${E})`}}}}},x=e.map((C,E)=>({id:E+1,label:C,percentage:(t[E]/g*100).toFixed(2)+"%",value:t[E]})),w=O.jsx("div",{className:"space-y-2",children:x.map(C=>O.jsxs("div",{className:"flex items-center justify-between p-2 border-b",style:{borderColor:"var(--border-color)"},children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:c[C.id-1]}}),O.jsx("span",{style:{color:"var(--text-color)"},children:C.label})]}),O.jsxs("div",{className:"flex gap-4",children:[O.jsx("span",{style:{color:"var(--secondary-text-color)"},children:C.percentage}),O.jsxs("span",{style:{color:"var(--secondary-text-color)"},children:["(",C.value,")"]})]})]},C.id))});return O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"flex flex-row flex-1 items-end",children:[O.jsx("div",{className:"w-2/3 h-64",children:O.jsx(B2,{data:d,options:b})}),O.jsx(Ap,{legends:e,colors:c,dataValues:t,showAllLegends:o,onClick:()=>a(!o)})]}),O.jsx(mo,{isOpen:o,onClose:()=>{a(!1)},title:`${r||"Chart"} Legends:`,showFooter:!1,body:s?s(x):w})]})},wt={brandOrange:"#ff6503",brandDark:"#3a3a3a",brandDarkSecondary:"#2c2c2c",brandLight:"#dae0e8",brandOrange10:"rgba(255, 101, 3, 0.1)",appBgColor:"#ffffff",appBgColorDark:"#111111",bgColor:"#ffffff",textColor:"#3a3a3a",hoverBgColor:"#f3f4f6",sidebarHoverBg:"#dae0e8",gridColor:"rgba(0, 0, 0, 0.08)",chartTextColor:"#3a3a3a",chartGridColor:"rgba(0, 0, 0, 0.08)",chartLabelColor:"#4b5563",borderColor:"#e5e7eb",secondaryTextColor:"#6b7280",disabledTextColor:"#9ca3af",statusErrorBg:"#fee2e2",statusErrorText:"#b91c1c",statusErrorBorder:"#fca5a5",statusWarningBg:"#fef3c7",statusWarningText:"#92400e",statusWarningBorder:"#fcd34d",statusSuccessBg:"#f0fdf4",statusSuccessText:"#166534",statusSuccessBorder:"#bbf7d0",fontFamily:"'Rubik', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",fontFamilyHeading:"'Afacad', 'Rubik', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},rD={bgColor:"#3a3a3a",textColor:"#f9fafb",hoverBgColor:"#4b4b4b",sidebarHoverBg:"#2c2c2c",gridColor:"rgba(255, 255, 255, 0.1)",chartTextColor:"#f9fafb",chartGridColor:"rgba(255, 255, 255, 0.1)",chartLabelColor:"#d1d5db",borderColor:"#4b5563",secondaryTextColor:"#9ca3af",disabledTextColor:"#6b7280",statusErrorBg:"#450a0a",statusErrorText:"#fca5a5",statusErrorBorder:"#991b1b",statusWarningBg:"#451a03",statusWarningText:"#fcd34d",statusWarningBorder:"#b45309",statusSuccessBg:"rgba(20, 83, 45, 0.2)",statusSuccessText:"#bbf7d0",statusSuccessBorder:"#166534"},U2=M.createContext(void 0),J2=({children:e,defaultTheme:t,config:n={},storageKey:r="theme"})=>{const i=()=>{if(typeof window<"u"){const w=localStorage.getItem(r);if(w==="light"||w==="dark")return w}return t||(typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")},[s,o]=M.useState(i),[a,l]=M.useState(()=>({...wt,...n})),c=M.useMemo(()=>s==="dark"?{...a,...rD,...n}:{...a,...n},[s,a,n]);M.useEffect(()=>{if(typeof window>"u")return;const w=window.document.documentElement;w.classList.remove(s==="light"?"dark":"light"),w.classList.add(s),localStorage.setItem(r,s);const C={"--brand-orange":c.brandOrange||wt.brandOrange,"--brand-dark":c.brandDark||wt.brandDark,"--brand-dark-secondary":c.brandDarkSecondary||wt.brandDarkSecondary,"--brand-light":c.brandLight||wt.brandLight,"--brand-orange-10":c.brandOrange10||wt.brandOrange10,"--app-bg-color":c.appBgColor||wt.appBgColor,"--app-bg-color-dark":c.appBgColorDark||wt.appBgColorDark,"--bg-color":c.bgColor||wt.bgColor,"--text-color":c.textColor||wt.textColor,"--hover-bg-color":c.hoverBgColor||wt.hoverBgColor,"--sidebar-hover-bg":c.sidebarHoverBg||wt.sidebarHoverBg,"--grid-color":c.gridColor||wt.gridColor,"--chart-text-color":c.chartTextColor||wt.chartTextColor,"--chart-grid-color":c.chartGridColor||wt.chartGridColor,"--chart-label-color":c.chartLabelColor||wt.chartLabelColor,"--border-color":c.borderColor||wt.borderColor,"--secondary-text-color":c.secondaryTextColor||wt.secondaryTextColor,"--disabled-text-color":c.disabledTextColor||wt.disabledTextColor,"--status-error-bg":c.statusErrorBg||wt.statusErrorBg,"--status-error-text":c.statusErrorText||wt.statusErrorText,"--status-error-border":c.statusErrorBorder||wt.statusErrorBorder,"--status-warning-bg":c.statusWarningBg||wt.statusWarningBg,"--status-warning-text":c.statusWarningText||wt.statusWarningText,"--status-warning-border":c.statusWarningBorder||wt.statusWarningBorder,"--status-success-bg":c.statusSuccessBg||wt.statusSuccessBg,"--status-success-text":c.statusSuccessText||wt.statusSuccessText,"--status-success-border":c.statusSuccessBorder||wt.statusSuccessBorder,"--font-family":c.fontFamily||wt.fontFamily,"--font-family-heading":c.fontFamilyHeading||wt.fontFamilyHeading,...c.customVariables||{}};Object.entries(C).forEach(([E,k])=>{w.style.setProperty(E,k)}),c.fontFamily&&(document.body.style.fontFamily=c.fontFamily),document.body.style.backgroundColor=s==="dark"?c.appBgColorDark||wt.appBgColorDark:c.appBgColor||wt.appBgColor},[s,c,r]);const x={theme:s,toggleTheme:()=>{o(w=>w==="light"?"dark":"light")},setTheme:w=>{o(w)},config:c,updateConfig:w=>{l(C=>({...C,...w}))}};return O.jsx(U2.Provider,{value:x,children:e})},Pd=()=>{const e=M.useContext(U2);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};pn.register(xi,Zs,Ys,Z2);pn.defaults.font.family="'Rubik', 'Inter', sans-serif";const iD=({labels:e,dataValues:t,colors:n,title:r="",tableHeader:i="",renderLegendTable:s})=>{const[o,a]=M.useState(!1),{theme:l}=Pd(),c=["#ff6503","#ff8533","#ffa366","#3a3a3a","#4a4a4a"],d=n||c.slice(0,e.length>c.length?c.length:e.length),g={labels:e,datasets:[{data:t,backgroundColor:d,hoverBackgroundColor:d.map(E=>E+"CC"),borderColor:"var(--border-color)",borderWidth:1}]},b=t.reduce((E,k)=>E+k,0),x={responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:!1},legend:{display:!1},datalabels:{color:"#fff",anchor:"center",align:"center",formatter:(E,k)=>{const u=k.chart.data.datasets[0].data.reduce((p,y)=>{const h=Number(y);return isNaN(h)?p:p+h},0);return`${Math.round(E/u*100)+"%"}`},font:function(E){const k=E.chart.width,u=Math.round(k/24);return{weight:"bold",size:u>14?14:u}}},tooltip:{callbacks:{label:E=>{const k=E.raw,u=t.reduce((f,p)=>f+p,0);return` ${(k/u*100).toFixed(2)}% (${k})`}}}}},w=e.map((E,k)=>({id:k+1,label:E,percentage:(t[k]/b*100).toFixed(2)+"%",value:t[k]})),C=O.jsx("div",{className:"space-y-2",children:w.map(E=>O.jsxs("div",{className:"flex items-center justify-between p-2 border-b",style:{borderColor:"var(--border-color)"},children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:d[E.id-1]}}),O.jsx("span",{style:{color:"var(--text-color)"},children:E.label})]}),O.jsxs("div",{className:"flex gap-4",children:[O.jsx("span",{style:{color:"var(--secondary-text-color)"},children:E.percentage}),O.jsxs("span",{style:{color:"var(--secondary-text-color)"},children:["(",E.value,")"]})]})]},E.id))});return O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"pie-chart-container flex flex-row flex-1 items-end",children:[O.jsx("div",{className:"w-2/3 h-64",children:O.jsx(OO,{data:g,options:x})}),O.jsx(Ap,{legends:e,colors:d,dataValues:t,showAllLegends:o,onClick:()=>a(!o)})]}),O.jsx(mo,{isOpen:o,onClose:()=>{a(!1)},title:`${r||"Chart"} Legends:`,showFooter:!1,body:s?s(w):C})]})};pn.register(...MO);pn.register(Ro,Ei,Yr,Ps,yi,$p,Zs,Ys);pn.defaults.font.family="'Rubik', 'Inter', sans-serif";const sD=({chartData:e,title:t})=>{const{theme:n}=Pd(),r=getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||(n==="dark"?"#fff":"#333333"),i=M.useMemo(()=>({responsive:!0,maintainAspectRatio:!1,interaction:{mode:"nearest",intersect:!1},scales:{y:{beginAtZero:!0,grid:{color:getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()},ticks:{maxTicksLimit:8,font:{size:12,weight:"bold"},color:r},border:{color:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()}},x:{grid:{display:!1,color:getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()},ticks:{font:{size:12,weight:"bold"},color:r},border:{color:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()}}},plugins:{datalabels:{color:r,font:{weight:"bold",size:14},anchor:"end",align:"left",formatter:(o,a)=>a.dataset.label==="Blue Bar"?o.toLocaleString():""},legend:{display:!1,labels:{color:r}},title:{display:!0,text:t||"",color:r,font:{weight:"600",size:20},position:"top",align:"start"},tooltip:{backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim(),titleColor:r,bodyColor:r,borderColor:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim(),borderWidth:1,callbacks:{label:function(o){return`${o.dataset.type==="line"?"Trend":"Value"}: ${o.raw}`}}}}}),[t,n,r]),s=M.useMemo(()=>{var o;return e!=null&&e.monthlyData?{labels:(o=e.monthlyData)==null?void 0:o.map(a=>a.month),datasets:[{label:`${t}`,type:"line",data:e.monthlyData.map(a=>a.value),borderColor:getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim(),borderWidth:3,pointRadius:4,pointBackgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim(),pointBorderColor:getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim(),pointBorderWidth:3,tension:0,fill:!1,yAxisID:"y",stack:"stack 1"},{label:`${t}`,type:"bar",data:e.monthlyData.map(a=>a.value),backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim(),borderSkipped:!1,maxBarThickness:30,stack:"Stack 0",borderRadius:{topLeft:20,topRight:20,bottomLeft:0,bottomRight:0}}]}:{labels:[],datasets:[]}},[e,t]);return O.jsx("div",{className:"vertical-bar-chart",style:{height:"400px"},children:O.jsx(Xp,{type:"bar",options:i,data:s})})};pn.register(Ro,zs,Ei,Yr,$p,Zs,Ys);pn.defaults.font.family="'Rubik', 'Inter', sans-serif";const oD=({data:e,maxValue:t=5e4,scaleType:n=vs.LINEAR})=>{const{theme:r}=Pd(),i=getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||(r==="dark"?"#fff":"#333333"),{processedData:s,computedMaxValue:o}=M.useMemo(()=>{const g=Object.values(e);let b=[...g],x=t;if(n===vs.NORMALISED){const w=Math.min(...g),E=Math.max(...g)-w;b=g.map(k=>(k-w)/E*100),x=100}else n===vs.LOG?(b=g.map(w=>Math.max(w,.1)),x=t||Math.max(...b)*1.1):x=t||Math.max(...g)*1.1;return{processedData:Object.keys(e).reduce((w,C,E)=>(w[C]=b[E],w),{}),computedMaxValue:x}},[e,n,t]),a=Math.max(300,Object.keys(e).length*50),l=g=>n===vs.NORMALISED?`Value: ${e[Object.keys(e)[g.dataIndex]].toLocaleString()} (${g.raw.toFixed(2)}%)`:`Value: ${g.raw.toLocaleString()}`,c={indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1,labels:{color:i}},title:{display:!1},datalabels:{color:"#ffff",font:{weight:"bold",size:14},anchor:"end",align:"left",formatter:(g,b)=>b.dataset.label==="Blue Bar"?g.toLocaleString():""},tooltip:{backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim(),titleColor:i,bodyColor:i,borderColor:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim(),borderWidth:1,callbacks:{label:g=>l(g)}}},scales:{x:{type:n===vs.LOG?"logarithmic":"linear",max:o,grid:{display:!1,offset:!1,color:getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()},ticks:{font:{size:11.19,weight:"400"},color:i},border:{color:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()}},y:{grid:{display:!1,color:getComputedStyle(document.documentElement).getPropertyValue("--chart-grid-color").trim()},ticks:{font:{size:10.33,weight:"500"},color:i,align:"center",callback:function(g){const b=this.getLabelForValue(g),x=25;return b.length>x?b.slice(0,x)+"...":b}},border:{color:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()}}}},d={labels:Object.keys(e),datasets:[{label:"Bar Chart",data:Object.values(s),backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim(),borderRadius:{topLeft:0,topRight:20,bottomLeft:0,bottomRight:20},barThickness:25,borderSkipped:!1,grouped:!1,maxBarThickness:30,stack:"foreground"}]};return O.jsx("div",{className:"horizontal-bar-chart-container",style:{height:`${a}px`},children:O.jsx(TO,{options:c,data:d})})};function Zp(e,t=2){if(e===0)return"0 bytes";const n=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],r=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,r)).toFixed(t)} ${n[r]}`}const aD=({icon:e,value:t,isSize:n=!1,label:r})=>{const i=M.useMemo(()=>{if(!n)return t;const s=typeof t=="number"?t:parseInt(t,10),o=Zp(s).split(" ");return{size:o[0],unit:o[1]}},[t,n]);return O.jsxs("div",{className:"flex flex-col select-none items-center justify-center rounded-lg relative w-full shadow-sm !p-0",style:{border:"1px solid var(--border-color)"},children:[O.jsxs("div",{className:"flex flex-col flex-1 items-center justify-center p-0",children:[O.jsx("div",{className:"p-2",style:{color:"var(--brand-orange)"},children:typeof e=="string"?O.jsx("img",{src:e,alt:r,className:"h-10 w-10 md:h-16 md:w-16 lg:h-20 lg:w-20 object-contain"}):O.jsx("div",{className:"text-4xl md:text-5xl lg:text-6xl",children:e})}),O.jsxs("div",{className:"font-bold text-center text-xl md:text-2xl lg:text-3xl mt-2",style:{color:"var(--chart-text-color)"},children:[n?i.size:i,n&&O.jsx("span",{className:"ml-1 text-sm md:text-base",style:{color:"var(--secondary-text-color)"},children:i.unit})]})]}),O.jsx("div",{className:"flex items-center justify-center font-bold p-2 w-full text-center text-sm md:text-base border-t",style:{backgroundColor:"var(--brand-light)",color:"var(--brand-dark)",borderTopColor:"var(--border-color)"},children:r})]})};pn.register(xi,Zs,Ys);pn.defaults.font.family="'Rubik', 'Inter', sans-serif";const lD=e=>`
108
- input[type=range] {
109
- height: 4px;
110
- -webkit-appearance: none;
111
- width: 100%;
112
- position: absolute;
113
- top: 0;
114
- margin: 0;
115
- padding: 0;
116
- background: none;
117
- pointer-events: none;
118
- }
119
-
120
- /* Center thumbs vertically on the track */
121
- input[type=range]::-webkit-slider-runnable-track {
122
- height: 1px;
123
- -webkit-appearance: none;
124
- color: #13bba4;
125
- }
126
-
127
- input[type=range]::-webkit-slider-thumb {
128
- -webkit-appearance: none;
129
- width: ${e}px;
130
- height: ${e}px;
131
- border-radius: 50%;
132
- background: #ffffff;
133
- cursor: pointer;
134
- box-shadow: 0 1px 3px rgba(0,0,0,0.3);
135
- border: 2px solid gray;
136
- margin-top: -0.8rem;
137
- pointer-events: all;
138
- z-index: 3;
139
- }
140
-
141
- input[type=range]::-moz-range-track {
142
- height: 1px;
143
- -moz-appearance: none;
144
- color: #13bba4;
145
- }
146
-
147
- input[type=range]::-moz-range-thumb {
148
- width: ${e}px;
149
- height: ${e}px;
150
- border-radius: 50%;
151
- background: #ffffff;
152
- cursor: pointer;
153
- box-shadow: 0 1px 3px rgba(0,0,0,0.3);
154
- border: 2px solid gray;
155
- margin-top: -0.8rem;
156
- pointer-events: all;
157
- }
158
- `,cD=({title:e,data:t,maxValue:n,minRange:r=0,maxRange:i=10,onMinRangeChange:s,onMaxRangeChange:o,showRangeSlider:a=!1,sliderMin:l=0,sliderMax:c=10,sliderStep:d=.1,formatSliderLabel:g=x=>`${x.toFixed(1)}Y`,hasData:b=!0})=>{const[x,w]=M.useState(0),C=M.useRef(null),[E,k]=M.useState(r),[u,v]=M.useState(i),f=t,p=n>0?f/n*100:0,y=25;M.useEffect(()=>{const G=()=>{if(C.current){const $=C.current.offsetWidth;w(Z=>Z!==$?$:Z)}};return window.addEventListener("resize",G),G(),()=>window.removeEventListener("resize",G)},[]),M.useEffect(()=>{k(r)},[r]),M.useEffect(()=>{v(i)},[i]);const h=M.useMemo(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:!1,text:e||"Gauge Chart",color:"#302d2eff",font:{weight:"bold",size:24},position:"top",align:"start",padding:{top:0}},legend:{display:!1},tooltip:{enabled:!1},datalabels:{display:!1}}}),[e]),_=M.useMemo(()=>({datasets:[{data:b?[p,100-p]:[0,100],backgroundColor:b?[getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim()||"#ff6503",getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8"]:[getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8",getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8"],borderWidth:0,cutout:"75%",circumference:300,rotation:-150}]}),[p,b]),I=M.useCallback(G=>{const $=parseFloat(G.target.value);k($)},[]),A=M.useCallback(G=>{const $=parseFloat(G.target.value);v($)},[]),R=M.useCallback(()=>{s==null||s(E)},[E,s]),D=M.useCallback(()=>{o==null||o(u)},[u,o]),B=c-l,N=B>0?(E-l)/B*100:0,F=B>0?(u-l)/B*100:0,j=`${N}%`,H=`${F}%`,L=M.useMemo(()=>{const G=getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8",$=getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim()||"#ff6503";return{background:`linear-gradient(to right, ${G} 0%, ${G} ${N}%,
159
- ${$} ${N}%, ${$} ${F}%, ${G} ${F}%, ${G} 100%)`}},[N,F]);return O.jsxs("div",{className:"retention flex flex-col items-center rounded-xl select-none p-3",children:[O.jsx("div",{className:"w-full flex flex-col items-center justify-center p-2 mb-4",children:O.jsxs("div",{className:"relative w-11/12 h-64 flex items-center justify-center",children:[O.jsx(B2,{data:_,options:h}),O.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:b?O.jsxs(O.Fragment,{children:[O.jsx("span",{className:"text-xl font-bold",style:{color:"var(--chart-text-color)"},children:f.toLocaleString()}),O.jsx("span",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:e})]}):O.jsxs(O.Fragment,{children:[O.jsx("span",{className:"text-lg font-medium",style:{color:"var(--secondary-text-color)"},children:"No Data"}),O.jsx("span",{className:"text-xs",style:{color:"var(--secondary-text-color)"},children:"Available"})]})})]})}),a&&O.jsx("div",{className:"w-full px-6",children:O.jsxs("div",{className:"relative w-full",ref:C,children:[O.jsx("style",{children:lD(y)}),O.jsx("div",{className:"absolute top-0 w-full h-1 rounded-full",style:L}),O.jsx("input",{type:"range",min:l,max:c,step:d,value:E,onChange:I,onMouseUp:R,onTouchEnd:R,className:"w-full"}),O.jsx("input",{type:"range",min:l,max:c,step:d,value:u,onChange:A,onMouseUp:D,onTouchEnd:D,className:"w-full"}),O.jsx("div",{className:"absolute flex items-center justify-center w-8 h-8 text-white text-xs font-bold rounded",style:{left:j,top:"-40px",transform:"translateX(-50%)",clipPath:"polygon(0% 0%, 100% 0%, 100% 80%, 60% 80%, 50% 100%, 40% 80%, 0% 80%)",backgroundColor:"var(--brand-orange)"},children:g(E)}),O.jsx("div",{className:"absolute flex items-center justify-center w-8 h-8 text-white text-xs font-bold rounded",style:{left:H,top:"-40px",transform:"translateX(-50%)",clipPath:"polygon(0% 0%, 100% 0%, 100% 80%, 60% 80%, 50% 100%, 40% 80%, 0% 80%)",backgroundColor:"var(--brand-dark)"},children:g(u)})]})})]})};class ts{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const s=n[i],o=t+s,a=Math.abs(t)<Math.abs(s)?t-(o-s):s-(o-t);a&&(n[r++]=a),t=o}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,s,o=0;if(n>0){for(o=t[--n];n>0&&(r=o,i=t[--n],o=r+i,s=i-(o-r),!s););n>0&&(s<0&&t[n-1]<0||s>0&&t[n-1]>0)&&(i=s*2,r=o+i,i==r-o&&(o=r))}return o}}function*uD(e){for(const t of e)yield*t}function q2(e){return Array.from(uD(e))}function fo(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}var Xe=1e-6,Up=1e-12,at=Math.PI,Ut=at/2,Dv=at/4,nr=at*2,jn=180/at,Ft=at/180,yt=Math.abs,$o=Math.atan,qr=Math.atan2,rt=Math.cos,Ic=Math.ceil,K2=Math.exp,Wu=Math.log,Kf=Math.pow,tt=Math.sin,fr=Math.sign||function(e){return e>0?1:e<0?-1:0},Vn=Math.sqrt,Jp=Math.tan;function Q2(e){return e>1?0:e<-1?at:Math.acos(e)}function pr(e){return e>1?Ut:e<-1?-Ut:Math.asin(e)}function fn(){}function $u(e,t){e&&Lv.hasOwnProperty(e.type)&&Lv[e.type](e,t)}var Fv={Feature:function(e,t){$u(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)$u(n[r].geometry,t)}},Lv={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){lg(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)lg(n[r],t,0)},Polygon:function(e,t){jv(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)jv(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)$u(n[r],t)}};function lg(e,t,n){var r=-1,i=e.length-n,s;for(t.lineStart();++r<i;)s=e[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function jv(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)lg(e[n],t,1);t.polygonEnd()}function xs(e,t){e&&Fv.hasOwnProperty(e.type)?Fv[e.type](e,t):$u(e,t)}function cg(e){return[qr(e[1],e[0]),pr(e[2])]}function Po(e){var t=e[0],n=e[1],r=rt(n);return[r*rt(t),r*tt(t),tt(n)]}function kc(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Xu(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Qf(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Ac(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function ug(e){var t=Vn(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function dg(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function fg(e,t){return yt(e)>at&&(e-=Math.round(e/nr)*nr),[e,t]}fg.invert=fg;function ew(e,t,n){return(e%=nr)?t||n?dg(Vv(e),zv(t,n)):Vv(e):t||n?zv(t,n):fg}function Bv(e){return function(t,n){return t+=e,yt(t)>at&&(t-=Math.round(t/nr)*nr),[t,n]}}function Vv(e){var t=Bv(e);return t.invert=Bv(-e),t}function zv(e,t){var n=rt(e),r=tt(e),i=rt(t),s=tt(t);function o(a,l){var c=rt(l),d=rt(a)*c,g=tt(a)*c,b=tt(l),x=b*n+d*r;return[qr(g*i-x*s,d*n-b*r),pr(x*i+g*s)]}return o.invert=function(a,l){var c=rt(l),d=rt(a)*c,g=tt(a)*c,b=tt(l),x=b*i-g*s;return[qr(g*i+b*s,d*n+x*r),pr(x*n-d*r)]},o}function dD(e){e=ew(e[0]*Ft,e[1]*Ft,e.length>2?e[2]*Ft:0);function t(n){return n=e(n[0]*Ft,n[1]*Ft),n[0]*=jn,n[1]*=jn,n}return t.invert=function(n){return n=e.invert(n[0]*Ft,n[1]*Ft),n[0]*=jn,n[1]*=jn,n},t}function fD(e,t,n,r,i,s){if(n){var o=rt(t),a=tt(t),l=r*n;i==null?(i=t+r*nr,s=t-l/2):(i=Hv(o,i),s=Hv(o,s),(r>0?i<s:i>s)&&(i+=r*nr));for(var c,d=i;r>0?d>s:d<s;d-=l)c=cg([o,-a*rt(d),-a*tt(d)]),e.point(c[0],c[1])}}function Hv(e,t){t=Po(t),t[0]-=e,ug(t);var n=Q2(-t[1]);return((-t[2]<0?-n:n)+nr-Xe)%nr}function tw(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:fn,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function ou(e,t){return yt(e[0]-t[0])<Xe&&yt(e[1]-t[1])<Xe}function Mc(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function nw(e,t,n,r,i){var s=[],o=[],a,l;if(e.forEach(function(w){if(!((C=w.length-1)<=0)){var C,E=w[0],k=w[C],u;if(ou(E,k)){if(!E[2]&&!k[2]){for(i.lineStart(),a=0;a<C;++a)i.point((E=w[a])[0],E[1]);i.lineEnd();return}k[0]+=2*Xe}s.push(u=new Mc(E,w,null,!0)),o.push(u.o=new Mc(E,null,u,!1)),s.push(u=new Mc(k,w,null,!1)),o.push(u.o=new Mc(k,null,u,!0))}}),!!s.length){for(o.sort(t),Gv(s),Gv(o),a=0,l=o.length;a<l;++a)o[a].e=n=!n;for(var c=s[0],d,g;;){for(var b=c,x=!0;b.v;)if((b=b.n)===c)return;d=b.z,i.lineStart();do{if(b.v=b.o.v=!0,b.e){if(x)for(a=0,l=d.length;a<l;++a)i.point((g=d[a])[0],g[1]);else r(b.x,b.n.x,1,i);b=b.n}else{if(x)for(d=b.p.z,a=d.length-1;a>=0;--a)i.point((g=d[a])[0],g[1]);else r(b.x,b.p.x,-1,i);b=b.p}b=b.o,d=b.z,x=!x}while(!b.v);i.lineEnd()}}}function Gv(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function eh(e){return yt(e[0])<=at?e[0]:fr(e[0])*((yt(e[0])+at)%nr-at)}function rw(e,t){var n=eh(t),r=t[1],i=tt(r),s=[tt(n),-rt(n),0],o=0,a=0,l=new ts;i===1?r=Ut+Xe:i===-1&&(r=-Ut-Xe);for(var c=0,d=e.length;c<d;++c)if(b=(g=e[c]).length)for(var g,b,x=g[b-1],w=eh(x),C=x[1]/2+Dv,E=tt(C),k=rt(C),u=0;u<b;++u,w=f,E=y,k=h,x=v){var v=g[u],f=eh(v),p=v[1]/2+Dv,y=tt(p),h=rt(p),_=f-w,I=_>=0?1:-1,A=I*_,R=A>at,D=E*y;if(l.add(qr(D*I*tt(A),k*h+D*rt(A))),o+=R?_+I*nr:_,R^w>=n^f>=n){var B=Xu(Po(x),Po(v));ug(B);var N=Xu(s,B);ug(N);var F=(R^_>=0?-1:1)*pr(N[2]);(r>F||r===F&&(B[0]||B[1]))&&(a+=R^_>=0?1:-1)}}return(o<-Xe||o<Xe&&l<-Up)^a&1}function iw(e,t,n,r){return function(i){var s=t(i),o=tw(),a=t(o),l=!1,c,d,g,b={point:x,lineStart:C,lineEnd:E,polygonStart:function(){b.point=k,b.lineStart=u,b.lineEnd=v,d=[],c=[]},polygonEnd:function(){b.point=x,b.lineStart=C,b.lineEnd=E,d=q2(d);var f=rw(c,r);d.length?(l||(i.polygonStart(),l=!0),nw(d,gD,f,n,i)):f&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),d=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function x(f,p){e(f,p)&&i.point(f,p)}function w(f,p){s.point(f,p)}function C(){b.point=w,s.lineStart()}function E(){b.point=x,s.lineEnd()}function k(f,p){g.push([f,p]),a.point(f,p)}function u(){a.lineStart(),g=[]}function v(){k(g[0][0],g[0][1]),a.lineEnd();var f=a.clean(),p=o.result(),y,h=p.length,_,I,A;if(g.pop(),c.push(g),g=null,!!h){if(f&1){if(I=p[0],(_=I.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),y=0;y<_;++y)i.point((A=I[y])[0],A[1]);i.lineEnd()}return}h>1&&f&2&&p.push(p.pop().concat(p.shift())),d.push(p.filter(hD))}}return b}}function hD(e){return e.length>1}function gD(e,t){return((e=e.x)[0]<0?e[1]-Ut-Xe:Ut-e[1])-((t=t.x)[0]<0?t[1]-Ut-Xe:Ut-t[1])}const Wv=iw(function(){return!0},pD,bD,[-at,-Ut]);function pD(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,o){var a=s>0?at:-at,l=yt(s-t);yt(l-at)<Xe?(e.point(t,n=(n+o)/2>0?Ut:-Ut),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(s,n),i=0):r!==a&&l>=at&&(yt(t-r)<Xe&&(t-=r*Xe),yt(s-a)<Xe&&(s-=a*Xe),n=mD(t,n,s,o),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(a,n),i=0),e.point(t=s,n=o),r=a},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function mD(e,t,n,r){var i,s,o=tt(e-n);return yt(o)>Xe?$o((tt(t)*(s=rt(r))*tt(n)-tt(r)*(i=rt(t))*tt(e))/(i*s*o)):(t+r)/2}function bD(e,t,n,r){var i;if(e==null)i=n*Ut,r.point(-at,i),r.point(0,i),r.point(at,i),r.point(at,0),r.point(at,-i),r.point(0,-i),r.point(-at,-i),r.point(-at,0),r.point(-at,i);else if(yt(e[0]-t[0])>Xe){var s=e[0]<t[0]?at:-at;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function vD(e){var t=rt(e),n=2*Ft,r=t>0,i=yt(t)>Xe;function s(d,g,b,x){fD(x,e,n,b,d,g)}function o(d,g){return rt(d)*rt(g)>t}function a(d){var g,b,x,w,C;return{lineStart:function(){w=x=!1,C=1},point:function(E,k){var u=[E,k],v,f=o(E,k),p=r?f?0:c(E,k):f?c(E+(E<0?at:-at),k):0;if(!g&&(w=x=f)&&d.lineStart(),f!==x&&(v=l(g,u),(!v||ou(g,v)||ou(u,v))&&(u[2]=1)),f!==x)C=0,f?(d.lineStart(),v=l(u,g),d.point(v[0],v[1])):(v=l(g,u),d.point(v[0],v[1],2),d.lineEnd()),g=v;else if(i&&g&&r^f){var y;!(p&b)&&(y=l(u,g,!0))&&(C=0,r?(d.lineStart(),d.point(y[0][0],y[0][1]),d.point(y[1][0],y[1][1]),d.lineEnd()):(d.point(y[1][0],y[1][1]),d.lineEnd(),d.lineStart(),d.point(y[0][0],y[0][1],3)))}f&&(!g||!ou(g,u))&&d.point(u[0],u[1]),g=u,x=f,b=p},lineEnd:function(){x&&d.lineEnd(),g=null},clean:function(){return C|(w&&x)<<1}}}function l(d,g,b){var x=Po(d),w=Po(g),C=[1,0,0],E=Xu(x,w),k=kc(E,E),u=E[0],v=k-u*u;if(!v)return!b&&d;var f=t*k/v,p=-t*u/v,y=Xu(C,E),h=Ac(C,f),_=Ac(E,p);Qf(h,_);var I=y,A=kc(h,I),R=kc(I,I),D=A*A-R*(kc(h,h)-1);if(!(D<0)){var B=Vn(D),N=Ac(I,(-A-B)/R);if(Qf(N,h),N=cg(N),!b)return N;var F=d[0],j=g[0],H=d[1],L=g[1],G;j<F&&(G=F,F=j,j=G);var $=j-F,Z=yt($-at)<Xe,U=Z||$<Xe;if(!Z&&L<H&&(G=H,H=L,L=G),U?Z?H+L>0^N[1]<(yt(N[0]-F)<Xe?H:L):H<=N[1]&&N[1]<=L:$>at^(F<=N[0]&&N[0]<=j)){var ee=Ac(I,(-A+B)/R);return Qf(ee,h),[N,cg(ee)]}}}function c(d,g){var b=r?e:at-e,x=0;return d<-b?x|=1:d>b&&(x|=2),g<-b?x|=4:g>b&&(x|=8),x}return iw(o,a,s,r?[0,-e]:[-at,e-at])}function xD(e,t,n,r,i,s){var o=e[0],a=e[1],l=t[0],c=t[1],d=0,g=1,b=l-o,x=c-a,w;if(w=n-o,!(!b&&w>0)){if(w/=b,b<0){if(w<d)return;w<g&&(g=w)}else if(b>0){if(w>g)return;w>d&&(d=w)}if(w=i-o,!(!b&&w<0)){if(w/=b,b<0){if(w>g)return;w>d&&(d=w)}else if(b>0){if(w<d)return;w<g&&(g=w)}if(w=r-a,!(!x&&w>0)){if(w/=x,x<0){if(w<d)return;w<g&&(g=w)}else if(x>0){if(w>g)return;w>d&&(d=w)}if(w=s-a,!(!x&&w<0)){if(w/=x,x<0){if(w>g)return;w>d&&(d=w)}else if(x>0){if(w<d)return;w<g&&(g=w)}return d>0&&(e[0]=o+d*b,e[1]=a+d*x),g<1&&(t[0]=o+g*b,t[1]=a+g*x),!0}}}}}var Sa=1e9,Rc=-Sa;function yD(e,t,n,r){function i(c,d){return e<=c&&c<=n&&t<=d&&d<=r}function s(c,d,g,b){var x=0,w=0;if(c==null||(x=o(c,g))!==(w=o(d,g))||l(c,d)<0^g>0)do b.point(x===0||x===3?e:n,x>1?r:t);while((x=(x+g+4)%4)!==w);else b.point(d[0],d[1])}function o(c,d){return yt(c[0]-e)<Xe?d>0?0:3:yt(c[0]-n)<Xe?d>0?2:1:yt(c[1]-t)<Xe?d>0?1:0:d>0?3:2}function a(c,d){return l(c.x,d.x)}function l(c,d){var g=o(c,1),b=o(d,1);return g!==b?g-b:g===0?d[1]-c[1]:g===1?c[0]-d[0]:g===2?c[1]-d[1]:d[0]-c[0]}return function(c){var d=c,g=tw(),b,x,w,C,E,k,u,v,f,p,y,h={point:_,lineStart:D,lineEnd:B,polygonStart:A,polygonEnd:R};function _(F,j){i(F,j)&&d.point(F,j)}function I(){for(var F=0,j=0,H=x.length;j<H;++j)for(var L=x[j],G=1,$=L.length,Z=L[0],U,ee,se=Z[0],ie=Z[1];G<$;++G)U=se,ee=ie,Z=L[G],se=Z[0],ie=Z[1],ee<=r?ie>r&&(se-U)*(r-ee)>(ie-ee)*(e-U)&&++F:ie<=r&&(se-U)*(r-ee)<(ie-ee)*(e-U)&&--F;return F}function A(){d=g,b=[],x=[],y=!0}function R(){var F=I(),j=y&&F,H=(b=q2(b)).length;(j||H)&&(c.polygonStart(),j&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),H&&nw(b,a,F,s,c),c.polygonEnd()),d=c,b=x=w=null}function D(){h.point=N,x&&x.push(w=[]),p=!0,f=!1,u=v=NaN}function B(){b&&(N(C,E),k&&f&&g.rejoin(),b.push(g.result())),h.point=_,f&&d.lineEnd()}function N(F,j){var H=i(F,j);if(x&&w.push([F,j]),p)C=F,E=j,k=H,p=!1,H&&(d.lineStart(),d.point(F,j));else if(H&&f)d.point(F,j);else{var L=[u=Math.max(Rc,Math.min(Sa,u)),v=Math.max(Rc,Math.min(Sa,v))],G=[F=Math.max(Rc,Math.min(Sa,F)),j=Math.max(Rc,Math.min(Sa,j))];xD(L,G,e,t,n,r)?(f||(d.lineStart(),d.point(L[0],L[1])),d.point(G[0],G[1]),H||d.lineEnd(),y=!1):H&&(d.lineStart(),d.point(F,j),y=!1)}u=F,v=j,f=H}return h}}var hg,gg,au,lu,No={sphere:fn,point:fn,lineStart:_D,lineEnd:fn,polygonStart:fn,polygonEnd:fn};function _D(){No.point=CD,No.lineEnd=wD}function wD(){No.point=No.lineEnd=fn}function CD(e,t){e*=Ft,t*=Ft,gg=e,au=tt(t),lu=rt(t),No.point=SD}function SD(e,t){e*=Ft,t*=Ft;var n=tt(t),r=rt(t),i=yt(e-gg),s=rt(i),o=tt(i),a=r*o,l=lu*n-au*r*s,c=au*n+lu*r*s;hg.add(qr(Vn(a*a+l*l),c)),gg=e,au=n,lu=r}function ED(e){return hg=new ts,xs(e,No),+hg}var pg=[null,null],ID={type:"LineString",coordinates:pg};function mg(e,t){return pg[0]=e,pg[1]=t,ED(ID)}var $v={Feature:function(e,t){return Yu(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(Yu(n[r].geometry,t))return!0;return!1}},Xv={Sphere:function(){return!0},Point:function(e,t){return Yv(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(Yv(n[r],t))return!0;return!1},LineString:function(e,t){return Zv(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(Zv(n[r],t))return!0;return!1},Polygon:function(e,t){return Uv(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(Uv(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(Yu(n[r],t))return!0;return!1}};function Yu(e,t){return e&&Xv.hasOwnProperty(e.type)?Xv[e.type](e,t):!1}function Yv(e,t){return mg(e,t)===0}function Zv(e,t){for(var n,r,i,s=0,o=e.length;s<o;s++){if(r=mg(e[s],t),r===0||s>0&&(i=mg(e[s],e[s-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Up*i))return!0;n=r}return!1}function Uv(e,t){return!!rw(e.map(kD),sw(t))}function kD(e){return e=e.map(sw),e.pop(),e}function sw(e){return[e[0]*Ft,e[1]*Ft]}function AD(e,t){return(e&&$v.hasOwnProperty(e.type)?$v[e.type]:Yu)(e,t)}function Jv(e,t,n){var r=fo(e,t-Xe,n).concat(t);return function(i){return r.map(function(s){return[i,s]})}}function qv(e,t,n){var r=fo(e,t-Xe,n).concat(t);return function(i){return r.map(function(s){return[s,i]})}}function ow(){var e,t,n,r,i,s,o,a,l=10,c=l,d=90,g=360,b,x,w,C,E=2.5;function k(){return{type:"MultiLineString",coordinates:u()}}function u(){return fo(Ic(r/d)*d,n,d).map(w).concat(fo(Ic(a/g)*g,o,g).map(C)).concat(fo(Ic(t/l)*l,e,l).filter(function(v){return yt(v%d)>Xe}).map(b)).concat(fo(Ic(s/c)*c,i,c).filter(function(v){return yt(v%g)>Xe}).map(x))}return k.lines=function(){return u().map(function(v){return{type:"LineString",coordinates:v}})},k.outline=function(){return{type:"Polygon",coordinates:[w(r).concat(C(o).slice(1),w(n).reverse().slice(1),C(a).reverse().slice(1))]}},k.extent=function(v){return arguments.length?k.extentMajor(v).extentMinor(v):k.extentMinor()},k.extentMajor=function(v){return arguments.length?(r=+v[0][0],n=+v[1][0],a=+v[0][1],o=+v[1][1],r>n&&(v=r,r=n,n=v),a>o&&(v=a,a=o,o=v),k.precision(E)):[[r,a],[n,o]]},k.extentMinor=function(v){return arguments.length?(t=+v[0][0],e=+v[1][0],s=+v[0][1],i=+v[1][1],t>e&&(v=t,t=e,e=v),s>i&&(v=s,s=i,i=v),k.precision(E)):[[t,s],[e,i]]},k.step=function(v){return arguments.length?k.stepMajor(v).stepMinor(v):k.stepMinor()},k.stepMajor=function(v){return arguments.length?(d=+v[0],g=+v[1],k):[d,g]},k.stepMinor=function(v){return arguments.length?(l=+v[0],c=+v[1],k):[l,c]},k.precision=function(v){return arguments.length?(E=+v,b=Jv(s,i,90),x=qv(t,e,E),w=Jv(a,o,90),C=qv(r,n,E),k):E},k.extentMajor([[-180,-90+Xe],[180,90-Xe]]).extentMinor([[-180,-80-Xe],[180,80+Xe]])}function MD(){return ow()()}const bg=e=>e;var th=new ts,vg=new ts,aw,lw,xg,yg,fi={point:fn,lineStart:fn,lineEnd:fn,polygonStart:function(){fi.lineStart=RD,fi.lineEnd=ND},polygonEnd:function(){fi.lineStart=fi.lineEnd=fi.point=fn,th.add(yt(vg)),vg=new ts},result:function(){var e=th/2;return th=new ts,e}};function RD(){fi.point=PD}function PD(e,t){fi.point=cw,aw=xg=e,lw=yg=t}function cw(e,t){vg.add(yg*e-xg*t),xg=e,yg=t}function ND(){cw(aw,lw)}var To=1/0,Zu=To,dl=-To,Uu=dl,Ju={point:TD,lineStart:fn,lineEnd:fn,polygonStart:fn,polygonEnd:fn,result:function(){var e=[[To,Zu],[dl,Uu]];return dl=Uu=-(Zu=To=1/0),e}};function TD(e,t){e<To&&(To=e),e>dl&&(dl=e),t<Zu&&(Zu=t),t>Uu&&(Uu=t)}var _g=0,wg=0,Ea=0,qu=0,Ku=0,ho=0,Cg=0,Sg=0,Ia=0,uw,dw,Hr,Gr,ur={point:Hs,lineStart:Kv,lineEnd:Qv,polygonStart:function(){ur.lineStart=FD,ur.lineEnd=LD},polygonEnd:function(){ur.point=Hs,ur.lineStart=Kv,ur.lineEnd=Qv},result:function(){var e=Ia?[Cg/Ia,Sg/Ia]:ho?[qu/ho,Ku/ho]:Ea?[_g/Ea,wg/Ea]:[NaN,NaN];return _g=wg=Ea=qu=Ku=ho=Cg=Sg=Ia=0,e}};function Hs(e,t){_g+=e,wg+=t,++Ea}function Kv(){ur.point=OD}function OD(e,t){ur.point=DD,Hs(Hr=e,Gr=t)}function DD(e,t){var n=e-Hr,r=t-Gr,i=Vn(n*n+r*r);qu+=i*(Hr+e)/2,Ku+=i*(Gr+t)/2,ho+=i,Hs(Hr=e,Gr=t)}function Qv(){ur.point=Hs}function FD(){ur.point=jD}function LD(){fw(uw,dw)}function jD(e,t){ur.point=fw,Hs(uw=Hr=e,dw=Gr=t)}function fw(e,t){var n=e-Hr,r=t-Gr,i=Vn(n*n+r*r);qu+=i*(Hr+e)/2,Ku+=i*(Gr+t)/2,ho+=i,i=Gr*e-Hr*t,Cg+=i*(Hr+e),Sg+=i*(Gr+t),Ia+=i*3,Hs(Hr=e,Gr=t)}function hw(e){this._context=e}hw.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,nr);break}}},result:fn};var Eg=new ts,nh,gw,pw,ka,Aa,fl={point:fn,lineStart:function(){fl.point=BD},lineEnd:function(){nh&&mw(gw,pw),fl.point=fn},polygonStart:function(){nh=!0},polygonEnd:function(){nh=null},result:function(){var e=+Eg;return Eg=new ts,e}};function BD(e,t){fl.point=mw,gw=ka=e,pw=Aa=t}function mw(e,t){ka-=e,Aa-=t,Eg.add(Vn(ka*ka+Aa*Aa)),ka=e,Aa=t}let ex,Qu,tx,nx;class rx{constructor(t){this._append=t==null?bw:VD(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==tx||this._append!==Qu){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,tx=r,Qu=this._append,nx=this._,this._=i}this._+=nx;break}}}result(){const t=this._;return this._="",t.length?t:null}}function bw(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function VD(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return bw;if(t!==ex){const n=10**t;ex=t,Qu=function(i){let s=1;this._+=i[0];for(const o=i.length;s<o;++s)this._+=Math.round(arguments[s]*n)/n+i[s]}}return Qu}function ix(e,t){let n=3,r=4.5,i,s;function o(a){return a&&(typeof r=="function"&&s.pointRadius(+r.apply(this,arguments)),xs(a,i(s))),s.result()}return o.area=function(a){return xs(a,i(fi)),fi.result()},o.measure=function(a){return xs(a,i(fl)),fl.result()},o.bounds=function(a){return xs(a,i(Ju)),Ju.result()},o.centroid=function(a){return xs(a,i(ur)),ur.result()},o.projection=function(a){return arguments.length?(i=a==null?(e=null,bg):(e=a).stream,o):e},o.context=function(a){return arguments.length?(s=a==null?(t=null,new rx(n)):new hw(t=a),typeof r!="function"&&s.pointRadius(r),o):t},o.pointRadius=function(a){return arguments.length?(r=typeof a=="function"?a:(s.pointRadius(+a),+a),o):r},o.digits=function(a){if(!arguments.length)return n;if(a==null)n=null;else{const l=Math.floor(a);if(!(l>=0))throw new RangeError(`invalid digits: ${a}`);n=l}return t===null&&(s=new rx(n)),o},o.projection(e).digits(n).context(t)}function qp(e){return function(t){var n=new Ig;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Ig(){}Ig.prototype={constructor:Ig,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Kp(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),xs(n,e.stream(Ju)),t(Ju.result()),r!=null&&e.clipExtent(r),e}function Qp(e,t,n){return Kp(e,function(r){var i=t[1][0]-t[0][0],s=t[1][1]-t[0][1],o=Math.min(i/(r[1][0]-r[0][0]),s/(r[1][1]-r[0][1])),a=+t[0][0]+(i-o*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(s-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([a,l])},n)}function vw(e,t,n){return Qp(e,[[0,0],t],n)}function xw(e,t,n){return Kp(e,function(r){var i=+t,s=i/(r[1][0]-r[0][0]),o=(i-s*(r[1][0]+r[0][0]))/2,a=-s*r[0][1];e.scale(150*s).translate([o,a])},n)}function yw(e,t,n){return Kp(e,function(r){var i=+t,s=i/(r[1][1]-r[0][1]),o=-s*r[0][0],a=(i-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([o,a])},n)}var sx=16,zD=rt(30*Ft);function ox(e,t){return+t?GD(e,t):HD(e)}function HD(e){return qp({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function GD(e,t){function n(r,i,s,o,a,l,c,d,g,b,x,w,C,E){var k=c-r,u=d-i,v=k*k+u*u;if(v>4*t&&C--){var f=o+b,p=a+x,y=l+w,h=Vn(f*f+p*p+y*y),_=pr(y/=h),I=yt(yt(y)-1)<Xe||yt(s-g)<Xe?(s+g)/2:qr(p,f),A=e(I,_),R=A[0],D=A[1],B=R-r,N=D-i,F=u*B-k*N;(F*F/v>t||yt((k*B+u*N)/v-.5)>.3||o*b+a*x+l*w<zD)&&(n(r,i,s,o,a,l,R,D,I,f/=h,p/=h,y,C,E),E.point(R,D),n(R,D,I,f,p,y,c,d,g,b,x,w,C,E))}}return function(r){var i,s,o,a,l,c,d,g,b,x,w,C,E={point:k,lineStart:u,lineEnd:f,polygonStart:function(){r.polygonStart(),E.lineStart=p},polygonEnd:function(){r.polygonEnd(),E.lineStart=u}};function k(_,I){_=e(_,I),r.point(_[0],_[1])}function u(){g=NaN,E.point=v,r.lineStart()}function v(_,I){var A=Po([_,I]),R=e(_,I);n(g,b,d,x,w,C,g=R[0],b=R[1],d=_,x=A[0],w=A[1],C=A[2],sx,r),r.point(g,b)}function f(){E.point=k,r.lineEnd()}function p(){u(),E.point=y,E.lineEnd=h}function y(_,I){v(i=_,I),s=g,o=b,a=x,l=w,c=C,E.point=v}function h(){n(g,b,d,x,w,C,s,o,i,a,l,c,sx,r),E.lineEnd=f,f()}return E}}var WD=qp({point:function(e,t){this.stream.point(e*Ft,t*Ft)}});function $D(e){return qp({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function XD(e,t,n,r,i){function s(o,a){return o*=r,a*=i,[t+e*o,n-e*a]}return s.invert=function(o,a){return[(o-t)/e*r,(n-a)/e*i]},s}function ax(e,t,n,r,i,s){if(!s)return XD(e,t,n,r,i);var o=rt(s),a=tt(s),l=o*e,c=a*e,d=o/e,g=a/e,b=(a*n-o*t)/e,x=(a*t+o*n)/e;function w(C,E){return C*=r,E*=i,[l*C-c*E+t,n-c*C-l*E]}return w.invert=function(C,E){return[r*(d*C-g*E+b),i*(x-g*C-d*E)]},w}function Pi(e){return _w(function(){return e})()}function _w(e){var t,n=150,r=480,i=250,s=0,o=0,a=0,l=0,c=0,d,g=0,b=1,x=1,w=null,C=Wv,E=null,k,u,v,f=bg,p=.5,y,h,_,I,A;function R(F){return _(F[0]*Ft,F[1]*Ft)}function D(F){return F=_.invert(F[0],F[1]),F&&[F[0]*jn,F[1]*jn]}R.stream=function(F){return I&&A===F?I:I=WD($D(d)(C(y(f(A=F)))))},R.preclip=function(F){return arguments.length?(C=F,w=void 0,N()):C},R.postclip=function(F){return arguments.length?(f=F,E=k=u=v=null,N()):f},R.clipAngle=function(F){return arguments.length?(C=+F?vD(w=F*Ft):(w=null,Wv),N()):w*jn},R.clipExtent=function(F){return arguments.length?(f=F==null?(E=k=u=v=null,bg):yD(E=+F[0][0],k=+F[0][1],u=+F[1][0],v=+F[1][1]),N()):E==null?null:[[E,k],[u,v]]},R.scale=function(F){return arguments.length?(n=+F,B()):n},R.translate=function(F){return arguments.length?(r=+F[0],i=+F[1],B()):[r,i]},R.center=function(F){return arguments.length?(s=F[0]%360*Ft,o=F[1]%360*Ft,B()):[s*jn,o*jn]},R.rotate=function(F){return arguments.length?(a=F[0]%360*Ft,l=F[1]%360*Ft,c=F.length>2?F[2]%360*Ft:0,B()):[a*jn,l*jn,c*jn]},R.angle=function(F){return arguments.length?(g=F%360*Ft,B()):g*jn},R.reflectX=function(F){return arguments.length?(b=F?-1:1,B()):b<0},R.reflectY=function(F){return arguments.length?(x=F?-1:1,B()):x<0},R.precision=function(F){return arguments.length?(y=ox(h,p=F*F),N()):Vn(p)},R.fitExtent=function(F,j){return Qp(R,F,j)},R.fitSize=function(F,j){return vw(R,F,j)},R.fitWidth=function(F,j){return xw(R,F,j)},R.fitHeight=function(F,j){return yw(R,F,j)};function B(){var F=ax(n,0,0,b,x,g).apply(null,t(s,o)),j=ax(n,r-F[0],i-F[1],b,x,g);return d=ew(a,l,c),h=dg(t,j),_=dg(d,h),y=ox(h,p),N()}function N(){return I=A=null,R}return function(){return t=e.apply(this,arguments),R.invert=t.invert&&D,B()}}function em(e){var t=0,n=at/3,r=_w(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*Ft,n=s[1]*Ft):[t*jn,n*jn]},i}function YD(e){var t=rt(e);function n(r,i){return[r*t,tt(i)/t]}return n.invert=function(r,i){return[r/t,pr(i*t)]},n}function ZD(e,t){var n=tt(e),r=(n+tt(t))/2;if(yt(r)<Xe)return YD(e);var i=1+n*(2*r-n),s=Vn(i)/r;function o(a,l){var c=Vn(i-2*r*tt(l))/r;return[c*tt(a*=r),s-c*rt(a)]}return o.invert=function(a,l){var c=s-l,d=qr(a,yt(c))*fr(c);return c*r<0&&(d-=at*fr(a)*fr(c)),[d/r,pr((i-(a*a+c*c)*r*r)/(2*r))]},o}function ed(){return em(ZD).scale(155.424).center([0,33.6442])}function ww(){return ed().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function UD(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function JD(){var e,t,n=ww(),r,i=ed().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s,o=ed().rotate([157,0]).center([-3,19.9]).parallels([8,18]),a,l,c={point:function(b,x){l=[b,x]}};function d(b){var x=b[0],w=b[1];return l=null,r.point(x,w),l||(s.point(x,w),l)||(a.point(x,w),l)}d.invert=function(b){var x=n.scale(),w=n.translate(),C=(b[0]-w[0])/x,E=(b[1]-w[1])/x;return(E>=.12&&E<.234&&C>=-.425&&C<-.214?i:E>=.166&&E<.234&&C>=-.214&&C<-.115?o:n).invert(b)},d.stream=function(b){return e&&t===b?e:e=UD([n.stream(t=b),i.stream(b),o.stream(b)])},d.precision=function(b){return arguments.length?(n.precision(b),i.precision(b),o.precision(b),g()):n.precision()},d.scale=function(b){return arguments.length?(n.scale(b),i.scale(b*.35),o.scale(b),d.translate(n.translate())):n.scale()},d.translate=function(b){if(!arguments.length)return n.translate();var x=n.scale(),w=+b[0],C=+b[1];return r=n.translate(b).clipExtent([[w-.455*x,C-.238*x],[w+.455*x,C+.238*x]]).stream(c),s=i.translate([w-.307*x,C+.201*x]).clipExtent([[w-.425*x+Xe,C+.12*x+Xe],[w-.214*x-Xe,C+.234*x-Xe]]).stream(c),a=o.translate([w-.205*x,C+.212*x]).clipExtent([[w-.214*x+Xe,C+.166*x+Xe],[w-.115*x-Xe,C+.234*x-Xe]]).stream(c),g()},d.fitExtent=function(b,x){return Qp(d,b,x)},d.fitSize=function(b,x){return vw(d,b,x)},d.fitWidth=function(b,x){return xw(d,b,x)},d.fitHeight=function(b,x){return yw(d,b,x)};function g(){return e=t=null,d}return d.scale(1070)}function Cw(e){return function(t,n){var r=rt(t),i=rt(n),s=e(r*i);return s===1/0?[2,0]:[s*i*tt(t),s*tt(n)]}}function Tl(e){return function(t,n){var r=Vn(t*t+n*n),i=e(r),s=tt(i),o=rt(i);return[qr(t*s,r*o),pr(r&&n*s/r)]}}var Sw=Cw(function(e){return Vn(2/(1+e))});Sw.invert=Tl(function(e){return 2*pr(e/2)});function qD(){return Pi(Sw).scale(124.75).clipAngle(180-.001)}var Ew=Cw(function(e){return(e=Q2(e))&&e/tt(e)});Ew.invert=Tl(function(e){return e});function KD(){return Pi(Ew).scale(79.4188).clipAngle(180-.001)}function Nd(e,t){return[e,Wu(Jp((Ut+t)/2))]}Nd.invert=function(e,t){return[e,2*$o(K2(t))-Ut]};function QD(){return Iw(Nd).scale(961/nr)}function Iw(e){var t=Pi(e),n=t.center,r=t.scale,i=t.translate,s=t.clipExtent,o=null,a,l,c;t.scale=function(g){return arguments.length?(r(g),d()):r()},t.translate=function(g){return arguments.length?(i(g),d()):i()},t.center=function(g){return arguments.length?(n(g),d()):n()},t.clipExtent=function(g){return arguments.length?(g==null?o=a=l=c=null:(o=+g[0][0],a=+g[0][1],l=+g[1][0],c=+g[1][1]),d()):o==null?null:[[o,a],[l,c]]};function d(){var g=at*r(),b=t(dD(t.rotate()).invert([0,0]));return s(o==null?[[b[0]-g,b[1]-g],[b[0]+g,b[1]+g]]:e===Nd?[[Math.max(b[0]-g,o),a],[Math.min(b[0]+g,l),c]]:[[o,Math.max(b[1]-g,a)],[l,Math.min(b[1]+g,c)]])}return d()}function Pc(e){return Jp((Ut+e)/2)}function e7(e,t){var n=rt(e),r=e===t?tt(e):Wu(n/rt(t))/Wu(Pc(t)/Pc(e)),i=n*Kf(Pc(e),r)/r;if(!r)return Nd;function s(o,a){i>0?a<-Ut+Xe&&(a=-Ut+Xe):a>Ut-Xe&&(a=Ut-Xe);var l=i/Kf(Pc(a),r);return[l*tt(r*o),i-l*rt(r*o)]}return s.invert=function(o,a){var l=i-a,c=fr(r)*Vn(o*o+l*l),d=qr(o,yt(l))*fr(l);return l*r<0&&(d-=at*fr(o)*fr(l)),[d/r,2*$o(Kf(i/c,1/r))-Ut]},s}function t7(){return em(e7).scale(109.5).parallels([30,30])}function td(e,t){return[e,t]}td.invert=td;function n7(){return Pi(td).scale(152.63)}function r7(e,t){var n=rt(e),r=e===t?tt(e):(n-rt(t))/(t-e),i=n/r+e;if(yt(r)<Xe)return td;function s(o,a){var l=i-a,c=r*o;return[l*tt(c),i-l*rt(c)]}return s.invert=function(o,a){var l=i-a,c=qr(o,yt(l))*fr(l);return l*r<0&&(c-=at*fr(o)*fr(l)),[c/r,i-fr(r)*Vn(o*o+l*l)]},s}function i7(){return em(r7).scale(131.154).center([0,13.9389])}var Ga=1.340264,Wa=-.081106,$a=893e-6,Xa=.003796,nd=Vn(3)/2,s7=12;function kw(e,t){var n=pr(nd*tt(t)),r=n*n,i=r*r*r;return[e*rt(n)/(nd*(Ga+3*Wa*r+i*(7*$a+9*Xa*r))),n*(Ga+Wa*r+i*($a+Xa*r))]}kw.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,o,a,l;s<s7&&(a=n*(Ga+Wa*r+i*($a+Xa*r))-t,l=Ga+3*Wa*r+i*(7*$a+9*Xa*r),n-=o=a/l,r=n*n,i=r*r*r,!(yt(o)<Up));++s);return[nd*e*(Ga+3*Wa*r+i*(7*$a+9*Xa*r))/rt(n),pr(tt(n)/nd)]};function o7(){return Pi(kw).scale(177.158)}function Aw(e,t){var n=rt(t),r=rt(e)*n;return[n*tt(e)/r,tt(t)/r]}Aw.invert=Tl($o);function a7(){return Pi(Aw).scale(144.049).clipAngle(60)}function Mw(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Mw.invert=function(e,t){var n=t,r=25,i;do{var s=n*n,o=s*s;n-=i=(n*(1.007226+s*(.015085+o*(-.044475+.028874*s-.005916*o)))-t)/(1.007226+s*(.015085*3+o*(-.044475*7+.028874*9*s-.005916*11*o)))}while(yt(i)>Xe&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function l7(){return Pi(Mw).scale(175.295)}function Rw(e,t){return[rt(t)*tt(e),tt(t)]}Rw.invert=Tl(pr);function c7(){return Pi(Rw).scale(249.5).clipAngle(90+Xe)}function Pw(e,t){var n=rt(t),r=1+rt(e)*n;return[n*tt(e)/r,tt(t)/r]}Pw.invert=Tl(function(e){return 2*$o(e)});function u7(){return Pi(Pw).scale(250).clipAngle(142)}function Nw(e,t){return[Wu(Jp((Ut+t)/2)),-e]}Nw.invert=function(e,t){return[-t,2*$o(K2(e))-Ut]};function d7(){var e=Iw(Nw),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function It(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}function Td(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function tm(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Xo(){}var Gs=.7,Oo=1/Gs,_o="\\s*([+-]?\\d+)\\s*",hl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f7=/^#([0-9a-f]{3,8})$/,h7=new RegExp(`^rgb\\(${_o},${_o},${_o}\\)$`),g7=new RegExp(`^rgb\\(${Zr},${Zr},${Zr}\\)$`),p7=new RegExp(`^rgba\\(${_o},${_o},${_o},${hl}\\)$`),m7=new RegExp(`^rgba\\(${Zr},${Zr},${Zr},${hl}\\)$`),b7=new RegExp(`^hsl\\(${hl},${Zr},${Zr}\\)$`),v7=new RegExp(`^hsla\\(${hl},${Zr},${Zr},${hl}\\)$`),lx={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Td(Xo,gl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:cx,formatHex:cx,formatHex8:x7,formatHsl:y7,formatRgb:ux,toString:ux});function cx(){return this.rgb().formatHex()}function x7(){return this.rgb().formatHex8()}function y7(){return Ow(this).formatHsl()}function ux(){return this.rgb().formatRgb()}function gl(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=f7.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?dx(t):n===3?new On(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Nc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Nc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=h7.exec(e))?new On(t[1],t[2],t[3],1):(t=g7.exec(e))?new On(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=p7.exec(e))?Nc(t[1],t[2],t[3],t[4]):(t=m7.exec(e))?Nc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=b7.exec(e))?gx(t[1],t[2]/100,t[3]/100,1):(t=v7.exec(e))?gx(t[1],t[2]/100,t[3]/100,t[4]):lx.hasOwnProperty(e)?dx(lx[e]):e==="transparent"?new On(NaN,NaN,NaN,0):null}function dx(e){return new On(e>>16&255,e>>8&255,e&255,1)}function Nc(e,t,n,r){return r<=0&&(e=t=n=NaN),new On(e,t,n,r)}function Tw(e){return e instanceof Xo||(e=gl(e)),e?(e=e.rgb(),new On(e.r,e.g,e.b,e.opacity)):new On}function pl(e,t,n,r){return arguments.length===1?Tw(e):new On(e,t,n,r??1)}function On(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Td(On,pl,tm(Xo,{brighter(e){return e=e==null?Oo:Math.pow(Oo,e),new On(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Gs:Math.pow(Gs,e),new On(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new On(Ns(this.r),Ns(this.g),Ns(this.b),rd(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:fx,formatHex:fx,formatHex8:_7,formatRgb:hx,toString:hx}));function fx(){return`#${Ss(this.r)}${Ss(this.g)}${Ss(this.b)}`}function _7(){return`#${Ss(this.r)}${Ss(this.g)}${Ss(this.b)}${Ss((isNaN(this.opacity)?1:this.opacity)*255)}`}function hx(){const e=rd(this.opacity);return`${e===1?"rgb(":"rgba("}${Ns(this.r)}, ${Ns(this.g)}, ${Ns(this.b)}${e===1?")":`, ${e})`}`}function rd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ns(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ss(e){return e=Ns(e),(e<16?"0":"")+e.toString(16)}function gx(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ir(e,t,n,r)}function Ow(e){if(e instanceof Ir)return new Ir(e.h,e.s,e.l,e.opacity);if(e instanceof Xo||(e=gl(e)),!e)return new Ir;if(e instanceof Ir)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=NaN,a=s-i,l=(s+i)/2;return a?(t===s?o=(n-r)/a+(n<r)*6:n===s?o=(r-t)/a+2:o=(t-n)/a+4,a/=l<.5?s+i:2-s-i,o*=60):a=l>0&&l<1?0:o,new Ir(o,a,l,e.opacity)}function w7(e,t,n,r){return arguments.length===1?Ow(e):new Ir(e,t,n,r??1)}function Ir(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Td(Ir,w7,tm(Xo,{brighter(e){return e=e==null?Oo:Math.pow(Oo,e),new Ir(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Gs:Math.pow(Gs,e),new Ir(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new On(rh(e>=240?e-240:e+120,i,r),rh(e,i,r),rh(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ir(px(this.h),Tc(this.s),Tc(this.l),rd(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=rd(this.opacity);return`${e===1?"hsl(":"hsla("}${px(this.h)}, ${Tc(this.s)*100}%, ${Tc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function px(e){return e=(e||0)%360,e<0?e+360:e}function Tc(e){return Math.max(0,Math.min(1,e||0))}function rh(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const C7=Math.PI/180,S7=180/Math.PI;var Dw=-.14861,nm=1.78277,rm=-.29227,Od=-.90649,ml=1.97294,mx=ml*Od,bx=ml*nm,vx=nm*rm-Od*Dw;function E7(e){if(e instanceof Ts)return new Ts(e.h,e.s,e.l,e.opacity);e instanceof On||(e=Tw(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(vx*r+mx*t-bx*n)/(vx+mx-bx),s=r-i,o=(ml*(n-i)-rm*s)/Od,a=Math.sqrt(o*o+s*s)/(ml*i*(1-i)),l=a?Math.atan2(o,s)*S7-120:NaN;return new Ts(l<0?l+360:l,a,i,e.opacity)}function Kr(e,t,n,r){return arguments.length===1?E7(e):new Ts(e,t,n,r??1)}function Ts(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Td(Ts,Kr,tm(Xo,{brighter(e){return e=e==null?Oo:Math.pow(Oo,e),new Ts(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Gs:Math.pow(Gs,e),new Ts(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*C7,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new On(255*(t+n*(Dw*r+nm*i)),255*(t+n*(rm*r+Od*i)),255*(t+n*(ml*r)),this.opacity)}}));function I7(e,t,n,r,i){var s=e*e,o=s*e;return((1-3*e+3*s-o)*t+(4-6*s+3*o)*n+(1+3*e+3*s-3*o)*r+o*i)/6}function k7(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],s=e[r+1],o=r>0?e[r-1]:2*i-s,a=r<t-1?e[r+2]:2*s-i;return I7((n-r/t)*t,o,i,s,a)}}const im=e=>()=>e;function Fw(e,t){return function(n){return e+n*t}}function A7(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function M7(e,t){var n=t-e;return n?Fw(e,n>180||n<-180?n-360*Math.round(n/360):n):im(isNaN(e)?t:e)}function R7(e){return(e=+e)==1?wo:function(t,n){return n-t?A7(t,n,e):im(isNaN(t)?n:t)}}function wo(e,t){var n=t-e;return n?Fw(e,n):im(isNaN(e)?t:e)}const xx=function e(t){var n=R7(t);function r(i,s){var o=n((i=pl(i)).r,(s=pl(s)).r),a=n(i.g,s.g),l=n(i.b,s.b),c=wo(i.opacity,s.opacity);return function(d){return i.r=o(d),i.g=a(d),i.b=l(d),i.opacity=c(d),i+""}}return r.gamma=e,r}(1);function P7(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),s=new Array(n),o,a;for(o=0;o<n;++o)a=pl(t[o]),r[o]=a.r||0,i[o]=a.g||0,s[o]=a.b||0;return r=e(r),i=e(i),s=e(s),a.opacity=1,function(l){return a.r=r(l),a.g=i(l),a.b=s(l),a+""}}}var N7=P7(k7);function Bi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var kg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ih=new RegExp(kg.source,"g");function T7(e){return function(){return e}}function O7(e){return function(t){return e(t)+""}}function D7(e,t){var n=kg.lastIndex=ih.lastIndex=0,r,i,s,o=-1,a=[],l=[];for(e=e+"",t=t+"";(r=kg.exec(e))&&(i=ih.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:Bi(r,i)})),n=ih.lastIndex;return n<t.length&&(s=t.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?O7(l[0].x):T7(t):(t=l.length,function(c){for(var d=0,g;d<t;++d)a[(g=l[d]).i]=g.x(c);return a.join("")})}var yx=180/Math.PI,Ag={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Lw(e,t,n,r,i,s){var o,a,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),e*r<t*n&&(e=-e,t=-t,l=-l,o=-o),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*yx,skewX:Math.atan(l)*yx,scaleX:o,scaleY:a}}var Oc;function F7(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ag:Lw(t.a,t.b,t.c,t.d,t.e,t.f)}function L7(e){return e==null||(Oc||(Oc=document.createElementNS("http://www.w3.org/2000/svg","g")),Oc.setAttribute("transform",e),!(e=Oc.transform.baseVal.consolidate()))?Ag:(e=e.matrix,Lw(e.a,e.b,e.c,e.d,e.e,e.f))}function jw(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function s(c,d,g,b,x,w){if(c!==g||d!==b){var C=x.push("translate(",null,t,null,n);w.push({i:C-4,x:Bi(c,g)},{i:C-2,x:Bi(d,b)})}else(g||b)&&x.push("translate("+g+t+b+n)}function o(c,d,g,b){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),b.push({i:g.push(i(g)+"rotate(",null,r)-2,x:Bi(c,d)})):d&&g.push(i(g)+"rotate("+d+r)}function a(c,d,g,b){c!==d?b.push({i:g.push(i(g)+"skewX(",null,r)-2,x:Bi(c,d)}):d&&g.push(i(g)+"skewX("+d+r)}function l(c,d,g,b,x,w){if(c!==g||d!==b){var C=x.push(i(x)+"scale(",null,",",null,")");w.push({i:C-4,x:Bi(c,g)},{i:C-2,x:Bi(d,b)})}else(g!==1||b!==1)&&x.push(i(x)+"scale("+g+","+b+")")}return function(c,d){var g=[],b=[];return c=e(c),d=e(d),s(c.translateX,c.translateY,d.translateX,d.translateY,g,b),o(c.rotate,d.rotate,g,b),a(c.skewX,d.skewX,g,b),l(c.scaleX,c.scaleY,d.scaleX,d.scaleY,g,b),c=d=null,function(x){for(var w=-1,C=b.length,E;++w<C;)g[(E=b[w]).i]=E.x(x);return g.join("")}}}var j7=jw(F7,"px, ","px)","deg)"),B7=jw(L7,", ",")",")"),V7=1e-12;function _x(e){return((e=Math.exp(e))+1/e)/2}function z7(e){return((e=Math.exp(e))-1/e)/2}function H7(e){return((e=Math.exp(2*e))-1)/(e+1)}const G7=function e(t,n,r){function i(s,o){var a=s[0],l=s[1],c=s[2],d=o[0],g=o[1],b=o[2],x=d-a,w=g-l,C=x*x+w*w,E,k;if(C<V7)k=Math.log(b/c)/t,E=function(h){return[a+h*x,l+h*w,c*Math.exp(t*h*k)]};else{var u=Math.sqrt(C),v=(b*b-c*c+r*C)/(2*c*n*u),f=(b*b-c*c-r*C)/(2*b*n*u),p=Math.log(Math.sqrt(v*v+1)-v),y=Math.log(Math.sqrt(f*f+1)-f);k=(y-p)/t,E=function(h){var _=h*k,I=_x(p),A=c/(n*u)*(I*H7(t*_+p)-z7(p));return[a+A*x,l+A*w,c*I/_x(t*_+p)]}}return E.duration=k*1e3*t/Math.SQRT2,E}return i.rho=function(s){var o=Math.max(.001,+s),a=o*o,l=a*a;return e(o,a,l)},i}(Math.SQRT2,2,4);function Bw(e){return function t(n){n=+n;function r(i,s){var o=e((i=Kr(i)).h,(s=Kr(s)).h),a=wo(i.s,s.s),l=wo(i.l,s.l),c=wo(i.opacity,s.opacity);return function(d){return i.h=o(d),i.s=a(d),i.l=l(Math.pow(d,n)),i.opacity=c(d),i+""}}return r.gamma=t,r}(1)}Bw(M7);var sm=Bw(wo);const Bt=e=>N7(e[e.length-1]);var W7=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(It);const $7=Bt(W7);var X7=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(It);const Y7=Bt(X7);var Z7=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(It);const U7=Bt(Z7);var J7=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(It);const q7=Bt(J7);var K7=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(It);const Q7=Bt(K7);var eF=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(It);const tF=Bt(eF);var nF=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(It);const rF=Bt(nF);var iF=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(It);const sF=Bt(iF);var oF=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(It);const aF=Bt(oF);var lF=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(It);const cF=Bt(lF);var uF=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(It);const dF=Bt(uF);var fF=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(It);const hF=Bt(fF);var gF=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(It);const pF=Bt(gF);var mF=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(It);const bF=Bt(mF);var vF=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(It);const xF=Bt(vF);var yF=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(It);const _F=Bt(yF);var wF=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(It);const CF=Bt(wF);var SF=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(It);const EF=Bt(SF);var IF=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(It);const kF=Bt(IF);var AF=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(It);const MF=Bt(AF);var RF=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(It);const PF=Bt(RF);var NF=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(It);const TF=Bt(NF);var OF=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(It);const DF=Bt(OF);var FF=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(It);const LF=Bt(FF);var jF=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(It);const BF=Bt(jF);var VF=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(It);const zF=Bt(VF);var HF=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(It);const GF=Bt(HF);function WF(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const $F=sm(Kr(300,.5,0),Kr(-240,.5,1));var XF=sm(Kr(-100,.75,.35),Kr(80,1.5,.8)),YF=sm(Kr(260,.75,.35),Kr(80,1.5,.8)),Dc=Kr();function ZF(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Dc.h=360*e-100,Dc.s=1.5-1.5*t,Dc.l=.8-.9*t,Dc+""}var Fc=pl(),UF=Math.PI/3,JF=Math.PI*2/3;function qF(e){var t;return e=(.5-e)*Math.PI,Fc.r=255*(t=Math.sin(e))*t,Fc.g=255*(t=Math.sin(e+UF))*t,Fc.b=255*(t=Math.sin(e+JF))*t,Fc+""}function KF(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Dd(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const QF=Dd(It("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var eL=Dd(It("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),tL=Dd(It("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),nL=Dd(It("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));const Ya={geoAzimuthalEqualArea:qD,geoAzimuthalEquidistant:KD,geoGnomonic:a7,geoOrthographic:c7,geoStereographic:u7,geoEqualEarth:o7,geoAlbers:ww,geoAlbersUsa:JD,geoConicConformal:t7,geoConicEqualArea:ed,geoConicEquidistant:i7,geoEquirectangular:n7,geoMercator:QD,geoTransverseMercator:d7,geoNaturalEarth1:l7};Object.keys(Ya).forEach(e=>{Ya[`${e.charAt(3).toLowerCase()}${e.slice(4)}`]=Ya[e]});class Us extends ss{constructor(t){super(t),this.outlineBounds=null,this.oldChartBounds=null,this.geoPath=ix()}init(t){t.position="chartArea",super.init(t),typeof t.projection=="function"?this.projection=t.projection:this.projection=(Ya[t.projection]||Ya.albersUsa)(),this.geoPath.projection(this.projection),this.outlineBounds=null,this.oldChartBounds=null}computeBounds(t){const n=ix(this.projection.fitWidth(1e3,t)).bounds(t),r=Math.ceil(n[1][1]-n[0][1]),i=Math.ceil(n[1][0]-n[0][0]),s=this.projection.translate();this.outlineBounds={width:i,height:r,aspectRatio:i/r,refScale:this.projection.scale(),refX:s[0],refY:s[1]}}updateBounds(){const t=this.chart.chartArea,n=this.outlineBounds;if(!n)return!1;const r=this.options.padding,i=typeof r=="number"?r:r.top,s=typeof r=="number"?r:r.left,o=typeof r=="number"?r:r.bottom,a=typeof r=="number"?r:r.right,l=t.right-t.left-s-a,c=t.bottom-t.top-i-o,d=this.oldChartBounds;this.oldChartBounds={chartWidth:l,chartHeight:c};const g=Math.min(l/n.width,c/n.height),b=n.width*g,x=n.height*g,w=(l-b)*.5+t.left+s,C=(c-x)*.5+t.top+i,E=this.options;return this.projection.scale(n.refScale*g*E.projectionScale).translate([g*n.refX+w+E.projectionOffset[0],g*n.refY+C+E.projectionOffset[1]]),!d||d.chartWidth!==this.oldChartBounds.chartWidth||d.chartHeight!==this.oldChartBounds.chartHeight}}Us.id="projection";Us.defaults={projection:"albersUsa",projectionScale:1,projectionOffset:[0,0],padding:0};Us.descriptors={_scriptable:e=>e!=="projection",_indexable:e=>e!=="projectionOffset"};const Fd={position:"chartArea",property:"value",grid:{z:1,drawOnChartArea:!1},ticks:{z:1},legend:{align:"right",position:"bottom-right",length:100,width:50,margin:8,indicatorWidth:10}};function rL(e){const{indicatorWidth:t,align:n,margin:r}=e,i=(typeof r=="number"?r:r.left)+(n==="right"?t:0),s=(typeof r=="number"?r:r.top)+(n==="bottom"?t:0),o=(typeof r=="number"?r:r.right)+(n==="left"?t:0),a=(typeof r=="number"?r:r.bottom)+(n==="top"?t:0);return{left:i,top:s,right:o,bottom:a}}function iL(e,t,n,r,i){const{indicatorWidth:s,align:o,position:a}=t,l=o==="top"||o==="bottom",c=(o==="left"?i.w:n)+(l?s:0),d=(o==="top"?i.h:r)+(l?0:s),g=rL(t);if(typeof a=="string")switch(a){case"top-left":return[g.left,g.top];case"top":return[(e.right-c)/2,g.top];case"left":return[g.left,(e.bottom-d)/2];case"top-right":return[e.right-c-g.right,g.top];case"bottom-right":return[e.right-c-g.right,e.bottom-d-g.bottom];case"bottom":return[(e.right-c)/2,e.bottom-d-g.bottom];case"bottom-left":return[g.left,e.bottom-d-g.bottom];default:return[e.right-c-g.right,(e.bottom-d)/2]}return[a.x,a.y]}class go extends Ei{constructor(){super(...arguments),this.legendSize={w:0,h:0}}init(t){t.position="chartArea",super.init(t),this.axis="r"}parse(t,n){return t&&typeof t[this.options.property]=="number"?t[this.options.property]:super.parse(t,n)}isHorizontal(){return this.options.legend.align==="top"||this.options.legend.align==="bottom"}_getNormalizedValue(t){return t==null||Number.isNaN(t)?null:(t-this._startValue)/this._valueRange}update(t,n,r){const i=Math.min(n,this.bottom==null?Number.POSITIVE_INFINITY:this.bottom),s=Math.min(t,this.right==null?Number.POSITIVE_INFINITY:this.right),o=this.options.legend,a=this.isHorizontal(),l=(x,w)=>x<1?w*x:x,c=Math.min(s,l(a?o.length:o.width,s))-(a?0:o.indicatorWidth),d=Math.min(i,l(a?o.width:o.length,i))-(a?o.indicatorWidth:0);this.legendSize={w:c,h:d},this.bottom=d,this.height=d,this.right=c,this.width=c;const g=this.options.position;this.options.position=this.options.legend.align;const b=super.update(c,d,r);return this.options.position=g,this.height=Math.min(d,this.height),this.width=Math.min(c,this.width),b}_computeLabelArea(){}draw(t){if(!this._isVisible())return;const n=iL(t,this.options.legend,this.width,this.height,this.legendSize),{ctx:r}=this;r.save(),r.translate(n[0],n[1]);const i=this.options.position;this.options.position=this.options.legend.align,super.draw({...t,bottom:this.height+10,right:this.width}),this.options.position=i;const{indicatorWidth:s}=this.options.legend;switch(this.options.legend.align){case"left":r.translate(this.legendSize.w,0);break;case"top":r.translate(0,this.legendSize.h);break;case"bottom":r.translate(0,-s);break;default:r.translate(-s,0);break}this._drawIndicator(),r.restore()}_drawIndicator(){}}class Vw extends zs{constructor(){super(...arguments),this.legendSize={w:0,h:0}}init(t){go.prototype.init.call(this,t)}parse(t,n){return go.prototype.parse.call(this,t,n)}isHorizontal(){return this.options.legend.align==="top"||this.options.legend.align==="bottom"}_getNormalizedValue(t){return t==null||Number.isNaN(t)?null:(Math.log10(t)-this._startValue)/this._valueRange}update(t,n,r){return go.prototype.update.call(this,t,n,r)}_computeLabelArea(){}draw(t){return go.prototype.draw.call(this,t)}_drawIndicator(){}}const hi={interpolateBlues:TF,interpolateBrBG:$7,interpolateBuGn:cF,interpolateBuPu:dF,interpolateCividis:WF,interpolateCool:YF,interpolateCubehelixDefault:$F,interpolateGnBu:hF,interpolateGreens:DF,interpolateGreys:LF,interpolateInferno:tL,interpolateMagma:eL,interpolateOrRd:pF,interpolateOranges:GF,interpolatePRGn:Y7,interpolatePiYG:U7,interpolatePlasma:nL,interpolatePuBu:xF,interpolatePuBuGn:bF,interpolatePuOr:q7,interpolatePuRd:_F,interpolatePurples:BF,interpolateRainbow:ZF,interpolateRdBu:Q7,interpolateRdGy:tF,interpolateRdPu:CF,interpolateRdYlBu:rF,interpolateRdYlGn:sF,interpolateReds:zF,interpolateSinebow:qF,interpolateSpectral:aF,interpolateTurbo:KF,interpolateViridis:QF,interpolateWarm:XF,interpolateYlGn:kF,interpolateYlGnBu:EF,interpolateYlOrBr:MF,interpolateYlOrRd:PF};Object.keys(hi).forEach(e=>{hi[`${e.charAt(11).toLowerCase()}${e.slice(12)}`]=hi[e],hi[e.slice(11)]=hi[e]});function zw(e,t){const n=1/t;if(e<=n)return 0;if(e>=1-n)return 1;for(let r=0;r<1;r+=n)if(e<r)return r-n/2;return e}const Hw={interpolate:"blues",missing:"transparent",quantize:0};class ns extends go{get interpolate(){const t=this.options;return t?typeof t.interpolate=="function"?t.interpolate:hi[t.interpolate]||hi.blues:n=>`rgb(${n},${n},${n})`}getColorForValue(t){const n=this._getNormalizedValue(t);return n==null||Number.isNaN(n)?this.options.missing:this.getColor(n)}getColor(t){let n=t;return this.options.quantize>0&&(n=zw(n,this.options.quantize)),this.interpolate(n)}_drawIndicator(){const{indicatorWidth:t}=this.options.legend,n=this._reversePixels;if(this.isHorizontal()){const r=this.width;if(this.options.quantize>0){const i=r/this.options.quantize,s=n?o=>r-i-o:o=>o;for(let o=0;o<r;o+=i){const a=(o+i/2)/r;this.ctx.fillStyle=this.getColor(a),this.ctx.fillRect(s(o),0,i,t)}}else{const i=n?s=>r-1-s:s=>s;for(let s=0;s<r;s+=1)this.ctx.fillStyle=this.getColor((s+.5)/r),this.ctx.fillRect(i(s),0,1,t)}}else{const r=this.height;if(this.options.quantize>0){const i=r/this.options.quantize,s=n?o=>r-i-o:o=>o;for(let o=0;o<r;o+=i){const a=(o+i/2)/r;this.ctx.fillStyle=this.getColor(a),this.ctx.fillRect(0,s(o),t,i)}}else{const i=n?s=>r-1-s:s=>s;for(let s=0;s<r;s+=1)this.ctx.fillStyle=this.getColor((s+.5)/r),this.ctx.fillRect(0,i(s),t,1)}}}}ns.id="color";ns.defaults=gn({},[Ei.defaults,Fd,Hw]);ns.descriptors={_scriptable:e=>e!=="interpolate",_indexable:!1};class om extends Vw{constructor(){super(...arguments),this.interpolate=t=>`rgb(${t},${t},${t})`}init(t){super.init(t),typeof t.interpolate=="function"?this.interpolate=t.interpolate:this.interpolate=hi[t.interpolate]||hi.blues}getColorForValue(t){return ns.prototype.getColorForValue.call(this,t)}getColor(t){let n=t;return this.options.quantize>0&&(n=zw(n,this.options.quantize)),this.interpolate(n)}_drawIndicator(){return ns.prototype._drawIndicator.call(this)}}om.id="colorLogarithmic";om.defaults=gn({},[zs.defaults,Fd,Hw]);om.descriptors={_scriptable:e=>e!=="interpolate",_indexable:!1};const Gw={missing:1,mode:"area",range:[2,20],legend:{align:"bottom",length:90,width:70,indicatorWidth:42}};class Ws extends go{constructor(){super(...arguments),this._model=null}getSizeForValue(t){const n=this._getNormalizedValue(t);return n==null||Number.isNaN(n)?this.options.missing:this.getSizeImpl(n)}getSizeImpl(t){const[n,r]=this.options.range;if(this.options.mode==="area"){const s=r*r*Math.PI,o=n*n*Math.PI,a=s-o,l=t*a+o;return Math.sqrt(l/Math.PI)}const i=r-n;return t*i+n}_drawIndicator(){const{ctx:t}=this,n=this.options.legend.indicatorWidth/2,r=this.isHorizontal(),i=this.ticks,s=this.getLabelItems(),o=s?s.map(a=>({[r?"x":"y"]:a.options.translation[r?0:1]})):i.map((a,l)=>({[r?"x":"y"]:this.getPixelForTick(l)}));if((this._gridLineItems||[]).forEach(a=>{if(t.save(),t.strokeStyle=a.color,t.lineWidth=a.width,t.setLineDash&&(t.setLineDash(a.borderDash),t.lineDashOffset=a.borderDashOffset),t.beginPath(),this.options.grid.drawTicks)switch(this.options.legend.align){case"left":t.moveTo(0,a.ty1),t.lineTo(n,a.ty2);break;case"top":t.moveTo(a.tx1,0),t.lineTo(a.tx2,n);break;case"bottom":t.moveTo(a.tx1,n),t.lineTo(a.tx2,n*2);break;default:t.moveTo(n,a.ty1),t.lineTo(n*2,a.ty2);break}t.stroke(),t.restore()}),this._model){const a=this._model;t.strokeStyle=a.borderColor,t.lineWidth=a.borderWidth||0,t.fillStyle=a.backgroundColor}else t.fillStyle="blue";i.forEach((a,l)=>{const c=o[l],d=this.getSizeForValue(a.value),g=r?c.x:n,b=r?n:c.y,x={pointStyle:"circle",borderWidth:0,...this._model||{},radius:d};ju(t,x,g,b)})}}Ws.id="size";Ws.defaults=gn({},[Ei.defaults,Fd,Gw]);Ws.descriptors={_scriptable:!0,_indexable:e=>e!=="range"};class Ww extends Vw{constructor(){super(...arguments),this._model=null}getSizeForValue(t){const n=this._getNormalizedValue(t);return n==null||Number.isNaN(n)?this.options.missing:this.getSizeImpl(n)}getSizeImpl(t){return Ws.prototype.getSizeImpl.call(this,t)}_drawIndicator(){Ws.prototype._drawIndicator.call(this)}}Ww.id="sizeLogarithmic";Ww.defaults=gn({},[zs.defaults,Fd,Gw]);function sL(e,t){return[[e[0][0]-t,e[0][1]-t],[e[1][0]+t,e[1][1]+t]]}class Ii extends ti{constructor(){super(...arguments),this.cache=void 0}updateExtras({scale:t,feature:n,center:r,pixelRatio:i,mode:s}){var o,a;const l=s==="resize"||s==="reset"||this.projectionScale!==t||this.feature!==n||((o=this.center)===null||o===void 0?void 0:o.longitude)!==(r==null?void 0:r.longitude)||((a=this.center)===null||a===void 0?void 0:a.latitude)!==(r==null?void 0:r.latitude)||this.pixelRatio!==i;return this.projectionScale=t,this.feature=n,this.center=r,this.pixelRatio=i,l&&(this.cache=void 0),this.getCenterPoint()}inRange(t,n){const r=this.getBounds(),i=(Number.isNaN(t)||t>=r.x&&t<=r.x2)&&(Number.isNaN(n)||n>=r.y&&n<=r.y2),s=this.projectionScale.geoPath.projection();if(i&&!Number.isNaN(t)&&!Number.isNaN(n)&&typeof s.invert=="function"){const o=s.invert([t,n]);return o!=null&&AD(this.feature,o)}return i}inXRange(t){return this.inRange(t,Number.NaN)}inYRange(t){return this.inRange(Number.NaN,t)}getCenterPoint(){if(this.cache&&this.cache.center)return this.cache.center;let t;if(this.center){const n=this.projectionScale.projection([this.center.longitude,this.center.latitude]);t={x:n[0],y:n[1]}}else{const n=this.projectionScale.geoPath.centroid(this.feature);t={x:n[0],y:n[1]}}return this.cache={...this.cache||{},center:t},t}getBounds(){if(this.cache&&this.cache.bounds)return this.cache.bounds;const t=sL(this.projectionScale.geoPath.bounds(this.feature),this.options.borderWidth/2),n={x:t[0][0],x2:t[1][0],y:t[0][1],y2:t[1][1],width:t[1][0]-t[0][0],height:t[1][1]-t[0][1]};return this.cache={...this.cache||{},bounds:n},n}_drawInCache(t){const n=this.getBounds();if(!Number.isFinite(n.x))return;const r=this.cache&&this.cache.canvas?this.cache.canvas:t.createElement("canvas"),i=Math.floor(n.x),s=Math.floor(n.y),o=Math.ceil(n.x+n.width),a=Math.ceil(n.y+n.height),l=this.pixelRatio||1,c=Math.ceil(Math.max(o-i,1)*l),d=Math.ceil(Math.max(a-s,1)*l);if(c<=0||d<=0)return;r.width=c,r.height=d;const g=r.getContext("2d");g&&(g.clearRect(0,0,r.width,r.height),g.save(),g.scale(l,l),g.translate(-i,-s),this._drawImpl(g),g.restore(),this.cache={...this.cache||{},canvas:r,canvasKey:this._optionsToKey()})}_optionsToKey(){const{options:t}=this;return`${t.backgroundColor};${t.borderColor};${t.borderWidth};${this.pixelRatio}`}_drawImpl(t){const{feature:n}=this,{options:r}=this;t.beginPath(),this.projectionScale.geoPath.context(t)(n),r.backgroundColor&&(t.fillStyle=r.backgroundColor,t.fill()),r.borderColor&&(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.stroke())}draw(t){const{feature:n}=this;if(!n)return;(!this.cache||this.cache.canvasKey!==this._optionsToKey())&&t.canvas.ownerDocument!=null&&this._drawInCache(t.canvas.ownerDocument);const r=this.getBounds();if(this.cache&&this.cache.canvas&&this.cache.canvas.width>0&&this.cache.canvas.height>0){const i=Math.floor(r.x),s=Math.floor(r.y),o=Math.ceil(r.x+r.width),a=Math.ceil(r.y+r.height),l=o-i,c=a-s;l>0&&c>0&&t.drawImage(this.cache.canvas,i,s,o-i,a-s)}else Number.isFinite(r.x)&&(t.save(),this._drawImpl(t),t.restore())}}Ii.id="geoFeature";Ii.defaults={...Yr.defaults,outlineBackgroundColor:null,outlineBorderWidth:0,graticuleBorderColor:"#CCCCCC",graticuleBorderWidth:0};Ii.defaultRoutes={outlineBorderColor:"borderColor",...Yr.defaultRoutes||{}};const $w={showOutline:!1,showGraticule:!1,clipMap:!0},Xw={scales:{projection:{axis:"x",type:Us.id,position:"chartArea",display:!1}}};function wx(e){const t={...e};return Object.keys(e).forEach(n=>{let r=n;if(n.startsWith("outline")){const i=n.slice(7);r=i[0].toLowerCase()+i.slice(1)}else if(n.startsWith("hoverOutline"))r=`hover${n.slice(12)}`;else return;delete t[n],t[r]=e[n]}),t}class Yw extends gr{getGeoDataset(){return super.getDataset()}getGeoOptions(){return this.chart.options}getProjectionScale(){return this.getScaleForId("projection")}linkScales(){const t=this.getGeoDataset(),n=this.getMeta();n.xAxisID="projection",t.xAxisID="projection",n.yAxisID="projection",t.yAxisID="projection",n.xScale=this.getScaleForId("projection"),n.yScale=this.getScaleForId("projection"),this.getProjectionScale().computeBounds(this.resolveOutline())}showOutline(){return qe(this.getGeoDataset().showOutline,this.getGeoOptions().showOutline)}clipMap(){return qe(this.getGeoDataset().clipMap,this.getGeoOptions().clipMap)}getGraticule(){return qe(this.getGeoDataset().showGraticule,this.getGeoOptions().showGraticule)}update(t){super.update(t);const n=this.getMeta(),r=this.getProjectionScale(),i=r.updateBounds()||t==="resize"||t==="reset";if(this.showOutline()){const s=n.dataset;if(i&&delete s.cache,s.projectionScale=r,s.pixelRatio=this.chart.currentDevicePixelRatio,t!=="resize"){const o=wx(this.resolveDatasetElementOptions(t)),a={feature:this.resolveOutline(),options:o};this.updateElement(s,void 0,a,t),this.getGraticule()&&(n.graticule=o)}}else this.getGraticule()&&t!=="resize"&&(n.graticule=wx(this.resolveDatasetElementOptions(t)));i&&n.data.forEach(s=>delete s.cache),this.updateElements(n.data,0,n.data.length,t)}resolveOutline(){const n=this.getGeoDataset().outline||{type:"Sphere"};return Array.isArray(n)?{type:"FeatureCollection",features:n}:n}showGraticule(){const t=this.getGraticule(),n=this.getMeta().graticule;if(!t||!n)return;const{ctx:r}=this.chart,s=this.getProjectionScale().geoPath.context(r);if(r.save(),r.beginPath(),typeof t=="boolean")t&&s(MD());else{const o=ow();t.stepMajor&&o.stepMajor(t.stepMajor),t.stepMinor&&o.stepMinor(t.stepMinor),s(o())}r.strokeStyle=n.graticuleBorderColor,r.lineWidth=n.graticuleBorderWidth,r.stroke(),r.restore()}draw(){const{chart:t}=this,n=this.clipMap();let r=!1;(n===!0||n==="outline"||n==="outline+graticule")&&(r=!0,ks(t.ctx,t.chartArea)),this.showOutline()&&this.getMeta().dataset&&this.getMeta().dataset.draw.call(this.getMeta().dataset,t.ctx,t.chartArea),n===!0||n==="graticule"||n==="outline+graticule"?r||ks(t.ctx,t.chartArea):r&&(r=!1,As(t.ctx)),this.showGraticule(),n===!0||n==="items"?r||ks(t.ctx,t.chartArea):r&&(r=!1,As(t.ctx)),this.getMeta().data.forEach(i=>i.draw.call(i,t.ctx,t.chartArea)),r&&(r=!1,As(t.ctx))}}function Zw(e,t,n,r=[],i=[]){Bn.addControllers(n),Array.isArray(r)?Bn.addElements(...r):Bn.addElements(r),Array.isArray(i)?Bn.addScales(...i):Bn.addScales(i);const s=t;return s.type=e,s}class Yo extends Yw{initialize(){super.initialize(),this.enableOptionSharing=!0}linkScales(){super.linkScales();const t=this.getGeoDataset(),n=this.getMeta();n.vAxisID="color",n.rAxisID="color",t.vAxisID="color",t.rAxisID="color",n.rScale=this.getScaleForId("color"),n.vScale=n.rScale,n.iScale=n.xScale,n.iAxisID=n.xAxisID,t.iAxisID=n.xAxisID}_getOtherScale(t){return t}parse(t,n){const r=this.getMeta().rScale,{data:i}=this.getDataset(),s=this._cachedMeta;for(let o=t;o<t+n;o+=1)s._parsed[o]={[r.axis]:r.parse(i[o],o)}}updateElements(t,n,r,i){const s=this.resolveDataElementOptions(n,i),o=this.getSharedOptions(s),a=this.includeOptions(i,o),l=this.getProjectionScale();this.updateSharedOptions(o,i,s);for(let c=n;c<n+r;c+=1){const d=t[c];d.projectionScale=l;const g=d.updateExtras({scale:l,feature:this._data[c].feature,center:this._data[c].center,pixelRatio:this.chart.currentDevicePixelRatio,mode:i}),b={x:g.x,y:g.y};a&&(b.options=o||this.resolveDataElementOptions(c,i)),this.updateElement(d,c,b,i)}}indexToColor(t){const n=this.getMeta().rScale;return n.getColorForValue(this.getParsed(t)[n.axis])}}Yo.id="choropleth";Yo.defaults=gn({},[$w,{datasetElementType:Ii.id,dataElementType:Ii.id}]);Yo.overrides=gn({},[Xw,{plugins:{tooltip:{callbacks:{title(){return""},label(e){var t,n,r,i;return e.formattedValue==null?(n=(t=e.chart.data)===null||t===void 0?void 0:t.labels)===null||n===void 0?void 0:n[e.dataIndex]:`${(i=(r=e.chart.data)===null||r===void 0?void 0:r.labels)===null||i===void 0?void 0:i[e.dataIndex]}: ${e.formattedValue}`}}},colors:{enabled:!1}},scales:{color:{type:ns.id,axis:"x"}},elements:{geoFeature:{backgroundColor(e){return e.dataIndex==null?null:e.chart.getDatasetMeta(e.datasetIndex).controller.indexToColor(e.dataIndex)}}}}]);class oL extends pn{constructor(t,n){super(t,Zw("choropleth",n,Yo,Ii,[ns,Us]))}}oL.id=Yo.id;class Ol extends Yw{initialize(){super.initialize(),this.enableOptionSharing=!0}linkScales(){super.linkScales();const t=this.getGeoDataset(),n=this.getMeta();n.vAxisID="size",n.rAxisID="size",t.vAxisID="size",t.rAxisID="size",n.rScale=this.getScaleForId("size"),n.vScale=n.rScale,n.iScale=n.xScale,n.iAxisID=n.xAxisID,t.iAxisID=n.xAxisID}_getOtherScale(t){return t}parse(t,n){const r=this.getMeta().rScale,i=this.getDataset().data,s=this._cachedMeta;for(let o=t;o<t+n;o+=1){const a=i[o];s._parsed[o]={x:a.longitude==null?a.x:a.longitude,y:a.latitude==null?a.y:a.latitude,[r.axis]:r.parse(a,o)}}}updateElements(t,n,r,i){const s=i==="reset",o=this.resolveDataElementOptions(n,i),a=this.getSharedOptions(o),l=this.includeOptions(i,a),c=this.getProjectionScale();this.getMeta().rScale._model=o,this.updateSharedOptions(a,i,o);for(let d=n;d<n+r;d+=1){const g=t[d],b=this.getParsed(d),x=c.projection([b.x,b.y]),w={x:x?x[0]:0,y:x?x[1]:0,skip:Number.isNaN(b.x)||Number.isNaN(b.y)};l&&(w.options=a||this.resolveDataElementOptions(d,i),s&&(w.options.radius=0)),this.updateElement(g,d,w,i)}}indexToRadius(t){const n=this.getMeta().rScale;return n.getSizeForValue(this.getParsed(t)[n.axis])}}Ol.id="bubbleMap";Ol.defaults=gn({},[$w,{dataElementType:Ps.id,datasetElementType:Ii.id,showOutline:!0,clipMap:"outline+graticule"}]);Ol.overrides=gn({},[Xw,{plugins:{tooltip:{callbacks:{title(){return""},label(e){var t,n,r,i;return e.formattedValue==null?(n=(t=e.chart.data)===null||t===void 0?void 0:t.labels)===null||n===void 0?void 0:n[e.dataIndex]:`${(i=(r=e.chart.data)===null||r===void 0?void 0:r.labels)===null||i===void 0?void 0:i[e.dataIndex]}: ${e.formattedValue}`}}}},scales:{size:{axis:"x",type:Ws.id}},elements:{point:{radius(e){return e.dataIndex==null?null:e.chart.getDatasetMeta(e.datasetIndex).controller.indexToRadius(e.dataIndex)},hoverRadius(e){return e.dataIndex==null?null:e.chart.getDatasetMeta(e.datasetIndex).controller.indexToRadius(e.dataIndex)+1}}}}]);class aL extends pn{constructor(t,n){super(t,Zw("bubbleMap",n,Ol,Ii,[Ws,Us]))}}aL.id=Ol.id;pn.register(Yo,Ii,Us,ns,Zs,Ys,Ro,Ei,Yr);pn.defaults.font.family="'Rubik', 'Inter', sans-serif";const lL=({data:e=new Map,defaultCountry:t="India",geoData:n,dataLabel:r="Data Points Found"})=>{const[i,s]=M.useState(null),[o,a]=M.useState(0),l=n?n.features.filter(g=>g.properties.name!=="Antarctica"):[];if(M.useEffect(()=>{if(e!=null&&e.size){let g=0;e.forEach((b,x)=>{i===x&&(g=b)}),a(g)}},[i,e]),!n||l.length===0)return O.jsx("div",{className:"geochart-container flex flex-col items-center justify-center p-8",style:{minHeight:"400px"},children:O.jsx("p",{style:{color:"var(--secondary-text-color)"},children:"Geo data not provided. Please provide geoData prop."})});const c={datasets:[{label:"Data Distribution",data:l.map(g=>({feature:g,value:e.get(g.properties.name)||0})),borderColor:"#fff",borderWidth:1,backgroundColor:g=>{var C;if(!((C=g==null?void 0:g.raw)!=null&&C.feature))return getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8";const b=g.raw.feature.properties.name,x=getComputedStyle(document.documentElement).getPropertyValue("--brand-orange").trim()||"#ff6503",w=getComputedStyle(document.documentElement).getPropertyValue("--brand-light").trim()||"#dae0e8";return b===t?x:i===b?x+"99":w}}]},d={responsive:!0,maintainAspectRatio:!1,scales:{projection:{axis:"x",projection:"equirectangular"},color:{axis:"x",display:!1}},plugins:{legend:{display:!1},tooltip:{backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--bg-color").trim()||"#fff",titleColor:getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||"#333",bodyColor:getComputedStyle(document.documentElement).getPropertyValue("--chart-text-color").trim()||"#333",borderColor:getComputedStyle(document.documentElement).getPropertyValue("--border-color").trim()||"#e5e7eb",borderWidth:1,callbacks:{title:g=>{var b,x,w;return g.length?((w=(x=(b=g[0].raw)==null?void 0:b.feature)==null?void 0:x.properties)==null?void 0:w.name)??"Unknown":""},label:()=>`${r}: ${o}`}},datalabels:{display:!1}},onHover:(g,b)=>{var x,w;if(b.length>0){const C=b[0].index;s(((w=(x=l[C])==null?void 0:x.properties)==null?void 0:w.name)||null)}}};return O.jsx("div",{className:"geochart-container flex flex-col items-center",onMouseLeave:()=>s(null),style:{minHeight:"400px"},children:O.jsx(Xp,{type:"choropleth",data:c,options:d,className:"w-full h-full"})})};var cL={exports:{}},sh={exports:{}};/*!
160
- * jQuery JavaScript Library v3.7.1
161
- * https://jquery.com/
162
- *
163
- * Copyright OpenJS Foundation and other contributors
164
- * Released under the MIT license
165
- * https://jquery.org/license
166
- *
167
- * Date: 2023-08-28T13:37Z
168
- */var Cx;function Uw(){return Cx||(Cx=1,function(e){(function(t,n){e.exports=t.document?n(t,!0):function(r){if(!r.document)throw new Error("jQuery requires a window with a document");return n(r)}})(typeof window<"u"?window:gd,function(t,n){var r=[],i=Object.getPrototypeOf,s=r.slice,o=r.flat?function(m){return r.flat.call(m)}:function(m){return r.concat.apply([],m)},a=r.push,l=r.indexOf,c={},d=c.toString,g=c.hasOwnProperty,b=g.toString,x=b.call(Object),w={},C=function(S){return typeof S=="function"&&typeof S.nodeType!="number"&&typeof S.item!="function"},E=function(S){return S!=null&&S===S.window},k=t.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function v(m,S,P){P=P||k;var T,V,z=P.createElement("script");if(z.text=m,S)for(T in u)V=S[T]||S.getAttribute&&S.getAttribute(T),V&&z.setAttribute(T,V);P.head.appendChild(z).parentNode.removeChild(z)}function f(m){return m==null?m+"":typeof m=="object"||typeof m=="function"?c[d.call(m)]||"object":typeof m}var p="3.7.1",y=/HTML$/i,h=function(m,S){return new h.fn.init(m,S)};h.fn=h.prototype={jquery:p,constructor:h,length:0,toArray:function(){return s.call(this)},get:function(m){return m==null?s.call(this):m<0?this[m+this.length]:this[m]},pushStack:function(m){var S=h.merge(this.constructor(),m);return S.prevObject=this,S},each:function(m){return h.each(this,m)},map:function(m){return this.pushStack(h.map(this,function(S,P){return m.call(S,P,S)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(h.grep(this,function(m,S){return(S+1)%2}))},odd:function(){return this.pushStack(h.grep(this,function(m,S){return S%2}))},eq:function(m){var S=this.length,P=+m+(m<0?S:0);return this.pushStack(P>=0&&P<S?[this[P]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:r.sort,splice:r.splice},h.extend=h.fn.extend=function(){var m,S,P,T,V,z,W=arguments[0]||{},K=1,J=arguments.length,te=!1;for(typeof W=="boolean"&&(te=W,W=arguments[K]||{},K++),typeof W!="object"&&!C(W)&&(W={}),K===J&&(W=this,K--);K<J;K++)if((m=arguments[K])!=null)for(S in m)T=m[S],!(S==="__proto__"||W===T)&&(te&&T&&(h.isPlainObject(T)||(V=Array.isArray(T)))?(P=W[S],V&&!Array.isArray(P)?z=[]:!V&&!h.isPlainObject(P)?z={}:z=P,V=!1,W[S]=h.extend(te,z,T)):T!==void 0&&(W[S]=T));return W},h.extend({expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),isReady:!0,error:function(m){throw new Error(m)},noop:function(){},isPlainObject:function(m){var S,P;return!m||d.call(m)!=="[object Object]"?!1:(S=i(m),S?(P=g.call(S,"constructor")&&S.constructor,typeof P=="function"&&b.call(P)===x):!0)},isEmptyObject:function(m){var S;for(S in m)return!1;return!0},globalEval:function(m,S,P){v(m,{nonce:S&&S.nonce},P)},each:function(m,S){var P,T=0;if(_(m))for(P=m.length;T<P&&S.call(m[T],T,m[T])!==!1;T++);else for(T in m)if(S.call(m[T],T,m[T])===!1)break;return m},text:function(m){var S,P="",T=0,V=m.nodeType;if(!V)for(;S=m[T++];)P+=h.text(S);return V===1||V===11?m.textContent:V===9?m.documentElement.textContent:V===3||V===4?m.nodeValue:P},makeArray:function(m,S){var P=S||[];return m!=null&&(_(Object(m))?h.merge(P,typeof m=="string"?[m]:m):a.call(P,m)),P},inArray:function(m,S,P){return S==null?-1:l.call(S,m,P)},isXMLDoc:function(m){var S=m&&m.namespaceURI,P=m&&(m.ownerDocument||m).documentElement;return!y.test(S||P&&P.nodeName||"HTML")},merge:function(m,S){for(var P=+S.length,T=0,V=m.length;T<P;T++)m[V++]=S[T];return m.length=V,m},grep:function(m,S,P){for(var T,V=[],z=0,W=m.length,K=!P;z<W;z++)T=!S(m[z],z),T!==K&&V.push(m[z]);return V},map:function(m,S,P){var T,V,z=0,W=[];if(_(m))for(T=m.length;z<T;z++)V=S(m[z],z,P),V!=null&&W.push(V);else for(z in m)V=S(m[z],z,P),V!=null&&W.push(V);return o(W)},guid:1,support:w}),typeof Symbol=="function"&&(h.fn[Symbol.iterator]=r[Symbol.iterator]),h.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(m,S){c["[object "+S+"]"]=S.toLowerCase()});function _(m){var S=!!m&&"length"in m&&m.length,P=f(m);return C(m)||E(m)?!1:P==="array"||S===0||typeof S=="number"&&S>0&&S-1 in m}function I(m,S){return m.nodeName&&m.nodeName.toLowerCase()===S.toLowerCase()}var A=r.pop,R=r.sort,D=r.splice,B="[\\x20\\t\\r\\n\\f]",N=new RegExp("^"+B+"+|((?:^|[^\\\\])(?:\\\\.)*)"+B+"+$","g");h.contains=function(m,S){var P=S&&S.parentNode;return m===P||!!(P&&P.nodeType===1&&(m.contains?m.contains(P):m.compareDocumentPosition&&m.compareDocumentPosition(P)&16))};var F=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function j(m,S){return S?m==="\0"?"�":m.slice(0,-1)+"\\"+m.charCodeAt(m.length-1).toString(16)+" ":"\\"+m}h.escapeSelector=function(m){return(m+"").replace(F,j)};var H=k,L=a;(function(){var m,S,P,T,V,z=L,W,K,J,te,de,me=h.expando,ae=0,Ce=0,Ke=Yl(),bt=Yl(),st=Yl(),xn=Yl(),an=function(X,Q){return X===Q&&(V=!0),0},Tr="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",Or="(?:\\\\[\\da-fA-F]{1,6}"+B+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",ht="\\["+B+"*("+Or+")(?:"+B+"*([*^$|!~]?=)"+B+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+Or+"))|)"+B+"*\\]",cs=":("+Or+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+ht+")*)|.*)\\)|)",xt=new RegExp(B+"+","g"),Zt=new RegExp("^"+B+"*,"+B+"*"),Qo=new RegExp("^"+B+"*([>+~]|"+B+")"+B+"*"),rf=new RegExp(B+"|>"),Dr=new RegExp(cs),ea=new RegExp("^"+Or+"$"),Fr={ID:new RegExp("^#("+Or+")"),CLASS:new RegExp("^\\.("+Or+")"),TAG:new RegExp("^("+Or+"|[*])"),ATTR:new RegExp("^"+ht),PSEUDO:new RegExp("^"+cs),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+B+"*(even|odd|(([+-]|)(\\d*)n|)"+B+"*(?:([+-]|)"+B+"*(\\d+)|))"+B+"*\\)|)","i"),bool:new RegExp("^(?:"+Tr+")$","i"),needsContext:new RegExp("^"+B+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+B+"*((?:-\\d)?\\d*)"+B+"*\\)|)(?=[^-]|$)","i")},Oi=/^(?:input|select|textarea|button)$/i,Di=/^h\d$/i,sr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,sf=/[+~]/,ii=new RegExp("\\\\[\\da-fA-F]{1,6}"+B+"?|\\\\([^\\r\\n\\f])","g"),si=function(X,Q){var oe="0x"+X.slice(1)-65536;return Q||(oe<0?String.fromCharCode(oe+65536):String.fromCharCode(oe>>10|55296,oe&1023|56320))},JS=function(){Fi()},qS=Ul(function(X){return X.disabled===!0&&I(X,"fieldset")},{dir:"parentNode",next:"legend"});function KS(){try{return W.activeElement}catch{}}try{z.apply(r=s.call(H.childNodes),H.childNodes),r[H.childNodes.length].nodeType}catch{z={apply:function(Q,oe){L.apply(Q,s.call(oe))},call:function(Q){L.apply(Q,s.call(arguments,1))}}}function Nt(X,Q,oe,ce){var pe,ke,Ne,Fe,Te,lt,Ze,et=Q&&Q.ownerDocument,ct=Q?Q.nodeType:9;if(oe=oe||[],typeof X!="string"||!X||ct!==1&&ct!==9&&ct!==11)return oe;if(!ce&&(Fi(Q),Q=Q||W,J)){if(ct!==11&&(Te=sr.exec(X)))if(pe=Te[1]){if(ct===9)if(Ne=Q.getElementById(pe)){if(Ne.id===pe)return z.call(oe,Ne),oe}else return oe;else if(et&&(Ne=et.getElementById(pe))&&Nt.contains(Q,Ne)&&Ne.id===pe)return z.call(oe,Ne),oe}else{if(Te[2])return z.apply(oe,Q.getElementsByTagName(X)),oe;if((pe=Te[3])&&Q.getElementsByClassName)return z.apply(oe,Q.getElementsByClassName(pe)),oe}if(!xn[X+" "]&&(!te||!te.test(X))){if(Ze=X,et=Q,ct===1&&(rf.test(X)||Qo.test(X))){for(et=sf.test(X)&&of(Q.parentNode)||Q,(et!=Q||!w.scope)&&((Fe=Q.getAttribute("id"))?Fe=h.escapeSelector(Fe):Q.setAttribute("id",Fe=me)),lt=ta(X),ke=lt.length;ke--;)lt[ke]=(Fe?"#"+Fe:":scope")+" "+Zl(lt[ke]);Ze=lt.join(",")}try{return z.apply(oe,et.querySelectorAll(Ze)),oe}catch{xn(X,!0)}finally{Fe===me&&Q.removeAttribute("id")}}}return jm(X.replace(N,"$1"),Q,oe,ce)}function Yl(){var X=[];function Q(oe,ce){return X.push(oe+" ")>S.cacheLength&&delete Q[X.shift()],Q[oe+" "]=ce}return Q}function _r(X){return X[me]=!0,X}function eo(X){var Q=W.createElement("fieldset");try{return!!X(Q)}catch{return!1}finally{Q.parentNode&&Q.parentNode.removeChild(Q),Q=null}}function QS(X){return function(Q){return I(Q,"input")&&Q.type===X}}function e4(X){return function(Q){return(I(Q,"input")||I(Q,"button"))&&Q.type===X}}function Fm(X){return function(Q){return"form"in Q?Q.parentNode&&Q.disabled===!1?"label"in Q?"label"in Q.parentNode?Q.parentNode.disabled===X:Q.disabled===X:Q.isDisabled===X||Q.isDisabled!==!X&&qS(Q)===X:Q.disabled===X:"label"in Q?Q.disabled===X:!1}}function us(X){return _r(function(Q){return Q=+Q,_r(function(oe,ce){for(var pe,ke=X([],oe.length,Q),Ne=ke.length;Ne--;)oe[pe=ke[Ne]]&&(oe[pe]=!(ce[pe]=oe[pe]))})})}function of(X){return X&&typeof X.getElementsByTagName<"u"&&X}function Fi(X){var Q,oe=X?X.ownerDocument||X:H;return oe==W||oe.nodeType!==9||!oe.documentElement||(W=oe,K=W.documentElement,J=!h.isXMLDoc(W),de=K.matches||K.webkitMatchesSelector||K.msMatchesSelector,K.msMatchesSelector&&H!=W&&(Q=W.defaultView)&&Q.top!==Q&&Q.addEventListener("unload",JS),w.getById=eo(function(ce){return K.appendChild(ce).id=h.expando,!W.getElementsByName||!W.getElementsByName(h.expando).length}),w.disconnectedMatch=eo(function(ce){return de.call(ce,"*")}),w.scope=eo(function(){return W.querySelectorAll(":scope")}),w.cssHas=eo(function(){try{return W.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),w.getById?(S.filter.ID=function(ce){var pe=ce.replace(ii,si);return function(ke){return ke.getAttribute("id")===pe}},S.find.ID=function(ce,pe){if(typeof pe.getElementById<"u"&&J){var ke=pe.getElementById(ce);return ke?[ke]:[]}}):(S.filter.ID=function(ce){var pe=ce.replace(ii,si);return function(ke){var Ne=typeof ke.getAttributeNode<"u"&&ke.getAttributeNode("id");return Ne&&Ne.value===pe}},S.find.ID=function(ce,pe){if(typeof pe.getElementById<"u"&&J){var ke,Ne,Fe,Te=pe.getElementById(ce);if(Te){if(ke=Te.getAttributeNode("id"),ke&&ke.value===ce)return[Te];for(Fe=pe.getElementsByName(ce),Ne=0;Te=Fe[Ne++];)if(ke=Te.getAttributeNode("id"),ke&&ke.value===ce)return[Te]}return[]}}),S.find.TAG=function(ce,pe){return typeof pe.getElementsByTagName<"u"?pe.getElementsByTagName(ce):pe.querySelectorAll(ce)},S.find.CLASS=function(ce,pe){if(typeof pe.getElementsByClassName<"u"&&J)return pe.getElementsByClassName(ce)},te=[],eo(function(ce){var pe;K.appendChild(ce).innerHTML="<a id='"+me+"' href='' disabled='disabled'></a><select id='"+me+"-\r\\' disabled='disabled'><option selected=''></option></select>",ce.querySelectorAll("[selected]").length||te.push("\\["+B+"*(?:value|"+Tr+")"),ce.querySelectorAll("[id~="+me+"-]").length||te.push("~="),ce.querySelectorAll("a#"+me+"+*").length||te.push(".#.+[+~]"),ce.querySelectorAll(":checked").length||te.push(":checked"),pe=W.createElement("input"),pe.setAttribute("type","hidden"),ce.appendChild(pe).setAttribute("name","D"),K.appendChild(ce).disabled=!0,ce.querySelectorAll(":disabled").length!==2&&te.push(":enabled",":disabled"),pe=W.createElement("input"),pe.setAttribute("name",""),ce.appendChild(pe),ce.querySelectorAll("[name='']").length||te.push("\\["+B+"*name"+B+"*="+B+`*(?:''|"")`)}),w.cssHas||te.push(":has"),te=te.length&&new RegExp(te.join("|")),an=function(ce,pe){if(ce===pe)return V=!0,0;var ke=!ce.compareDocumentPosition-!pe.compareDocumentPosition;return ke||(ke=(ce.ownerDocument||ce)==(pe.ownerDocument||pe)?ce.compareDocumentPosition(pe):1,ke&1||!w.sortDetached&&pe.compareDocumentPosition(ce)===ke?ce===W||ce.ownerDocument==H&&Nt.contains(H,ce)?-1:pe===W||pe.ownerDocument==H&&Nt.contains(H,pe)?1:T?l.call(T,ce)-l.call(T,pe):0:ke&4?-1:1)}),W}Nt.matches=function(X,Q){return Nt(X,null,null,Q)},Nt.matchesSelector=function(X,Q){if(Fi(X),J&&!xn[Q+" "]&&(!te||!te.test(Q)))try{var oe=de.call(X,Q);if(oe||w.disconnectedMatch||X.document&&X.document.nodeType!==11)return oe}catch{xn(Q,!0)}return Nt(Q,W,null,[X]).length>0},Nt.contains=function(X,Q){return(X.ownerDocument||X)!=W&&Fi(X),h.contains(X,Q)},Nt.attr=function(X,Q){(X.ownerDocument||X)!=W&&Fi(X);var oe=S.attrHandle[Q.toLowerCase()],ce=oe&&g.call(S.attrHandle,Q.toLowerCase())?oe(X,Q,!J):void 0;return ce!==void 0?ce:X.getAttribute(Q)},Nt.error=function(X){throw new Error("Syntax error, unrecognized expression: "+X)},h.uniqueSort=function(X){var Q,oe=[],ce=0,pe=0;if(V=!w.sortStable,T=!w.sortStable&&s.call(X,0),R.call(X,an),V){for(;Q=X[pe++];)Q===X[pe]&&(ce=oe.push(pe));for(;ce--;)D.call(X,oe[ce],1)}return T=null,X},h.fn.uniqueSort=function(){return this.pushStack(h.uniqueSort(s.apply(this)))},S=h.expr={cacheLength:50,createPseudo:_r,match:Fr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(X){return X[1]=X[1].replace(ii,si),X[3]=(X[3]||X[4]||X[5]||"").replace(ii,si),X[2]==="~="&&(X[3]=" "+X[3]+" "),X.slice(0,4)},CHILD:function(X){return X[1]=X[1].toLowerCase(),X[1].slice(0,3)==="nth"?(X[3]||Nt.error(X[0]),X[4]=+(X[4]?X[5]+(X[6]||1):2*(X[3]==="even"||X[3]==="odd")),X[5]=+(X[7]+X[8]||X[3]==="odd")):X[3]&&Nt.error(X[0]),X},PSEUDO:function(X){var Q,oe=!X[6]&&X[2];return Fr.CHILD.test(X[0])?null:(X[3]?X[2]=X[4]||X[5]||"":oe&&Dr.test(oe)&&(Q=ta(oe,!0))&&(Q=oe.indexOf(")",oe.length-Q)-oe.length)&&(X[0]=X[0].slice(0,Q),X[2]=oe.slice(0,Q)),X.slice(0,3))}},filter:{TAG:function(X){var Q=X.replace(ii,si).toLowerCase();return X==="*"?function(){return!0}:function(oe){return I(oe,Q)}},CLASS:function(X){var Q=Ke[X+" "];return Q||(Q=new RegExp("(^|"+B+")"+X+"("+B+"|$)"))&&Ke(X,function(oe){return Q.test(typeof oe.className=="string"&&oe.className||typeof oe.getAttribute<"u"&&oe.getAttribute("class")||"")})},ATTR:function(X,Q,oe){return function(ce){var pe=Nt.attr(ce,X);return pe==null?Q==="!=":Q?(pe+="",Q==="="?pe===oe:Q==="!="?pe!==oe:Q==="^="?oe&&pe.indexOf(oe)===0:Q==="*="?oe&&pe.indexOf(oe)>-1:Q==="$="?oe&&pe.slice(-oe.length)===oe:Q==="~="?(" "+pe.replace(xt," ")+" ").indexOf(oe)>-1:Q==="|="?pe===oe||pe.slice(0,oe.length+1)===oe+"-":!1):!0}},CHILD:function(X,Q,oe,ce,pe){var ke=X.slice(0,3)!=="nth",Ne=X.slice(-4)!=="last",Fe=Q==="of-type";return ce===1&&pe===0?function(Te){return!!Te.parentNode}:function(Te,lt,Ze){var et,ct,We,Vt,Gn,En=ke!==Ne?"nextSibling":"previousSibling",or=Te.parentNode,Lr=Fe&&Te.nodeName.toLowerCase(),to=!Ze&&!Fe,Ln=!1;if(or){if(ke){for(;En;){for(We=Te;We=We[En];)if(Fe?I(We,Lr):We.nodeType===1)return!1;Gn=En=X==="only"&&!Gn&&"nextSibling"}return!0}if(Gn=[Ne?or.firstChild:or.lastChild],Ne&&to){for(ct=or[me]||(or[me]={}),et=ct[X]||[],Vt=et[0]===ae&&et[1],Ln=Vt&&et[2],We=Vt&&or.childNodes[Vt];We=++Vt&&We&&We[En]||(Ln=Vt=0)||Gn.pop();)if(We.nodeType===1&&++Ln&&We===Te){ct[X]=[ae,Vt,Ln];break}}else if(to&&(ct=Te[me]||(Te[me]={}),et=ct[X]||[],Vt=et[0]===ae&&et[1],Ln=Vt),Ln===!1)for(;(We=++Vt&&We&&We[En]||(Ln=Vt=0)||Gn.pop())&&!((Fe?I(We,Lr):We.nodeType===1)&&++Ln&&(to&&(ct=We[me]||(We[me]={}),ct[X]=[ae,Ln]),We===Te)););return Ln-=pe,Ln===ce||Ln%ce===0&&Ln/ce>=0}}},PSEUDO:function(X,Q){var oe,ce=S.pseudos[X]||S.setFilters[X.toLowerCase()]||Nt.error("unsupported pseudo: "+X);return ce[me]?ce(Q):ce.length>1?(oe=[X,X,"",Q],S.setFilters.hasOwnProperty(X.toLowerCase())?_r(function(pe,ke){for(var Ne,Fe=ce(pe,Q),Te=Fe.length;Te--;)Ne=l.call(pe,Fe[Te]),pe[Ne]=!(ke[Ne]=Fe[Te])}):function(pe){return ce(pe,0,oe)}):ce}},pseudos:{not:_r(function(X){var Q=[],oe=[],ce=uf(X.replace(N,"$1"));return ce[me]?_r(function(pe,ke,Ne,Fe){for(var Te,lt=ce(pe,null,Fe,[]),Ze=pe.length;Ze--;)(Te=lt[Ze])&&(pe[Ze]=!(ke[Ze]=Te))}):function(pe,ke,Ne){return Q[0]=pe,ce(Q,null,Ne,oe),Q[0]=null,!oe.pop()}}),has:_r(function(X){return function(Q){return Nt(X,Q).length>0}}),contains:_r(function(X){return X=X.replace(ii,si),function(Q){return(Q.textContent||h.text(Q)).indexOf(X)>-1}}),lang:_r(function(X){return ea.test(X||"")||Nt.error("unsupported lang: "+X),X=X.replace(ii,si).toLowerCase(),function(Q){var oe;do if(oe=J?Q.lang:Q.getAttribute("xml:lang")||Q.getAttribute("lang"))return oe=oe.toLowerCase(),oe===X||oe.indexOf(X+"-")===0;while((Q=Q.parentNode)&&Q.nodeType===1);return!1}}),target:function(X){var Q=t.location&&t.location.hash;return Q&&Q.slice(1)===X.id},root:function(X){return X===K},focus:function(X){return X===KS()&&W.hasFocus()&&!!(X.type||X.href||~X.tabIndex)},enabled:Fm(!1),disabled:Fm(!0),checked:function(X){return I(X,"input")&&!!X.checked||I(X,"option")&&!!X.selected},selected:function(X){return X.parentNode&&X.parentNode.selectedIndex,X.selected===!0},empty:function(X){for(X=X.firstChild;X;X=X.nextSibling)if(X.nodeType<6)return!1;return!0},parent:function(X){return!S.pseudos.empty(X)},header:function(X){return Di.test(X.nodeName)},input:function(X){return Oi.test(X.nodeName)},button:function(X){return I(X,"input")&&X.type==="button"||I(X,"button")},text:function(X){var Q;return I(X,"input")&&X.type==="text"&&((Q=X.getAttribute("type"))==null||Q.toLowerCase()==="text")},first:us(function(){return[0]}),last:us(function(X,Q){return[Q-1]}),eq:us(function(X,Q,oe){return[oe<0?oe+Q:oe]}),even:us(function(X,Q){for(var oe=0;oe<Q;oe+=2)X.push(oe);return X}),odd:us(function(X,Q){for(var oe=1;oe<Q;oe+=2)X.push(oe);return X}),lt:us(function(X,Q,oe){var ce;for(oe<0?ce=oe+Q:oe>Q?ce=Q:ce=oe;--ce>=0;)X.push(ce);return X}),gt:us(function(X,Q,oe){for(var ce=oe<0?oe+Q:oe;++ce<Q;)X.push(ce);return X})}},S.pseudos.nth=S.pseudos.eq;for(m in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})S.pseudos[m]=QS(m);for(m in{submit:!0,reset:!0})S.pseudos[m]=e4(m);function Lm(){}Lm.prototype=S.filters=S.pseudos,S.setFilters=new Lm;function ta(X,Q){var oe,ce,pe,ke,Ne,Fe,Te,lt=bt[X+" "];if(lt)return Q?0:lt.slice(0);for(Ne=X,Fe=[],Te=S.preFilter;Ne;){(!oe||(ce=Zt.exec(Ne)))&&(ce&&(Ne=Ne.slice(ce[0].length)||Ne),Fe.push(pe=[])),oe=!1,(ce=Qo.exec(Ne))&&(oe=ce.shift(),pe.push({value:oe,type:ce[0].replace(N," ")}),Ne=Ne.slice(oe.length));for(ke in S.filter)(ce=Fr[ke].exec(Ne))&&(!Te[ke]||(ce=Te[ke](ce)))&&(oe=ce.shift(),pe.push({value:oe,type:ke,matches:ce}),Ne=Ne.slice(oe.length));if(!oe)break}return Q?Ne.length:Ne?Nt.error(X):bt(X,Fe).slice(0)}function Zl(X){for(var Q=0,oe=X.length,ce="";Q<oe;Q++)ce+=X[Q].value;return ce}function Ul(X,Q,oe){var ce=Q.dir,pe=Q.next,ke=pe||ce,Ne=oe&&ke==="parentNode",Fe=Ce++;return Q.first?function(Te,lt,Ze){for(;Te=Te[ce];)if(Te.nodeType===1||Ne)return X(Te,lt,Ze);return!1}:function(Te,lt,Ze){var et,ct,We=[ae,Fe];if(Ze){for(;Te=Te[ce];)if((Te.nodeType===1||Ne)&&X(Te,lt,Ze))return!0}else for(;Te=Te[ce];)if(Te.nodeType===1||Ne)if(ct=Te[me]||(Te[me]={}),pe&&I(Te,pe))Te=Te[ce]||Te;else{if((et=ct[ke])&&et[0]===ae&&et[1]===Fe)return We[2]=et[2];if(ct[ke]=We,We[2]=X(Te,lt,Ze))return!0}return!1}}function af(X){return X.length>1?function(Q,oe,ce){for(var pe=X.length;pe--;)if(!X[pe](Q,oe,ce))return!1;return!0}:X[0]}function t4(X,Q,oe){for(var ce=0,pe=Q.length;ce<pe;ce++)Nt(X,Q[ce],oe);return oe}function Jl(X,Q,oe,ce,pe){for(var ke,Ne=[],Fe=0,Te=X.length,lt=Q!=null;Fe<Te;Fe++)(ke=X[Fe])&&(!oe||oe(ke,ce,pe))&&(Ne.push(ke),lt&&Q.push(Fe));return Ne}function lf(X,Q,oe,ce,pe,ke){return ce&&!ce[me]&&(ce=lf(ce)),pe&&!pe[me]&&(pe=lf(pe,ke)),_r(function(Ne,Fe,Te,lt){var Ze,et,ct,We,Vt=[],Gn=[],En=Fe.length,or=Ne||t4(Q||"*",Te.nodeType?[Te]:Te,[]),Lr=X&&(Ne||!Q)?Jl(or,Vt,X,Te,lt):or;if(oe?(We=pe||(Ne?X:En||ce)?[]:Fe,oe(Lr,We,Te,lt)):We=Lr,ce)for(Ze=Jl(We,Gn),ce(Ze,[],Te,lt),et=Ze.length;et--;)(ct=Ze[et])&&(We[Gn[et]]=!(Lr[Gn[et]]=ct));if(Ne){if(pe||X){if(pe){for(Ze=[],et=We.length;et--;)(ct=We[et])&&Ze.push(Lr[et]=ct);pe(null,We=[],Ze,lt)}for(et=We.length;et--;)(ct=We[et])&&(Ze=pe?l.call(Ne,ct):Vt[et])>-1&&(Ne[Ze]=!(Fe[Ze]=ct))}}else We=Jl(We===Fe?We.splice(En,We.length):We),pe?pe(null,Fe,We,lt):z.apply(Fe,We)})}function cf(X){for(var Q,oe,ce,pe=X.length,ke=S.relative[X[0].type],Ne=ke||S.relative[" "],Fe=ke?1:0,Te=Ul(function(et){return et===Q},Ne,!0),lt=Ul(function(et){return l.call(Q,et)>-1},Ne,!0),Ze=[function(et,ct,We){var Vt=!ke&&(We||ct!=P)||((Q=ct).nodeType?Te(et,ct,We):lt(et,ct,We));return Q=null,Vt}];Fe<pe;Fe++)if(oe=S.relative[X[Fe].type])Ze=[Ul(af(Ze),oe)];else{if(oe=S.filter[X[Fe].type].apply(null,X[Fe].matches),oe[me]){for(ce=++Fe;ce<pe&&!S.relative[X[ce].type];ce++);return lf(Fe>1&&af(Ze),Fe>1&&Zl(X.slice(0,Fe-1).concat({value:X[Fe-2].type===" "?"*":""})).replace(N,"$1"),oe,Fe<ce&&cf(X.slice(Fe,ce)),ce<pe&&cf(X=X.slice(ce)),ce<pe&&Zl(X))}Ze.push(oe)}return af(Ze)}function n4(X,Q){var oe=Q.length>0,ce=X.length>0,pe=function(ke,Ne,Fe,Te,lt){var Ze,et,ct,We=0,Vt="0",Gn=ke&&[],En=[],or=P,Lr=ke||ce&&S.find.TAG("*",lt),to=ae+=or==null?1:Math.random()||.1,Ln=Lr.length;for(lt&&(P=Ne==W||Ne||lt);Vt!==Ln&&(Ze=Lr[Vt])!=null;Vt++){if(ce&&Ze){for(et=0,!Ne&&Ze.ownerDocument!=W&&(Fi(Ze),Fe=!J);ct=X[et++];)if(ct(Ze,Ne||W,Fe)){z.call(Te,Ze);break}lt&&(ae=to)}oe&&((Ze=!ct&&Ze)&&We--,ke&&Gn.push(Ze))}if(We+=Vt,oe&&Vt!==We){for(et=0;ct=Q[et++];)ct(Gn,En,Ne,Fe);if(ke){if(We>0)for(;Vt--;)Gn[Vt]||En[Vt]||(En[Vt]=A.call(Te));En=Jl(En)}z.apply(Te,En),lt&&!ke&&En.length>0&&We+Q.length>1&&h.uniqueSort(Te)}return lt&&(ae=to,P=or),Gn};return oe?_r(pe):pe}function uf(X,Q){var oe,ce=[],pe=[],ke=st[X+" "];if(!ke){for(Q||(Q=ta(X)),oe=Q.length;oe--;)ke=cf(Q[oe]),ke[me]?ce.push(ke):pe.push(ke);ke=st(X,n4(pe,ce)),ke.selector=X}return ke}function jm(X,Q,oe,ce){var pe,ke,Ne,Fe,Te,lt=typeof X=="function"&&X,Ze=!ce&&ta(X=lt.selector||X);if(oe=oe||[],Ze.length===1){if(ke=Ze[0]=Ze[0].slice(0),ke.length>2&&(Ne=ke[0]).type==="ID"&&Q.nodeType===9&&J&&S.relative[ke[1].type]){if(Q=(S.find.ID(Ne.matches[0].replace(ii,si),Q)||[])[0],Q)lt&&(Q=Q.parentNode);else return oe;X=X.slice(ke.shift().value.length)}for(pe=Fr.needsContext.test(X)?0:ke.length;pe--&&(Ne=ke[pe],!S.relative[Fe=Ne.type]);)if((Te=S.find[Fe])&&(ce=Te(Ne.matches[0].replace(ii,si),sf.test(ke[0].type)&&of(Q.parentNode)||Q))){if(ke.splice(pe,1),X=ce.length&&Zl(ke),!X)return z.apply(oe,ce),oe;break}}return(lt||uf(X,Ze))(ce,Q,!J,oe,!Q||sf.test(X)&&of(Q.parentNode)||Q),oe}w.sortStable=me.split("").sort(an).join("")===me,Fi(),w.sortDetached=eo(function(X){return X.compareDocumentPosition(W.createElement("fieldset"))&1}),h.find=Nt,h.expr[":"]=h.expr.pseudos,h.unique=h.uniqueSort,Nt.compile=uf,Nt.select=jm,Nt.setDocument=Fi,Nt.tokenize=ta,Nt.escape=h.escapeSelector,Nt.getText=h.text,Nt.isXML=h.isXMLDoc,Nt.selectors=h.expr,Nt.support=h.support,Nt.uniqueSort=h.uniqueSort})();var G=function(m,S,P){for(var T=[],V=P!==void 0;(m=m[S])&&m.nodeType!==9;)if(m.nodeType===1){if(V&&h(m).is(P))break;T.push(m)}return T},$=function(m,S){for(var P=[];m;m=m.nextSibling)m.nodeType===1&&m!==S&&P.push(m);return P},Z=h.expr.match.needsContext,U=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function ee(m,S,P){return C(S)?h.grep(m,function(T,V){return!!S.call(T,V,T)!==P}):S.nodeType?h.grep(m,function(T){return T===S!==P}):typeof S!="string"?h.grep(m,function(T){return l.call(S,T)>-1!==P}):h.filter(S,m,P)}h.filter=function(m,S,P){var T=S[0];return P&&(m=":not("+m+")"),S.length===1&&T.nodeType===1?h.find.matchesSelector(T,m)?[T]:[]:h.find.matches(m,h.grep(S,function(V){return V.nodeType===1}))},h.fn.extend({find:function(m){var S,P,T=this.length,V=this;if(typeof m!="string")return this.pushStack(h(m).filter(function(){for(S=0;S<T;S++)if(h.contains(V[S],this))return!0}));for(P=this.pushStack([]),S=0;S<T;S++)h.find(m,V[S],P);return T>1?h.uniqueSort(P):P},filter:function(m){return this.pushStack(ee(this,m||[],!1))},not:function(m){return this.pushStack(ee(this,m||[],!0))},is:function(m){return!!ee(this,typeof m=="string"&&Z.test(m)?h(m):m||[],!1).length}});var se,ie=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,fe=h.fn.init=function(m,S,P){var T,V;if(!m)return this;if(P=P||se,typeof m=="string")if(m[0]==="<"&&m[m.length-1]===">"&&m.length>=3?T=[null,m,null]:T=ie.exec(m),T&&(T[1]||!S))if(T[1]){if(S=S instanceof h?S[0]:S,h.merge(this,h.parseHTML(T[1],S&&S.nodeType?S.ownerDocument||S:k,!0)),U.test(T[1])&&h.isPlainObject(S))for(T in S)C(this[T])?this[T](S[T]):this.attr(T,S[T]);return this}else return V=k.getElementById(T[2]),V&&(this[0]=V,this.length=1),this;else return!S||S.jquery?(S||P).find(m):this.constructor(S).find(m);else{if(m.nodeType)return this[0]=m,this.length=1,this;if(C(m))return P.ready!==void 0?P.ready(m):m(h)}return h.makeArray(m,this)};fe.prototype=h.fn,se=h(k);var Se=/^(?:parents|prev(?:Until|All))/,ve={children:!0,contents:!0,next:!0,prev:!0};h.fn.extend({has:function(m){var S=h(m,this),P=S.length;return this.filter(function(){for(var T=0;T<P;T++)if(h.contains(this,S[T]))return!0})},closest:function(m,S){var P,T=0,V=this.length,z=[],W=typeof m!="string"&&h(m);if(!Z.test(m)){for(;T<V;T++)for(P=this[T];P&&P!==S;P=P.parentNode)if(P.nodeType<11&&(W?W.index(P)>-1:P.nodeType===1&&h.find.matchesSelector(P,m))){z.push(P);break}}return this.pushStack(z.length>1?h.uniqueSort(z):z)},index:function(m){return m?typeof m=="string"?l.call(h(m),this[0]):l.call(this,m.jquery?m[0]:m):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(m,S){return this.pushStack(h.uniqueSort(h.merge(this.get(),h(m,S))))},addBack:function(m){return this.add(m==null?this.prevObject:this.prevObject.filter(m))}});function xe(m,S){for(;(m=m[S])&&m.nodeType!==1;);return m}h.each({parent:function(m){var S=m.parentNode;return S&&S.nodeType!==11?S:null},parents:function(m){return G(m,"parentNode")},parentsUntil:function(m,S,P){return G(m,"parentNode",P)},next:function(m){return xe(m,"nextSibling")},prev:function(m){return xe(m,"previousSibling")},nextAll:function(m){return G(m,"nextSibling")},prevAll:function(m){return G(m,"previousSibling")},nextUntil:function(m,S,P){return G(m,"nextSibling",P)},prevUntil:function(m,S,P){return G(m,"previousSibling",P)},siblings:function(m){return $((m.parentNode||{}).firstChild,m)},children:function(m){return $(m.firstChild)},contents:function(m){return m.contentDocument!=null&&i(m.contentDocument)?m.contentDocument:(I(m,"template")&&(m=m.content||m),h.merge([],m.childNodes))}},function(m,S){h.fn[m]=function(P,T){var V=h.map(this,S,P);return m.slice(-5)!=="Until"&&(T=P),T&&typeof T=="string"&&(V=h.filter(T,V)),this.length>1&&(ve[m]||h.uniqueSort(V),Se.test(m)&&V.reverse()),this.pushStack(V)}});var Y=/[^\x20\t\r\n\f]+/g;function le(m){var S={};return h.each(m.match(Y)||[],function(P,T){S[T]=!0}),S}h.Callbacks=function(m){m=typeof m=="string"?le(m):h.extend({},m);var S,P,T,V,z=[],W=[],K=-1,J=function(){for(V=V||m.once,T=S=!0;W.length;K=-1)for(P=W.shift();++K<z.length;)z[K].apply(P[0],P[1])===!1&&m.stopOnFalse&&(K=z.length,P=!1);m.memory||(P=!1),S=!1,V&&(P?z=[]:z="")},te={add:function(){return z&&(P&&!S&&(K=z.length-1,W.push(P)),function de(me){h.each(me,function(ae,Ce){C(Ce)?(!m.unique||!te.has(Ce))&&z.push(Ce):Ce&&Ce.length&&f(Ce)!=="string"&&de(Ce)})}(arguments),P&&!S&&J()),this},remove:function(){return h.each(arguments,function(de,me){for(var ae;(ae=h.inArray(me,z,ae))>-1;)z.splice(ae,1),ae<=K&&K--}),this},has:function(de){return de?h.inArray(de,z)>-1:z.length>0},empty:function(){return z&&(z=[]),this},disable:function(){return V=W=[],z=P="",this},disabled:function(){return!z},lock:function(){return V=W=[],!P&&!S&&(z=P=""),this},locked:function(){return!!V},fireWith:function(de,me){return V||(me=me||[],me=[de,me.slice?me.slice():me],W.push(me),S||J()),this},fire:function(){return te.fireWith(this,arguments),this},fired:function(){return!!T}};return te};function re(m){return m}function ge(m){throw m}function ne(m,S,P,T){var V;try{m&&C(V=m.promise)?V.call(m).done(S).fail(P):m&&C(V=m.then)?V.call(m,S,P):S.apply(void 0,[m].slice(T))}catch(z){P.apply(void 0,[z])}}h.extend({Deferred:function(m){var S=[["notify","progress",h.Callbacks("memory"),h.Callbacks("memory"),2],["resolve","done",h.Callbacks("once memory"),h.Callbacks("once memory"),0,"resolved"],["reject","fail",h.Callbacks("once memory"),h.Callbacks("once memory"),1,"rejected"]],P="pending",T={state:function(){return P},always:function(){return V.done(arguments).fail(arguments),this},catch:function(z){return T.then(null,z)},pipe:function(){var z=arguments;return h.Deferred(function(W){h.each(S,function(K,J){var te=C(z[J[4]])&&z[J[4]];V[J[1]](function(){var de=te&&te.apply(this,arguments);de&&C(de.promise)?de.promise().progress(W.notify).done(W.resolve).fail(W.reject):W[J[0]+"With"](this,te?[de]:arguments)})}),z=null}).promise()},then:function(z,W,K){var J=0;function te(de,me,ae,Ce){return function(){var Ke=this,bt=arguments,st=function(){var an,Tr;if(!(de<J)){if(an=ae.apply(Ke,bt),an===me.promise())throw new TypeError("Thenable self-resolution");Tr=an&&(typeof an=="object"||typeof an=="function")&&an.then,C(Tr)?Ce?Tr.call(an,te(J,me,re,Ce),te(J,me,ge,Ce)):(J++,Tr.call(an,te(J,me,re,Ce),te(J,me,ge,Ce),te(J,me,re,me.notifyWith))):(ae!==re&&(Ke=void 0,bt=[an]),(Ce||me.resolveWith)(Ke,bt))}},xn=Ce?st:function(){try{st()}catch(an){h.Deferred.exceptionHook&&h.Deferred.exceptionHook(an,xn.error),de+1>=J&&(ae!==ge&&(Ke=void 0,bt=[an]),me.rejectWith(Ke,bt))}};de?xn():(h.Deferred.getErrorHook?xn.error=h.Deferred.getErrorHook():h.Deferred.getStackHook&&(xn.error=h.Deferred.getStackHook()),t.setTimeout(xn))}}return h.Deferred(function(de){S[0][3].add(te(0,de,C(K)?K:re,de.notifyWith)),S[1][3].add(te(0,de,C(z)?z:re)),S[2][3].add(te(0,de,C(W)?W:ge))}).promise()},promise:function(z){return z!=null?h.extend(z,T):T}},V={};return h.each(S,function(z,W){var K=W[2],J=W[5];T[W[1]]=K.add,J&&K.add(function(){P=J},S[3-z][2].disable,S[3-z][3].disable,S[0][2].lock,S[0][3].lock),K.add(W[3].fire),V[W[0]]=function(){return V[W[0]+"With"](this===V?void 0:this,arguments),this},V[W[0]+"With"]=K.fireWith}),T.promise(V),m&&m.call(V,V),V},when:function(m){var S=arguments.length,P=S,T=Array(P),V=s.call(arguments),z=h.Deferred(),W=function(K){return function(J){T[K]=this,V[K]=arguments.length>1?s.call(arguments):J,--S||z.resolveWith(T,V)}};if(S<=1&&(ne(m,z.done(W(P)).resolve,z.reject,!S),z.state()==="pending"||C(V[P]&&V[P].then)))return z.then();for(;P--;)ne(V[P],W(P),z.reject);return z.promise()}});var he=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;h.Deferred.exceptionHook=function(m,S){t.console&&t.console.warn&&m&&he.test(m.name)&&t.console.warn("jQuery.Deferred exception: "+m.message,m.stack,S)},h.readyException=function(m){t.setTimeout(function(){throw m})};var be=h.Deferred();h.fn.ready=function(m){return be.then(m).catch(function(S){h.readyException(S)}),this},h.extend({isReady:!1,readyWait:1,ready:function(m){(m===!0?--h.readyWait:h.isReady)||(h.isReady=!0,!(m!==!0&&--h.readyWait>0)&&be.resolveWith(k,[h]))}}),h.ready.then=be.then;function ye(){k.removeEventListener("DOMContentLoaded",ye),t.removeEventListener("load",ye),h.ready()}k.readyState==="complete"||k.readyState!=="loading"&&!k.documentElement.doScroll?t.setTimeout(h.ready):(k.addEventListener("DOMContentLoaded",ye),t.addEventListener("load",ye));var q=function(m,S,P,T,V,z,W){var K=0,J=m.length,te=P==null;if(f(P)==="object"){V=!0;for(K in P)q(m,S,K,P[K],!0,z,W)}else if(T!==void 0&&(V=!0,C(T)||(W=!0),te&&(W?(S.call(m,T),S=null):(te=S,S=function(de,me,ae){return te.call(h(de),ae)})),S))for(;K<J;K++)S(m[K],P,W?T:T.call(m[K],K,S(m[K],P)));return V?m:te?S.call(m):J?S(m[0],P):z},Ie=/^-ms-/,Le=/-([a-z])/g;function Me(m,S){return S.toUpperCase()}function je(m){return m.replace(Ie,"ms-").replace(Le,Me)}var gt=function(m){return m.nodeType===1||m.nodeType===9||!+m.nodeType};function Ve(){this.expando=h.expando+Ve.uid++}Ve.uid=1,Ve.prototype={cache:function(m){var S=m[this.expando];return S||(S={},gt(m)&&(m.nodeType?m[this.expando]=S:Object.defineProperty(m,this.expando,{value:S,configurable:!0}))),S},set:function(m,S,P){var T,V=this.cache(m);if(typeof S=="string")V[je(S)]=P;else for(T in S)V[je(T)]=S[T];return V},get:function(m,S){return S===void 0?this.cache(m):m[this.expando]&&m[this.expando][je(S)]},access:function(m,S,P){return S===void 0||S&&typeof S=="string"&&P===void 0?this.get(m,S):(this.set(m,S,P),P!==void 0?P:S)},remove:function(m,S){var P,T=m[this.expando];if(T!==void 0){if(S!==void 0)for(Array.isArray(S)?S=S.map(je):(S=je(S),S=S in T?[S]:S.match(Y)||[]),P=S.length;P--;)delete T[S[P]];(S===void 0||h.isEmptyObject(T))&&(m.nodeType?m[this.expando]=void 0:delete m[this.expando])}},hasData:function(m){var S=m[this.expando];return S!==void 0&&!h.isEmptyObject(S)}};var _e=new Ve,Oe=new Ve,nt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,pt=/[A-Z]/g;function Qt(m){return m==="true"?!0:m==="false"?!1:m==="null"?null:m===+m+""?+m:nt.test(m)?JSON.parse(m):m}function Dn(m,S,P){var T;if(P===void 0&&m.nodeType===1)if(T="data-"+S.replace(pt,"-$&").toLowerCase(),P=m.getAttribute(T),typeof P=="string"){try{P=Qt(P)}catch{}Oe.set(m,S,P)}else P=void 0;return P}h.extend({hasData:function(m){return Oe.hasData(m)||_e.hasData(m)},data:function(m,S,P){return Oe.access(m,S,P)},removeData:function(m,S){Oe.remove(m,S)},_data:function(m,S,P){return _e.access(m,S,P)},_removeData:function(m,S){_e.remove(m,S)}}),h.fn.extend({data:function(m,S){var P,T,V,z=this[0],W=z&&z.attributes;if(m===void 0){if(this.length&&(V=Oe.get(z),z.nodeType===1&&!_e.get(z,"hasDataAttrs"))){for(P=W.length;P--;)W[P]&&(T=W[P].name,T.indexOf("data-")===0&&(T=je(T.slice(5)),Dn(z,T,V[T])));_e.set(z,"hasDataAttrs",!0)}return V}return typeof m=="object"?this.each(function(){Oe.set(this,m)}):q(this,function(K){var J;if(z&&K===void 0)return J=Oe.get(z,m),J!==void 0||(J=Dn(z,m),J!==void 0)?J:void 0;this.each(function(){Oe.set(this,m,K)})},null,S,arguments.length>1,null,!0)},removeData:function(m){return this.each(function(){Oe.remove(this,m)})}}),h.extend({queue:function(m,S,P){var T;if(m)return S=(S||"fx")+"queue",T=_e.get(m,S),P&&(!T||Array.isArray(P)?T=_e.access(m,S,h.makeArray(P)):T.push(P)),T||[]},dequeue:function(m,S){S=S||"fx";var P=h.queue(m,S),T=P.length,V=P.shift(),z=h._queueHooks(m,S),W=function(){h.dequeue(m,S)};V==="inprogress"&&(V=P.shift(),T--),V&&(S==="fx"&&P.unshift("inprogress"),delete z.stop,V.call(m,W,z)),!T&&z&&z.empty.fire()},_queueHooks:function(m,S){var P=S+"queueHooks";return _e.get(m,P)||_e.access(m,P,{empty:h.Callbacks("once memory").add(function(){_e.remove(m,[S+"queue",P])})})}}),h.fn.extend({queue:function(m,S){var P=2;return typeof m!="string"&&(S=m,m="fx",P--),arguments.length<P?h.queue(this[0],m):S===void 0?this:this.each(function(){var T=h.queue(this,m,S);h._queueHooks(this,m),m==="fx"&&T[0]!=="inprogress"&&h.dequeue(this,m)})},dequeue:function(m){return this.each(function(){h.dequeue(this,m)})},clearQueue:function(m){return this.queue(m||"fx",[])},promise:function(m,S){var P,T=1,V=h.Deferred(),z=this,W=this.length,K=function(){--T||V.resolveWith(z,[z])};for(typeof m!="string"&&(S=m,m=void 0),m=m||"fx";W--;)P=_e.get(z[W],m+"queueHooks"),P&&P.empty&&(T++,P.empty.add(K));return K(),V.promise(S)}});var vt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ft=new RegExp("^(?:([+-])=|)("+vt+")([a-z%]*)$","i"),_t=["Top","Right","Bottom","Left"],Ot=k.documentElement,dn=function(m){return h.contains(m.ownerDocument,m)},mn={composed:!0};Ot.getRootNode&&(dn=function(m){return h.contains(m.ownerDocument,m)||m.getRootNode(mn)===m.ownerDocument});var on=function(m,S){return m=S||m,m.style.display==="none"||m.style.display===""&&dn(m)&&h.css(m,"display")==="none"};function ir(m,S,P,T){var V,z,W=20,K=T?function(){return T.cur()}:function(){return h.css(m,S,"")},J=K(),te=P&&P[3]||(h.cssNumber[S]?"":"px"),de=m.nodeType&&(h.cssNumber[S]||te!=="px"&&+J)&&ft.exec(h.css(m,S));if(de&&de[3]!==te){for(J=J/2,te=te||de[3],de=+J||1;W--;)h.style(m,S,de+te),(1-z)*(1-(z=K()/J||.5))<=0&&(W=0),de=de/z;de=de*2,h.style(m,S,de+te),P=P||[]}return P&&(de=+de||+J||0,V=P[1]?de+(P[1]+1)*P[2]:+P[2],T&&(T.unit=te,T.start=de,T.end=V)),V}var vr={};function xr(m){var S,P=m.ownerDocument,T=m.nodeName,V=vr[T];return V||(S=P.body.appendChild(P.createElement(T)),V=h.css(S,"display"),S.parentNode.removeChild(S),V==="none"&&(V="block"),vr[T]=V,V)}function bn(m,S){for(var P,T,V=[],z=0,W=m.length;z<W;z++)T=m[z],T.style&&(P=T.style.display,S?(P==="none"&&(V[z]=_e.get(T,"display")||null,V[z]||(T.style.display="")),T.style.display===""&&on(T)&&(V[z]=xr(T))):P!=="none"&&(V[z]="none",_e.set(T,"display",P)));for(z=0;z<W;z++)V[z]!=null&&(m[z].style.display=V[z]);return m}h.fn.extend({show:function(){return bn(this,!0)},hide:function(){return bn(this)},toggle:function(m){return typeof m=="boolean"?m?this.show():this.hide():this.each(function(){on(this)?h(this).show():h(this).hide()})}});var zn=/^(?:checkbox|radio)$/i,Ee=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,De=/^$|^module$|\/(?:java|ecma)script/i;(function(){var m=k.createDocumentFragment(),S=m.appendChild(k.createElement("div")),P=k.createElement("input");P.setAttribute("type","radio"),P.setAttribute("checked","checked"),P.setAttribute("name","t"),S.appendChild(P),w.checkClone=S.cloneNode(!0).cloneNode(!0).lastChild.checked,S.innerHTML="<textarea>x</textarea>",w.noCloneChecked=!!S.cloneNode(!0).lastChild.defaultValue,S.innerHTML="<option></option>",w.option=!!S.lastChild})();var Pe={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Pe.tbody=Pe.tfoot=Pe.colgroup=Pe.caption=Pe.thead,Pe.th=Pe.td,w.option||(Pe.optgroup=Pe.option=[1,"<select multiple='multiple'>","</select>"]);function Qe(m,S){var P;return typeof m.getElementsByTagName<"u"?P=m.getElementsByTagName(S||"*"):typeof m.querySelectorAll<"u"?P=m.querySelectorAll(S||"*"):P=[],S===void 0||S&&I(m,S)?h.merge([m],P):P}function Ht(m,S){for(var P=0,T=m.length;P<T;P++)_e.set(m[P],"globalEval",!S||_e.get(S[P],"globalEval"))}var vn=/<|&#?\w+;/;function Yt(m,S,P,T,V){for(var z,W,K,J,te,de,me=S.createDocumentFragment(),ae=[],Ce=0,Ke=m.length;Ce<Ke;Ce++)if(z=m[Ce],z||z===0)if(f(z)==="object")h.merge(ae,z.nodeType?[z]:z);else if(!vn.test(z))ae.push(S.createTextNode(z));else{for(W=W||me.appendChild(S.createElement("div")),K=(Ee.exec(z)||["",""])[1].toLowerCase(),J=Pe[K]||Pe._default,W.innerHTML=J[1]+h.htmlPrefilter(z)+J[2],de=J[0];de--;)W=W.lastChild;h.merge(ae,W.childNodes),W=me.firstChild,W.textContent=""}for(me.textContent="",Ce=0;z=ae[Ce++];){if(T&&h.inArray(z,T)>-1){V&&V.push(z);continue}if(te=dn(z),W=Qe(me.appendChild(z),"script"),te&&Ht(W),P)for(de=0;z=W[de++];)De.test(z.type||"")&&P.push(z)}return me}var kt=/^([^.]*)(?:\.(.+)|)/;function Pt(){return!0}function Fn(){return!1}function Ni(m,S,P,T,V,z){var W,K;if(typeof S=="object"){typeof P!="string"&&(T=T||P,P=void 0);for(K in S)Ni(m,K,P,T,S[K],z);return m}if(T==null&&V==null?(V=P,T=P=void 0):V==null&&(typeof P=="string"?(V=T,T=void 0):(V=T,T=P,P=void 0)),V===!1)V=Fn;else if(!V)return m;return z===1&&(W=V,V=function(J){return h().off(J),W.apply(this,arguments)},V.guid=W.guid||(W.guid=h.guid++)),m.each(function(){h.event.add(this,S,V,T,P)})}h.event={global:{},add:function(m,S,P,T,V){var z,W,K,J,te,de,me,ae,Ce,Ke,bt,st=_e.get(m);if(gt(m))for(P.handler&&(z=P,P=z.handler,V=z.selector),V&&h.find.matchesSelector(Ot,V),P.guid||(P.guid=h.guid++),(J=st.events)||(J=st.events=Object.create(null)),(W=st.handle)||(W=st.handle=function(xn){return typeof h<"u"&&h.event.triggered!==xn.type?h.event.dispatch.apply(m,arguments):void 0}),S=(S||"").match(Y)||[""],te=S.length;te--;)K=kt.exec(S[te])||[],Ce=bt=K[1],Ke=(K[2]||"").split(".").sort(),Ce&&(me=h.event.special[Ce]||{},Ce=(V?me.delegateType:me.bindType)||Ce,me=h.event.special[Ce]||{},de=h.extend({type:Ce,origType:bt,data:T,handler:P,guid:P.guid,selector:V,needsContext:V&&h.expr.match.needsContext.test(V),namespace:Ke.join(".")},z),(ae=J[Ce])||(ae=J[Ce]=[],ae.delegateCount=0,(!me.setup||me.setup.call(m,T,Ke,W)===!1)&&m.addEventListener&&m.addEventListener(Ce,W)),me.add&&(me.add.call(m,de),de.handler.guid||(de.handler.guid=P.guid)),V?ae.splice(ae.delegateCount++,0,de):ae.push(de),h.event.global[Ce]=!0)},remove:function(m,S,P,T,V){var z,W,K,J,te,de,me,ae,Ce,Ke,bt,st=_e.hasData(m)&&_e.get(m);if(!(!st||!(J=st.events))){for(S=(S||"").match(Y)||[""],te=S.length;te--;){if(K=kt.exec(S[te])||[],Ce=bt=K[1],Ke=(K[2]||"").split(".").sort(),!Ce){for(Ce in J)h.event.remove(m,Ce+S[te],P,T,!0);continue}for(me=h.event.special[Ce]||{},Ce=(T?me.delegateType:me.bindType)||Ce,ae=J[Ce]||[],K=K[2]&&new RegExp("(^|\\.)"+Ke.join("\\.(?:.*\\.|)")+"(\\.|$)"),W=z=ae.length;z--;)de=ae[z],(V||bt===de.origType)&&(!P||P.guid===de.guid)&&(!K||K.test(de.namespace))&&(!T||T===de.selector||T==="**"&&de.selector)&&(ae.splice(z,1),de.selector&&ae.delegateCount--,me.remove&&me.remove.call(m,de));W&&!ae.length&&((!me.teardown||me.teardown.call(m,Ke,st.handle)===!1)&&h.removeEvent(m,Ce,st.handle),delete J[Ce])}h.isEmptyObject(J)&&_e.remove(m,"handle events")}},dispatch:function(m){var S,P,T,V,z,W,K=new Array(arguments.length),J=h.event.fix(m),te=(_e.get(this,"events")||Object.create(null))[J.type]||[],de=h.event.special[J.type]||{};for(K[0]=J,S=1;S<arguments.length;S++)K[S]=arguments[S];if(J.delegateTarget=this,!(de.preDispatch&&de.preDispatch.call(this,J)===!1)){for(W=h.event.handlers.call(this,J,te),S=0;(V=W[S++])&&!J.isPropagationStopped();)for(J.currentTarget=V.elem,P=0;(z=V.handlers[P++])&&!J.isImmediatePropagationStopped();)(!J.rnamespace||z.namespace===!1||J.rnamespace.test(z.namespace))&&(J.handleObj=z,J.data=z.data,T=((h.event.special[z.origType]||{}).handle||z.handler).apply(V.elem,K),T!==void 0&&(J.result=T)===!1&&(J.preventDefault(),J.stopPropagation()));return de.postDispatch&&de.postDispatch.call(this,J),J.result}},handlers:function(m,S){var P,T,V,z,W,K=[],J=S.delegateCount,te=m.target;if(J&&te.nodeType&&!(m.type==="click"&&m.button>=1)){for(;te!==this;te=te.parentNode||this)if(te.nodeType===1&&!(m.type==="click"&&te.disabled===!0)){for(z=[],W={},P=0;P<J;P++)T=S[P],V=T.selector+" ",W[V]===void 0&&(W[V]=T.needsContext?h(V,this).index(te)>-1:h.find(V,this,null,[te]).length),W[V]&&z.push(T);z.length&&K.push({elem:te,handlers:z})}}return te=this,J<S.length&&K.push({elem:te,handlers:S.slice(J)}),K},addProp:function(m,S){Object.defineProperty(h.Event.prototype,m,{enumerable:!0,configurable:!0,get:C(S)?function(){if(this.originalEvent)return S(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[m]},set:function(P){Object.defineProperty(this,m,{enumerable:!0,configurable:!0,writable:!0,value:P})}})},fix:function(m){return m[h.expando]?m:new h.Event(m)},special:{load:{noBubble:!0},click:{setup:function(m){var S=this||m;return zn.test(S.type)&&S.click&&I(S,"input")&&ri(S,"click",!0),!1},trigger:function(m){var S=this||m;return zn.test(S.type)&&S.click&&I(S,"input")&&ri(S,"click"),!0},_default:function(m){var S=m.target;return zn.test(S.type)&&S.click&&I(S,"input")&&_e.get(S,"click")||I(S,"a")}},beforeunload:{postDispatch:function(m){m.result!==void 0&&m.originalEvent&&(m.originalEvent.returnValue=m.result)}}}};function ri(m,S,P){if(!P){_e.get(m,S)===void 0&&h.event.add(m,S,Pt);return}_e.set(m,S,!1),h.event.add(m,S,{namespace:!1,handler:function(T){var V,z=_e.get(this,S);if(T.isTrigger&1&&this[S]){if(z)(h.event.special[S]||{}).delegateType&&T.stopPropagation();else if(z=s.call(arguments),_e.set(this,S,z),this[S](),V=_e.get(this,S),_e.set(this,S,!1),z!==V)return T.stopImmediatePropagation(),T.preventDefault(),V}else z&&(_e.set(this,S,h.event.trigger(z[0],z.slice(1),this)),T.stopPropagation(),T.isImmediatePropagationStopped=Pt)}})}h.removeEvent=function(m,S,P){m.removeEventListener&&m.removeEventListener(S,P)},h.Event=function(m,S){if(!(this instanceof h.Event))return new h.Event(m,S);m&&m.type?(this.originalEvent=m,this.type=m.type,this.isDefaultPrevented=m.defaultPrevented||m.defaultPrevented===void 0&&m.returnValue===!1?Pt:Fn,this.target=m.target&&m.target.nodeType===3?m.target.parentNode:m.target,this.currentTarget=m.currentTarget,this.relatedTarget=m.relatedTarget):this.type=m,S&&h.extend(this,S),this.timeStamp=m&&m.timeStamp||Date.now(),this[h.expando]=!0},h.Event.prototype={constructor:h.Event,isDefaultPrevented:Fn,isPropagationStopped:Fn,isImmediatePropagationStopped:Fn,isSimulated:!1,preventDefault:function(){var m=this.originalEvent;this.isDefaultPrevented=Pt,m&&!this.isSimulated&&m.preventDefault()},stopPropagation:function(){var m=this.originalEvent;this.isPropagationStopped=Pt,m&&!this.isSimulated&&m.stopPropagation()},stopImmediatePropagation:function(){var m=this.originalEvent;this.isImmediatePropagationStopped=Pt,m&&!this.isSimulated&&m.stopImmediatePropagation(),this.stopPropagation()}},h.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},h.event.addProp),h.each({focus:"focusin",blur:"focusout"},function(m,S){function P(T){if(k.documentMode){var V=_e.get(this,"handle"),z=h.event.fix(T);z.type=T.type==="focusin"?"focus":"blur",z.isSimulated=!0,V(T),z.target===z.currentTarget&&V(z)}else h.event.simulate(S,T.target,h.event.fix(T))}h.event.special[m]={setup:function(){var T;if(ri(this,m,!0),k.documentMode)T=_e.get(this,S),T||this.addEventListener(S,P),_e.set(this,S,(T||0)+1);else return!1},trigger:function(){return ri(this,m),!0},teardown:function(){var T;if(k.documentMode)T=_e.get(this,S)-1,T?_e.set(this,S,T):(this.removeEventListener(S,P),_e.remove(this,S));else return!1},_default:function(T){return _e.get(T.target,m)},delegateType:S},h.event.special[S]={setup:function(){var T=this.ownerDocument||this.document||this,V=k.documentMode?this:T,z=_e.get(V,S);z||(k.documentMode?this.addEventListener(S,P):T.addEventListener(m,P,!0)),_e.set(V,S,(z||0)+1)},teardown:function(){var T=this.ownerDocument||this.document||this,V=k.documentMode?this:T,z=_e.get(V,S)-1;z?_e.set(V,S,z):(k.documentMode?this.removeEventListener(S,P):T.removeEventListener(m,P,!0),_e.remove(V,S))}}}),h.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(m,S){h.event.special[m]={delegateType:S,bindType:S,handle:function(P){var T,V=this,z=P.relatedTarget,W=P.handleObj;return(!z||z!==V&&!h.contains(V,z))&&(P.type=W.origType,T=W.handler.apply(this,arguments),P.type=S),T}}}),h.fn.extend({on:function(m,S,P,T){return Ni(this,m,S,P,T)},one:function(m,S,P,T){return Ni(this,m,S,P,T,1)},off:function(m,S,P){var T,V;if(m&&m.preventDefault&&m.handleObj)return T=m.handleObj,h(m.delegateTarget).off(T.namespace?T.origType+"."+T.namespace:T.origType,T.selector,T.handler),this;if(typeof m=="object"){for(V in m)this.off(V,S,m[V]);return this}return(S===!1||typeof S=="function")&&(P=S,S=void 0),P===!1&&(P=Fn),this.each(function(){h.event.remove(this,m,P,S)})}});var ue=/<script|<style|<link/i,He=/checked\s*(?:[^=]|=\s*.checked.)/i,Re=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function mt(m,S){return I(m,"table")&&I(S.nodeType!==11?S:S.firstChild,"tr")&&h(m).children("tbody")[0]||m}function Lt(m){return m.type=(m.getAttribute("type")!==null)+"/"+m.type,m}function en(m){return(m.type||"").slice(0,5)==="true/"?m.type=m.type.slice(5):m.removeAttribute("type"),m}function Un(m,S){var P,T,V,z,W,K,J;if(S.nodeType===1){if(_e.hasData(m)&&(z=_e.get(m),J=z.events,J)){_e.remove(S,"handle events");for(V in J)for(P=0,T=J[V].length;P<T;P++)h.event.add(S,V,J[V][P])}Oe.hasData(m)&&(W=Oe.access(m),K=h.extend({},W),Oe.set(S,K))}}function Jn(m,S){var P=S.nodeName.toLowerCase();P==="input"&&zn.test(m.type)?S.checked=m.checked:(P==="input"||P==="textarea")&&(S.defaultValue=m.defaultValue)}function Ti(m,S,P,T){S=o(S);var V,z,W,K,J,te,de=0,me=m.length,ae=me-1,Ce=S[0],Ke=C(Ce);if(Ke||me>1&&typeof Ce=="string"&&!w.checkClone&&He.test(Ce))return m.each(function(bt){var st=m.eq(bt);Ke&&(S[0]=Ce.call(this,bt,st.html())),Ti(st,S,P,T)});if(me&&(V=Yt(S,m[0].ownerDocument,!1,m,T),z=V.firstChild,V.childNodes.length===1&&(V=z),z||T)){for(W=h.map(Qe(V,"script"),Lt),K=W.length;de<me;de++)J=V,de!==ae&&(J=h.clone(J,!0,!0),K&&h.merge(W,Qe(J,"script"))),P.call(m[de],J,de);if(K)for(te=W[W.length-1].ownerDocument,h.map(W,en),de=0;de<K;de++)J=W[de],De.test(J.type||"")&&!_e.access(J,"globalEval")&&h.contains(te,J)&&(J.src&&(J.type||"").toLowerCase()!=="module"?h._evalUrl&&!J.noModule&&h._evalUrl(J.src,{nonce:J.nonce||J.getAttribute("nonce")},te):v(J.textContent.replace(Re,""),J,te))}return m}function Ll(m,S,P){for(var T,V=S?h.filter(S,m):m,z=0;(T=V[z])!=null;z++)!P&&T.nodeType===1&&h.cleanData(Qe(T)),T.parentNode&&(P&&dn(T)&&Ht(Qe(T,"script")),T.parentNode.removeChild(T));return m}h.extend({htmlPrefilter:function(m){return m},clone:function(m,S,P){var T,V,z,W,K=m.cloneNode(!0),J=dn(m);if(!w.noCloneChecked&&(m.nodeType===1||m.nodeType===11)&&!h.isXMLDoc(m))for(W=Qe(K),z=Qe(m),T=0,V=z.length;T<V;T++)Jn(z[T],W[T]);if(S)if(P)for(z=z||Qe(m),W=W||Qe(K),T=0,V=z.length;T<V;T++)Un(z[T],W[T]);else Un(m,K);return W=Qe(K,"script"),W.length>0&&Ht(W,!J&&Qe(m,"script")),K},cleanData:function(m){for(var S,P,T,V=h.event.special,z=0;(P=m[z])!==void 0;z++)if(gt(P)){if(S=P[_e.expando]){if(S.events)for(T in S.events)V[T]?h.event.remove(P,T):h.removeEvent(P,T,S.handle);P[_e.expando]=void 0}P[Oe.expando]&&(P[Oe.expando]=void 0)}}}),h.fn.extend({detach:function(m){return Ll(this,m,!0)},remove:function(m){return Ll(this,m)},text:function(m){return q(this,function(S){return S===void 0?h.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=S)})},null,m,arguments.length)},append:function(){return Ti(this,arguments,function(m){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var S=mt(this,m);S.appendChild(m)}})},prepend:function(){return Ti(this,arguments,function(m){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var S=mt(this,m);S.insertBefore(m,S.firstChild)}})},before:function(){return Ti(this,arguments,function(m){this.parentNode&&this.parentNode.insertBefore(m,this)})},after:function(){return Ti(this,arguments,function(m){this.parentNode&&this.parentNode.insertBefore(m,this.nextSibling)})},empty:function(){for(var m,S=0;(m=this[S])!=null;S++)m.nodeType===1&&(h.cleanData(Qe(m,!1)),m.textContent="");return this},clone:function(m,S){return m=m??!1,S=S??m,this.map(function(){return h.clone(this,m,S)})},html:function(m){return q(this,function(S){var P=this[0]||{},T=0,V=this.length;if(S===void 0&&P.nodeType===1)return P.innerHTML;if(typeof S=="string"&&!ue.test(S)&&!Pe[(Ee.exec(S)||["",""])[1].toLowerCase()]){S=h.htmlPrefilter(S);try{for(;T<V;T++)P=this[T]||{},P.nodeType===1&&(h.cleanData(Qe(P,!1)),P.innerHTML=S);P=0}catch{}}P&&this.empty().append(S)},null,m,arguments.length)},replaceWith:function(){var m=[];return Ti(this,arguments,function(S){var P=this.parentNode;h.inArray(this,m)<0&&(h.cleanData(Qe(this)),P&&P.replaceChild(S,this))},m)}}),h.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(m,S){h.fn[m]=function(P){for(var T,V=[],z=h(P),W=z.length-1,K=0;K<=W;K++)T=K===W?this:this.clone(!0),h(z[K])[S](T),a.apply(V,T.get());return this.pushStack(V)}});var Zo=new RegExp("^("+vt+")(?!px)[a-z%]+$","i"),Uo=/^--/,Js=function(m){var S=m.ownerDocument.defaultView;return(!S||!S.opener)&&(S=t),S.getComputedStyle(m)},jl=function(m,S,P){var T,V,z={};for(V in S)z[V]=m.style[V],m.style[V]=S[V];T=P.call(m);for(V in S)m.style[V]=z[V];return T},Bl=new RegExp(_t.join("|"),"i");(function(){function m(){if(te){J.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",te.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Ot.appendChild(J).appendChild(te);var de=t.getComputedStyle(te);P=de.top!=="1%",K=S(de.marginLeft)===12,te.style.right="60%",z=S(de.right)===36,T=S(de.width)===36,te.style.position="absolute",V=S(te.offsetWidth/3)===12,Ot.removeChild(J),te=null}}function S(de){return Math.round(parseFloat(de))}var P,T,V,z,W,K,J=k.createElement("div"),te=k.createElement("div");te.style&&(te.style.backgroundClip="content-box",te.cloneNode(!0).style.backgroundClip="",w.clearCloneStyle=te.style.backgroundClip==="content-box",h.extend(w,{boxSizingReliable:function(){return m(),T},pixelBoxStyles:function(){return m(),z},pixelPosition:function(){return m(),P},reliableMarginLeft:function(){return m(),K},scrollboxSize:function(){return m(),V},reliableTrDimensions:function(){var de,me,ae,Ce;return W==null&&(de=k.createElement("table"),me=k.createElement("tr"),ae=k.createElement("div"),de.style.cssText="position:absolute;left:-11111px;border-collapse:separate",me.style.cssText="box-sizing:content-box;border:1px solid",me.style.height="1px",ae.style.height="9px",ae.style.display="block",Ot.appendChild(de).appendChild(me).appendChild(ae),Ce=t.getComputedStyle(me),W=parseInt(Ce.height,10)+parseInt(Ce.borderTopWidth,10)+parseInt(Ce.borderBottomWidth,10)===me.offsetHeight,Ot.removeChild(de)),W}}))})();function os(m,S,P){var T,V,z,W,K=Uo.test(S),J=m.style;return P=P||Js(m),P&&(W=P.getPropertyValue(S)||P[S],K&&W&&(W=W.replace(N,"$1")||void 0),W===""&&!dn(m)&&(W=h.style(m,S)),!w.pixelBoxStyles()&&Zo.test(W)&&Bl.test(S)&&(T=J.width,V=J.minWidth,z=J.maxWidth,J.minWidth=J.maxWidth=J.width=W,W=P.width,J.width=T,J.minWidth=V,J.maxWidth=z)),W!==void 0?W+"":W}function Vl(m,S){return{get:function(){if(m()){delete this.get;return}return(this.get=S).apply(this,arguments)}}}var zl=["Webkit","Moz","ms"],Hl=k.createElement("div").style,Gl={};function $d(m){for(var S=m[0].toUpperCase()+m.slice(1),P=zl.length;P--;)if(m=zl[P]+S,m in Hl)return m}function qs(m){var S=h.cssProps[m]||Gl[m];return S||(m in Hl?m:Gl[m]=$d(m)||m)}var Xd=/^(none|table(?!-c[ea]).+)/,Yd={position:"absolute",visibility:"hidden",display:"block"},Wl={letterSpacing:"0",fontWeight:"400"};function Ks(m,S,P){var T=ft.exec(S);return T?Math.max(0,T[2]-(P||0))+(T[3]||"px"):S}function Zd(m,S,P,T,V,z){var W=S==="width"?1:0,K=0,J=0,te=0;if(P===(T?"border":"content"))return 0;for(;W<4;W+=2)P==="margin"&&(te+=h.css(m,P+_t[W],!0,V)),T?(P==="content"&&(J-=h.css(m,"padding"+_t[W],!0,V)),P!=="margin"&&(J-=h.css(m,"border"+_t[W]+"Width",!0,V))):(J+=h.css(m,"padding"+_t[W],!0,V),P!=="padding"?J+=h.css(m,"border"+_t[W]+"Width",!0,V):K+=h.css(m,"border"+_t[W]+"Width",!0,V));return!T&&z>=0&&(J+=Math.max(0,Math.ceil(m["offset"+S[0].toUpperCase()+S.slice(1)]-z-J-K-.5))||0),J+te}function Cm(m,S,P){var T=Js(m),V=!w.boxSizingReliable()||P,z=V&&h.css(m,"boxSizing",!1,T)==="border-box",W=z,K=os(m,S,T),J="offset"+S[0].toUpperCase()+S.slice(1);if(Zo.test(K)){if(!P)return K;K="auto"}return(!w.boxSizingReliable()&&z||!w.reliableTrDimensions()&&I(m,"tr")||K==="auto"||!parseFloat(K)&&h.css(m,"display",!1,T)==="inline")&&m.getClientRects().length&&(z=h.css(m,"boxSizing",!1,T)==="border-box",W=J in m,W&&(K=m[J])),K=parseFloat(K)||0,K+Zd(m,S,P||(z?"border":"content"),W,T,K)+"px"}h.extend({cssHooks:{opacity:{get:function(m,S){if(S){var P=os(m,"opacity");return P===""?"1":P}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(m,S,P,T){if(!(!m||m.nodeType===3||m.nodeType===8||!m.style)){var V,z,W,K=je(S),J=Uo.test(S),te=m.style;if(J||(S=qs(K)),W=h.cssHooks[S]||h.cssHooks[K],P!==void 0){if(z=typeof P,z==="string"&&(V=ft.exec(P))&&V[1]&&(P=ir(m,S,V),z="number"),P==null||P!==P)return;z==="number"&&!J&&(P+=V&&V[3]||(h.cssNumber[K]?"":"px")),!w.clearCloneStyle&&P===""&&S.indexOf("background")===0&&(te[S]="inherit"),(!W||!("set"in W)||(P=W.set(m,P,T))!==void 0)&&(J?te.setProperty(S,P):te[S]=P)}else return W&&"get"in W&&(V=W.get(m,!1,T))!==void 0?V:te[S]}},css:function(m,S,P,T){var V,z,W,K=je(S),J=Uo.test(S);return J||(S=qs(K)),W=h.cssHooks[S]||h.cssHooks[K],W&&"get"in W&&(V=W.get(m,!0,P)),V===void 0&&(V=os(m,S,T)),V==="normal"&&S in Wl&&(V=Wl[S]),P===""||P?(z=parseFloat(V),P===!0||isFinite(z)?z||0:V):V}}),h.each(["height","width"],function(m,S){h.cssHooks[S]={get:function(P,T,V){if(T)return Xd.test(h.css(P,"display"))&&(!P.getClientRects().length||!P.getBoundingClientRect().width)?jl(P,Yd,function(){return Cm(P,S,V)}):Cm(P,S,V)},set:function(P,T,V){var z,W=Js(P),K=!w.scrollboxSize()&&W.position==="absolute",J=K||V,te=J&&h.css(P,"boxSizing",!1,W)==="border-box",de=V?Zd(P,S,V,te,W):0;return te&&K&&(de-=Math.ceil(P["offset"+S[0].toUpperCase()+S.slice(1)]-parseFloat(W[S])-Zd(P,S,"border",!1,W)-.5)),de&&(z=ft.exec(T))&&(z[3]||"px")!=="px"&&(P.style[S]=T,T=h.css(P,S)),Ks(P,T,de)}}}),h.cssHooks.marginLeft=Vl(w.reliableMarginLeft,function(m,S){if(S)return(parseFloat(os(m,"marginLeft"))||m.getBoundingClientRect().left-jl(m,{marginLeft:0},function(){return m.getBoundingClientRect().left}))+"px"}),h.each({margin:"",padding:"",border:"Width"},function(m,S){h.cssHooks[m+S]={expand:function(P){for(var T=0,V={},z=typeof P=="string"?P.split(" "):[P];T<4;T++)V[m+_t[T]+S]=z[T]||z[T-2]||z[0];return V}},m!=="margin"&&(h.cssHooks[m+S].set=Ks)}),h.fn.extend({css:function(m,S){return q(this,function(P,T,V){var z,W,K={},J=0;if(Array.isArray(T)){for(z=Js(P),W=T.length;J<W;J++)K[T[J]]=h.css(P,T[J],!1,z);return K}return V!==void 0?h.style(P,T,V):h.css(P,T)},m,S,arguments.length>1)}});function Hn(m,S,P,T,V){return new Hn.prototype.init(m,S,P,T,V)}h.Tween=Hn,Hn.prototype={constructor:Hn,init:function(m,S,P,T,V,z){this.elem=m,this.prop=P,this.easing=V||h.easing._default,this.options=S,this.start=this.now=this.cur(),this.end=T,this.unit=z||(h.cssNumber[P]?"":"px")},cur:function(){var m=Hn.propHooks[this.prop];return m&&m.get?m.get(this):Hn.propHooks._default.get(this)},run:function(m){var S,P=Hn.propHooks[this.prop];return this.options.duration?this.pos=S=h.easing[this.easing](m,this.options.duration*m,0,1,this.options.duration):this.pos=S=m,this.now=(this.end-this.start)*S+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),P&&P.set?P.set(this):Hn.propHooks._default.set(this),this}},Hn.prototype.init.prototype=Hn.prototype,Hn.propHooks={_default:{get:function(m){var S;return m.elem.nodeType!==1||m.elem[m.prop]!=null&&m.elem.style[m.prop]==null?m.elem[m.prop]:(S=h.css(m.elem,m.prop,""),!S||S==="auto"?0:S)},set:function(m){h.fx.step[m.prop]?h.fx.step[m.prop](m):m.elem.nodeType===1&&(h.cssHooks[m.prop]||m.elem.style[qs(m.prop)]!=null)?h.style(m.elem,m.prop,m.now+m.unit):m.elem[m.prop]=m.now}}},Hn.propHooks.scrollTop=Hn.propHooks.scrollLeft={set:function(m){m.elem.nodeType&&m.elem.parentNode&&(m.elem[m.prop]=m.now)}},h.easing={linear:function(m){return m},swing:function(m){return .5-Math.cos(m*Math.PI)/2},_default:"swing"},h.fx=Hn.prototype.init,h.fx.step={};var Qs,$l,kS=/^(?:toggle|show|hide)$/,AS=/queueHooks$/;function Ud(){$l&&(k.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(Ud):t.setTimeout(Ud,h.fx.interval),h.fx.tick())}function Sm(){return t.setTimeout(function(){Qs=void 0}),Qs=Date.now()}function Xl(m,S){var P,T=0,V={height:m};for(S=S?1:0;T<4;T+=2-S)P=_t[T],V["margin"+P]=V["padding"+P]=m;return S&&(V.opacity=V.width=m),V}function Em(m,S,P){for(var T,V=(yr.tweeners[S]||[]).concat(yr.tweeners["*"]),z=0,W=V.length;z<W;z++)if(T=V[z].call(P,S,m))return T}function MS(m,S,P){var T,V,z,W,K,J,te,de,me="width"in S||"height"in S,ae=this,Ce={},Ke=m.style,bt=m.nodeType&&on(m),st=_e.get(m,"fxshow");P.queue||(W=h._queueHooks(m,"fx"),W.unqueued==null&&(W.unqueued=0,K=W.empty.fire,W.empty.fire=function(){W.unqueued||K()}),W.unqueued++,ae.always(function(){ae.always(function(){W.unqueued--,h.queue(m,"fx").length||W.empty.fire()})}));for(T in S)if(V=S[T],kS.test(V)){if(delete S[T],z=z||V==="toggle",V===(bt?"hide":"show"))if(V==="show"&&st&&st[T]!==void 0)bt=!0;else continue;Ce[T]=st&&st[T]||h.style(m,T)}if(J=!h.isEmptyObject(S),!(!J&&h.isEmptyObject(Ce))){me&&m.nodeType===1&&(P.overflow=[Ke.overflow,Ke.overflowX,Ke.overflowY],te=st&&st.display,te==null&&(te=_e.get(m,"display")),de=h.css(m,"display"),de==="none"&&(te?de=te:(bn([m],!0),te=m.style.display||te,de=h.css(m,"display"),bn([m]))),(de==="inline"||de==="inline-block"&&te!=null)&&h.css(m,"float")==="none"&&(J||(ae.done(function(){Ke.display=te}),te==null&&(de=Ke.display,te=de==="none"?"":de)),Ke.display="inline-block")),P.overflow&&(Ke.overflow="hidden",ae.always(function(){Ke.overflow=P.overflow[0],Ke.overflowX=P.overflow[1],Ke.overflowY=P.overflow[2]})),J=!1;for(T in Ce)J||(st?"hidden"in st&&(bt=st.hidden):st=_e.access(m,"fxshow",{display:te}),z&&(st.hidden=!bt),bt&&bn([m],!0),ae.done(function(){bt||bn([m]),_e.remove(m,"fxshow");for(T in Ce)h.style(m,T,Ce[T])})),J=Em(bt?st[T]:0,T,ae),T in st||(st[T]=J.start,bt&&(J.end=J.start,J.start=0))}}function RS(m,S){var P,T,V,z,W;for(P in m)if(T=je(P),V=S[T],z=m[P],Array.isArray(z)&&(V=z[1],z=m[P]=z[0]),P!==T&&(m[T]=z,delete m[P]),W=h.cssHooks[T],W&&"expand"in W){z=W.expand(z),delete m[T];for(P in z)P in m||(m[P]=z[P],S[P]=V)}else S[T]=V}function yr(m,S,P){var T,V,z=0,W=yr.prefilters.length,K=h.Deferred().always(function(){delete J.elem}),J=function(){if(V)return!1;for(var me=Qs||Sm(),ae=Math.max(0,te.startTime+te.duration-me),Ce=ae/te.duration||0,Ke=1-Ce,bt=0,st=te.tweens.length;bt<st;bt++)te.tweens[bt].run(Ke);return K.notifyWith(m,[te,Ke,ae]),Ke<1&&st?ae:(st||K.notifyWith(m,[te,1,0]),K.resolveWith(m,[te]),!1)},te=K.promise({elem:m,props:h.extend({},S),opts:h.extend(!0,{specialEasing:{},easing:h.easing._default},P),originalProperties:S,originalOptions:P,startTime:Qs||Sm(),duration:P.duration,tweens:[],createTween:function(me,ae){var Ce=h.Tween(m,te.opts,me,ae,te.opts.specialEasing[me]||te.opts.easing);return te.tweens.push(Ce),Ce},stop:function(me){var ae=0,Ce=me?te.tweens.length:0;if(V)return this;for(V=!0;ae<Ce;ae++)te.tweens[ae].run(1);return me?(K.notifyWith(m,[te,1,0]),K.resolveWith(m,[te,me])):K.rejectWith(m,[te,me]),this}}),de=te.props;for(RS(de,te.opts.specialEasing);z<W;z++)if(T=yr.prefilters[z].call(te,m,de,te.opts),T)return C(T.stop)&&(h._queueHooks(te.elem,te.opts.queue).stop=T.stop.bind(T)),T;return h.map(de,Em,te),C(te.opts.start)&&te.opts.start.call(m,te),te.progress(te.opts.progress).done(te.opts.done,te.opts.complete).fail(te.opts.fail).always(te.opts.always),h.fx.timer(h.extend(J,{elem:m,anim:te,queue:te.opts.queue})),te}h.Animation=h.extend(yr,{tweeners:{"*":[function(m,S){var P=this.createTween(m,S);return ir(P.elem,m,ft.exec(S),P),P}]},tweener:function(m,S){C(m)?(S=m,m=["*"]):m=m.match(Y);for(var P,T=0,V=m.length;T<V;T++)P=m[T],yr.tweeners[P]=yr.tweeners[P]||[],yr.tweeners[P].unshift(S)},prefilters:[MS],prefilter:function(m,S){S?yr.prefilters.unshift(m):yr.prefilters.push(m)}}),h.speed=function(m,S,P){var T=m&&typeof m=="object"?h.extend({},m):{complete:P||!P&&S||C(m)&&m,duration:m,easing:P&&S||S&&!C(S)&&S};return h.fx.off?T.duration=0:typeof T.duration!="number"&&(T.duration in h.fx.speeds?T.duration=h.fx.speeds[T.duration]:T.duration=h.fx.speeds._default),(T.queue==null||T.queue===!0)&&(T.queue="fx"),T.old=T.complete,T.complete=function(){C(T.old)&&T.old.call(this),T.queue&&h.dequeue(this,T.queue)},T},h.fn.extend({fadeTo:function(m,S,P,T){return this.filter(on).css("opacity",0).show().end().animate({opacity:S},m,P,T)},animate:function(m,S,P,T){var V=h.isEmptyObject(m),z=h.speed(S,P,T),W=function(){var K=yr(this,h.extend({},m),z);(V||_e.get(this,"finish"))&&K.stop(!0)};return W.finish=W,V||z.queue===!1?this.each(W):this.queue(z.queue,W)},stop:function(m,S,P){var T=function(V){var z=V.stop;delete V.stop,z(P)};return typeof m!="string"&&(P=S,S=m,m=void 0),S&&this.queue(m||"fx",[]),this.each(function(){var V=!0,z=m!=null&&m+"queueHooks",W=h.timers,K=_e.get(this);if(z)K[z]&&K[z].stop&&T(K[z]);else for(z in K)K[z]&&K[z].stop&&AS.test(z)&&T(K[z]);for(z=W.length;z--;)W[z].elem===this&&(m==null||W[z].queue===m)&&(W[z].anim.stop(P),V=!1,W.splice(z,1));(V||!P)&&h.dequeue(this,m)})},finish:function(m){return m!==!1&&(m=m||"fx"),this.each(function(){var S,P=_e.get(this),T=P[m+"queue"],V=P[m+"queueHooks"],z=h.timers,W=T?T.length:0;for(P.finish=!0,h.queue(this,m,[]),V&&V.stop&&V.stop.call(this,!0),S=z.length;S--;)z[S].elem===this&&z[S].queue===m&&(z[S].anim.stop(!0),z.splice(S,1));for(S=0;S<W;S++)T[S]&&T[S].finish&&T[S].finish.call(this);delete P.finish})}}),h.each(["toggle","show","hide"],function(m,S){var P=h.fn[S];h.fn[S]=function(T,V,z){return T==null||typeof T=="boolean"?P.apply(this,arguments):this.animate(Xl(S,!0),T,V,z)}}),h.each({slideDown:Xl("show"),slideUp:Xl("hide"),slideToggle:Xl("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(m,S){h.fn[m]=function(P,T,V){return this.animate(S,P,T,V)}}),h.timers=[],h.fx.tick=function(){var m,S=0,P=h.timers;for(Qs=Date.now();S<P.length;S++)m=P[S],!m()&&P[S]===m&&P.splice(S--,1);P.length||h.fx.stop(),Qs=void 0},h.fx.timer=function(m){h.timers.push(m),h.fx.start()},h.fx.interval=13,h.fx.start=function(){$l||($l=!0,Ud())},h.fx.stop=function(){$l=null},h.fx.speeds={slow:600,fast:200,_default:400},h.fn.delay=function(m,S){return m=h.fx&&h.fx.speeds[m]||m,S=S||"fx",this.queue(S,function(P,T){var V=t.setTimeout(P,m);T.stop=function(){t.clearTimeout(V)}})},function(){var m=k.createElement("input"),S=k.createElement("select"),P=S.appendChild(k.createElement("option"));m.type="checkbox",w.checkOn=m.value!=="",w.optSelected=P.selected,m=k.createElement("input"),m.value="t",m.type="radio",w.radioValue=m.value==="t"}();var Im,Jo=h.expr.attrHandle;h.fn.extend({attr:function(m,S){return q(this,h.attr,m,S,arguments.length>1)},removeAttr:function(m){return this.each(function(){h.removeAttr(this,m)})}}),h.extend({attr:function(m,S,P){var T,V,z=m.nodeType;if(!(z===3||z===8||z===2)){if(typeof m.getAttribute>"u")return h.prop(m,S,P);if((z!==1||!h.isXMLDoc(m))&&(V=h.attrHooks[S.toLowerCase()]||(h.expr.match.bool.test(S)?Im:void 0)),P!==void 0){if(P===null){h.removeAttr(m,S);return}return V&&"set"in V&&(T=V.set(m,P,S))!==void 0?T:(m.setAttribute(S,P+""),P)}return V&&"get"in V&&(T=V.get(m,S))!==null?T:(T=h.find.attr(m,S),T??void 0)}},attrHooks:{type:{set:function(m,S){if(!w.radioValue&&S==="radio"&&I(m,"input")){var P=m.value;return m.setAttribute("type",S),P&&(m.value=P),S}}}},removeAttr:function(m,S){var P,T=0,V=S&&S.match(Y);if(V&&m.nodeType===1)for(;P=V[T++];)m.removeAttribute(P)}}),Im={set:function(m,S,P){return S===!1?h.removeAttr(m,P):m.setAttribute(P,P),P}},h.each(h.expr.match.bool.source.match(/\w+/g),function(m,S){var P=Jo[S]||h.find.attr;Jo[S]=function(T,V,z){var W,K,J=V.toLowerCase();return z||(K=Jo[J],Jo[J]=W,W=P(T,V,z)!=null?J:null,Jo[J]=K),W}});var PS=/^(?:input|select|textarea|button)$/i,NS=/^(?:a|area)$/i;h.fn.extend({prop:function(m,S){return q(this,h.prop,m,S,arguments.length>1)},removeProp:function(m){return this.each(function(){delete this[h.propFix[m]||m]})}}),h.extend({prop:function(m,S,P){var T,V,z=m.nodeType;if(!(z===3||z===8||z===2))return(z!==1||!h.isXMLDoc(m))&&(S=h.propFix[S]||S,V=h.propHooks[S]),P!==void 0?V&&"set"in V&&(T=V.set(m,P,S))!==void 0?T:m[S]=P:V&&"get"in V&&(T=V.get(m,S))!==null?T:m[S]},propHooks:{tabIndex:{get:function(m){var S=h.find.attr(m,"tabindex");return S?parseInt(S,10):PS.test(m.nodeName)||NS.test(m.nodeName)&&m.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),w.optSelected||(h.propHooks.selected={get:function(m){var S=m.parentNode;return S&&S.parentNode&&S.parentNode.selectedIndex,null},set:function(m){var S=m.parentNode;S&&(S.selectedIndex,S.parentNode&&S.parentNode.selectedIndex)}}),h.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){h.propFix[this.toLowerCase()]=this});function as(m){var S=m.match(Y)||[];return S.join(" ")}function ls(m){return m.getAttribute&&m.getAttribute("class")||""}function Jd(m){return Array.isArray(m)?m:typeof m=="string"?m.match(Y)||[]:[]}h.fn.extend({addClass:function(m){var S,P,T,V,z,W;return C(m)?this.each(function(K){h(this).addClass(m.call(this,K,ls(this)))}):(S=Jd(m),S.length?this.each(function(){if(T=ls(this),P=this.nodeType===1&&" "+as(T)+" ",P){for(z=0;z<S.length;z++)V=S[z],P.indexOf(" "+V+" ")<0&&(P+=V+" ");W=as(P),T!==W&&this.setAttribute("class",W)}}):this)},removeClass:function(m){var S,P,T,V,z,W;return C(m)?this.each(function(K){h(this).removeClass(m.call(this,K,ls(this)))}):arguments.length?(S=Jd(m),S.length?this.each(function(){if(T=ls(this),P=this.nodeType===1&&" "+as(T)+" ",P){for(z=0;z<S.length;z++)for(V=S[z];P.indexOf(" "+V+" ")>-1;)P=P.replace(" "+V+" "," ");W=as(P),T!==W&&this.setAttribute("class",W)}}):this):this.attr("class","")},toggleClass:function(m,S){var P,T,V,z,W=typeof m,K=W==="string"||Array.isArray(m);return C(m)?this.each(function(J){h(this).toggleClass(m.call(this,J,ls(this),S),S)}):typeof S=="boolean"&&K?S?this.addClass(m):this.removeClass(m):(P=Jd(m),this.each(function(){if(K)for(z=h(this),V=0;V<P.length;V++)T=P[V],z.hasClass(T)?z.removeClass(T):z.addClass(T);else(m===void 0||W==="boolean")&&(T=ls(this),T&&_e.set(this,"__className__",T),this.setAttribute&&this.setAttribute("class",T||m===!1?"":_e.get(this,"__className__")||""))}))},hasClass:function(m){var S,P,T=0;for(S=" "+m+" ";P=this[T++];)if(P.nodeType===1&&(" "+as(ls(P))+" ").indexOf(S)>-1)return!0;return!1}});var TS=/\r/g;h.fn.extend({val:function(m){var S,P,T,V=this[0];return arguments.length?(T=C(m),this.each(function(z){var W;this.nodeType===1&&(T?W=m.call(this,z,h(this).val()):W=m,W==null?W="":typeof W=="number"?W+="":Array.isArray(W)&&(W=h.map(W,function(K){return K==null?"":K+""})),S=h.valHooks[this.type]||h.valHooks[this.nodeName.toLowerCase()],(!S||!("set"in S)||S.set(this,W,"value")===void 0)&&(this.value=W))})):V?(S=h.valHooks[V.type]||h.valHooks[V.nodeName.toLowerCase()],S&&"get"in S&&(P=S.get(V,"value"))!==void 0?P:(P=V.value,typeof P=="string"?P.replace(TS,""):P??"")):void 0}}),h.extend({valHooks:{option:{get:function(m){var S=h.find.attr(m,"value");return S??as(h.text(m))}},select:{get:function(m){var S,P,T,V=m.options,z=m.selectedIndex,W=m.type==="select-one",K=W?null:[],J=W?z+1:V.length;for(z<0?T=J:T=W?z:0;T<J;T++)if(P=V[T],(P.selected||T===z)&&!P.disabled&&(!P.parentNode.disabled||!I(P.parentNode,"optgroup"))){if(S=h(P).val(),W)return S;K.push(S)}return K},set:function(m,S){for(var P,T,V=m.options,z=h.makeArray(S),W=V.length;W--;)T=V[W],(T.selected=h.inArray(h.valHooks.option.get(T),z)>-1)&&(P=!0);return P||(m.selectedIndex=-1),z}}}}),h.each(["radio","checkbox"],function(){h.valHooks[this]={set:function(m,S){if(Array.isArray(S))return m.checked=h.inArray(h(m).val(),S)>-1}},w.checkOn||(h.valHooks[this].get=function(m){return m.getAttribute("value")===null?"on":m.value})});var qo=t.location,km={guid:Date.now()},qd=/\?/;h.parseXML=function(m){var S,P;if(!m||typeof m!="string")return null;try{S=new t.DOMParser().parseFromString(m,"text/xml")}catch{}return P=S&&S.getElementsByTagName("parsererror")[0],(!S||P)&&h.error("Invalid XML: "+(P?h.map(P.childNodes,function(T){return T.textContent}).join(`
169
- `):m)),S};var Am=/^(?:focusinfocus|focusoutblur)$/,Mm=function(m){m.stopPropagation()};h.extend(h.event,{trigger:function(m,S,P,T){var V,z,W,K,J,te,de,me,ae=[P||k],Ce=g.call(m,"type")?m.type:m,Ke=g.call(m,"namespace")?m.namespace.split("."):[];if(z=me=W=P=P||k,!(P.nodeType===3||P.nodeType===8)&&!Am.test(Ce+h.event.triggered)&&(Ce.indexOf(".")>-1&&(Ke=Ce.split("."),Ce=Ke.shift(),Ke.sort()),J=Ce.indexOf(":")<0&&"on"+Ce,m=m[h.expando]?m:new h.Event(Ce,typeof m=="object"&&m),m.isTrigger=T?2:3,m.namespace=Ke.join("."),m.rnamespace=m.namespace?new RegExp("(^|\\.)"+Ke.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m.result=void 0,m.target||(m.target=P),S=S==null?[m]:h.makeArray(S,[m]),de=h.event.special[Ce]||{},!(!T&&de.trigger&&de.trigger.apply(P,S)===!1))){if(!T&&!de.noBubble&&!E(P)){for(K=de.delegateType||Ce,Am.test(K+Ce)||(z=z.parentNode);z;z=z.parentNode)ae.push(z),W=z;W===(P.ownerDocument||k)&&ae.push(W.defaultView||W.parentWindow||t)}for(V=0;(z=ae[V++])&&!m.isPropagationStopped();)me=z,m.type=V>1?K:de.bindType||Ce,te=(_e.get(z,"events")||Object.create(null))[m.type]&&_e.get(z,"handle"),te&&te.apply(z,S),te=J&&z[J],te&&te.apply&&gt(z)&&(m.result=te.apply(z,S),m.result===!1&&m.preventDefault());return m.type=Ce,!T&&!m.isDefaultPrevented()&&(!de._default||de._default.apply(ae.pop(),S)===!1)&&gt(P)&&J&&C(P[Ce])&&!E(P)&&(W=P[J],W&&(P[J]=null),h.event.triggered=Ce,m.isPropagationStopped()&&me.addEventListener(Ce,Mm),P[Ce](),m.isPropagationStopped()&&me.removeEventListener(Ce,Mm),h.event.triggered=void 0,W&&(P[J]=W)),m.result}},simulate:function(m,S,P){var T=h.extend(new h.Event,P,{type:m,isSimulated:!0});h.event.trigger(T,null,S)}}),h.fn.extend({trigger:function(m,S){return this.each(function(){h.event.trigger(m,S,this)})},triggerHandler:function(m,S){var P=this[0];if(P)return h.event.trigger(m,S,P,!0)}});var OS=/\[\]$/,Rm=/\r?\n/g,DS=/^(?:submit|button|image|reset|file)$/i,FS=/^(?:input|select|textarea|keygen)/i;function Kd(m,S,P,T){var V;if(Array.isArray(S))h.each(S,function(z,W){P||OS.test(m)?T(m,W):Kd(m+"["+(typeof W=="object"&&W!=null?z:"")+"]",W,P,T)});else if(!P&&f(S)==="object")for(V in S)Kd(m+"["+V+"]",S[V],P,T);else T(m,S)}h.param=function(m,S){var P,T=[],V=function(z,W){var K=C(W)?W():W;T[T.length]=encodeURIComponent(z)+"="+encodeURIComponent(K??"")};if(m==null)return"";if(Array.isArray(m)||m.jquery&&!h.isPlainObject(m))h.each(m,function(){V(this.name,this.value)});else for(P in m)Kd(P,m[P],S,V);return T.join("&")},h.fn.extend({serialize:function(){return h.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var m=h.prop(this,"elements");return m?h.makeArray(m):this}).filter(function(){var m=this.type;return this.name&&!h(this).is(":disabled")&&FS.test(this.nodeName)&&!DS.test(m)&&(this.checked||!zn.test(m))}).map(function(m,S){var P=h(this).val();return P==null?null:Array.isArray(P)?h.map(P,function(T){return{name:S.name,value:T.replace(Rm,`\r
170
- `)}}):{name:S.name,value:P.replace(Rm,`\r
171
- `)}}).get()}});var LS=/%20/g,jS=/#.*$/,BS=/([?&])_=[^&]*/,VS=/^(.*?):[ \t]*([^\r\n]*)$/mg,zS=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,HS=/^(?:GET|HEAD)$/,GS=/^\/\//,Pm={},Qd={},Nm="*/".concat("*"),ef=k.createElement("a");ef.href=qo.href;function Tm(m){return function(S,P){typeof S!="string"&&(P=S,S="*");var T,V=0,z=S.toLowerCase().match(Y)||[];if(C(P))for(;T=z[V++];)T[0]==="+"?(T=T.slice(1)||"*",(m[T]=m[T]||[]).unshift(P)):(m[T]=m[T]||[]).push(P)}}function Om(m,S,P,T){var V={},z=m===Qd;function W(K){var J;return V[K]=!0,h.each(m[K]||[],function(te,de){var me=de(S,P,T);if(typeof me=="string"&&!z&&!V[me])return S.dataTypes.unshift(me),W(me),!1;if(z)return!(J=me)}),J}return W(S.dataTypes[0])||!V["*"]&&W("*")}function tf(m,S){var P,T,V=h.ajaxSettings.flatOptions||{};for(P in S)S[P]!==void 0&&((V[P]?m:T||(T={}))[P]=S[P]);return T&&h.extend(!0,m,T),m}function WS(m,S,P){for(var T,V,z,W,K=m.contents,J=m.dataTypes;J[0]==="*";)J.shift(),T===void 0&&(T=m.mimeType||S.getResponseHeader("Content-Type"));if(T){for(V in K)if(K[V]&&K[V].test(T)){J.unshift(V);break}}if(J[0]in P)z=J[0];else{for(V in P){if(!J[0]||m.converters[V+" "+J[0]]){z=V;break}W||(W=V)}z=z||W}if(z)return z!==J[0]&&J.unshift(z),P[z]}function $S(m,S,P,T){var V,z,W,K,J,te={},de=m.dataTypes.slice();if(de[1])for(W in m.converters)te[W.toLowerCase()]=m.converters[W];for(z=de.shift();z;)if(m.responseFields[z]&&(P[m.responseFields[z]]=S),!J&&T&&m.dataFilter&&(S=m.dataFilter(S,m.dataType)),J=z,z=de.shift(),z){if(z==="*")z=J;else if(J!=="*"&&J!==z){if(W=te[J+" "+z]||te["* "+z],!W){for(V in te)if(K=V.split(" "),K[1]===z&&(W=te[J+" "+K[0]]||te["* "+K[0]],W)){W===!0?W=te[V]:te[V]!==!0&&(z=K[0],de.unshift(K[1]));break}}if(W!==!0)if(W&&m.throws)S=W(S);else try{S=W(S)}catch(me){return{state:"parsererror",error:W?me:"No conversion from "+J+" to "+z}}}}return{state:"success",data:S}}h.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qo.href,type:"GET",isLocal:zS.test(qo.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Nm,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":h.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(m,S){return S?tf(tf(m,h.ajaxSettings),S):tf(h.ajaxSettings,m)},ajaxPrefilter:Tm(Pm),ajaxTransport:Tm(Qd),ajax:function(m,S){typeof m=="object"&&(S=m,m=void 0),S=S||{};var P,T,V,z,W,K,J,te,de,me,ae=h.ajaxSetup({},S),Ce=ae.context||ae,Ke=ae.context&&(Ce.nodeType||Ce.jquery)?h(Ce):h.event,bt=h.Deferred(),st=h.Callbacks("once memory"),xn=ae.statusCode||{},an={},Tr={},Or="canceled",ht={readyState:0,getResponseHeader:function(xt){var Zt;if(J){if(!z)for(z={};Zt=VS.exec(V);)z[Zt[1].toLowerCase()+" "]=(z[Zt[1].toLowerCase()+" "]||[]).concat(Zt[2]);Zt=z[xt.toLowerCase()+" "]}return Zt==null?null:Zt.join(", ")},getAllResponseHeaders:function(){return J?V:null},setRequestHeader:function(xt,Zt){return J==null&&(xt=Tr[xt.toLowerCase()]=Tr[xt.toLowerCase()]||xt,an[xt]=Zt),this},overrideMimeType:function(xt){return J==null&&(ae.mimeType=xt),this},statusCode:function(xt){var Zt;if(xt)if(J)ht.always(xt[ht.status]);else for(Zt in xt)xn[Zt]=[xn[Zt],xt[Zt]];return this},abort:function(xt){var Zt=xt||Or;return P&&P.abort(Zt),cs(0,Zt),this}};if(bt.promise(ht),ae.url=((m||ae.url||qo.href)+"").replace(GS,qo.protocol+"//"),ae.type=S.method||S.type||ae.method||ae.type,ae.dataTypes=(ae.dataType||"*").toLowerCase().match(Y)||[""],ae.crossDomain==null){K=k.createElement("a");try{K.href=ae.url,K.href=K.href,ae.crossDomain=ef.protocol+"//"+ef.host!=K.protocol+"//"+K.host}catch{ae.crossDomain=!0}}if(ae.data&&ae.processData&&typeof ae.data!="string"&&(ae.data=h.param(ae.data,ae.traditional)),Om(Pm,ae,S,ht),J)return ht;te=h.event&&ae.global,te&&h.active++===0&&h.event.trigger("ajaxStart"),ae.type=ae.type.toUpperCase(),ae.hasContent=!HS.test(ae.type),T=ae.url.replace(jS,""),ae.hasContent?ae.data&&ae.processData&&(ae.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(ae.data=ae.data.replace(LS,"+")):(me=ae.url.slice(T.length),ae.data&&(ae.processData||typeof ae.data=="string")&&(T+=(qd.test(T)?"&":"?")+ae.data,delete ae.data),ae.cache===!1&&(T=T.replace(BS,"$1"),me=(qd.test(T)?"&":"?")+"_="+km.guid+++me),ae.url=T+me),ae.ifModified&&(h.lastModified[T]&&ht.setRequestHeader("If-Modified-Since",h.lastModified[T]),h.etag[T]&&ht.setRequestHeader("If-None-Match",h.etag[T])),(ae.data&&ae.hasContent&&ae.contentType!==!1||S.contentType)&&ht.setRequestHeader("Content-Type",ae.contentType),ht.setRequestHeader("Accept",ae.dataTypes[0]&&ae.accepts[ae.dataTypes[0]]?ae.accepts[ae.dataTypes[0]]+(ae.dataTypes[0]!=="*"?", "+Nm+"; q=0.01":""):ae.accepts["*"]);for(de in ae.headers)ht.setRequestHeader(de,ae.headers[de]);if(ae.beforeSend&&(ae.beforeSend.call(Ce,ht,ae)===!1||J))return ht.abort();if(Or="abort",st.add(ae.complete),ht.done(ae.success),ht.fail(ae.error),P=Om(Qd,ae,S,ht),!P)cs(-1,"No Transport");else{if(ht.readyState=1,te&&Ke.trigger("ajaxSend",[ht,ae]),J)return ht;ae.async&&ae.timeout>0&&(W=t.setTimeout(function(){ht.abort("timeout")},ae.timeout));try{J=!1,P.send(an,cs)}catch(xt){if(J)throw xt;cs(-1,xt)}}function cs(xt,Zt,Qo,rf){var Dr,ea,Fr,Oi,Di,sr=Zt;J||(J=!0,W&&t.clearTimeout(W),P=void 0,V=rf||"",ht.readyState=xt>0?4:0,Dr=xt>=200&&xt<300||xt===304,Qo&&(Oi=WS(ae,ht,Qo)),!Dr&&h.inArray("script",ae.dataTypes)>-1&&h.inArray("json",ae.dataTypes)<0&&(ae.converters["text script"]=function(){}),Oi=$S(ae,Oi,ht,Dr),Dr?(ae.ifModified&&(Di=ht.getResponseHeader("Last-Modified"),Di&&(h.lastModified[T]=Di),Di=ht.getResponseHeader("etag"),Di&&(h.etag[T]=Di)),xt===204||ae.type==="HEAD"?sr="nocontent":xt===304?sr="notmodified":(sr=Oi.state,ea=Oi.data,Fr=Oi.error,Dr=!Fr)):(Fr=sr,(xt||!sr)&&(sr="error",xt<0&&(xt=0))),ht.status=xt,ht.statusText=(Zt||sr)+"",Dr?bt.resolveWith(Ce,[ea,sr,ht]):bt.rejectWith(Ce,[ht,sr,Fr]),ht.statusCode(xn),xn=void 0,te&&Ke.trigger(Dr?"ajaxSuccess":"ajaxError",[ht,ae,Dr?ea:Fr]),st.fireWith(Ce,[ht,sr]),te&&(Ke.trigger("ajaxComplete",[ht,ae]),--h.active||h.event.trigger("ajaxStop")))}return ht},getJSON:function(m,S,P){return h.get(m,S,P,"json")},getScript:function(m,S){return h.get(m,void 0,S,"script")}}),h.each(["get","post"],function(m,S){h[S]=function(P,T,V,z){return C(T)&&(z=z||V,V=T,T=void 0),h.ajax(h.extend({url:P,type:S,dataType:z,data:T,success:V},h.isPlainObject(P)&&P))}}),h.ajaxPrefilter(function(m){var S;for(S in m.headers)S.toLowerCase()==="content-type"&&(m.contentType=m.headers[S]||"")}),h._evalUrl=function(m,S,P){return h.ajax({url:m,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(T){h.globalEval(T,S,P)}})},h.fn.extend({wrapAll:function(m){var S;return this[0]&&(C(m)&&(m=m.call(this[0])),S=h(m,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&S.insertBefore(this[0]),S.map(function(){for(var P=this;P.firstElementChild;)P=P.firstElementChild;return P}).append(this)),this},wrapInner:function(m){return C(m)?this.each(function(S){h(this).wrapInner(m.call(this,S))}):this.each(function(){var S=h(this),P=S.contents();P.length?P.wrapAll(m):S.append(m)})},wrap:function(m){var S=C(m);return this.each(function(P){h(this).wrapAll(S?m.call(this,P):m)})},unwrap:function(m){return this.parent(m).not("body").each(function(){h(this).replaceWith(this.childNodes)}),this}}),h.expr.pseudos.hidden=function(m){return!h.expr.pseudos.visible(m)},h.expr.pseudos.visible=function(m){return!!(m.offsetWidth||m.offsetHeight||m.getClientRects().length)},h.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var XS={0:200,1223:204},Ko=h.ajaxSettings.xhr();w.cors=!!Ko&&"withCredentials"in Ko,w.ajax=Ko=!!Ko,h.ajaxTransport(function(m){var S,P;if(w.cors||Ko&&!m.crossDomain)return{send:function(T,V){var z,W=m.xhr();if(W.open(m.type,m.url,m.async,m.username,m.password),m.xhrFields)for(z in m.xhrFields)W[z]=m.xhrFields[z];m.mimeType&&W.overrideMimeType&&W.overrideMimeType(m.mimeType),!m.crossDomain&&!T["X-Requested-With"]&&(T["X-Requested-With"]="XMLHttpRequest");for(z in T)W.setRequestHeader(z,T[z]);S=function(K){return function(){S&&(S=P=W.onload=W.onerror=W.onabort=W.ontimeout=W.onreadystatechange=null,K==="abort"?W.abort():K==="error"?typeof W.status!="number"?V(0,"error"):V(W.status,W.statusText):V(XS[W.status]||W.status,W.statusText,(W.responseType||"text")!=="text"||typeof W.responseText!="string"?{binary:W.response}:{text:W.responseText},W.getAllResponseHeaders()))}},W.onload=S(),P=W.onerror=W.ontimeout=S("error"),W.onabort!==void 0?W.onabort=P:W.onreadystatechange=function(){W.readyState===4&&t.setTimeout(function(){S&&P()})},S=S("abort");try{W.send(m.hasContent&&m.data||null)}catch(K){if(S)throw K}},abort:function(){S&&S()}}}),h.ajaxPrefilter(function(m){m.crossDomain&&(m.contents.script=!1)}),h.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(m){return h.globalEval(m),m}}}),h.ajaxPrefilter("script",function(m){m.cache===void 0&&(m.cache=!1),m.crossDomain&&(m.type="GET")}),h.ajaxTransport("script",function(m){if(m.crossDomain||m.scriptAttrs){var S,P;return{send:function(T,V){S=h("<script>").attr(m.scriptAttrs||{}).prop({charset:m.scriptCharset,src:m.url}).on("load error",P=function(z){S.remove(),P=null,z&&V(z.type==="error"?404:200,z.type)}),k.head.appendChild(S[0])},abort:function(){P&&P()}}}});var Dm=[],nf=/(=)\?(?=&|$)|\?\?/;h.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var m=Dm.pop()||h.expando+"_"+km.guid++;return this[m]=!0,m}}),h.ajaxPrefilter("json jsonp",function(m,S,P){var T,V,z,W=m.jsonp!==!1&&(nf.test(m.url)?"url":typeof m.data=="string"&&(m.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&nf.test(m.data)&&"data");if(W||m.dataTypes[0]==="jsonp")return T=m.jsonpCallback=C(m.jsonpCallback)?m.jsonpCallback():m.jsonpCallback,W?m[W]=m[W].replace(nf,"$1"+T):m.jsonp!==!1&&(m.url+=(qd.test(m.url)?"&":"?")+m.jsonp+"="+T),m.converters["script json"]=function(){return z||h.error(T+" was not called"),z[0]},m.dataTypes[0]="json",V=t[T],t[T]=function(){z=arguments},P.always(function(){V===void 0?h(t).removeProp(T):t[T]=V,m[T]&&(m.jsonpCallback=S.jsonpCallback,Dm.push(T)),z&&C(V)&&V(z[0]),z=V=void 0}),"script"}),w.createHTMLDocument=function(){var m=k.implementation.createHTMLDocument("").body;return m.innerHTML="<form></form><form></form>",m.childNodes.length===2}(),h.parseHTML=function(m,S,P){if(typeof m!="string")return[];typeof S=="boolean"&&(P=S,S=!1);var T,V,z;return S||(w.createHTMLDocument?(S=k.implementation.createHTMLDocument(""),T=S.createElement("base"),T.href=k.location.href,S.head.appendChild(T)):S=k),V=U.exec(m),z=!P&&[],V?[S.createElement(V[1])]:(V=Yt([m],S,z),z&&z.length&&h(z).remove(),h.merge([],V.childNodes))},h.fn.load=function(m,S,P){var T,V,z,W=this,K=m.indexOf(" ");return K>-1&&(T=as(m.slice(K)),m=m.slice(0,K)),C(S)?(P=S,S=void 0):S&&typeof S=="object"&&(V="POST"),W.length>0&&h.ajax({url:m,type:V||"GET",dataType:"html",data:S}).done(function(J){z=arguments,W.html(T?h("<div>").append(h.parseHTML(J)).find(T):J)}).always(P&&function(J,te){W.each(function(){P.apply(this,z||[J.responseText,te,J])})}),this},h.expr.pseudos.animated=function(m){return h.grep(h.timers,function(S){return m===S.elem}).length},h.offset={setOffset:function(m,S,P){var T,V,z,W,K,J,te,de=h.css(m,"position"),me=h(m),ae={};de==="static"&&(m.style.position="relative"),K=me.offset(),z=h.css(m,"top"),J=h.css(m,"left"),te=(de==="absolute"||de==="fixed")&&(z+J).indexOf("auto")>-1,te?(T=me.position(),W=T.top,V=T.left):(W=parseFloat(z)||0,V=parseFloat(J)||0),C(S)&&(S=S.call(m,P,h.extend({},K))),S.top!=null&&(ae.top=S.top-K.top+W),S.left!=null&&(ae.left=S.left-K.left+V),"using"in S?S.using.call(m,ae):me.css(ae)}},h.fn.extend({offset:function(m){if(arguments.length)return m===void 0?this:this.each(function(V){h.offset.setOffset(this,m,V)});var S,P,T=this[0];if(T)return T.getClientRects().length?(S=T.getBoundingClientRect(),P=T.ownerDocument.defaultView,{top:S.top+P.pageYOffset,left:S.left+P.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var m,S,P,T=this[0],V={top:0,left:0};if(h.css(T,"position")==="fixed")S=T.getBoundingClientRect();else{for(S=this.offset(),P=T.ownerDocument,m=T.offsetParent||P.documentElement;m&&(m===P.body||m===P.documentElement)&&h.css(m,"position")==="static";)m=m.parentNode;m&&m!==T&&m.nodeType===1&&(V=h(m).offset(),V.top+=h.css(m,"borderTopWidth",!0),V.left+=h.css(m,"borderLeftWidth",!0))}return{top:S.top-V.top-h.css(T,"marginTop",!0),left:S.left-V.left-h.css(T,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var m=this.offsetParent;m&&h.css(m,"position")==="static";)m=m.offsetParent;return m||Ot})}}),h.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(m,S){var P=S==="pageYOffset";h.fn[m]=function(T){return q(this,function(V,z,W){var K;if(E(V)?K=V:V.nodeType===9&&(K=V.defaultView),W===void 0)return K?K[S]:V[z];K?K.scrollTo(P?K.pageXOffset:W,P?W:K.pageYOffset):V[z]=W},m,T,arguments.length)}}),h.each(["top","left"],function(m,S){h.cssHooks[S]=Vl(w.pixelPosition,function(P,T){if(T)return T=os(P,S),Zo.test(T)?h(P).position()[S]+"px":T})}),h.each({Height:"height",Width:"width"},function(m,S){h.each({padding:"inner"+m,content:S,"":"outer"+m},function(P,T){h.fn[T]=function(V,z){var W=arguments.length&&(P||typeof V!="boolean"),K=P||(V===!0||z===!0?"margin":"border");return q(this,function(J,te,de){var me;return E(J)?T.indexOf("outer")===0?J["inner"+m]:J.document.documentElement["client"+m]:J.nodeType===9?(me=J.documentElement,Math.max(J.body["scroll"+m],me["scroll"+m],J.body["offset"+m],me["offset"+m],me["client"+m])):de===void 0?h.css(J,te,K):h.style(J,te,de,K)},S,W?V:void 0,W)}})}),h.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(m,S){h.fn[S]=function(P){return this.on(S,P)}}),h.fn.extend({bind:function(m,S,P){return this.on(m,null,S,P)},unbind:function(m,S){return this.off(m,null,S)},delegate:function(m,S,P,T){return this.on(S,m,P,T)},undelegate:function(m,S,P){return arguments.length===1?this.off(m,"**"):this.off(S,m||"**",P)},hover:function(m,S){return this.on("mouseenter",m).on("mouseleave",S||m)}}),h.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(m,S){h.fn[S]=function(P,T){return arguments.length>0?this.on(S,null,P,T):this.trigger(S)}});var YS=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;h.proxy=function(m,S){var P,T,V;if(typeof S=="string"&&(P=m[S],S=m,m=P),!!C(m))return T=s.call(arguments,2),V=function(){return m.apply(S||this,T.concat(s.call(arguments)))},V.guid=m.guid=m.guid||h.guid++,V},h.holdReady=function(m){m?h.readyWait++:h.ready(!0)},h.isArray=Array.isArray,h.parseJSON=JSON.parse,h.nodeName=I,h.isFunction=C,h.isWindow=E,h.camelCase=je,h.type=f,h.now=Date.now,h.isNumeric=function(m){var S=h.type(m);return(S==="number"||S==="string")&&!isNaN(m-parseFloat(m))},h.trim=function(m){return m==null?"":(m+"").replace(YS,"$1")};var ZS=t.jQuery,US=t.$;return h.noConflict=function(m){return t.$===h&&(t.$=US),m&&t.jQuery===h&&(t.jQuery=ZS),h},typeof n>"u"&&(t.jQuery=t.$=h),h})}(sh)),sh.exports}(function(e){(function(t){e.exports?e.exports=t(Uw()):t(jQuery)})(function(t,n){/*!
172
- * jsTree 3.3.17
173
- * http://jstree.com/
174
- *
175
- * Copyright (c) 2014 Ivan Bozhanov (http://vakata.com)
176
- *
177
- * Licensed same as jquery - under the terms of the MIT License
178
- * http://www.opensource.org/licenses/mit-license.php
179
- *//*!
180
- * if using jslint please allow for the jQuery global and use following options:
181
- * jslint: loopfunc: true, browser: true, ass: true, bitwise: true, continue: true, nomen: true, plusplus: true, regexp: true, unparam: true, todo: true, white: true
182
- */if(!t.jstree){var r=0,i=!1,s=!1,o=!1,a=[],l=t("script:last").attr("src"),c=window.document,d=window.setImmediate,g=window.Promise;!d&&g&&(d=function(u,v){g.resolve(v).then(u)}),t.jstree={version:"3.3.17",defaults:{plugins:[]},plugins:{},path:l&&l.indexOf("/")!==-1?l.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},t.jstree.create=function(u,v){var f=new t.jstree.core(++r),p=v;return v=t.extend(!0,{},t.jstree.defaults,v),p&&p.plugins&&(v.plugins=p.plugins),t.each(v.plugins,function(y,h){y!=="core"&&(f=f.plugin(h,v[h]))}),t(u).data("jstree",f),f.init(u,v),f},t.jstree.destroy=function(){t(".jstree:jstree").jstree("destroy"),t(c).off(".jstree")},t.jstree.core=function(u){this._id=u,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},t.jstree.reference=function(u){var v=null,f=null;if(u&&u.id&&(!u.tagName||!u.nodeType)&&(u=u.id),!f||!f.length)try{f=t(u)}catch{}if(!f||!f.length)try{f=t("#"+u.replace(t.jstree.idregex,"\\$&"))}catch{}return f&&f.length&&(f=f.closest(".jstree")).length&&(f=f.data("jstree"))?v=f:t(".jstree").each(function(){var p=t(this).data("jstree");if(p&&p._model.data[u])return v=p,!1}),v},t.fn.jstree=function(u){var v=typeof u=="string",f=Array.prototype.slice.call(arguments,1),p=null;return u===!0&&!this.length?!1:(this.each(function(){var y=t.jstree.reference(this),h=v&&y?y[u]:null;if(p=v&&h?h.apply(y,f):null,!y&&!v&&(u===n||t.isPlainObject(u))&&t.jstree.create(this,u),(y&&!v||u===!0)&&(p=y||!1),p!==null&&p!==n)return!1}),p!==null&&p!==n?p:this)},t.expr.pseudos.jstree=t.expr.createPseudo(function(u){return function(v){return t(v).hasClass("jstree")&&t(v).data("jstree")!==n}}),t.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:t.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,compute_elements_positions:!1,keyboard:{"ctrl-space":function(u){u.type="click",t(u.currentTarget).trigger(u)},enter:function(u){u.type="click",t(u.currentTarget).trigger(u)},left:function(u){if(u.preventDefault(),this.is_open(u.currentTarget))this.close_node(u.currentTarget);else{var v=this.get_parent(u.currentTarget);v&&v.id!==t.jstree.root&&this.get_node(v,!0).children(".jstree-anchor").trigger("focus")}},up:function(u){u.preventDefault();var v=this.get_prev_dom(u.currentTarget);v&&v.length&&v.children(".jstree-anchor").trigger("focus")},right:function(u){if(u.preventDefault(),this.is_closed(u.currentTarget))this.open_node(u.currentTarget,function(f){this.get_node(f,!0).children(".jstree-anchor").trigger("focus")});else if(this.is_open(u.currentTarget)){var v=this.get_node(u.currentTarget,!0).children(".jstree-children")[0];v&&t(this._firstChild(v)).children(".jstree-anchor").trigger("focus")}},down:function(u){u.preventDefault();var v=this.get_next_dom(u.currentTarget);v&&v.length&&v.children(".jstree-anchor").trigger("focus")},"*":function(u){this.open_all()},home:function(u){u.preventDefault();var v=this._firstChild(this.get_container_ul()[0]);v&&t(v).children(".jstree-anchor").filter(":visible").trigger("focus")},end:function(u){u.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().trigger("focus")},f2:function(u){u.preventDefault(),this.edit(u.currentTarget)}},allow_reselect:!1},t.jstree.core.prototype={plugin:function(u,v){var f=t.jstree.plugins[u];return f?(this._data[u]={},f.prototype=this,new f(v,this)):this},init:function(u,v){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[t.jstree.root]={id:t.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=t(u).addClass("jstree jstree-"+this._id),this.settings=v,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl=this.element.css("direction")==="rtl",this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return this.nodeType===3&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(t.jstree.root)},destroy:function(u){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch{}u||this.element.empty(),this.teardown()},_create_prototype_node:function(){var u=c.createElement("LI"),v,f;return u.setAttribute("role","none"),v=c.createElement("I"),v.className="jstree-icon jstree-ocl",v.setAttribute("role","presentation"),u.appendChild(v),v=c.createElement("A"),v.className="jstree-anchor",v.setAttribute("href","#"),v.setAttribute("tabindex","-1"),v.setAttribute("role","treeitem"),f=c.createElement("I"),f.className="jstree-icon jstree-themeicon",f.setAttribute("role","presentation"),v.appendChild(f),u.appendChild(v),v=f=null,u},_kbevent_to_func:function(u){var v={8:"Backspace",9:"Tab",13:"Enter",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"},f=[];if(u.ctrlKey&&f.push("ctrl"),u.altKey&&f.push("alt"),u.shiftKey&&f.push("shift"),f.push(v[u.which]?v[u.which].toLowerCase():u.which),f=f.sort().join("-").toLowerCase(),f==="shift-shift"||f==="ctrl-ctrl"||f==="alt-alt")return null;var p=this.settings.core.keyboard,y,h;for(y in p)if(p.hasOwnProperty(y)&&(h=y,h!=="-"&&h!=="+"&&(h=h.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS"),h=h.split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),h===f))return p[y];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/ig,"")}),this.element=null},bind:function(){var u="",v=null,f=0;this.element.on("dblclick.jstree",function(p){if(p.target.tagName&&p.target.tagName.toLowerCase()==="input")return!0;if(c.selection&&c.selection.empty)c.selection.empty();else if(window.getSelection){var y=window.getSelection();try{y.removeAllRanges(),y.collapse()}catch{}}}).on("mousedown.jstree",(function(p){p.target===this.element[0]&&(p.preventDefault(),f=+new Date)}).bind(this)).on("mousedown.jstree",".jstree-ocl",function(p){p.preventDefault()}).on("click.jstree",".jstree-ocl",(function(p){this.toggle_node(p.target)}).bind(this)).on("dblclick.jstree",".jstree-anchor",(function(p){if(p.target.tagName&&p.target.tagName.toLowerCase()==="input")return!0;this.settings.core.dblclick_toggle&&this.toggle_node(p.target)}).bind(this)).on("click.jstree",".jstree-anchor",(function(p){p.preventDefault(),p.currentTarget!==c.activeElement&&t(p.currentTarget).trigger("focus"),this.activate_node(p.currentTarget,p)}).bind(this)).on("keydown.jstree",".jstree-anchor",(function(p){if(p.target.tagName&&p.target.tagName.toLowerCase()==="input")return!0;this._data.core.rtl&&(p.which===37?p.which=39:p.which===39&&(p.which=37));var y=this._kbevent_to_func(p);if(y){var h=y.call(this,p);if(h===!1||h===!0)return h}}).bind(this)).on("load_node.jstree",(function(p,y){y.status&&(y.node.id===t.jstree.root&&!this._data.core.loaded&&(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout((function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var h=[],_,I;for(_=0,I=this._data.core.selected.length;_<I;_++)h=h.concat(this._model.data[this._data.core.selected[_]].parents);for(h=t.vakata.array_unique(h),_=0,I=h.length;_<I;_++)this.open_node(h[_],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}}).bind(this),0))}).bind(this)).on("keypress.jstree",(function(p){if(p.target.tagName&&p.target.tagName.toLowerCase()==="input")return!0;v&&clearTimeout(v),v=setTimeout(function(){u=""},500);var y=String.fromCharCode(p.which).toLowerCase(),h=this.element.find(".jstree-anchor").filter(":visible"),_=h.index(c.activeElement)||0,I=!1;u+=y,!(u.length>1&&(h.slice(_).each((function(A,R){if(t(R).text().toLowerCase().indexOf(u)===0)return t(R).trigger("focus"),I=!0,!1}).bind(this)),I||(h.slice(0,_).each((function(A,R){if(t(R).text().toLowerCase().indexOf(u)===0)return t(R).trigger("focus"),I=!0,!1}).bind(this)),I)))&&new RegExp("^"+y.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(u)&&(h.slice(_+1).each((function(A,R){if(t(R).text().toLowerCase().charAt(0)===y)return t(R).trigger("focus"),I=!0,!1}).bind(this)),I||h.slice(0,_+1).each((function(A,R){if(t(R).text().toLowerCase().charAt(0)===y)return t(R).trigger("focus"),I=!0,!1}).bind(this)))}).bind(this)).on("init.jstree",(function(){var p=this.settings.core.themes;this._data.core.themes.dots=p.dots,this._data.core.themes.stripes=p.stripes,this._data.core.themes.icons=p.icons,this._data.core.themes.ellipsis=p.ellipsis,this.set_theme(p.name||"default",p.url),this.set_theme_variant(p.variant)}).bind(this)).on("loading.jstree",(function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()}).bind(this)).on("blur.jstree",".jstree-anchor",(function(p){this._data.core.focused=null,t(p.currentTarget).filter(".jstree-hovered").trigger("mouseleave"),this.element.attr("tabindex","0"),t(p.currentTarget).attr("tabindex","-1")}).bind(this)).on("focus.jstree",".jstree-anchor",(function(p){var y=this.get_node(p.currentTarget);y&&(y.id||y.id===0)&&(this._data.core.focused=y.id),this.element.find(".jstree-hovered").not(p.currentTarget).trigger("mouseleave"),t(p.currentTarget).trigger("mouseenter"),this.element.attr("tabindex","-1"),t(p.currentTarget).attr("tabindex","0")}).bind(this)).on("focus.jstree",(function(){if(+new Date-f>500&&!this._data.core.focused&&this.settings.core.restore_focus){f=0;var p=this.get_node(this.element.attr("aria-activedescendant"),!0);p&&p.find("> .jstree-anchor").trigger("focus")}}).bind(this)).on("mouseenter.jstree",".jstree-anchor",(function(p){this.hover_node(p.currentTarget)}).bind(this)).on("mouseleave.jstree",".jstree-anchor",(function(p){this.dehover_node(p.currentTarget)}).bind(this))},unbind:function(){this.element.off(".jstree"),t(c).off(".jstree-"+this._id)},trigger:function(u,v){v||(v={}),v.instance=this,this.element.triggerHandler(u.replace(".jstree","")+".jstree",v)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(u){var v=this.settings.core.strings;return t.vakata.is_function(v)?v.call(this,u):v&&v[u]?v[u]:u},_firstChild:function(u){for(u=u?u.firstChild:null;u!==null&&u.nodeType!==1;)u=u.nextSibling;return u},_nextSibling:function(u){for(u=u?u.nextSibling:null;u!==null&&u.nodeType!==1;)u=u.nextSibling;return u},_previousSibling:function(u){for(u=u?u.previousSibling:null;u!==null&&u.nodeType!==1;)u=u.previousSibling;return u},get_node:function(u,v){u&&(u.id||u.id===0)&&(u=u.id),u instanceof t&&u.length&&u[0].id&&(u=u[0].id);var f;try{if(this._model.data[u])u=this._model.data[u];else if(typeof u=="string"&&this._model.data[u.replace(/^#/,"")])u=this._model.data[u.replace(/^#/,"")];else if(typeof u=="string"&&(f=t("#"+u.replace(t.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[f.closest(".jstree-node").attr("id")])u=this._model.data[f.closest(".jstree-node").attr("id")];else if((f=this.element.find(u)).length&&this._model.data[f.closest(".jstree-node").attr("id")])u=this._model.data[f.closest(".jstree-node").attr("id")];else if((f=this.element.find(u)).length&&f.hasClass("jstree"))u=this._model.data[t.jstree.root];else return!1;return v&&(u=u.id===t.jstree.root?this.element:t("#"+u.id.replace(t.jstree.idregex,"\\$&"),this.element)),u}catch{return!1}},get_path:function(u,v,f){if(u=u.parents?u:this.get_node(u),!u||u.id===t.jstree.root||!u.parents)return!1;var p,y,h=[];for(h.push(f?u.id:u.text),p=0,y=u.parents.length;p<y;p++)h.push(f?u.parents[p]:this.get_text(u.parents[p]));return h=h.reverse().slice(1),v?h.join(v):h},get_next_dom:function(u,v){var f;if(u=this.get_node(u,!0),u[0]===this.element[0]){for(f=this._firstChild(this.get_container_ul()[0]);f&&f.offsetHeight===0;)f=this._nextSibling(f);return f?t(f):!1}if(!u||!u.length)return!1;if(v){f=u[0];do f=this._nextSibling(f);while(f&&f.offsetHeight===0);return f?t(f):!1}if(u.hasClass("jstree-open")){for(f=this._firstChild(u.children(".jstree-children")[0]);f&&f.offsetHeight===0;)f=this._nextSibling(f);if(f!==null)return t(f)}f=u[0];do f=this._nextSibling(f);while(f&&f.offsetHeight===0);return f!==null?t(f):u.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(u,v){var f;if(u=this.get_node(u,!0),u[0]===this.element[0]){for(f=this.get_container_ul()[0].lastChild;f&&f.offsetHeight===0;)f=this._previousSibling(f);return f?t(f):!1}if(!u||!u.length)return!1;if(v){f=u[0];do f=this._previousSibling(f);while(f&&f.offsetHeight===0);return f?t(f):!1}f=u[0];do f=this._previousSibling(f);while(f&&f.offsetHeight===0);if(f!==null){for(u=t(f);u.hasClass("jstree-open");)u=u.children(".jstree-children").first().children(".jstree-node:visible:last");return u}return f=u[0].parentNode.parentNode,f&&f.className&&f.className.indexOf("jstree-node")!==-1?t(f):!1},get_parent:function(u){return u=this.get_node(u),!u||u.id===t.jstree.root?!1:u.parent},get_children_dom:function(u){return u=this.get_node(u,!0),u[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):!u||!u.length?!1:u.children(".jstree-children").children(".jstree-node")},is_parent:function(u){return u=this.get_node(u),u&&(u.state.loaded===!1||u.children.length>0)},is_loaded:function(u){return u=this.get_node(u),u&&u.state.loaded},is_loading:function(u){return u=this.get_node(u),u&&u.state&&u.state.loading},is_open:function(u){return u=this.get_node(u),u&&u.state.opened},is_closed:function(u){return u=this.get_node(u),u&&this.is_parent(u)&&!u.state.opened},is_leaf:function(u){return!this.is_parent(u)},load_node:function(u,v){var f=this.get_node(u,!0),p,y,h,_,I;if(t.vakata.is_array(u))return this._load_nodes(u.slice(),v),!0;if(u=this.get_node(u),!u)return v&&v.call(this,u,!1),!1;if(u.state.loaded){for(u.state.loaded=!1,h=0,_=u.parents.length;h<_;h++)this._model.data[u.parents[h]].children_d=t.vakata.array_filter(this._model.data[u.parents[h]].children_d,function(A){return t.inArray(A,u.children_d)===-1});for(p=0,y=u.children_d.length;p<y;p++)this._model.data[u.children_d[p]].state.selected&&(I=!0),delete this._model.data[u.children_d[p]];I&&(this._data.core.selected=t.vakata.array_filter(this._data.core.selected,function(A){return t.inArray(A,u.children_d)===-1})),u.children=[],u.children_d=[],I&&this.trigger("changed",{action:"load_node",node:u,selected:this._data.core.selected})}return u.state.failed=!1,u.state.loading=!0,u.id!==t.jstree.root?f.children(".jstree-anchor").attr("aria-busy",!0):f.attr("aria-busy",!0),f.addClass("jstree-loading"),this._load_node(u,(function(A){u=this._model.data[u.id],u.state.loading=!1,u.state.loaded=A,u.state.failed=!u.state.loaded;var R=this.get_node(u,!0),D=0,B=0,N=this._model.data,F=!1;for(D=0,B=u.children.length;D<B;D++)if(N[u.children[D]]&&!N[u.children[D]].state.hidden){F=!0;break}u.state.loaded&&R&&R.length&&(R.removeClass("jstree-closed jstree-open jstree-leaf"),F?u.id!=="#"&&R.addClass(u.state.opened?"jstree-open":"jstree-closed"):R.addClass("jstree-leaf")),u.id!==t.jstree.root?R.children(".jstree-anchor").attr("aria-busy",!1):R.attr("aria-busy",!1),R.removeClass("jstree-loading"),this.trigger("load_node",{node:u,status:A}),v&&v.call(this,u,A)}).bind(this)),!0},_load_nodes:function(u,v,f,p){var y=!0,h=function(){this._load_nodes(u,v,!0)},_=this._model.data,I,A,R=[];for(I=0,A=u.length;I<A;I++)_[u[I]]&&(!_[u[I]].state.loaded&&!_[u[I]].state.failed||!f&&p)&&(this.is_loading(u[I])||this.load_node(u[I],h),y=!1);if(y){for(I=0,A=u.length;I<A;I++)_[u[I]]&&_[u[I]].state.loaded&&R.push(u[I]);v&&!v.done&&(v.call(this,R),v.done=!0)}},load_all:function(u,v){if(u||(u=t.jstree.root),u=this.get_node(u),!u)return!1;var f=[],p=this._model.data,y=p[u.id].children_d,h,_;for(u.state&&!u.state.loaded&&f.push(u.id),h=0,_=y.length;h<_;h++)p[y[h]]&&p[y[h]].state&&!p[y[h]].state.loaded&&f.push(y[h]);f.length?this._load_nodes(f,function(){this.load_all(u,v)}):(v&&v.call(this,u),this.trigger("load_all",{node:u}))},_load_node:function(u,v){var f=this.settings.core.data,p,y=function(){return this.nodeType!==3&&this.nodeType!==8};return f?t.vakata.is_function(f)?f.call(this,u,(function(h){h===!1?v.call(this,!1):this[typeof h=="string"?"_append_html_data":"_append_json_data"](u,typeof h=="string"?t(t.parseHTML(h)).filter(y):h,function(_){v.call(this,_)})}).bind(this)):typeof f=="object"?f.url?(f=t.extend(!0,{},f),t.vakata.is_function(f.url)&&(f.url=f.url.call(this,u)),t.vakata.is_function(f.data)&&(f.data=f.data.call(this,u)),t.ajax(f).done((function(h,_,I){var A=I.getResponseHeader("Content-Type");return A&&A.indexOf("json")!==-1||typeof h=="object"?this._append_json_data(u,h,function(R){v.call(this,R)}):A&&A.indexOf("html")!==-1||typeof h=="string"?this._append_html_data(u,t(t.parseHTML(h)).filter(y),function(R){v.call(this,R)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:u.id,xhr:I})},this.settings.core.error.call(this,this._data.core.last_error),v.call(this,!1))}).bind(this)).fail((function(h){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:u.id,xhr:h})},v.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)}).bind(this))):(t.vakata.is_array(f)?p=t.extend(!0,[],f):t.isPlainObject(f)?p=t.extend(!0,{},f):p=f,u.id===t.jstree.root?this._append_json_data(u,p,function(h){v.call(this,h)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:u.id})},this.settings.core.error.call(this,this._data.core.last_error),v.call(this,!1))):typeof f=="string"?u.id===t.jstree.root?this._append_html_data(u,t(t.parseHTML(f)).filter(y),function(h){v.call(this,h)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:u.id})},this.settings.core.error.call(this,this._data.core.last_error),v.call(this,!1)):v.call(this,!1):u.id===t.jstree.root?this._append_html_data(u,this._data.core.original_container_html.clone(!0),function(h){v.call(this,h)}):v.call(this,!1)},_node_changed:function(u){u=this.get_node(u),u&&t.inArray(u.id,this._model.changed)===-1&&this._model.changed.push(u.id)},_append_html_data:function(u,v,f){u=this.get_node(u),u.children=[],u.children_d=[];var p=v.is("ul")?v.children():v,y=u.id,h=[],_=[],I=this._model.data,A=I[y],R=this._data.core.selected.length,D,B,N;for(p.each((function(F,j){D=this._parse_model_from_html(t(j),y,A.parents.concat()),D&&(h.push(D),_.push(D),I[D].children_d.length&&(_=_.concat(I[D].children_d)))}).bind(this)),A.children=h,A.children_d=_,B=0,N=A.parents.length;B<N;B++)I[A.parents[B]].children_d=I[A.parents[B]].children_d.concat(_);this.trigger("model",{nodes:_,parent:y}),y!==t.jstree.root?(this._node_changed(y),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==R&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),f.call(this,!0)},_append_json_data:function(u,v,f,p){if(this.element!==null){u=this.get_node(u),u.children=[],u.children_d=[],v.d&&(v=v.d,typeof v=="string"&&(v=JSON.parse(v))),t.vakata.is_array(v)||(v=[v]);var y=null,h={df:this._model.default_state,dat:v,par:u.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},_=this,I=function(R,D){R.data&&(R=R.data);var B=R.dat,N=R.par,F=[],j=[],H=[],L=R.df,G=R.t_id,$=R.t_cnt,Z=R.m,U=Z[N],ee=R.sel,se,ie,fe,Se,ve=function(Y,le,re){re?re=re.concat():re=[],le&&re.unshift(le);var ge=Y.id.toString(),ne,he,be,ye,q={id:ge,text:Y.text||"",icon:Y.icon!==D?Y.icon:!0,parent:le,parents:re,children:Y.children||[],children_d:Y.children_d||[],data:Y.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(ne in L)L.hasOwnProperty(ne)&&(q.state[ne]=L[ne]);if(Y&&Y.data&&Y.data.jstree&&Y.data.jstree.icon&&(q.icon=Y.data.jstree.icon),(q.icon===D||q.icon===null||q.icon==="")&&(q.icon=!0),Y&&Y.data&&(q.data=Y.data,Y.data.jstree))for(ne in Y.data.jstree)Y.data.jstree.hasOwnProperty(ne)&&(q.state[ne]=Y.data.jstree[ne]);if(Y&&typeof Y.state=="object")for(ne in Y.state)Y.state.hasOwnProperty(ne)&&(q.state[ne]=Y.state[ne]);if(Y&&typeof Y.li_attr=="object")for(ne in Y.li_attr)Y.li_attr.hasOwnProperty(ne)&&(q.li_attr[ne]=Y.li_attr[ne]);if(q.li_attr.id||(q.li_attr.id=ge),Y&&typeof Y.a_attr=="object")for(ne in Y.a_attr)Y.a_attr.hasOwnProperty(ne)&&(q.a_attr[ne]=Y.a_attr[ne]);for(Y&&Y.children&&Y.children===!0&&(q.state.loaded=!1,q.children=[],q.children_d=[]),Z[q.id]=q,ne=0,he=q.children.length;ne<he;ne++)be=ve(Z[q.children[ne]],q.id,re),ye=Z[be],q.children_d.push(be),ye.children_d.length&&(q.children_d=q.children_d.concat(ye.children_d));return delete Y.data,delete Y.children,Z[q.id].original=Y,q.state.selected&&H.push(q.id),q.id},xe=function(Y,le,re){re?re=re.concat():re=[],le&&re.unshift(le);var ge=!1,ne,he,be,ye,q;do ge="j"+G+"_"+ ++$;while(Z[ge]);q={id:!1,text:typeof Y=="string"?Y:"",icon:typeof Y=="object"&&Y.icon!==D?Y.icon:!0,parent:le,parents:re,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(ne in L)L.hasOwnProperty(ne)&&(q.state[ne]=L[ne]);if(Y&&(Y.id||Y.id===0)&&(q.id=Y.id.toString()),Y&&Y.text&&(q.text=Y.text),Y&&Y.data&&Y.data.jstree&&Y.data.jstree.icon&&(q.icon=Y.data.jstree.icon),(q.icon===D||q.icon===null||q.icon==="")&&(q.icon=!0),Y&&Y.data&&(q.data=Y.data,Y.data.jstree))for(ne in Y.data.jstree)Y.data.jstree.hasOwnProperty(ne)&&(q.state[ne]=Y.data.jstree[ne]);if(Y&&typeof Y.state=="object")for(ne in Y.state)Y.state.hasOwnProperty(ne)&&(q.state[ne]=Y.state[ne]);if(Y&&typeof Y.li_attr=="object")for(ne in Y.li_attr)Y.li_attr.hasOwnProperty(ne)&&(q.li_attr[ne]=Y.li_attr[ne]);if(q.li_attr.id&&!(q.id||q.id===0)&&(q.id=q.li_attr.id.toString()),q.id||q.id===0||(q.id=ge),q.li_attr.id||(q.li_attr.id=q.id),Y&&typeof Y.a_attr=="object")for(ne in Y.a_attr)Y.a_attr.hasOwnProperty(ne)&&(q.a_attr[ne]=Y.a_attr[ne]);if(Y&&Y.children&&Y.children.length){for(ne=0,he=Y.children.length;ne<he;ne++)be=xe(Y.children[ne],q.id,re),ye=Z[be],q.children.push(be),ye.children_d.length&&(q.children_d=q.children_d.concat(ye.children_d));q.children_d=q.children_d.concat(q.children)}return Y&&Y.children&&Y.children===!0&&(q.state.loaded=!1,q.children=[],q.children_d=[]),delete Y.data,delete Y.children,q.original=Y,Z[q.id]=q,q.state.selected&&H.push(q.id),q.id};if(B.length&&B[0].id!==D&&B[0].parent!==D){for(ie=0,fe=B.length;ie<fe;ie++)B[ie].children||(B[ie].children=[]),B[ie].state||(B[ie].state={}),Z[B[ie].id.toString()]=B[ie];for(ie=0,fe=B.length;ie<fe;ie++){if(!Z[B[ie].parent.toString()]){typeof _<"u"&&(_._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:B[ie].id.toString(),parent:B[ie].parent.toString()})},_.settings.core.error.call(_,_._data.core.last_error));continue}Z[B[ie].parent.toString()].children.push(B[ie].id.toString()),U.children_d.push(B[ie].id.toString())}for(ie=0,fe=U.children.length;ie<fe;ie++)se=ve(Z[U.children[ie]],N,U.parents.concat()),j.push(se),Z[se].children_d.length&&(j=j.concat(Z[se].children_d));for(ie=0,fe=U.parents.length;ie<fe;ie++)Z[U.parents[ie]].children_d=Z[U.parents[ie]].children_d.concat(j);Se={cnt:$,mod:Z,sel:ee,par:N,dpc:j,add:H}}else{for(ie=0,fe=B.length;ie<fe;ie++)se=xe(B[ie],N,U.parents.concat()),se&&(F.push(se),j.push(se),Z[se].children_d.length&&(j=j.concat(Z[se].children_d)));for(U.children=F,U.children_d=j,ie=0,fe=U.parents.length;ie<fe;ie++)Z[U.parents[ie]].children_d=Z[U.parents[ie]].children_d.concat(j);Se={cnt:$,mod:Z,sel:ee,par:N,dpc:j,add:H}}if(typeof window>"u"||typeof window.document>"u")postMessage(Se);else return Se},A=function(R,D){if(this.element!==null){this._cnt=R.cnt;var B,N=this._model.data;for(B in N)N.hasOwnProperty(B)&&N[B].state&&N[B].state.loading&&R.mod[B]&&(R.mod[B].state.loading=!0);if(this._model.data=R.mod,D){var F,j=R.add,H=R.sel,L=this._data.core.selected.slice();if(N=this._model.data,H.length!==L.length||t.vakata.array_unique(H.concat(L)).length!==H.length){for(B=0,F=H.length;B<F;B++)t.inArray(H[B],j)===-1&&t.inArray(H[B],L)===-1&&(N[H[B]].state.selected=!1);for(B=0,F=L.length;B<F;B++)t.inArray(L[B],H)===-1&&(N[L[B]].state.selected=!0)}}R.add.length&&(this._data.core.selected=this._data.core.selected.concat(R.add)),this.trigger("model",{nodes:R.dpc,parent:R.par}),R.par!==t.jstree.root?(this._node_changed(R.par),this.redraw()):this.redraw(!0),R.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),!D&&d?d(function(){f.call(_,!0)}):f.call(_,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{this._wrk===null&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+I.toString()],{type:"text/javascript"}))),!this._data.core.working||p?(this._data.core.working=!0,y=new window.Worker(this._wrk),y.onmessage=(function(R){A.call(this,R.data,!0);try{y.terminate(),y=null}catch{}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}).bind(this),y.onerror=(function(R){A.call(this,I(h),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}).bind(this),h.par?y.postMessage(h):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([u,v,f,!0])}catch{A.call(this,I(h),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else A.call(this,I(h),!1)}},_parse_model_from_html:function(u,v,f){f?f=[].concat(f):f=[],v&&f.unshift(v);var p,y,h=this._model.data,_={id:!1,text:!1,icon:!0,parent:v,parents:f,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},I,A,R;for(I in this._model.default_state)this._model.default_state.hasOwnProperty(I)&&(_.state[I]=this._model.default_state[I]);if(A=t.vakata.attributes(u,!0),t.each(A,function(D,B){if(B=t.vakata.trim(B),!B.length)return!0;_.li_attr[D]=B,D==="id"&&(_.id=B.toString())}),A=u.children("a").first(),A.length&&(A=t.vakata.attributes(A,!0),t.each(A,function(D,B){B=t.vakata.trim(B),B.length&&(_.a_attr[D]=B)})),A=u.children("a").first().length?u.children("a").first().clone():u.clone(),A.children("ins, i, ul").remove(),A=A.html(),A=t("<div></div>").html(A),_.text=this.settings.core.force_text?A.text():A.html(),A=u.data(),_.data=A?t.extend(!0,{},A):null,_.state.opened=u.hasClass("jstree-open"),_.state.selected=u.children("a").hasClass("jstree-clicked"),_.state.disabled=u.children("a").hasClass("jstree-disabled"),_.data&&_.data.jstree)for(I in _.data.jstree)_.data.jstree.hasOwnProperty(I)&&(_.state[I]=_.data.jstree[I]);A=u.children("a").children(".jstree-themeicon"),A.length&&(_.icon=A.hasClass("jstree-themeicon-hidden")?!1:A.attr("rel")),_.state.icon!==n&&(_.icon=_.state.icon),(_.icon===n||_.icon===null||_.icon==="")&&(_.icon=!0),A=u.children("ul").children("li");do R="j"+this._id+"_"+ ++this._cnt;while(h[R]);return _.id=_.li_attr.id?_.li_attr.id.toString():R,A.length?(A.each((function(D,B){p=this._parse_model_from_html(t(B),_.id,f),y=this._model.data[p],_.children.push(p),y.children_d.length&&(_.children_d=_.children_d.concat(y.children_d))}).bind(this)),_.children_d=_.children_d.concat(_.children)):u.hasClass("jstree-closed")&&(_.state.loaded=!1),_.li_attr.class&&(_.li_attr.class=_.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),_.a_attr.class&&(_.a_attr.class=_.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),h[_.id]=_,_.state.selected&&this._data.core.selected.push(_.id),_.id},_parse_model_from_flat_json:function(u,v,f){f?f=f.concat():f=[],v&&f.unshift(v);var p=u.id.toString(),y=this._model.data,h=this._model.default_state,_,I,A,R,D={id:p,text:u.text||"",icon:u.icon!==n?u.icon:!0,parent:v,parents:f,children:u.children||[],children_d:u.children_d||[],data:u.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(_ in h)h.hasOwnProperty(_)&&(D.state[_]=h[_]);if(u&&u.data&&u.data.jstree&&u.data.jstree.icon&&(D.icon=u.data.jstree.icon),(D.icon===n||D.icon===null||D.icon==="")&&(D.icon=!0),u&&u.data&&(D.data=u.data,u.data.jstree))for(_ in u.data.jstree)u.data.jstree.hasOwnProperty(_)&&(D.state[_]=u.data.jstree[_]);if(u&&typeof u.state=="object")for(_ in u.state)u.state.hasOwnProperty(_)&&(D.state[_]=u.state[_]);if(u&&typeof u.li_attr=="object")for(_ in u.li_attr)u.li_attr.hasOwnProperty(_)&&(D.li_attr[_]=u.li_attr[_]);if(D.li_attr.id||(D.li_attr.id=p),u&&typeof u.a_attr=="object")for(_ in u.a_attr)u.a_attr.hasOwnProperty(_)&&(D.a_attr[_]=u.a_attr[_]);for(u&&u.children&&u.children===!0&&(D.state.loaded=!1,D.children=[],D.children_d=[]),y[D.id]=D,_=0,I=D.children.length;_<I;_++)A=this._parse_model_from_flat_json(y[D.children[_]],D.id,f),R=y[A],D.children_d.push(A),R.children_d.length&&(D.children_d=D.children_d.concat(R.children_d));return delete u.data,delete u.children,y[D.id].original=u,D.state.selected&&this._data.core.selected.push(D.id),D.id},_parse_model_from_json:function(u,v,f){f?f=f.concat():f=[],v&&f.unshift(v);var p=!1,y,h,_,I,A=this._model.data,R=this._model.default_state,D;do p="j"+this._id+"_"+ ++this._cnt;while(A[p]);D={id:!1,text:typeof u=="string"?u:"",icon:typeof u=="object"&&u.icon!==n?u.icon:!0,parent:v,parents:f,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(y in R)R.hasOwnProperty(y)&&(D.state[y]=R[y]);if(u&&(u.id||u.id===0)&&(D.id=u.id.toString()),u&&u.text&&(D.text=u.text),u&&u.data&&u.data.jstree&&u.data.jstree.icon&&(D.icon=u.data.jstree.icon),(D.icon===n||D.icon===null||D.icon==="")&&(D.icon=!0),u&&u.data&&(D.data=u.data,u.data.jstree))for(y in u.data.jstree)u.data.jstree.hasOwnProperty(y)&&(D.state[y]=u.data.jstree[y]);if(u&&typeof u.state=="object")for(y in u.state)u.state.hasOwnProperty(y)&&(D.state[y]=u.state[y]);if(u&&typeof u.li_attr=="object")for(y in u.li_attr)u.li_attr.hasOwnProperty(y)&&(D.li_attr[y]=u.li_attr[y]);if(D.li_attr.id&&!(D.id||D.id===0)&&(D.id=D.li_attr.id.toString()),D.id||D.id===0||(D.id=p),D.li_attr.id||(D.li_attr.id=D.id),u&&typeof u.a_attr=="object")for(y in u.a_attr)u.a_attr.hasOwnProperty(y)&&(D.a_attr[y]=u.a_attr[y]);if(u&&u.children&&u.children.length){for(y=0,h=u.children.length;y<h;y++)_=this._parse_model_from_json(u.children[y],D.id,f),I=A[_],D.children.push(_),I.children_d.length&&(D.children_d=D.children_d.concat(I.children_d));D.children_d=D.children.concat(D.children_d)}return u&&u.children&&u.children===!0&&(D.state.loaded=!1,D.children=[],D.children_d=[]),delete u.data,delete u.children,D.original=u,A[D.id]=D,D.state.selected&&this._data.core.selected.push(D.id),D.id},_redraw:function(){var u=this._model.force_full_redraw?this._model.data[t.jstree.root].children.concat([]):this._model.changed.concat([]),v=c.createElement("UL"),f,p,y,h=this._data.core.focused;for(p=0,y=u.length;p<y;p++)f=this.redraw_node(u[p],!0,this._model.force_full_redraw),f&&this._model.force_full_redraw&&v.appendChild(f);this._model.force_full_redraw&&(v.className=this.get_container_ul()[0].className,v.setAttribute("role","presentation"),this.element.empty().append(v)),h!==null&&this.settings.core.restore_focus&&(f=this.get_node(h,!0),f&&f.length&&f.children(".jstree-anchor")[0]!==c.activeElement?f.children(".jstree-anchor").trigger("focus"):this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:u})},redraw:function(u){u&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(u){var v=this.get_node(u),f=!1,p=!1,y=!1,h=c;if(!v)return!1;if(v.id===t.jstree.root)return this.redraw(!0);if(u=this.get_node(u,!0),!u||!u.length)return!1;if(u.children(".jstree-children").remove(),u=u[0],v.children.length&&v.state.loaded){for(y=h.createElement("UL"),y.setAttribute("role","group"),y.className="jstree-children",f=0,p=v.children.length;f<p;f++)y.appendChild(this.redraw_node(v.children[f],!0,!0));u.appendChild(y)}},redraw_node:function(u,v,f,p){var y=this.get_node(u),h=!1,_=!1,I=!1,A=!1,R=!1,D=!1,B="",N=c,F=this._model.data,j=!1,H=null,L=0,G=0,$=!1,Z=!1;if(!y)return!1;if(y.id===t.jstree.root)return this.redraw(!0);if(v=v||y.children.length===0,u=c.querySelector?this.element[0].querySelector("#"+("0123456789".indexOf(y.id[0])!==-1?"\\3"+y.id[0]+" "+y.id.substr(1).replace(t.jstree.idregex,"\\$&"):y.id.replace(t.jstree.idregex,"\\$&"))):c.getElementById(y.id),u)u=t(u),f||(h=u.parent().parent()[0],h===this.element[0]&&(h=null),_=u.index()),!v&&y.children.length&&!u.children(".jstree-children").length&&(v=!0),v||(I=u.children(".jstree-children")[0]),j=u.children(".jstree-anchor")[0]===c.activeElement,u.remove();else if(v=!0,!f){if(h=y.parent!==t.jstree.root?t("#"+y.parent.replace(t.jstree.idregex,"\\$&"),this.element)[0]:null,h!==null&&(!h||!F[y.parent].state.opened))return!1;_=t.inArray(y.id,h===null?F[t.jstree.root].children:F[y.parent].children)}u=this._data.core.node.cloneNode(!0),B="jstree-node ";for(A in y.li_attr)if(y.li_attr.hasOwnProperty(A)){if(A==="id")continue;A!=="class"?u.setAttribute(A,y.li_attr[A]):B+=y.li_attr[A]}for(y.a_attr.id||(y.a_attr.id=y.id+"_anchor"),u.childNodes[1].setAttribute("aria-selected",!!y.state.selected),u.childNodes[1].setAttribute("aria-level",y.parents.length),this.settings.core.compute_elements_positions&&(u.childNodes[1].setAttribute("aria-setsize",F[y.parent].children.length),u.childNodes[1].setAttribute("aria-posinset",F[y.parent].children.indexOf(y.id)+1)),y.state.disabled&&u.childNodes[1].setAttribute("aria-disabled",!0),A=0,R=y.children.length;A<R;A++)if(!F[y.children[A]].state.hidden){$=!0;break}if(y.parent!==null&&F[y.parent]&&!y.state.hidden&&(A=t.inArray(y.id,F[y.parent].children),Z=y.id,A!==-1))for(A++,R=F[y.parent].children.length;A<R&&(F[F[y.parent].children[A]].state.hidden||(Z=F[y.parent].children[A]),Z===y.id);A++);y.state.hidden&&(B+=" jstree-hidden"),y.state.loading&&(B+=" jstree-loading"),y.state.loaded&&!$?B+=" jstree-leaf":(B+=y.state.opened&&y.state.loaded?" jstree-open":" jstree-closed",u.childNodes[1].setAttribute("aria-expanded",y.state.opened&&y.state.loaded)),Z===y.id&&(B+=" jstree-last"),u.id=y.id,u.className=B,B=(y.state.selected?" jstree-clicked":"")+(y.state.disabled?" jstree-disabled":"");for(R in y.a_attr)if(y.a_attr.hasOwnProperty(R)){if(R==="href"&&y.a_attr[R]==="#")continue;R!=="class"?u.childNodes[1].setAttribute(R,y.a_attr[R]):B+=" "+y.a_attr[R]}if(B.length&&(u.childNodes[1].className="jstree-anchor "+B),(y.icon&&y.icon!==!0||y.icon===!1)&&(y.icon===!1?u.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":y.icon.indexOf("/")===-1&&y.icon.indexOf(".")===-1?u.childNodes[1].childNodes[0].className+=" "+y.icon+" jstree-themeicon-custom":(u.childNodes[1].childNodes[0].style.backgroundImage='url("'+y.icon+'")',u.childNodes[1].childNodes[0].style.backgroundPosition="center center",u.childNodes[1].childNodes[0].style.backgroundSize="auto",u.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?u.childNodes[1].appendChild(N.createTextNode(y.text)):u.childNodes[1].innerHTML+=y.text,v&&y.children.length&&(y.state.opened||p)&&y.state.loaded){for(D=N.createElement("UL"),D.setAttribute("role","group"),D.className="jstree-children",A=0,R=y.children.length;A<R;A++)D.appendChild(this.redraw_node(y.children[A],v,!0));u.appendChild(D)}if(I&&u.appendChild(I),!f){for(h||(h=this.element[0]),A=0,R=h.childNodes.length;A<R;A++)if(h.childNodes[A]&&h.childNodes[A].className&&h.childNodes[A].className.indexOf("jstree-children")!==-1){H=h.childNodes[A];break}H||(H=N.createElement("UL"),H.setAttribute("role","group"),H.className="jstree-children",h.appendChild(H)),h=H,_<h.childNodes.length?h.insertBefore(u,h.childNodes[_]):h.appendChild(u),j&&(L=this.element[0].scrollTop,G=this.element[0].scrollLeft,u.childNodes[1].focus(),this.element[0].scrollTop=L,this.element[0].scrollLeft=G)}return y.state.opened&&!y.state.loaded&&(y.state.opened=!1,setTimeout((function(){this.open_node(y.id,!1,0)}).bind(this),0)),u},open_node:function(u,v,f){var p,y,h,_;if(t.vakata.is_array(u)){for(u=u.slice(),p=0,y=u.length;p<y;p++)this.open_node(u[p],v,f);return!0}if(u=this.get_node(u),!u||u.id===t.jstree.root)return!1;if(f=f===n?this.settings.core.animation:f,!this.is_closed(u))return v&&v.call(this,u,!1),!1;if(this.is_loaded(u))return h=this.get_node(u,!0),_=this,h.length&&(f&&h.children(".jstree-children").length&&h.children(".jstree-children").stop(!0,!0),u.children.length&&!this._firstChild(h.children(".jstree-children")[0])&&this.draw_children(u),f?(this.trigger("before_open",{node:u}),h.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").children(".jstree-anchor").attr("aria-expanded",!0).end().children(".jstree-children").stop(!0,!0).slideDown(f,function(){this.style.display="",_.element&&_.trigger("after_open",{node:u})})):(this.trigger("before_open",{node:u}),h[0].className=h[0].className.replace("jstree-closed","jstree-open"),h[0].childNodes[1].setAttribute("aria-expanded",!0))),u.state.opened=!0,v&&v.call(this,u,!0),h.length||this.trigger("before_open",{node:u}),this.trigger("open_node",{node:u}),(!f||!h.length)&&this.trigger("after_open",{node:u}),!0;if(this.is_loading(u))return setTimeout((function(){this.open_node(u,v,f)}).bind(this),500);this.load_node(u,function(I,A){return A?this.open_node(I,v,f):v?v.call(this,I,!1):!1})},_open_to:function(u){if(u=this.get_node(u),!u||u.id===t.jstree.root)return!1;var v,f,p=u.parents;for(v=0,f=p.length;v<f;v+=1)v!==t.jstree.root&&this.open_node(p[v],!1,0);return t("#"+u.id.replace(t.jstree.idregex,"\\$&"),this.element)},close_node:function(u,v){var f,p,y,h;if(t.vakata.is_array(u)){for(u=u.slice(),f=0,p=u.length;f<p;f++)this.close_node(u[f],v);return!0}if(u=this.get_node(u),!u||u.id===t.jstree.root||this.is_closed(u))return!1;v=v===n?this.settings.core.animation:v,y=this,h=this.get_node(u,!0),u.state.opened=!1,this.trigger("close_node",{node:u}),h.length?v?h.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").children(".jstree-anchor").attr("aria-expanded",!1).end().children(".jstree-children").stop(!0,!0).slideUp(v,function(){this.style.display="",h.children(".jstree-children").remove(),y.element&&y.trigger("after_close",{node:u})}):(h[0].className=h[0].className.replace("jstree-open","jstree-closed"),h.children(".jstree-anchor").attr("aria-expanded",!1),h.children(".jstree-children").remove(),this.trigger("after_close",{node:u})):this.trigger("after_close",{node:u})},toggle_node:function(u){var v,f;if(t.vakata.is_array(u)){for(u=u.slice(),v=0,f=u.length;v<f;v++)this.toggle_node(u[v]);return!0}if(this.is_closed(u))return this.open_node(u);if(this.is_open(u))return this.close_node(u)},open_all:function(u,v,f){if(u||(u=t.jstree.root),u=this.get_node(u),!u)return!1;var p=u.id===t.jstree.root?this.get_container_ul():this.get_node(u,!0),y,h,_;if(!p.length){for(y=0,h=u.children_d.length;y<h;y++)this.is_closed(this._model.data[u.children_d[y]])&&(this._model.data[u.children_d[y]].state.opened=!0);return this.trigger("open_all",{node:u})}f=f||p,_=this,p=this.is_closed(u)?p.find(".jstree-closed").addBack():p.find(".jstree-closed"),p.each(function(){_.open_node(this,function(I,A){A&&this.is_parent(I)&&this.open_all(I,v,f)},v||0)}),f.find(".jstree-closed").length===0&&this.trigger("open_all",{node:this.get_node(f)})},close_all:function(u,v){if(u||(u=t.jstree.root),u=this.get_node(u),!u)return!1;var f=u.id===t.jstree.root?this.get_container_ul():this.get_node(u,!0),p=this,y,h;for(f.length&&(f=this.is_open(u)?f.find(".jstree-open").addBack():f.find(".jstree-open"),t(f.get().reverse()).each(function(){p.close_node(this,v||0)})),y=0,h=u.children_d.length;y<h;y++)this._model.data[u.children_d[y]].state.opened=!1;this.trigger("close_all",{node:u})},is_disabled:function(u){return u=this.get_node(u),u&&u.state&&u.state.disabled},enable_node:function(u){var v,f;if(t.vakata.is_array(u)){for(u=u.slice(),v=0,f=u.length;v<f;v++)this.enable_node(u[v]);return!0}if(u=this.get_node(u),!u||u.id===t.jstree.root)return!1;u.state.disabled=!1,this.get_node(u,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),this.trigger("enable_node",{node:u})},disable_node:function(u){var v,f;if(t.vakata.is_array(u)){for(u=u.slice(),v=0,f=u.length;v<f;v++)this.disable_node(u[v]);return!0}if(u=this.get_node(u),!u||u.id===t.jstree.root)return!1;u.state.disabled=!0,this.get_node(u,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),this.trigger("disable_node",{node:u})},is_hidden:function(u){return u=this.get_node(u),u.state.hidden===!0},hide_node:function(u,v){var f,p;if(t.vakata.is_array(u)){for(u=u.slice(),f=0,p=u.length;f<p;f++)this.hide_node(u[f],!0);return v||this.redraw(),!0}if(u=this.get_node(u),!u||u.id===t.jstree.root)return!1;u.state.hidden||(u.state.hidden=!0,this._node_changed(u.parent),v||this.redraw(),this.trigger("hide_node",{node:u}))},show_node:function(u,v){var f,p;if(t.vakata.is_array(u)){for(u=u.slice(),f=0,p=u.length;f<p;f++)this.show_node(u[f],!0);return v||this.redraw(),!0}if(u=this.get_node(u),!u||u.id===t.jstree.root)return!1;u.state.hidden&&(u.state.hidden=!1,this._node_changed(u.parent),v||this.redraw(),this.trigger("show_node",{node:u}))},hide_all:function(u){var v,f=this._model.data,p=[];for(v in f)f.hasOwnProperty(v)&&v!==t.jstree.root&&!f[v].state.hidden&&(f[v].state.hidden=!0,p.push(v));return this._model.force_full_redraw=!0,u||this.redraw(),this.trigger("hide_all",{nodes:p}),p},show_all:function(u){var v,f=this._model.data,p=[];for(v in f)f.hasOwnProperty(v)&&v!==t.jstree.root&&f[v].state.hidden&&(f[v].state.hidden=!1,p.push(v));return this._model.force_full_redraw=!0,u||this.redraw(),this.trigger("show_all",{nodes:p}),p},activate_node:function(u,v){if(this.is_disabled(u))return!1;if((!v||typeof v!="object")&&(v={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==n?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),!this.settings.core.multiple||!v.metaKey&&!v.ctrlKey&&!v.shiftKey||v.shiftKey&&(!this._data.core.last_clicked||!this.get_parent(u)||this.get_parent(u)!==this._data.core.last_clicked.parent))!this.settings.core.multiple&&(v.metaKey||v.ctrlKey||v.shiftKey)&&this.is_selected(u)?this.deselect_node(u,!1,v):((this.settings.core.allow_reselect||!this.is_selected(u)||this._data.core.selected.length!==1)&&(this.deselect_all(!0),this.select_node(u,!1,!1,v)),this._data.core.last_clicked=this.get_node(u));else if(v.shiftKey){var f=this.get_node(u).id,p=this._data.core.last_clicked.id,y=this.get_node(this._data.core.last_clicked.parent).children,h=!1,_,I;for(_=0,I=y.length;_<I;_+=1)y[_]===f&&(h=!h),y[_]===p&&(h=!h),!this.is_disabled(y[_])&&(h||y[_]===f||y[_]===p)?this.is_hidden(y[_])||this.select_node(y[_],!0,!1,v):v.ctrlKey||this.deselect_node(y[_],!0,v);this.trigger("changed",{action:"select_node",node:this.get_node(u),selected:this._data.core.selected,event:v})}else this.is_selected(u)?this.deselect_node(u,!1,v):(v.ctrlKey&&(this._data.core.last_clicked=this.get_node(u)),this.select_node(u,!1,!1,v));this.trigger("activate_node",{node:this.get_node(u),event:v})},hover_node:function(u){if(u=this.get_node(u,!0),!u||!u.length||u.children(".jstree-hovered").length)return!1;var v=this.element.find(".jstree-hovered"),f=this.element;v&&v.length&&this.dehover_node(v),u.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(u)}),setTimeout(function(){f.attr("aria-activedescendant",u[0].id)},0)},dehover_node:function(u){if(u=this.get_node(u,!0),!u||!u.length||!u.children(".jstree-hovered").length)return!1;u.children(".jstree-anchor").removeClass("jstree-hovered"),this.trigger("dehover_node",{node:this.get_node(u)})},select_node:function(u,v,f,p){var y,h,_;if(t.vakata.is_array(u)){for(u=u.slice(),h=0,_=u.length;h<_;h++)this.select_node(u[h],v,f,p);return!0}if(u=this.get_node(u),!u||u.id===t.jstree.root)return!1;y=this.get_node(u,!0),u.state.selected||(u.state.selected=!0,this._data.core.selected.push(u.id),f||(y=this._open_to(u)),y&&y.length&&y.children(".jstree-anchor").addClass("jstree-clicked").attr("aria-selected",!0),this.trigger("select_node",{node:u,selected:this._data.core.selected,event:p}),v||this.trigger("changed",{action:"select_node",node:u,selected:this._data.core.selected,event:p}))},deselect_node:function(u,v,f){var p,y,h;if(t.vakata.is_array(u)){for(u=u.slice(),p=0,y=u.length;p<y;p++)this.deselect_node(u[p],v,f);return!0}if(u=this.get_node(u),!u||u.id===t.jstree.root)return!1;h=this.get_node(u,!0),u.state.selected&&(u.state.selected=!1,this._data.core.selected=t.vakata.array_remove_item(this._data.core.selected,u.id),h.length&&h.children(".jstree-anchor").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_node",{node:u,selected:this._data.core.selected,event:f}),v||this.trigger("changed",{action:"deselect_node",node:u,selected:this._data.core.selected,event:f}))},select_all:function(u){var v=this._data.core.selected.concat([]),f,p;for(this._data.core.selected=this._model.data[t.jstree.root].children_d.concat(),f=0,p=this._data.core.selected.length;f<p;f++)this._model.data[this._data.core.selected[f]]&&(this._model.data[this._data.core.selected[f]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),u||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:v})},deselect_all:function(u){var v=this._data.core.selected.concat([]),f,p;for(f=0,p=this._data.core.selected.length;f<p;f++)this._model.data[this._data.core.selected[f]]&&(this._model.data[this._data.core.selected[f]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:v}),u||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:v})},is_selected:function(u){return u=this.get_node(u),!u||u.id===t.jstree.root?!1:u.state.selected},get_selected:function(u){return u?t.map(this._data.core.selected,(function(v){return this.get_node(v)}).bind(this)):this._data.core.selected.slice()},get_top_selected:function(u){var v=this.get_selected(!0),f={},p,y,h,_;for(p=0,y=v.length;p<y;p++)f[v[p].id]=v[p];for(p=0,y=v.length;p<y;p++)for(h=0,_=v[p].children_d.length;h<_;h++)f[v[p].children_d[h]]&&delete f[v[p].children_d[h]];v=[];for(p in f)f.hasOwnProperty(p)&&v.push(p);return u?t.map(v,(function(I){return this.get_node(I)}).bind(this)):v},get_bottom_selected:function(u){var v=this.get_selected(!0),f=[],p,y;for(p=0,y=v.length;p<y;p++)v[p].children.length||f.push(v[p].id);return u?t.map(f,(function(h){return this.get_node(h)}).bind(this)):f},get_state:function(){var u={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}},v;for(v in this._model.data)this._model.data.hasOwnProperty(v)&&v!==t.jstree.root&&(this._model.data[v].state.loaded&&this.settings.core.loaded_state&&u.core.loaded.push(v),this._model.data[v].state.opened&&u.core.open.push(v),this._model.data[v].state.selected&&u.core.selected.push(v));return u},set_state:function(u,v){if(u){if(u.core&&u.core.selected&&u.core.initial_selection===n&&(u.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),u.core){var f,p;if(u.core.loaded)return!this.settings.core.loaded_state||!t.vakata.is_array(u.core.loaded)||!u.core.loaded.length?(delete u.core.loaded,this.set_state(u,v)):this._load_nodes(u.core.loaded,function(y){delete u.core.loaded,this.set_state(u,v)}),!1;if(u.core.open)return!t.vakata.is_array(u.core.open)||!u.core.open.length?(delete u.core.open,this.set_state(u,v)):this._load_nodes(u.core.open,function(y){this.open_node(y,!1,0),delete u.core.open,this.set_state(u,v)}),!1;if(u.core.scroll)return u.core.scroll&&u.core.scroll.left!==n&&this.element.scrollLeft(u.core.scroll.left),u.core.scroll&&u.core.scroll.top!==n&&this.element.scrollTop(u.core.scroll.top),delete u.core.scroll,this.set_state(u,v),!1;if(u.core.selected)return f=this,(u.core.initial_selection===n||u.core.initial_selection===this._data.core.selected.concat([]).sort().join(","))&&(this.deselect_all(),t.each(u.core.selected,function(y,h){f.select_node(h,!1,!0)})),delete u.core.initial_selection,delete u.core.selected,this.set_state(u,v),!1;for(p in u)u.hasOwnProperty(p)&&p!=="core"&&t.inArray(p,this.settings.plugins)===-1&&delete u[p];if(t.isEmptyObject(u.core))return delete u.core,this.set_state(u,v),!1}return t.isEmptyObject(u)?(u=null,v&&v.call(this),this.trigger("set_state"),!1):!0}return!1},refresh:function(u,v){this._data.core.state=v===!0?{}:this.get_state(),v&&t.vakata.is_function(v)&&(this._data.core.state=v.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[t.jstree.root]={id:t.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var f=this.get_container_ul()[0].className;u||(this.element.html("<ul class='"+f+"' role='group'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(t.jstree.root,function(p,y){y&&(this.get_container_ul()[0].className=f,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(t.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(u){if(u=this.get_node(u),!u||u.id===t.jstree.root)return!1;var v=[],f=[],p=this._data.core.selected.concat([]);f.push(u.id),u.state.opened===!0&&v.push(u.id),this.get_node(u,!0).find(".jstree-open").each(function(){f.push(this.id),v.push(this.id)}),this._load_nodes(f,(function(y){this.open_node(v,!1,0),this.select_node(p),this.trigger("refresh_node",{node:u,nodes:y})}).bind(this),!1,!0)},set_id:function(u,v){if(u=this.get_node(u),!u||u.id===t.jstree.root)return!1;var f,p,y=this._model.data,h=u.id;for(v=v.toString(),y[u.parent].children[t.inArray(u.id,y[u.parent].children)]=v,f=0,p=u.parents.length;f<p;f++)y[u.parents[f]].children_d[t.inArray(u.id,y[u.parents[f]].children_d)]=v;for(f=0,p=u.children.length;f<p;f++)y[u.children[f]].parent=v;for(f=0,p=u.children_d.length;f<p;f++)y[u.children_d[f]].parents[t.inArray(u.id,y[u.children_d[f]].parents)]=v;return f=t.inArray(u.id,this._data.core.selected),f!==-1&&(this._data.core.selected[f]=v),f=this.get_node(u.id,!0),f&&(f.attr("id",v),this.element.attr("aria-activedescendant")===u.id&&this.element.attr("aria-activedescendant",v)),delete y[u.id],u.id=v,u.li_attr.id=v,y[v]=u,this.trigger("set_id",{node:u,new:u.id,old:h}),!0},get_text:function(u){return u=this.get_node(u),!u||u.id===t.jstree.root?!1:u.text},set_text:function(u,v){var f,p;if(t.vakata.is_array(u)){for(u=u.slice(),f=0,p=u.length;f<p;f++)this.set_text(u[f],v);return!0}return u=this.get_node(u),!u||u.id===t.jstree.root?!1:(u.text=v,this.get_node(u,!0).length&&this.redraw_node(u.id),this.trigger("set_text",{obj:u,text:v}),!0)},get_json:function(u,v,f){if(u=this.get_node(u||t.jstree.root),!u)return!1;v&&v.flat&&!f&&(f=[]);var p={id:u.id,text:u.text,icon:this.get_icon(u),li_attr:t.extend(!0,{},u.li_attr),a_attr:t.extend(!0,{},u.a_attr),state:{},data:v&&v.no_data?!1:t.extend(!0,t.vakata.is_array(u.data)?[]:{},u.data)},y,h;if(v&&v.flat?p.parent=u.parent:p.children=[],!v||!v.no_state)for(y in u.state)u.state.hasOwnProperty(y)&&(p.state[y]=u.state[y]);else delete p.state;if(v&&v.no_li_attr&&delete p.li_attr,v&&v.no_a_attr&&delete p.a_attr,v&&v.no_id&&(delete p.id,p.li_attr&&p.li_attr.id&&delete p.li_attr.id,p.a_attr&&p.a_attr.id&&delete p.a_attr.id),v&&v.flat&&u.id!==t.jstree.root&&f.push(p),!v||!v.no_children)for(y=0,h=u.children.length;y<h;y++)v&&v.flat?this.get_json(u.children[y],v,f):p.children.push(this.get_json(u.children[y],v));return v&&v.flat?f:u.id===t.jstree.root?p.children:p},create_node:function(u,v,f,p,y){if(u===null&&(u=t.jstree.root),u=this.get_node(u),!u)return!1;if(f=f===n?"last":f,!f.toString().match(/^(before|after)$/)&&!y&&!this.is_loaded(u))return this.load_node(u,function(){this.create_node(u,v,f,p,!0)});v||(v={text:this.get_string("New node")}),typeof v=="string"?v={text:v}:v=t.extend(!0,{},v),v.text===n&&(v.text=this.get_string("New node"));var h,_,I,A;switch(u.id===t.jstree.root&&(f==="before"&&(f="first"),f==="after"&&(f="last")),f){case"before":h=this.get_node(u.parent),f=t.inArray(u.id,h.children),u=h;break;case"after":h=this.get_node(u.parent),f=t.inArray(u.id,h.children)+1,u=h;break;case"inside":case"first":f=0;break;case"last":f=u.children.length;break;default:f||(f=0);break}if(f>u.children.length&&(f=u.children.length),v.id===n&&(v.id=!0),!this.check("create_node",v,u,f))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(v.id===!0&&delete v.id,v=this._parse_model_from_json(v,u.id,u.parents.concat()),!v)return!1;for(h=this.get_node(v),_=[],_.push(v),_=_.concat(h.children_d),this.trigger("model",{nodes:_,parent:u.id}),u.children_d=u.children_d.concat(_),I=0,A=u.parents.length;I<A;I++)this._model.data[u.parents[I]].children_d=this._model.data[u.parents[I]].children_d.concat(_);for(v=h,h=[],I=0,A=u.children.length;I<A;I++)h[I>=f?I+1:I]=u.children[I];return h[f]=v.id,u.children=h,this.redraw_node(u,!0),this.trigger("create_node",{node:this.get_node(v),parent:u.id,position:f}),p&&p.call(this,this.get_node(v)),v.id},rename_node:function(u,v){var f,p,y;if(t.vakata.is_array(u)){for(u=u.slice(),f=0,p=u.length;f<p;f++)this.rename_node(u[f],v);return!0}return u=this.get_node(u),!u||u.id===t.jstree.root?!1:(y=u.text,this.check("rename_node",u,this.get_parent(u),v)?(this.set_text(u,v),this.trigger("rename_node",{node:u,text:v,old:y}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1))},delete_node:function(u){var v,f,p,y,h,_,I,A,R,D,B,N;if(t.vakata.is_array(u)){for(u=u.slice(),v=0,f=u.length;v<f;v++)this.delete_node(u[v]);return!0}if(u=this.get_node(u),!u||u.id===t.jstree.root)return!1;if(p=this.get_node(u.parent),y=t.inArray(u.id,p.children),D=!1,!this.check("delete_node",u,p,y))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(y!==-1&&(p.children=t.vakata.array_remove(p.children,y)),h=u.children_d.concat([]),h.push(u.id),_=0,I=u.parents.length;_<I;_++)this._model.data[u.parents[_]].children_d=t.vakata.array_filter(this._model.data[u.parents[_]].children_d,function(F){return t.inArray(F,h)===-1});for(A=0,R=h.length;A<R;A++)if(this._model.data[h[A]].state.selected){D=!0;break}for(D&&(this._data.core.selected=t.vakata.array_filter(this._data.core.selected,function(F){return t.inArray(F,h)===-1})),this.trigger("delete_node",{node:u,parent:p.id}),D&&this.trigger("changed",{action:"delete_node",node:u,selected:this._data.core.selected,parent:p.id}),A=0,R=h.length;A<R;A++)delete this._model.data[h[A]];return t.inArray(this._data.core.focused,h)!==-1&&(this._data.core.focused=null,B=this.element[0].scrollTop,N=this.element[0].scrollLeft,p.id===t.jstree.root?this._model.data[t.jstree.root].children[0]&&this.get_node(this._model.data[t.jstree.root].children[0],!0).children(".jstree-anchor").trigger("focus"):this.get_node(p,!0).children(".jstree-anchor").trigger("focus"),this.element[0].scrollTop=B,this.element[0].scrollLeft=N),this.redraw_node(p,!0),!0},check:function(u,v,f,p,y){v=v&&v.id?v:this.get_node(v),f=f&&f.id?f:this.get_node(f);var h=u.match(/^(move_node|copy_node|create_node)$/i)?f:v,_=this.settings.core.check_callback;if(u==="move_node"||u==="copy_node"){if((!y||!y.is_multi)&&u==="move_node"&&t.inArray(v.id,f.children)===p)return this._data.core.last_error={error:"check",plugin:"core",id:"core_08",reason:"Moving node to its current position",data:JSON.stringify({chk:u,pos:p,obj:v&&v.id?v.id:!1,par:f&&f.id?f.id:!1})},!1;if((!y||!y.is_multi)&&(v.id===f.id||u==="move_node"&&t.inArray(v.id,f.children)===p||t.inArray(f.id,v.children_d)!==-1))return this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:u,pos:p,obj:v&&v.id?v.id:!1,par:f&&f.id?f.id:!1})},!1}return h&&h.data&&(h=h.data),h&&h.functions&&(h.functions[u]===!1||h.functions[u]===!0)?(h.functions[u]===!1&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+u,data:JSON.stringify({chk:u,pos:p,obj:v&&v.id?v.id:!1,par:f&&f.id?f.id:!1})}),h.functions[u]):_===!1||t.vakata.is_function(_)&&_.call(this,u,v,f,p,y)===!1||_&&_[u]===!1?(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+u,data:JSON.stringify({chk:u,pos:p,obj:v&&v.id?v.id:!1,par:f&&f.id?f.id:!1})},!1):!0},last_error:function(){return this._data.core.last_error},move_node:function(u,v,f,p,y,h,_){var I,A,R,D,B,N,F,j,H,L,G,$,Z,U;if(v=this.get_node(v),f=f===n?0:f,!v)return!1;if(!f.toString().match(/^(before|after)$/)&&!y&&!this.is_loaded(v))return this.load_node(v,function(){this.move_node(u,v,f,p,!0,!1,_)});if(t.vakata.is_array(u))if(u.length===1)u=u[0];else{for(I=0,A=u.length;I<A;I++)(H=this.move_node(u[I],v,f,p,y,!1,_))&&(v=H,f="after");return this.redraw(),!0}if(u=u&&u.id!==n?u:this.get_node(u),!u||u.id===t.jstree.root)return!1;if(R=(u.parent||t.jstree.root).toString(),B=!f.toString().match(/^(before|after)$/)||v.id===t.jstree.root?v:this.get_node(v.parent),N=_||(this._model.data[u.id]?this:t.jstree.reference(u.id)),F=!N||!N._id||this._id!==N._id,D=N&&N._id&&R&&N._model.data[R]&&N._model.data[R].children?t.inArray(u.id,N._model.data[R].children):-1,N&&N._id&&(u=N._model.data[u.id]),F)return(H=this.copy_node(u,v,f,p,y,!1,_))?(N&&N.delete_node(u),H):!1;switch(v.id===t.jstree.root&&(f==="before"&&(f="first"),f==="after"&&(f="last")),f){case"before":f=t.inArray(v.id,B.children);break;case"after":f=t.inArray(v.id,B.children)+1;break;case"inside":case"first":f=0;break;case"last":f=B.children.length;break;default:f||(f=0);break}if(f>B.children.length&&(f=B.children.length),!this.check("move_node",u,B,f,{core:!0,origin:_,is_multi:N&&N._id&&N._id!==this._id,is_foreign:!N||!N._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(u.parent===B.id){for(j=B.children.concat(),H=t.inArray(u.id,j),H!==-1&&(j=t.vakata.array_remove(j,H),f>H&&f--),H=[],L=0,G=j.length;L<G;L++)H[L>=f?L+1:L]=j[L];H[f]=u.id,B.children=H,this._node_changed(B.id),this.redraw(B.id===t.jstree.root)}else{for(H=u.children_d.concat(),H.push(u.id),L=0,G=u.parents.length;L<G;L++){for(j=[],U=N._model.data[u.parents[L]].children_d,$=0,Z=U.length;$<Z;$++)t.inArray(U[$],H)===-1&&j.push(U[$]);N._model.data[u.parents[L]].children_d=j}for(N._model.data[R].children=t.vakata.array_remove_item(N._model.data[R].children,u.id),L=0,G=B.parents.length;L<G;L++)this._model.data[B.parents[L]].children_d=this._model.data[B.parents[L]].children_d.concat(H);for(j=[],L=0,G=B.children.length;L<G;L++)j[L>=f?L+1:L]=B.children[L];for(j[f]=u.id,B.children=j,B.children_d.push(u.id),B.children_d=B.children_d.concat(u.children_d),u.parent=B.id,H=B.parents.concat(),H.unshift(B.id),U=u.parents.length,u.parents=H,H=H.concat(),L=0,G=u.children_d.length;L<G;L++)this._model.data[u.children_d[L]].parents=this._model.data[u.children_d[L]].parents.slice(0,U*-1),Array.prototype.push.apply(this._model.data[u.children_d[L]].parents,H);(R===t.jstree.root||B.id===t.jstree.root)&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(R),this._node_changed(B.id)),h||this.redraw()}return p&&p.call(this,u,B,f),this.trigger("move_node",{node:u,parent:B.id,position:f,old_parent:R,old_position:D,is_multi:N&&N._id&&N._id!==this._id,is_foreign:!N||!N._id,old_instance:N,new_instance:this}),u.id},copy_node:function(u,v,f,p,y,h,_){var I,A,R,D,B,N,F,j,H,L;if(v=this.get_node(v),f=f===n?0:f,!v)return!1;if(!f.toString().match(/^(before|after)$/)&&!y&&!this.is_loaded(v))return this.load_node(v,function(){this.copy_node(u,v,f,p,!0,!1,_)});if(t.vakata.is_array(u))if(u.length===1)u=u[0];else{for(I=0,A=u.length;I<A;I++)(D=this.copy_node(u[I],v,f,p,y,!0,_))&&(v=D,f="after");return this.redraw(),!0}if(u=u&&u.id!==n?u:this.get_node(u),!u||u.id===t.jstree.root)return!1;switch(j=(u.parent||t.jstree.root).toString(),H=!f.toString().match(/^(before|after)$/)||v.id===t.jstree.root?v:this.get_node(v.parent),L=_||(this._model.data[u.id]?this:t.jstree.reference(u.id)),!L||!L._id||(this._id,L._id),L&&L._id&&(u=L._model.data[u.id]),v.id===t.jstree.root&&(f==="before"&&(f="first"),f==="after"&&(f="last")),f){case"before":f=t.inArray(v.id,H.children);break;case"after":f=t.inArray(v.id,H.children)+1;break;case"inside":case"first":f=0;break;case"last":f=H.children.length;break;default:f||(f=0);break}if(f>H.children.length&&(f=H.children.length),!this.check("copy_node",u,H,f,{core:!0,origin:_,is_multi:L&&L._id&&L._id!==this._id,is_foreign:!L||!L._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(F=L?L.get_json(u,{no_id:!0,no_data:!0,no_state:!0}):u,!F||(F.id===!0&&delete F.id,F=this._parse_model_from_json(F,H.id,H.parents.concat()),!F))return!1;for(D=this.get_node(F),u&&u.state&&u.state.loaded===!1&&(D.state.loaded=!1),R=[],R.push(F),R=R.concat(D.children_d),this.trigger("model",{nodes:R,parent:H.id}),B=0,N=H.parents.length;B<N;B++)this._model.data[H.parents[B]].children_d=this._model.data[H.parents[B]].children_d.concat(R);for(R=[],B=0,N=H.children.length;B<N;B++)R[B>=f?B+1:B]=H.children[B];return R[f]=D.id,H.children=R,H.children_d.push(D.id),H.children_d=H.children_d.concat(D.children_d),H.id===t.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(H.id),h||this.redraw(H.id===t.jstree.root),p&&p.call(this,D,H,f),this.trigger("copy_node",{node:D,original:u,parent:H.id,position:f,old_parent:j,old_position:L&&L._id&&j&&L._model.data[j]&&L._model.data[j].children?t.inArray(u.id,L._model.data[j].children):-1,is_multi:L&&L._id&&L._id!==this._id,is_foreign:!L||!L._id,old_instance:L,new_instance:this}),D.id},cut:function(u){if(u||(u=this._data.core.selected.concat()),t.vakata.is_array(u)||(u=[u]),!u.length)return!1;var v=[],f,p,y;for(p=0,y=u.length;p<y;p++)f=this.get_node(u[p]),f&&(f.id||f.id===0)&&f.id!==t.jstree.root&&v.push(f);if(!v.length)return!1;i=v,o=this,s="move_node",this.trigger("cut",{node:u})},copy:function(u){if(u||(u=this._data.core.selected.concat()),t.vakata.is_array(u)||(u=[u]),!u.length)return!1;var v=[],f,p,y;for(p=0,y=u.length;p<y;p++)f=this.get_node(u[p]),f&&f.id!==n&&f.id!==t.jstree.root&&v.push(f);if(!v.length)return!1;i=v,o=this,s="copy_node",this.trigger("copy",{node:u})},get_buffer:function(){return{mode:s,node:i,inst:o}},can_paste:function(){return s!==!1&&i!==!1},paste:function(u,v){if(u=this.get_node(u),!u||!s||!s.match(/^(copy_node|move_node)$/)||!i)return!1;this[s](i,u,v,!1,!1,!1,o)&&this.trigger("paste",{parent:u.id,node:i,mode:s}),i=!1,s=!1,o=!1},clear_buffer:function(){i=!1,s=!1,o=!1,this.trigger("clear_buffer")},edit:function(u,v,f){var p,y,h,_,I,A,R,D,B,N=!1;if(u=this.get_node(u),!u)return!1;if(!this.check("edit",u,this.get_parent(u)))return this.settings.core.error.call(this,this._data.core.last_error),!1;B=u,v=typeof v=="string"?v:u.text,this.set_text(u,""),u=this._open_to(u),B.text=v,p=this._data.core.rtl,y=this.element.width(),this._data.core.focused=B.id,h=u.children(".jstree-anchor").trigger("focus"),_=t("<span></span>");/*!
183
- oi = obj.children("i:visible"),
184
- ai = a.children("i:visible"),
185
- w1 = oi.width() * oi.length,
186
- w2 = ai.width() * ai.length,
187
- */I=v,A=t("<div></div>",{css:{position:"absolute",top:"-200px",left:p?"0px":"-1000px",visibility:"hidden"}}).appendTo(c.body),R=t("<input />",{value:I,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},on:{blur:(function(F){F.stopImmediatePropagation(),F.preventDefault();var j=_.children(".jstree-rename-input"),H=j.val(),L=this.settings.core.force_text,G;H===""&&(H=I),A.remove(),_.replaceWith(h),_.remove(),I=L?I:t("<div></div>").append(t.parseHTML(I)).html(),u=this.get_node(u),this.set_text(u,I),G=!!this.rename_node(u,L?t("<div></div>").text(H).text():t("<div></div>").append(t.parseHTML(H)).html()),G||this.set_text(u,I),this._data.core.focused=B.id,setTimeout((function(){var $=this.get_node(B.id,!0);$.length&&(this._data.core.focused=B.id,$.children(".jstree-anchor").trigger("focus"))}).bind(this),0),f&&f.call(this,B,G,N,H),R=null}).bind(this),keydown:function(F){var j=F.which;j===27&&(N=!0,this.value=I),(j===27||j===13||j===37||j===38||j===39||j===40||j===32)&&F.stopImmediatePropagation(),(j===27||j===13)&&(F.preventDefault(),this.blur())},click:function(F){F.stopImmediatePropagation()},mousedown:function(F){F.stopImmediatePropagation()},keyup:function(F){R.width(Math.min(A.text("pW"+this.value).width(),y))},keypress:function(F){if(F.which===13)return!1}}}),D={fontFamily:h.css("fontFamily")||"",fontSize:h.css("fontSize")||"",fontWeight:h.css("fontWeight")||"",fontStyle:h.css("fontStyle")||"",fontStretch:h.css("fontStretch")||"",fontVariant:h.css("fontVariant")||"",letterSpacing:h.css("letterSpacing")||"",wordSpacing:h.css("wordSpacing")||""},_.attr("class",h.attr("class")).append(h.contents().clone()).append(R),h.replaceWith(_),A.css(D),R.css(D).width(Math.min(A.text("pW"+R[0].value).width(),y))[0].select(),t(c).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(F){R&&F.target!==R&&t(R).trigger("blur")})},set_theme:function(u,v){if(!u)return!1;if(v===!0){var f=this.settings.core.themes.dir;f||(f=t.jstree.path+"/themes"),v=f+"/"+u+"/style.css"}v&&t.inArray(v,a)===-1&&(t("head").append('<link rel="stylesheet" href="'+v+'" type="text/css" />'),a.push(v)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=u,this.element.addClass("jstree-"+u),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+u+"-responsive"),this.trigger("set_theme",{theme:u})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(u){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=u,u&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(u,v){var f,p,y,h;if(t.vakata.is_array(u)){for(u=u.slice(),f=0,p=u.length;f<p;f++)this.set_icon(u[f],v);return!0}return u=this.get_node(u),!u||u.id===t.jstree.root?!1:(h=u.icon,u.icon=v===!0||v===null||v===n||v===""?!0:v,y=this.get_node(u,!0).children(".jstree-anchor").children(".jstree-themeicon"),v===!1?(y.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),this.hide_icon(u)):v===!0||v===null||v===n||v===""?(y.removeClass("jstree-themeicon-custom "+h).css("background","").removeAttr("rel"),h===!1&&this.show_icon(u)):v.indexOf("/")===-1&&v.indexOf(".")===-1?(y.removeClass(h).css("background",""),y.addClass(v+" jstree-themeicon-custom").attr("rel",v),h===!1&&this.show_icon(u)):(y.removeClass(h).css("background",""),y.addClass("jstree-themeicon-custom").css("background","url('"+v+"') center center no-repeat").attr("rel",v),h===!1&&this.show_icon(u)),!0)},get_icon:function(u){return u=this.get_node(u),!u||u.id===t.jstree.root?!1:u.icon},hide_icon:function(u){var v,f;if(t.vakata.is_array(u)){for(u=u.slice(),v=0,f=u.length;v<f;v++)this.hide_icon(u[v]);return!0}return u=this.get_node(u),!u||u===t.jstree.root?!1:(u.icon=!1,this.get_node(u,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0)},show_icon:function(u){var v,f,p;if(t.vakata.is_array(u)){for(u=u.slice(),v=0,f=u.length;v<f;v++)this.show_icon(u[v]);return!0}return u=this.get_node(u),!u||u===t.jstree.root?!1:(p=this.get_node(u,!0),u.icon=p.length?p.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"):!0,u.icon||(u.icon=!0),p.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0)}},t.vakata={},t.vakata.attributes=function(u,v){u=t(u)[0];var f=v?{}:[];return u&&u.attributes&&t.each(u.attributes,function(p,y){t.inArray(y.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])===-1&&y.value!==null&&t.vakata.trim(y.value)!==""&&(v?f[y.name]=y.value:f.push(y.name))}),f},t.vakata.array_unique=function(u){var v=[],f,p,y={};for(f=0,p=u.length;f<p;f++)y[u[f]]===n&&(v.push(u[f]),y[u[f]]=!0);return v},t.vakata.array_remove=function(u,v){return u.splice(v,1),u},t.vakata.array_remove_item=function(u,v){var f=t.inArray(v,u);return f!==-1?t.vakata.array_remove(u,f):u},t.vakata.array_filter=function(u,v,f,p,y){if(u.filter)return u.filter(v,f);p=[];for(y in u)~~y+""==y+""&&y>=0&&v.call(f,u[y],+y,u)&&p.push(u[y]);return p},t.vakata.trim=function(u){return String.prototype.trim?String.prototype.trim.call(u.toString()):u.toString().replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},t.vakata.is_function=function(u){return typeof u=="function"&&typeof u.nodeType!="number"},t.vakata.is_array=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"},Function.prototype.bind||(Function.prototype.bind=function(){var u=this,v=arguments[0],f=Array.prototype.slice.call(arguments,1);if(typeof u!="function")throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");return function(){var p=f.concat(Array.prototype.slice.call(arguments));return u.apply(v,p)}}),t.jstree.plugins.changed=function(u,v){var f=[];this.trigger=function(p,y){var h,_;if(y||(y={}),p.replace(".jstree","")==="changed"){y.changed={selected:[],deselected:[]};var I={};for(h=0,_=f.length;h<_;h++)I[f[h]]=1;for(h=0,_=y.selected.length;h<_;h++)I[y.selected[h]]?I[y.selected[h]]=2:y.changed.selected.push(y.selected[h]);for(h=0,_=f.length;h<_;h++)I[f[h]]===1&&y.changed.deselected.push(f[h]);f=y.selected.slice()}v.trigger.call(this,p,y)},this.refresh=function(p,y){return f=[],v.refresh.apply(this,arguments)}};var b=c.createElement("I");b.className="jstree-icon jstree-checkbox",b.setAttribute("role","presentation"),t.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},t.jstree.plugins.checkbox=function(u,v){this.bind=function(){v.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",(function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")}).bind(this)).on("loading.jstree",(function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()}).bind(this)),this.settings.checkbox.cascade.indexOf("undetermined")!==-1&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",(function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)}).bind(this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",(function(f,p){var y=this._model.data;y[p.parent];var h=p.nodes,_,I;for(_=0,I=h.length;_<I;_++)y[h[_]].state.checked=y[h[_]].state.checked||y[h[_]].original&&y[h[_]].original.state&&y[h[_]].original.state.checked,y[h[_]].state.checked&&this._data.checkbox.selected.push(h[_])}).bind(this)),(this.settings.checkbox.cascade.indexOf("up")!==-1||this.settings.checkbox.cascade.indexOf("down")!==-1)&&this.element.on("model.jstree",(function(f,p){var y=this._model.data,h=y[p.parent],_=p.nodes,I=[],A,R,D,B,N,F,j=this.settings.checkbox.cascade,H=this.settings.checkbox.tie_selection;if(j.indexOf("down")!==-1){if(h.state[H?"selected":"checked"]){for(R=0,D=_.length;R<D;R++)y[_[R]].state[H?"selected":"checked"]=!0;this._data[H?"core":"checkbox"].selected=this._data[H?"core":"checkbox"].selected.concat(_)}else for(R=0,D=_.length;R<D;R++)if(y[_[R]].state[H?"selected":"checked"]){for(B=0,N=y[_[R]].children_d.length;B<N;B++)y[y[_[R]].children_d[B]].state[H?"selected":"checked"]=!0;this._data[H?"core":"checkbox"].selected=this._data[H?"core":"checkbox"].selected.concat(y[_[R]].children_d)}}if(j.indexOf("up")!==-1){for(R=0,D=h.children_d.length;R<D;R++)y[h.children_d[R]].children.length||I.push(y[h.children_d[R]].parent);for(I=t.vakata.array_unique(I),B=0,N=I.length;B<N;B++)for(h=y[I[B]];h&&h.id!==t.jstree.root;){for(A=0,R=0,D=h.children.length;R<D;R++)A+=y[h.children[R]].state[H?"selected":"checked"];if(A===D)h.state[H?"selected":"checked"]=!0,this._data[H?"core":"checkbox"].selected.push(h.id),F=this.get_node(h,!0),F&&F.length&&F.children(".jstree-anchor").attr("aria-selected",!0).addClass(H?"jstree-clicked":"jstree-checked");else break;h=this.get_node(h.parent)}}this._data[H?"core":"checkbox"].selected=t.vakata.array_unique(this._data[H?"core":"checkbox"].selected)}).bind(this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",(function(f,p){var y=p.node,h=this._model.data,_=this.get_node(y.parent),I,A,R,D,B=this.settings.checkbox.cascade,N=this.settings.checkbox.tie_selection,F={},j=this._data[N?"core":"checkbox"].selected;for(I=0,A=j.length;I<A;I++)F[j[I]]=!0;if(B.indexOf("down")!==-1){var H=this._cascade_new_checked_state(y.id,!0),L=y.children_d.concat(y.id);for(I=0,A=L.length;I<A;I++)H.indexOf(L[I])>-1?F[L[I]]=!0:delete F[L[I]]}if(B.indexOf("up")!==-1)for(;_&&_.id!==t.jstree.root;){for(R=0,I=0,A=_.children.length;I<A;I++)R+=h[_.children[I]].state[N?"selected":"checked"];if(R===A)_.state[N?"selected":"checked"]=!0,F[_.id]=!0,D=this.get_node(_,!0),D&&D.length&&D.children(".jstree-anchor").attr("aria-selected",!0).addClass(N?"jstree-clicked":"jstree-checked");else break;_=this.get_node(_.parent)}j=[];for(I in F)F.hasOwnProperty(I)&&j.push(I);this._data[N?"core":"checkbox"].selected=j}).bind(this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",(function(f,p){var y=this.get_node(t.jstree.root),h=this._model.data,_,I,A;for(_=0,I=y.children_d.length;_<I;_++)A=h[y.children_d[_]],A&&A.original&&A.original.state&&A.original.state.undetermined&&(A.original.state.undetermined=!1)}).bind(this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",(function(f,p){var y=p.node;this.get_node(y,!0);var h,_,I,A=this.settings.checkbox.cascade,R=this.settings.checkbox.tie_selection,D=this._data[R?"core":"checkbox"].selected,B=y.children_d.concat(y.id);if(A.indexOf("down")!==-1){var N=this._cascade_new_checked_state(y.id,!1);D=t.vakata.array_filter(D,function(F){return B.indexOf(F)===-1||N.indexOf(F)>-1})}if(A.indexOf("up")!==-1&&D.indexOf(y.id)===-1){for(h=0,_=y.parents.length;h<_;h++)I=this._model.data[y.parents[h]],I.state[R?"selected":"checked"]=!1,I&&I.original&&I.original.state&&I.original.state.undetermined&&(I.original.state.undetermined=!1),I=this.get_node(y.parents[h],!0),I&&I.length&&I.children(".jstree-anchor").attr("aria-selected",!1).removeClass(R?"jstree-clicked":"jstree-checked");D=t.vakata.array_filter(D,function(F){return y.parents.indexOf(F)===-1})}this._data[R?"core":"checkbox"].selected=D}).bind(this)),this.settings.checkbox.cascade.indexOf("up")!==-1&&this.element.on("delete_node.jstree",(function(f,p){for(var y=this.get_node(p.parent),h=this._model.data,_,I,A,R,D=this.settings.checkbox.tie_selection;y&&y.id!==t.jstree.root&&!y.state[D?"selected":"checked"];){for(A=0,_=0,I=y.children.length;_<I;_++)A+=h[y.children[_]].state[D?"selected":"checked"];if(I>0&&A===I)y.state[D?"selected":"checked"]=!0,this._data[D?"core":"checkbox"].selected.push(y.id),R=this.get_node(y,!0),R&&R.length&&R.children(".jstree-anchor").attr("aria-selected",!0).addClass(D?"jstree-clicked":"jstree-checked");else break;y=this.get_node(y.parent)}}).bind(this)).on("move_node.jstree",(function(f,p){var y=p.is_multi,h=p.old_parent,_=this.get_node(p.parent),I=this._model.data,A,R,D,B,N,F=this.settings.checkbox.tie_selection;if(!y)for(A=this.get_node(h);A&&A.id!==t.jstree.root&&!A.state[F?"selected":"checked"];){for(R=0,D=0,B=A.children.length;D<B;D++)R+=I[A.children[D]].state[F?"selected":"checked"];if(B>0&&R===B)A.state[F?"selected":"checked"]=!0,this._data[F?"core":"checkbox"].selected.push(A.id),N=this.get_node(A,!0),N&&N.length&&N.children(".jstree-anchor").attr("aria-selected",!0).addClass(F?"jstree-clicked":"jstree-checked");else break;A=this.get_node(A.parent)}for(A=_;A&&A.id!==t.jstree.root;){for(R=0,D=0,B=A.children.length;D<B;D++)R+=I[A.children[D]].state[F?"selected":"checked"];if(R===B)A.state[F?"selected":"checked"]||(A.state[F?"selected":"checked"]=!0,this._data[F?"core":"checkbox"].selected.push(A.id),N=this.get_node(A,!0),N&&N.length&&N.children(".jstree-anchor").attr("aria-selected",!0).addClass(F?"jstree-clicked":"jstree-checked"));else if(A.state[F?"selected":"checked"])A.state[F?"selected":"checked"]=!1,this._data[F?"core":"checkbox"].selected=t.vakata.array_remove_item(this._data[F?"core":"checkbox"].selected,A.id),N=this.get_node(A,!0),N&&N.length&&N.children(".jstree-anchor").attr("aria-selected",!1).removeClass(F?"jstree-clicked":"jstree-checked");else break;A=this.get_node(A.parent)}}).bind(this))},this.get_undetermined=function(f){if(this.settings.checkbox.cascade.indexOf("undetermined")===-1)return[];var p,y,h,_,I={},A=this._model.data,R=this.settings.checkbox.tie_selection,D=this._data[R?"core":"checkbox"].selected,B=[],N=this,F=[];for(p=0,y=D.length;p<y;p++)if(A[D[p]]&&A[D[p]].parents)for(h=0,_=A[D[p]].parents.length;h<_&&I[A[D[p]].parents[h]]===n;h++)A[D[p]].parents[h]!==t.jstree.root&&(I[A[D[p]].parents[h]]=!0,B.push(A[D[p]].parents[h]));for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var j=N.get_node(this),H;if(j){if(j.state.loaded){for(p=0,y=j.children_d.length;p<y;p++)if(H=A[j.children_d[p]],!H.state.loaded&&H.original&&H.original.state&&H.original.state.undetermined&&H.original.state.undetermined===!0)for(I[H.id]===n&&H.id!==t.jstree.root&&(I[H.id]=!0,B.push(H.id)),h=0,_=H.parents.length;h<_;h++)I[H.parents[h]]===n&&H.parents[h]!==t.jstree.root&&(I[H.parents[h]]=!0,B.push(H.parents[h]))}else if(j.original&&j.original.state&&j.original.state.undetermined&&j.original.state.undetermined===!0)for(I[j.id]===n&&j.id!==t.jstree.root&&(I[j.id]=!0,B.push(j.id)),h=0,_=j.parents.length;h<_;h++)I[j.parents[h]]===n&&j.parents[h]!==t.jstree.root&&(I[j.parents[h]]=!0,B.push(j.parents[h]))}}),p=0,y=B.length;p<y;p++)A[B[p]].state[R?"selected":"checked"]||F.push(f?A[B[p]]:B[p]);return F},this._undetermined=function(){if(this.element!==null){var f=this.get_undetermined(!1),p,y,h;for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),p=0,y=f.length;p<y;p++)h=this.get_node(f[p],!0),h&&h.length&&h.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(f,p,y,h){if(f=v.redraw_node.apply(this,arguments),f){var _,I,A=null,R=null;for(_=0,I=f.childNodes.length;_<I;_++)if(f.childNodes[_]&&f.childNodes[_].className&&f.childNodes[_].className.indexOf("jstree-anchor")!==-1){A=f.childNodes[_];break}A&&(!this.settings.checkbox.tie_selection&&this._model.data[f.id].state.checked&&(A.className+=" jstree-checked"),R=b.cloneNode(!1),this._model.data[f.id].state.checkbox_disabled&&(R.className+=" jstree-checkbox-disabled"),A.insertBefore(R,A.childNodes[0]))}return!y&&this.settings.checkbox.cascade.indexOf("undetermined")!==-1&&(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)),f},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(f){f=this.get_node(f);var p=this.settings.checkbox.cascade,y,h,_=this.settings.checkbox.tie_selection,I=this._data[_?"core":"checkbox"].selected,A=this._model.data;if(!f||f.state[_?"selected":"checked"]===!0||p.indexOf("undetermined")===-1||p.indexOf("down")===-1&&p.indexOf("up")===-1)return!1;if(!f.state.loaded&&f.original.state.undetermined===!0)return!0;for(y=0,h=f.children_d.length;y<h;y++)if(t.inArray(f.children_d[y],I)!==-1||!A[f.children_d[y]].state.loaded&&A[f.children_d[y]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(f){var p,y,h;if(t.vakata.is_array(f)){for(f=f.slice(),p=0,y=f.length;p<y;p++)this.disable_checkbox(f[p]);return!0}if(f=this.get_node(f),!f||f.id===t.jstree.root)return!1;h=this.get_node(f,!0),f.state.checkbox_disabled||(f.state.checkbox_disabled=!0,h&&h.length&&h.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:f}))},this.enable_checkbox=function(f){var p,y,h;if(t.vakata.is_array(f)){for(f=f.slice(),p=0,y=f.length;p<y;p++)this.enable_checkbox(f[p]);return!0}if(f=this.get_node(f),!f||f.id===t.jstree.root)return!1;h=this.get_node(f,!0),f.state.checkbox_disabled&&(f.state.checkbox_disabled=!1,h&&h.length&&h.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:f}))},this.activate_node=function(f,p){if(t(p.target).hasClass("jstree-checkbox-disabled"))return!1;if(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||t(p.target).hasClass("jstree-checkbox"))&&(p.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!t(p.target).hasClass("jstree-checkbox"))return v.activate_node.call(this,f,p);if(this.is_disabled(f))return!1;this.is_checked(f)?this.uncheck_node(f,p):this.check_node(f,p),this.trigger("activate_node",{node:this.get_node(f)})},this.delete_node=function(f){if(this.settings.checkbox.tie_selection||t.vakata.is_array(f))return v.delete_node.call(this,f);var p,y,h,_=!1;if(f=this.get_node(f),!f||f.id===t.jstree.root)return!1;for(p=f.children_d.concat([]),p.push(f.id),y=0,h=p.length;y<h;y++)if(this._model.data[p[y]].state.checked){_=!0;break}return _&&(this._data.checkbox.selected=t.vakata.array_filter(this._data.checkbox.selected,function(I){return t.inArray(I,p)===-1})),v.delete_node.call(this,f)},this._cascade_new_checked_state=function(f,p){var y=this,h=this.settings.checkbox.tie_selection,_=this._model.data[f],I=[],A=[],R,D,B;if((this.settings.checkbox.cascade_to_disabled||!_.state.disabled)&&(this.settings.checkbox.cascade_to_hidden||!_.state.hidden)){if(_.children)for(R=0,D=_.children.length;R<D;R++){var N=_.children[R];B=y._cascade_new_checked_state(N,p),I=I.concat(B),B.indexOf(N)>-1&&A.push(N)}var F=y.get_node(_,!0),j=A.length>0&&A.length<_.children.length;_.original&&_.original.state&&_.original.state.undetermined&&(_.original.state.undetermined=j),j?(_.state[h?"selected":"checked"]=!1,F.children(".jstree-anchor").attr("aria-selected",!1).removeClass(h?"jstree-clicked":"jstree-checked")):p&&A.length===_.children.length?(_.state[h?"selected":"checked"]=p,I.push(_.id),F.children(".jstree-anchor").attr("aria-selected",!0).addClass(h?"jstree-clicked":"jstree-checked")):(_.state[h?"selected":"checked"]=!1,F.children(".jstree-anchor").attr("aria-selected",!1).removeClass(h?"jstree-clicked":"jstree-checked"))}else B=this.get_checked_descendants(f),_.state[h?"selected":"checked"]&&B.push(_.id),I=I.concat(B);return I},this.get_checked_descendants=function(f){var p=this,y=p.settings.checkbox.tie_selection,h=p._model.data[f];return t.vakata.array_filter(h.children_d,function(_){return p._model.data[_].state[y?"selected":"checked"]})},this.check_node=function(f,p){if(this.settings.checkbox.tie_selection)return this.select_node(f,!1,!0,p);var y,h,_;if(t.vakata.is_array(f)){for(f=f.slice(),h=0,_=f.length;h<_;h++)this.check_node(f[h],p);return!0}if(f=this.get_node(f),!f||f.id===t.jstree.root)return!1;y=this.get_node(f,!0),f.state.checked||(f.state.checked=!0,this._data.checkbox.selected.push(f.id),y&&y.length&&y.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:f,selected:this._data.checkbox.selected,event:p}))},this.uncheck_node=function(f,p){if(this.settings.checkbox.tie_selection)return this.deselect_node(f,!1,p);var y,h,_;if(t.vakata.is_array(f)){for(f=f.slice(),y=0,h=f.length;y<h;y++)this.uncheck_node(f[y],p);return!0}if(f=this.get_node(f),!f||f.id===t.jstree.root)return!1;_=this.get_node(f,!0),f.state.checked&&(f.state.checked=!1,this._data.checkbox.selected=t.vakata.array_remove_item(this._data.checkbox.selected,f.id),_.length&&_.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:f,selected:this._data.checkbox.selected,event:p}))},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();this._data.checkbox.selected.concat([]);var f,p;for(this._data.checkbox.selected=this._model.data[t.jstree.root].children_d.concat(),f=0,p=this._data.checkbox.selected.length;f<p;f++)this._model.data[this._data.checkbox.selected[f]]&&(this._model.data[this._data.checkbox.selected[f]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var f=this._data.checkbox.selected.concat([]),p,y;for(p=0,y=this._data.checkbox.selected.length;p<y;p++)this._model.data[this._data.checkbox.selected[p]]&&(this._model.data[this._data.checkbox.selected[p]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:f})},this.is_checked=function(f){return this.settings.checkbox.tie_selection?this.is_selected(f):(f=this.get_node(f),!f||f.id===t.jstree.root?!1:f.state.checked)},this.get_checked=function(f){return this.settings.checkbox.tie_selection?this.get_selected(f):f?t.map(this._data.checkbox.selected,(function(p){return this.get_node(p)}).bind(this)):this._data.checkbox.selected.slice()},this.get_top_checked=function(f){if(this.settings.checkbox.tie_selection)return this.get_top_selected(f);var p=this.get_checked(!0),y={},h,_,I,A;for(h=0,_=p.length;h<_;h++)y[p[h].id]=p[h];for(h=0,_=p.length;h<_;h++)for(I=0,A=p[h].children_d.length;I<A;I++)y[p[h].children_d[I]]&&delete y[p[h].children_d[I]];p=[];for(h in y)y.hasOwnProperty(h)&&p.push(h);return f?t.map(p,(function(R){return this.get_node(R)}).bind(this)):p},this.get_bottom_checked=function(f){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(f);var p=this.get_checked(!0),y=[],h,_;for(h=0,_=p.length;h<_;h++)p[h].children.length||y.push(p[h].id);return f?t.map(y,(function(I){return this.get_node(I)}).bind(this)):y},this.load_node=function(f,p){var y,h,_;if(!t.vakata.is_array(f)&&!this.settings.checkbox.tie_selection&&(_=this.get_node(f),_&&_.state.loaded))for(y=0,h=_.children_d.length;y<h;y++)this._model.data[_.children_d[y]].state.checked&&(this._data.checkbox.selected=t.vakata.array_remove_item(this._data.checkbox.selected,_.children_d[y]));return v.load_node.apply(this,arguments)},this.get_state=function(){var f=v.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection||(f.checkbox=this._data.checkbox.selected.slice()),f},this.set_state=function(f,p){var y=v.set_state.apply(this,arguments);if(y&&f.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var h=this;t.each(f.checkbox,function(_,I){h.check_node(I)})}return delete f.checkbox,this.set_state(f,p),!1}return y},this.refresh=function(f,p){return this.settings.checkbox.tie_selection&&(this._data.checkbox.selected=[]),v.refresh.apply(this,arguments)}},t.jstree.defaults.conditionalselect=function(){return!0},t.jstree.plugins.conditionalselect=function(u,v){this.activate_node=function(f,p){if(this.settings.conditionalselect.call(this,this.get_node(f),p))return v.activate_node.call(this,f,p)}},t.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(u,v){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(f){var p=t.jstree.reference(f.reference),y=p.get_node(f.reference);p.create_node(y,{},"last",function(h){try{p.edit(h)}catch{setTimeout(function(){p.edit(h)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(f){var p=t.jstree.reference(f.reference),y=p.get_node(f.reference);p.edit(y)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(f){var p=t.jstree.reference(f.reference),y=p.get_node(f.reference);p.is_selected(y)?p.delete_node(p.get_selected()):p.delete_node(y)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(f){var p=t.jstree.reference(f.reference),y=p.get_node(f.reference);p.is_selected(y)?p.cut(p.get_top_selected()):p.cut(y)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(f){var p=t.jstree.reference(f.reference),y=p.get_node(f.reference);p.is_selected(y)?p.copy(p.get_top_selected()):p.copy(y)}},paste:{separator_before:!1,icon:!1,_disabled:function(f){return!t.jstree.reference(f.reference).can_paste()},separator_after:!1,label:"Paste",action:function(f){var p=t.jstree.reference(f.reference),y=p.get_node(f.reference);p.paste(y)}}}}}}},t.jstree.plugins.contextmenu=function(u,v){this.bind=function(){v.bind.call(this);var f=0,p=null,y,h;this.element.on("init.jstree loading.jstree ready.jstree",(function(){this.get_container_ul().addClass("jstree-contextmenu")}).bind(this)).on("contextmenu.jstree",".jstree-anchor",(function(_,I){_.target.tagName.toLowerCase()!=="input"&&(_.preventDefault(),f=_.ctrlKey?+new Date:0,(I||p)&&(f=+new Date+1e4),p&&clearTimeout(p),this.is_loading(_.currentTarget)||this.show_contextmenu(_.currentTarget,_.pageX,_.pageY,_))}).bind(this)).on("click.jstree",".jstree-anchor",(function(_){this._data.contextmenu.visible&&(!f||+new Date-f>250)&&t.vakata.context.hide(),f=0}).bind(this)).on("touchstart.jstree",".jstree-anchor",function(_){!_.originalEvent||!_.originalEvent.changedTouches||!_.originalEvent.changedTouches[0]||(y=_.originalEvent.changedTouches[0].clientX,h=_.originalEvent.changedTouches[0].clientY,p=setTimeout(function(){t(_.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(_){p&&_.originalEvent&&_.originalEvent.changedTouches&&_.originalEvent.changedTouches[0]&&(Math.abs(y-_.originalEvent.changedTouches[0].clientX)>10||Math.abs(h-_.originalEvent.changedTouches[0].clientY)>10)&&(clearTimeout(p),t.vakata.context.hide())}).on("touchend.vakata.jstree",function(_){p&&clearTimeout(p)});/*!
188
- if(!('oncontextmenu' in document.body) && ('ontouchstart' in document.body)) {
189
- var el = null, tm = null;
190
- this.element
191
- .on("touchstart", ".jstree-anchor", function (e) {
192
- el = e.currentTarget;
193
- tm = +new Date();
194
- $(document).one("touchend", function (e) {
195
- e.target = document.elementFromPoint(e.originalEvent.targetTouches[0].pageX - window.pageXOffset, e.originalEvent.targetTouches[0].pageY - window.pageYOffset);
196
- e.currentTarget = e.target;
197
- tm = ((+(new Date())) - tm);
198
- if(e.target === el && tm > 600 && tm < 1000) {
199
- e.preventDefault();
200
- $(el).trigger('contextmenu', e);
201
- }
202
- el = null;
203
- tm = null;
204
- });
205
- });
206
- }
207
- */t(c).on("context_hide.vakata.jstree",(function(_,I){this._data.contextmenu.visible=!1,t(I.reference).removeClass("jstree-context")}).bind(this))},this.teardown=function(){this._data.contextmenu.visible&&t.vakata.context.hide(),t(c).off("context_hide.vakata.jstree"),v.teardown.call(this)},this.show_contextmenu=function(f,p,y,h){if(f=this.get_node(f),!f||f.id===t.jstree.root)return!1;var _=this.settings.contextmenu,I=this.get_node(f,!0),A=I.children(".jstree-anchor"),R=!1,D=!1;(_.show_at_node||p===n||y===n)&&(R=A.offset(),p=R.left,y=R.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(f)&&this.activate_node(f,h),D=_.items,t.vakata.is_function(D)&&(D=D.call(this,f,(function(B){this._show_contextmenu(f,p,y,B)}).bind(this))),t.isPlainObject(D)&&this._show_contextmenu(f,p,y,D)},this._show_contextmenu=function(f,p,y,h){var _=this.get_node(f,!0),I=_.children(".jstree-anchor");t(c).one("context_show.vakata.jstree",(function(A,R){var D="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";t(R.element).addClass(D),I.addClass("jstree-context")}).bind(this)),this._data.contextmenu.visible=!0,t.vakata.context.show(I,{x:p,y},h),this.trigger("show_contextmenu",{node:f,x:p,y})}},function(u){var v=!1,f={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};u.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(p){u(c).triggerHandler("context_"+p+".vakata",{reference:f.reference,element:f.element,position:{x:f.position_x,y:f.position_y}})},_execute:function(p){return p=f.items[p],p&&(!p._disabled||u.vakata.is_function(p._disabled)&&!p._disabled({item:p,reference:f.reference,element:f.element}))&&p.action?p.action.call(null,{item:p,reference:f.reference,element:f.element,position:{x:f.position_x,y:f.position_y}}):!1},_parse:function(p,y){if(!p)return!1;y||(f.html="",f.items=[]);var h="",_=!1,I;return y&&(h+="<ul>"),u.each(p,function(A,R){if(!R)return!0;f.items.push(R),!_&&R.separator_before&&(h+="<li class='vakata-context-separator'><a href='#' "+(u.vakata.context.settings.icons?"":'class="vakata-context-no-icons"')+">&#160;</a></li>"),_=!1,h+="<li class='"+(R._class||"")+(R._disabled===!0||u.vakata.is_function(R._disabled)&&R._disabled({item:R,reference:f.reference,element:f.element})?" vakata-contextmenu-disabled ":"")+"' "+(R.shortcut?" data-shortcut='"+R.shortcut+"' ":"")+">",h+="<a href='#' rel='"+(f.items.length-1)+"' "+(R.title?"title='"+R.title+"'":"")+">",u.vakata.context.settings.icons&&(h+="<i ",R.icon&&(R.icon.indexOf("/")!==-1||R.icon.indexOf(".")!==-1?h+=` style='background:url("`+R.icon+`") center center no-repeat' `:h+=" class='"+R.icon+"' "),h+="></i><span class='vakata-contextmenu-sep'>&#160;</span>"),h+=(u.vakata.is_function(R.label)?R.label({item:A,reference:f.reference,element:f.element}):R.label)+(R.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+R.shortcut+'">'+(R.shortcut_label||"")+"</span>":"")+"</a>",R.submenu&&(I=u.vakata.context._parse(R.submenu,!0),I&&(h+=I)),h+="</li>",R.separator_after&&(h+="<li class='vakata-context-separator'><a href='#' "+(u.vakata.context.settings.icons?"":'class="vakata-context-no-icons"')+">&#160;</a></li>",_=!0)}),h=h.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),y&&(h+="</ul>"),y||(f.html=h,u.vakata.context._trigger("parse")),h.length>10?h:!1},_show_submenu:function(p){if(p=u(p),!(!p.length||!p.children("ul").length)){var y=p.children("ul"),h=p.offset().left,_=h+p.outerWidth(),I=p.offset().top,A=y.width(),R=y.height(),D=u(window).width()+u(window).scrollLeft(),B=u(window).height()+u(window).scrollTop();v?p[_-(A+10+p.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):p[_+A>D&&h>D-_?"addClass":"removeClass"]("vakata-context-right"),I+R+10>B&&y.css("bottom","-1px"),p.hasClass("vakata-context-right")?h<A&&y.css("margin-right",h-A):D-_<A&&y.css("margin-left",D-_-A),y.show()}},show:function(p,y,h){var _,I,A,R,D,B,N,F,j=!0;switch(f.element&&f.element.length&&f.element.width(""),j){case(!y&&!p):return!1;case(!!y&&!!p):f.reference=p,f.position_x=y.x,f.position_y=y.y;break;case(!y&&!!p):f.reference=p,_=p.offset(),f.position_x=_.left+p.outerHeight(),f.position_y=_.top;break;case(!!y&&!p):f.position_x=y.x,f.position_y=y.y;break}p&&!h&&u(p).data("vakata_contextmenu")&&(h=u(p).data("vakata_contextmenu")),u.vakata.context._parse(h)&&f.element.html(f.html),f.items.length&&(f.element.appendTo(c.body),I=f.element,A=f.position_x,R=f.position_y,D=I.width(),B=I.height(),N=u(window).width()+u(window).scrollLeft(),F=u(window).height()+u(window).scrollTop(),v&&(A-=I.outerWidth()-u(p).outerWidth(),A<u(window).scrollLeft()+20&&(A=u(window).scrollLeft()+20)),A+D+20>N&&(A=N-(D+20)),R+B+20>F&&(R=F-(B+20)),f.element.css({left:A,top:R}).show().find("a").first().trigger("focus").parent().addClass("vakata-context-hover"),f.is_visible=!0,u.vakata.context._trigger("show"))},hide:function(){f.is_visible&&(f.element.hide().find("ul").hide().end().find(":focus").trigger("blur").end().detach(),f.is_visible=!1,u.vakata.context._trigger("hide"))}},u(function(){v=u(c.body).css("direction")==="rtl";var p=!1;f.element=u("<ul class='vakata-context'></ul>"),f.element.on("mouseenter","li",function(y){y.stopImmediatePropagation(),!u.contains(this,y.relatedTarget)&&(p&&clearTimeout(p),f.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),u(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),u.vakata.context._show_submenu(this))}).on("mouseleave","li",function(y){u.contains(this,y.relatedTarget)||u(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(y){u(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),u.vakata.context.settings.hide_onmouseleave&&(p=setTimeout(function(h){return function(){u.vakata.context.hide()}}(),u.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(y){y.preventDefault(),!u(this).trigger("blur").parent().hasClass("vakata-context-disabled")&&u.vakata.context._execute(u(this).attr("rel"))!==!1&&u.vakata.context.hide()}).on("keydown","a",function(y){var h=null;switch(y.which){case 13:case 32:y.type="click",y.preventDefault(),u(y.currentTarget).trigger(y);break;case 37:f.is_visible&&(f.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").trigger("focus"),y.stopImmediatePropagation(),y.preventDefault());break;case 38:f.is_visible&&(h=f.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first(),h.length||(h=f.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),h.addClass("vakata-context-hover").children("a").trigger("focus"),y.stopImmediatePropagation(),y.preventDefault());break;case 39:f.is_visible&&(f.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").trigger("focus"),y.stopImmediatePropagation(),y.preventDefault());break;case 40:f.is_visible&&(h=f.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first(),h.length||(h=f.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),h.addClass("vakata-context-hover").children("a").trigger("focus"),y.stopImmediatePropagation(),y.preventDefault());break;case 27:u.vakata.context.hide(),y.preventDefault();break}}).on("keydown",function(y){y.preventDefault();var h=f.element.find(".vakata-contextmenu-shortcut-"+y.which).parent();h.parent().not(".vakata-context-disabled")&&h.trigger("click")}),u(c).on("mousedown.vakata.jstree",function(y){f.is_visible&&f.element[0]!==y.target&&!u.contains(f.element[0],y.target)&&u.vakata.context.hide()}).on("context_show.vakata.jstree",function(y,h){f.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),v&&f.element.addClass("vakata-context-rtl").css("direction","rtl"),f.element.find("ul").hide().end()})})}(t),t.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1,blank_space_drop:!1};var x,w;t.jstree.plugins.dnd=function(u,v){this.init=function(f,p){v.init.call(this,f,p),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in c.createElement("span")},this.bind=function(){v.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",(function(f){if(this.settings.dnd.large_drag_target&&t(f.target).closest(".jstree-node")[0]!==f.currentTarget||f.type==="touchstart"&&(!this.settings.dnd.touch||this.settings.dnd.touch==="selected"&&!t(f.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var p=this.get_node(f.target),y=this.is_selected(p)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,h=y>1?y+" "+this.get_string("nodes"):this.get_text(f.currentTarget);if(this.settings.core.force_text&&(h=t.vakata.html.escape(h)),p&&(p.id||p.id===0)&&p.id!==t.jstree.root&&(f.which===1||f.type==="touchstart"||f.type==="dragstart")&&(this.settings.dnd.is_draggable===!0||t.vakata.is_function(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,y>1?this.get_top_selected(!0):[p],f)))if(x={jstree:!0,origin:this,obj:this.get_node(p,!0),nodes:y>1?this.get_top_selected():[p.id]},w=f.currentTarget,this.settings.dnd.use_html5)t.vakata.dnd._trigger("start",f,{helper:t(),element:w,data:x});else return this.element.trigger("mousedown.jstree"),t.vakata.dnd.start(f,x,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+h+'<ins class="jstree-copy">+</ins></div>')}).bind(this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(f){return f.preventDefault(),t.vakata.dnd._trigger("move",f,{helper:t(),element:w,data:x}),!1}).on("drop.jstree",(function(f){return f.preventDefault(),t.vakata.dnd._trigger("stop",f,{helper:t(),element:w,data:x}),!1}).bind(this))},this.redraw_node=function(f,p,y,h){if(f=v.redraw_node.apply(this,arguments),f&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)f.setAttribute("draggable",!0);else{var _,I,A=null;for(_=0,I=f.childNodes.length;_<I;_++)if(f.childNodes[_]&&f.childNodes[_].className&&f.childNodes[_].className.indexOf("jstree-anchor")!==-1){A=f.childNodes[_];break}A&&A.setAttribute("draggable",!0)}return f}},t(function(){var u=!1,v=!1,f=!1,p=!1,y=t('<div id="jstree-marker">&#160;</div>').hide();t(c).on("dragover.vakata.jstree",function(h){w&&t.vakata.dnd._trigger("move",h,{helper:t(),element:w,data:x})}).on("drop.vakata.jstree",function(h){w&&(t.vakata.dnd._trigger("stop",h,{helper:t(),element:w,data:x}),w=null,x=null)}).on("dnd_start.vakata.jstree",function(h,_){u=!1,f=!1,!(!_||!_.data||!_.data.jstree)&&y.appendTo(c.body)}).on("dnd_move.vakata.jstree",function(h,_){var I=_.event.target!==f.target;if(p&&(!_.event||_.event.type!=="dragover"||I)&&clearTimeout(p),!(!_||!_.data||!_.data.jstree)&&!(_.event.target.id&&_.event.target.id==="jstree-marker")){f=_.event;var A=t.jstree.reference(_.event.target),R=!1,D=!1,B=!1,N,F,j,H,L,G,$,Z,U,ee,se,ie,fe,Se,ve,xe,Y;if(A&&A._data&&A._data.dnd){if(y.attr("class","jstree-"+A.get_theme()+(A.settings.core.themes.responsive?" jstree-dnd-responsive":"")),ve=_.data.origin&&(_.data.origin.settings.dnd.always_copy||_.data.origin.settings.dnd.copy&&(_.event.metaKey||_.event.ctrlKey)),_.helper.children().attr("class","jstree-"+A.get_theme()+" jstree-"+A.get_theme()+"-"+A.get_theme_variant()+" "+(A.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[ve?"show":"hide"](),(_.event.target===A.element[0]||_.event.target===A.get_container_ul()[0])&&(A.get_container_ul().children().length===0||A.settings.dnd.blank_space_drop)){for($=!0,Z=0,U=_.data.nodes.length;Z<U&&($=$&&A.check(_.data.origin&&(_.data.origin.settings.dnd.always_copy||_.data.origin.settings.dnd.copy&&(_.event.metaKey||_.event.ctrlKey))?"copy_node":"move_node",_.data.origin&&_.data.origin!==A?_.data.origin.get_node(_.data.nodes[Z]):_.data.nodes[Z],t.jstree.root,"last",{dnd:!0,ref:A.get_node(t.jstree.root),pos:"i",origin:_.data.origin,is_multi:_.data.origin&&_.data.origin!==A,is_foreign:!_.data.origin}),!!$);Z++);if($){u={ins:A,par:t.jstree.root,pos:"last"},y.hide(),_.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),_.event.originalEvent&&_.event.originalEvent.dataTransfer&&(_.event.originalEvent.dataTransfer.dropEffect=ve?"copy":"move");return}}else if(R=A.settings.dnd.large_drop_target?t(_.event.target).closest(".jstree-node").children(".jstree-anchor"):t(_.event.target).closest(".jstree-anchor"),R&&R.length&&R.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(D=R.offset(),B=(_.event.pageY!==n?_.event.pageY:_.event.originalEvent.pageY)-D.top,j=R.outerHeight(),B<j/3?G=["b","i","a"]:B>j-j/3?G=["a","i","b"]:G=B>j/2?["i","a","b"]:["i","b","a"],t.each(G,function(le,re){switch(re){case"b":N=D.left-6,F=D.top,H=A.get_parent(R),L=R.parent().index(),Y="jstree-below";break;case"i":fe=A.settings.dnd.inside_pos,Se=A.get_node(R.parent()),N=D.left-2,F=D.top+j/2+1,H=Se.id,L=fe==="first"?0:fe==="last"?Se.children.length:Math.min(fe,Se.children.length),Y="jstree-inside";break;case"a":N=D.left-6,F=D.top+j,H=A.get_parent(R),L=R.parent().index()+1,Y="jstree-above";break}for($=!0,Z=0,U=_.data.nodes.length;Z<U;Z++)if(ee=_.data.origin&&(_.data.origin.settings.dnd.always_copy||_.data.origin.settings.dnd.copy&&(_.event.metaKey||_.event.ctrlKey))?"copy_node":"move_node",se=L,ee==="move_node"&&re==="a"&&_.data.origin&&_.data.origin===A&&H===A.get_parent(_.data.nodes[Z])&&(ie=A.get_node(H),se>t.inArray(_.data.nodes[Z],ie.children)&&(se-=1)),$=$&&(A&&A.settings&&A.settings.dnd&&A.settings.dnd.check_while_dragging===!1||A.check(ee,_.data.origin&&_.data.origin!==A?_.data.origin.get_node(_.data.nodes[Z]):_.data.nodes[Z],H,se,{dnd:!0,ref:A.get_node(R.parent()),pos:re,origin:_.data.origin,is_multi:_.data.origin&&_.data.origin!==A,is_foreign:!_.data.origin})),!$){A&&A.last_error&&(v=A.last_error());break}if(re==="i"&&R.parent().is(".jstree-closed")&&A.settings.dnd.open_timeout&&(!_.event||_.event.type!=="dragover"||I)&&(p&&clearTimeout(p),p=setTimeout(function(ge,ne){return function(){ge.open_node(ne)}}(A,R),A.settings.dnd.open_timeout)),$)return xe=A.get_node(H,!0),xe.hasClass(".jstree-dnd-parent")||(t(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),xe.addClass("jstree-dnd-parent")),u={ins:A,par:H,pos:re==="i"&&fe==="last"&&L===0&&!A.is_loaded(Se)?"last":L},y.css({left:N+"px",top:F+"px"}).show(),y.removeClass("jstree-above jstree-inside jstree-below").addClass(Y),_.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),_.event.originalEvent&&_.event.originalEvent.dataTransfer&&(_.event.originalEvent.dataTransfer.dropEffect=ve?"copy":"move"),v={},G=!0,!1}),G===!0))return}t(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),u=!1,_.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),_.event.originalEvent&&_.event.originalEvent.dataTransfer,y.hide()}}).on("dnd_scroll.vakata.jstree",function(h,_){!_||!_.data||!_.data.jstree||(y.hide(),u=!1,f=!1,_.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(h,_){if(t(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),p&&clearTimeout(p),!(!_||!_.data||!_.data.jstree)){y.hide().detach();var I,A,R=[];if(u){for(I=0,A=_.data.nodes.length;I<A;I++)R[I]=_.data.origin?_.data.origin.get_node(_.data.nodes[I]):_.data.nodes[I];u.ins[_.data.origin&&(_.data.origin.settings.dnd.always_copy||_.data.origin.settings.dnd.copy&&(_.event.metaKey||_.event.ctrlKey))?"copy_node":"move_node"](R,u.par,u.pos,!1,!1,!1,_.data.origin)}else I=t(_.event.target).closest(".jstree"),I.length&&v&&v.error&&v.error==="check"&&(I=I.jstree(!0),I&&I.settings.core.error.call(this,v));f=!1,u=!1}}).on("keyup.jstree keydown.jstree",function(h,_){_=t.vakata.dnd._get(),_&&_.data&&_.data.jstree&&(h.type==="keyup"&&h.which===27?(p&&clearTimeout(p),u=!1,v=!1,f=!1,p=!1,y.hide().detach(),t.vakata.dnd._clean()):(_.helper.find(".jstree-copy").first()[_.data.origin&&(_.data.origin.settings.dnd.always_copy||_.data.origin.settings.dnd.copy&&(h.metaKey||h.ctrlKey))?"show":"hide"](),f&&(f.metaKey=h.metaKey,f.ctrlKey=h.ctrlKey,t.vakata.dnd._trigger("move",f))))})}),function(u){u.vakata.html={div:u("<div></div>"),escape:function(f){return u.vakata.html.div.text(f).html()},strip:function(f){return u.vakata.html.div.empty().append(u.parseHTML(f)).text()}};var v={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};u.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(f,p,y){y===n&&(y=u.vakata.dnd._get()),y.event=p,u(c).triggerHandler("dnd_"+f+".vakata",y)},_get:function(){return{data:v.data,element:v.element,helper:v.helper}},_clean:function(){v.helper&&v.helper.remove(),v.scroll_i&&(clearInterval(v.scroll_i),v.scroll_i=!1),v={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},w=null,u(c).off("mousemove.vakata.jstree touchmove.vakata.jstree",u.vakata.dnd.drag),u(c).off("mouseup.vakata.jstree touchend.vakata.jstree",u.vakata.dnd.stop)},_scroll:function(f){if(!v.scroll_e||!v.scroll_l&&!v.scroll_t)return v.scroll_i&&(clearInterval(v.scroll_i),v.scroll_i=!1),!1;if(!v.scroll_i)return v.scroll_i=setInterval(u.vakata.dnd._scroll,100),!1;if(f===!0)return!1;var p=v.scroll_e.scrollTop(),y=v.scroll_e.scrollLeft();v.scroll_e.scrollTop(p+v.scroll_t*u.vakata.dnd.settings.scroll_speed),v.scroll_e.scrollLeft(y+v.scroll_l*u.vakata.dnd.settings.scroll_speed),(p!==v.scroll_e.scrollTop()||y!==v.scroll_e.scrollLeft())&&u.vakata.dnd._trigger("scroll",v.scroll_e)},start:function(f,p,y){f.type==="touchstart"&&f.originalEvent&&f.originalEvent.changedTouches&&f.originalEvent.changedTouches[0]&&(f.pageX=f.originalEvent.changedTouches[0].pageX,f.pageY=f.originalEvent.changedTouches[0].pageY,f.target=c.elementFromPoint(f.originalEvent.changedTouches[0].pageX-window.pageXOffset,f.originalEvent.changedTouches[0].pageY-window.pageYOffset)),v.is_drag&&u.vakata.dnd.stop({});try{f.currentTarget.unselectable="on",f.currentTarget.onselectstart=function(){return!1},f.currentTarget.style&&(f.currentTarget.style.touchAction="none",f.currentTarget.style.msTouchAction="none",f.currentTarget.style.MozUserSelect="none")}catch{}return v.init_x=f.pageX,v.init_y=f.pageY,v.data=p,v.is_down=!0,v.element=f.currentTarget,v.target=f.target,v.is_touch=f.type==="touchstart",y!==!1&&(v.helper=u("<div id='vakata-dnd'></div>").html(y).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),u(c).on("mousemove.vakata.jstree touchmove.vakata.jstree",u.vakata.dnd.drag),u(c).on("mouseup.vakata.jstree touchend.vakata.jstree",u.vakata.dnd.stop),!1},drag:function(f){if(f.type==="touchmove"&&f.originalEvent&&f.originalEvent.changedTouches&&f.originalEvent.changedTouches[0]&&(f.pageX=f.originalEvent.changedTouches[0].pageX,f.pageY=f.originalEvent.changedTouches[0].pageY,f.target=c.elementFromPoint(f.originalEvent.changedTouches[0].pageX-window.pageXOffset,f.originalEvent.changedTouches[0].pageY-window.pageYOffset)),!!v.is_down){if(!v.is_drag)if(Math.abs(f.pageX-v.init_x)>(v.is_touch?u.vakata.dnd.settings.threshold_touch:u.vakata.dnd.settings.threshold)||Math.abs(f.pageY-v.init_y)>(v.is_touch?u.vakata.dnd.settings.threshold_touch:u.vakata.dnd.settings.threshold))v.helper&&(v.helper.appendTo(c.body),v.helper_w=v.helper.outerWidth()),v.is_drag=!0,u(v.target).one("click.vakata",!1),u.vakata.dnd._trigger("start",f);else return;var p=!1,y=!1,h=!1,_=!1,I=!1,A=!1,R=!1,D=!1,B=!1,N=!1;return v.scroll_t=0,v.scroll_l=0,v.scroll_e=!1,u(u(f.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return this.ownerDocument&&/^auto|scroll$/.test(u(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var F=u(this),j=F.offset();if(this.scrollHeight>this.offsetHeight&&(j.top+F.height()-f.pageY<u.vakata.dnd.settings.scroll_proximity&&(v.scroll_t=1),f.pageY-j.top<u.vakata.dnd.settings.scroll_proximity&&(v.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(j.left+F.width()-f.pageX<u.vakata.dnd.settings.scroll_proximity&&(v.scroll_l=1),f.pageX-j.left<u.vakata.dnd.settings.scroll_proximity&&(v.scroll_l=-1)),v.scroll_t||v.scroll_l)return v.scroll_e=u(this),!1}),v.scroll_e||(p=u(c),y=u(window),h=p.height(),_=y.height(),I=p.width(),A=y.width(),R=p.scrollTop(),D=p.scrollLeft(),h>_&&f.pageY-R<u.vakata.dnd.settings.scroll_proximity&&(v.scroll_t=-1),h>_&&_-(f.pageY-R)<u.vakata.dnd.settings.scroll_proximity&&(v.scroll_t=1),I>A&&f.pageX-D<u.vakata.dnd.settings.scroll_proximity&&(v.scroll_l=-1),I>A&&A-(f.pageX-D)<u.vakata.dnd.settings.scroll_proximity&&(v.scroll_l=1),(v.scroll_t||v.scroll_l)&&(v.scroll_e=p)),v.scroll_e&&u.vakata.dnd._scroll(!0),v.helper&&(B=parseInt(f.pageY+u.vakata.dnd.settings.helper_top,10),N=parseInt(f.pageX+u.vakata.dnd.settings.helper_left,10),h&&B+25>h&&(B=h-50),I&&N+v.helper_w>I&&(N=I-(v.helper_w+2)),v.helper.css({left:N+"px",top:B+"px"})),u.vakata.dnd._trigger("move",f),!1}},stop:function(f){if(f.type==="touchend"&&f.originalEvent&&f.originalEvent.changedTouches&&f.originalEvent.changedTouches[0]&&(f.pageX=f.originalEvent.changedTouches[0].pageX,f.pageY=f.originalEvent.changedTouches[0].pageY,f.target=c.elementFromPoint(f.originalEvent.changedTouches[0].pageX-window.pageXOffset,f.originalEvent.changedTouches[0].pageY-window.pageYOffset)),v.is_drag)f.target!==v.target&&u(v.target).off("click.vakata"),u.vakata.dnd._trigger("stop",f);else if(f.type==="touchend"&&f.target===v.target){var p=setTimeout(function(){u(f.target).trigger("click")},100);u(f.target).one("click",function(){p&&clearTimeout(p)})}return u.vakata.dnd._clean(),!1}}}(t),t.jstree.defaults.massload=null,t.jstree.plugins.massload=function(u,v){this.init=function(f,p){this._data.massload={},v.init.call(this,f,p)},this._load_nodes=function(f,p,y,h){var _=this.settings.massload,I=[],A=this._model.data,R,D,B;if(!y){for(R=0,D=f.length;R<D;R++)(!A[f[R]]||!A[f[R]].state.loaded&&!A[f[R]].state.failed||h)&&(I.push(f[R]),B=this.get_node(f[R],!0),B&&B.length&&B.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},I.length){if(t.vakata.is_function(_))return _.call(this,I,(function(N){var F,j;if(N)for(F in N)N.hasOwnProperty(F)&&(this._data.massload[F]=N[F]);for(F=0,j=f.length;F<j;F++)B=this.get_node(f[F],!0),B&&B.length&&B.removeClass("jstree-loading").attr("aria-busy",!1);v._load_nodes.call(this,f,p,y,h)}).bind(this));if(typeof _=="object"&&_&&_.url)return _=t.extend(!0,{},_),t.vakata.is_function(_.url)&&(_.url=_.url.call(this,I)),t.vakata.is_function(_.data)&&(_.data=_.data.call(this,I)),t.ajax(_).done((function(N,F,j){var H,L;if(N)for(H in N)N.hasOwnProperty(H)&&(this._data.massload[H]=N[H]);for(H=0,L=f.length;H<L;H++)B=this.get_node(f[H],!0),B&&B.length&&B.removeClass("jstree-loading").attr("aria-busy",!1);v._load_nodes.call(this,f,p,y,h)}).bind(this)).fail((function(N){v._load_nodes.call(this,f,p,y,h)}).bind(this))}}return v._load_nodes.call(this,f,p,y,h)},this._load_node=function(f,p){var y=this._data.massload[f.id],h=null,_;return y?(h=this[typeof y=="string"?"_append_html_data":"_append_json_data"](f,typeof y=="string"?t(t.parseHTML(y)).filter(function(){return this.nodeType!==3}):y,function(I){p.call(this,I)}),_=this.get_node(f.id,!0),_&&_.length&&_.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[f.id],h):v._load_node.call(this,f,p)}},t.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},t.jstree.plugins.search=function(u,v){this.bind=function(){v.bind.call(this),this._data.search.str="",this._data.search.dom=t(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",(function(f,p){if(this._data.search.som&&p.res.length){var y=this._model.data,h,_,I=[],A,R;for(h=0,_=p.res.length;h<_;h++)if(y[p.res[h]]&&!y[p.res[h]].state.hidden&&(I.push(p.res[h]),I=I.concat(y[p.res[h]].parents),this._data.search.smc))for(A=0,R=y[p.res[h]].children_d.length;A<R;A++)y[y[p.res[h]].children_d[A]]&&!y[y[p.res[h]].children_d[A]].state.hidden&&I.push(y[p.res[h]].children_d[A]);I=t.vakata.array_remove_item(t.vakata.array_unique(I),t.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(I,!0),this.redraw(!0)}}).bind(this)).on("clear_search.jstree",(function(f,p){this._data.search.som&&p.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))}).bind(this))},this.search=function(f,p,y,h,_,I){if(f===!1||t.vakata.trim(f.toString())==="")return this.clear_search();h=this.get_node(h),h=h&&(h.id||h.id===0)?h.id:null,f=f.toString();var A=this.settings.search,R=A.ajax?A.ajax:!1,D=this._model.data,B=null,N=[],F=[],j,H;if(this._data.search.res.length&&!_&&this.clear_search(),y===n&&(y=A.show_only_matches),I===n&&(I=A.show_only_matches_children),!p&&R!==!1)return t.vakata.is_function(R)?R.call(this,f,(function(L){L&&L.d&&(L=L.d),this._load_nodes(t.vakata.is_array(L)?t.vakata.array_unique(L):[],function(){this.search(f,!0,y,h,_,I)})}).bind(this),h):(R=t.extend({},R),R.data||(R.data={}),R.data.str=f,h&&(R.data.inside=h),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=t.ajax(R).fail((function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(R)},this.settings.core.error.call(this,this._data.core.last_error)}).bind(this)).done((function(L){L&&L.d&&(L=L.d),this._load_nodes(t.vakata.is_array(L)?t.vakata.array_unique(L):[],function(){this.search(f,!0,y,h,_,I)})}).bind(this)),this._data.search.lastRequest);if(_||(this._data.search.str=f,this._data.search.dom=t(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=y,this._data.search.smc=I),B=new t.vakata.search(f,!0,{caseSensitive:A.case_sensitive,fuzzy:A.fuzzy}),t.each(D[h||t.jstree.root].children_d,function(L,G){var $=D[G];$.text&&!$.state.hidden&&(!A.search_leaves_only||$.state.loaded&&$.children.length===0)&&(A.search_callback&&A.search_callback.call(this,f,$)||!A.search_callback&&B.search($.text).isMatch)&&(N.push(G),F=F.concat($.parents))}),N.length){for(F=t.vakata.array_unique(F),j=0,H=F.length;j<H;j++)F[j]!==t.jstree.root&&D[F[j]]&&this.open_node(F[j],null,0)===!0&&this._data.search.opn.push(F[j]);_?(this._data.search.dom=this._data.search.dom.add(t(this.element[0].querySelectorAll("#"+t.map(N,function(L){return"0123456789".indexOf(L[0])!==-1?"\\3"+L[0]+" "+L.substr(1).replace(t.jstree.idregex,"\\$&"):L.replace(t.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=t.vakata.array_unique(this._data.search.res.concat(N))):(this._data.search.dom=t(this.element[0].querySelectorAll("#"+t.map(N,function(L){return"0123456789".indexOf(L[0])!==-1?"\\3"+L[0]+" "+L.substr(1).replace(t.jstree.idregex,"\\$&"):L.replace(t.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=N),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:f,res:this._data.search.res,show_only_matches:y})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=t(this.element[0].querySelectorAll("#"+t.map(this._data.search.res,function(f){return"0123456789".indexOf(f[0])!==-1?"\\3"+f[0]+" "+f.substr(1).replace(t.jstree.idregex,"\\$&"):f.replace(t.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=t()},this.redraw_node=function(f,p,y,h){if(f=v.redraw_node.apply(this,arguments),f&&t.inArray(f.id,this._data.search.res)!==-1){var _,I,A=null;for(_=0,I=f.childNodes.length;_<I;_++)if(f.childNodes[_]&&f.childNodes[_].className&&f.childNodes[_].className.indexOf("jstree-anchor")!==-1){A=f.childNodes[_];break}A&&(A.className+=" jstree-search")}return f}},function(u){u.vakata.search=function(v,f,p){p=p||{},p=u.extend({},u.vakata.search.defaults,p),p.fuzzy!==!1&&(p.fuzzy=!0),v=p.caseSensitive?v:v.toLowerCase();var y=p.location,h=p.distance,_=p.threshold,I=v.length,A,R,D,B;return I>32&&(p.fuzzy=!1),p.fuzzy&&(A=1<<I-1,R=function(){var N={},F=0;for(F=0;F<I;F++)N[v.charAt(F)]=0;for(F=0;F<I;F++)N[v.charAt(F)]|=1<<I-F-1;return N}(),D=function(N,F){var j=N/I,H=Math.abs(y-F);return h?j+H/h:H?1:j}),B=function(N){if(N=p.caseSensitive?N.toString():N.toString().toLowerCase(),v===N||N.indexOf(v)!==-1)return{isMatch:!0,score:0};if(!p.fuzzy)return{isMatch:!1,score:1};var F,j,H=N.length,L=_,G=N.indexOf(v,y),$,Z,U=I+H,ee,se,ie,fe,Se,ve=1;for(G!==-1&&(L=Math.min(D(0,G),L),G=N.lastIndexOf(v,y+I),G!==-1&&(L=Math.min(D(0,G),L))),G=-1,F=0;F<I;F++){for($=0,Z=U;$<Z;)D(F,y+Z)<=L?$=Z:U=Z,Z=Math.floor((U-$)/2+$);for(U=Z,se=Math.max(1,y-Z+1),ie=Math.min(y+Z,H)+I,fe=new Array(ie+2),fe[ie+1]=(1<<F)-1,j=ie;j>=se;j--)if(Se=R[N.charAt(j-1)],F===0?fe[j]=(fe[j+1]<<1|1)&Se:fe[j]=(fe[j+1]<<1|1)&Se|((ee[j+1]|ee[j])<<1|1)|ee[j+1],fe[j]&A&&(ve=D(F,j-1),ve<=L))if(L=ve,G=j-1,G>y)se=Math.max(1,2*y-G);else break;if(D(F+1,y)>L)break;ee=fe}return{isMatch:G>=0,score:ve}},f===!0?{search:B}:B(f)},u.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(t),t.jstree.defaults.sort=function(u,v){return this.get_text(u)>this.get_text(v)?1:-1},t.jstree.plugins.sort=function(u,v){this.bind=function(){v.bind.call(this),this.element.on("model.jstree",(function(f,p){this.sort(p.parent,!0)}).bind(this)).on("rename_node.jstree create_node.jstree",(function(f,p){this.sort(p.parent||p.node.parent,!1),this.redraw_node(p.parent||p.node.parent,!0)}).bind(this)).on("move_node.jstree copy_node.jstree",(function(f,p){this.sort(p.parent,!1),this.redraw_node(p.parent,!0)}).bind(this))},this.sort=function(f,p){var y,h;if(f=this.get_node(f),f&&f.children&&f.children.length&&(f.children.sort(this.settings.sort.bind(this)),p))for(y=0,h=f.children_d.length;y<h;y++)this.sort(f.children_d[y],!1)}};var C=!1;t.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},t.jstree.plugins.state=function(u,v){this.bind=function(){v.bind.call(this);var f=(function(){this.element.on(this.settings.state.events,(function(){C&&clearTimeout(C),C=setTimeout((function(){this.save_state()}).bind(this),100)}).bind(this)),this.trigger("state_ready")}).bind(this);this.element.on("ready.jstree",(function(p,y){this.element.one("restore_state.jstree",f),this.restore_state()||f()}).bind(this))},this.save_state=function(){var f=this.get_state();this.settings.state.preserve_loaded||delete f.core.loaded;var p={state:f,ttl:this.settings.state.ttl,sec:+new Date};t.vakata.storage.set(this.settings.state.key,JSON.stringify(p))},this.restore_state=function(){var f=t.vakata.storage.get(this.settings.state.key);if(f)try{f=JSON.parse(f)}catch{return!1}return f&&f.ttl&&f.sec&&+new Date-f.sec>f.ttl?!1:(f&&f.state&&(f=f.state),f&&t.vakata.is_function(this.settings.state.filter)&&(f=this.settings.state.filter.call(this,f)),f?(this.settings.state.preserve_loaded||delete f.core.loaded,this.element.one("set_state.jstree",function(p,y){y.instance.trigger("restore_state",{state:t.extend(!0,{},f)})}),this.set_state(f),!0):!1)},this.clear_state=function(){return t.vakata.storage.del(this.settings.state.key)}},function(u,v){u.vakata.storage={set:function(f,p){return window.localStorage.setItem(f,p)},get:function(f){return window.localStorage.getItem(f)},del:function(f){return window.localStorage.removeItem(f)}}}(t),t.jstree.defaults.types={default:{}},t.jstree.defaults.types[t.jstree.root]={},t.jstree.plugins.types=function(u,v){this.init=function(f,p){var y,h;if(p&&p.types&&p.types.default){for(y in p.types)if(y!=="default"&&y!==t.jstree.root&&p.types.hasOwnProperty(y))for(h in p.types.default)p.types.default.hasOwnProperty(h)&&p.types[y][h]===n&&(p.types[y][h]=p.types.default[h])}v.init.call(this,f,p),this._model.data[t.jstree.root].type=t.jstree.root},this.refresh=function(f,p){v.refresh.call(this,f,p),this._model.data[t.jstree.root].type=t.jstree.root},this.bind=function(){this.element.on("model.jstree",(function(f,p){var y=this._model.data,h=p.nodes,_=this.settings.types,I,A,R="default",D;for(I=0,A=h.length;I<A;I++){if(R="default",y[h[I]].original&&y[h[I]].original.type&&_[y[h[I]].original.type]&&(R=y[h[I]].original.type),y[h[I]].data&&y[h[I]].data.jstree&&y[h[I]].data.jstree.type&&_[y[h[I]].data.jstree.type]&&(R=y[h[I]].data.jstree.type),y[h[I]].type=R,y[h[I]].icon===!0&&_[R].icon!==n&&(y[h[I]].icon=_[R].icon),_[R].li_attr!==n&&typeof _[R].li_attr=="object"){for(D in _[R].li_attr)if(_[R].li_attr.hasOwnProperty(D)){if(D==="id")continue;y[h[I]].li_attr[D]===n?y[h[I]].li_attr[D]=_[R].li_attr[D]:D==="class"&&(y[h[I]].li_attr.class=_[R].li_attr.class+" "+y[h[I]].li_attr.class)}}if(_[R].a_attr!==n&&typeof _[R].a_attr=="object"){for(D in _[R].a_attr)if(_[R].a_attr.hasOwnProperty(D)){if(D==="id")continue;y[h[I]].a_attr[D]===n?y[h[I]].a_attr[D]=_[R].a_attr[D]:D==="href"&&y[h[I]].a_attr[D]==="#"?y[h[I]].a_attr.href=_[R].a_attr.href:D==="class"&&(y[h[I]].a_attr.class=_[R].a_attr.class+" "+y[h[I]].a_attr.class)}}}y[t.jstree.root].type=t.jstree.root}).bind(this)),v.bind.call(this)},this.get_json=function(f,p,y){var h,_,I=this._model.data,A=p?t.extend(!0,{},p,{no_id:!1}):{},R=v.get_json.call(this,f,A,y);if(R===!1)return!1;if(t.vakata.is_array(R))for(h=0,_=R.length;h<_;h++)R[h].type=(R[h].id||R[h].id===0)&&I[R[h].id]&&I[R[h].id].type?I[R[h].id].type:"default",p&&p.no_id&&(delete R[h].id,R[h].li_attr&&R[h].li_attr.id&&delete R[h].li_attr.id,R[h].a_attr&&R[h].a_attr.id&&delete R[h].a_attr.id);else R.type=(R.id||R.id===0)&&I[R.id]&&I[R.id].type?I[R.id].type:"default",p&&p.no_id&&(R=this._delete_ids(R));return R},this._delete_ids=function(f){if(t.vakata.is_array(f)){for(var p=0,y=f.length;p<y;p++)f[p]=this._delete_ids(f[p]);return f}return delete f.id,f.li_attr&&f.li_attr.id&&delete f.li_attr.id,f.a_attr&&f.a_attr.id&&delete f.a_attr.id,f.children&&t.vakata.is_array(f.children)&&(f.children=this._delete_ids(f.children)),f},this.check=function(f,p,y,h,_){if(v.check.call(this,f,p,y,h,_)===!1)return!1;p=p&&(p.id||p.id===0)?p:this.get_node(p),y=y&&(y.id||y.id===0)?y:this.get_node(y);var I=p&&(p.id||p.id===0)?_&&_.origin?_.origin:t.jstree.reference(p.id):null,A,R,D,B;switch(I=I&&I._model&&I._model.data?I._model.data:null,f){case"create_node":case"move_node":case"copy_node":if(f!=="move_node"||t.inArray(p.id,y.children)===-1){if(A=this.get_rules(y),A.max_children!==n&&A.max_children!==-1&&A.max_children===y.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+f,data:JSON.stringify({chk:f,pos:h,obj:p&&(p.id||p.id===0)?p.id:!1,par:y&&(y.id||y.id===0)?y.id:!1})},!1;if(A.valid_children!==n&&A.valid_children!==-1&&t.inArray(p.type||"default",A.valid_children)===-1)return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+f,data:JSON.stringify({chk:f,pos:h,obj:p&&(p.id||p.id===0)?p.id:!1,par:y&&(y.id||y.id===0)?y.id:!1})},!1;if(I&&p.children_d&&p.parents){for(R=0,D=0,B=p.children_d.length;D<B;D++)R=Math.max(R,I[p.children_d[D]].parents.length);R=R-p.parents.length+1}(R<=0||R===n)&&(R=1);do{if(A.max_depth!==n&&A.max_depth!==-1&&A.max_depth<R)return this._data.core.last_error={error:"check",plugin:"types",id:"types_03",reason:"max_depth prevents function: "+f,data:JSON.stringify({chk:f,pos:h,obj:p&&(p.id||p.id===0)?p.id:!1,par:y&&(y.id||y.id===0)?y.id:!1})},!1;y=this.get_node(y.parent),A=this.get_rules(y),R++}while(y)}break}return!0},this.get_rules=function(f){if(f=this.get_node(f),!f)return!1;var p=this.get_type(f,!0);return p.max_depth===n&&(p.max_depth=-1),p.max_children===n&&(p.max_children=-1),p.valid_children===n&&(p.valid_children=-1),p},this.get_type=function(f,p){return f=this.get_node(f),f?p?t.extend({type:f.type},this.settings.types[f.type]):f.type:!1},this.set_type=function(f,p){var y=this._model.data,h,_,I,A,R,D,B,N;if(t.vakata.is_array(f)){for(f=f.slice(),_=0,I=f.length;_<I;_++)this.set_type(f[_],p);return!0}if(h=this.settings.types,f=this.get_node(f),!h[p]||!f)return!1;if(B=this.get_node(f,!0),B&&B.length&&(N=B.children(".jstree-anchor")),A=f.type,R=this.get_icon(f),f.type=p,(R===!0||!h[A]||h[A].icon!==n&&R===h[A].icon)&&this.set_icon(f,h[p].icon!==n?h[p].icon:!0),h[A]&&h[A].li_attr!==n&&typeof h[A].li_attr=="object"){for(D in h[A].li_attr)if(h[A].li_attr.hasOwnProperty(D)){if(D==="id")continue;D==="class"?(y[f.id].li_attr.class=(y[f.id].li_attr.class||"").replace(h[A].li_attr[D],""),B&&B.removeClass(h[A].li_attr[D])):y[f.id].li_attr[D]===h[A].li_attr[D]&&(y[f.id].li_attr[D]=null,B&&B.removeAttr(D))}}if(h[A]&&h[A].a_attr!==n&&typeof h[A].a_attr=="object"){for(D in h[A].a_attr)if(h[A].a_attr.hasOwnProperty(D)){if(D==="id")continue;D==="class"?(y[f.id].a_attr.class=(y[f.id].a_attr.class||"").replace(h[A].a_attr[D],""),N&&N.removeClass(h[A].a_attr[D])):y[f.id].a_attr[D]===h[A].a_attr[D]&&(D==="href"?(y[f.id].a_attr[D]="#",N&&N.attr("href","#")):(delete y[f.id].a_attr[D],N&&N.removeAttr(D)))}}if(h[p].li_attr!==n&&typeof h[p].li_attr=="object"){for(D in h[p].li_attr)if(h[p].li_attr.hasOwnProperty(D)){if(D==="id")continue;y[f.id].li_attr[D]===n?(y[f.id].li_attr[D]=h[p].li_attr[D],B&&(D==="class"?B.addClass(h[p].li_attr[D]):B.attr(D,h[p].li_attr[D]))):D==="class"&&(y[f.id].li_attr.class=h[p].li_attr[D]+" "+y[f.id].li_attr.class,B&&B.addClass(h[p].li_attr[D]))}}if(h[p].a_attr!==n&&typeof h[p].a_attr=="object"){for(D in h[p].a_attr)if(h[p].a_attr.hasOwnProperty(D)){if(D==="id")continue;y[f.id].a_attr[D]===n?(y[f.id].a_attr[D]=h[p].a_attr[D],N&&(D==="class"?N.addClass(h[p].a_attr[D]):N.attr(D,h[p].a_attr[D]))):D==="href"&&y[f.id].a_attr[D]==="#"?(y[f.id].a_attr.href=h[p].a_attr.href,N&&N.attr("href",h[p].a_attr.href)):D==="class"&&(y[f.id].a_attr.class=h[p].a_attr.class+" "+y[f.id].a_attr.class,N&&N.addClass(h[p].a_attr[D]))}}return!0}},t.jstree.defaults.unique={case_sensitive:!1,trim_whitespace:!1,duplicate:function(u,v){return u+" ("+v+")"}},t.jstree.plugins.unique=function(u,v){this.check=function(f,p,y,h,_){if(v.check.call(this,f,p,y,h,_)===!1)return!1;if(p=p&&(p.id||p.id===0)?p:this.get_node(p),y=y&&(y.id||y.id===0)?y:this.get_node(y),!y||!y.children)return!0;var I=f==="rename_node"?h:p.text,A=[],R=this.settings.unique.case_sensitive,D=this.settings.unique.trim_whitespace,B=this._model.data,N,F,j;for(N=0,F=y.children.length;N<F;N++)j=B[y.children[N]].text,R||(j=j.toLowerCase()),D&&(j=j.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),A.push(j);switch(R||(I=I.toLowerCase()),D&&(I=I.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),f){case"delete_node":return!0;case"rename_node":return j=p.text||"",R||(j=j.toLowerCase()),D&&(j=j.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),N=t.inArray(I,A)===-1||p.text&&j===I,N||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+I+" already exists. Preventing: "+f,data:JSON.stringify({chk:f,pos:h,obj:p&&(p.id||p.id===0)?p.id:!1,par:y&&(y.id||y.id===0)?y.id:!1})}),N;case"create_node":return N=t.inArray(I,A)===-1,N||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+I+" already exists. Preventing: "+f,data:JSON.stringify({chk:f,pos:h,obj:p&&(p.id||p.id===0)?p.id:!1,par:y&&(y.id||y.id===0)?y.id:!1})}),N;case"copy_node":return N=t.inArray(I,A)===-1,N||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+I+" already exists. Preventing: "+f,data:JSON.stringify({chk:f,pos:h,obj:p&&(p.id||p.id===0)?p.id:!1,par:y&&(y.id||y.id===0)?y.id:!1})}),N;case"move_node":return N=p.parent===y.id&&(!_||!_.is_multi)||t.inArray(I,A)===-1,N||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+I+" already exists. Preventing: "+f,data:JSON.stringify({chk:f,pos:h,obj:p&&(p.id||p.id===0)?p.id:!1,par:y&&(y.id||y.id===0)?y.id:!1})}),N}return!0},this.create_node=function(f,p,y,h,_){if(!p||typeof p=="object"&&p.text===n){if(f===null&&(f=t.jstree.root),f=this.get_node(f),!f)return v.create_node.call(this,f,p,y,h,_);if(y=y===n?"last":y,!y.toString().match(/^(before|after)$/)&&!_&&!this.is_loaded(f))return v.create_node.call(this,f,p,y,h,_);p||(p={});var I,A,R,D,B,N=this._model.data,F=this.settings.unique.case_sensitive,j=this.settings.unique.trim_whitespace,H=this.settings.unique.duplicate,L;for(A=I=this.get_string("New node"),R=[],D=0,B=f.children.length;D<B;D++)L=N[f.children[D]].text,F||(L=L.toLowerCase()),j&&(L=L.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),R.push(L);for(D=1,L=A,F||(L=L.toLowerCase()),j&&(L=L.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));t.inArray(L,R)!==-1;)A=H.call(this,I,++D).toString(),L=A,F||(L=L.toLowerCase()),j&&(L=L.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));p.text=A}return v.create_node.call(this,f,p,y,h,_)}};var E=c.createElement("DIV");if(E.setAttribute("unselectable","on"),E.setAttribute("role","presentation"),E.className="jstree-wholerow",E.innerHTML="&#160;",t.jstree.plugins.wholerow=function(u,v){this.bind=function(){v.bind.call(this),this.element.on("ready.jstree set_state.jstree",(function(){this.hide_dots()}).bind(this)).on("init.jstree loading.jstree ready.jstree",(function(){this.get_container_ul().addClass("jstree-wholerow-ul")}).bind(this)).on("deselect_all.jstree",(function(f,p){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")}).bind(this)).on("changed.jstree",(function(f,p){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var y=!1,h,_;for(h=0,_=p.selected.length;h<_;h++)y=this.get_node(p.selected[h],!0),y&&y.length&&y.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}).bind(this)).on("open_node.jstree",(function(f,p){this.get_node(p.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}).bind(this)).on("hover_node.jstree dehover_node.jstree",(function(f,p){f.type==="hover_node"&&this.is_disabled(p.node)||this.get_node(p.node,!0).children(".jstree-wholerow")[f.type==="hover_node"?"addClass":"removeClass"]("jstree-wholerow-hovered")}).bind(this)).on("contextmenu.jstree",".jstree-wholerow",(function(f){if(this._data.contextmenu){f.preventDefault();var p=t.Event("contextmenu",{metaKey:f.metaKey,ctrlKey:f.ctrlKey,altKey:f.altKey,shiftKey:f.shiftKey,pageX:f.pageX,pageY:f.pageY});t(f.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(p)}}).bind(this)).on("click.jstree",".jstree-wholerow",function(f){f.stopImmediatePropagation();var p=t.Event("click",{metaKey:f.metaKey,ctrlKey:f.ctrlKey,altKey:f.altKey,shiftKey:f.shiftKey});t(f.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(p).trigger("focus")}).on("dblclick.jstree",".jstree-wholerow",function(f){f.stopImmediatePropagation();var p=t.Event("dblclick",{metaKey:f.metaKey,ctrlKey:f.ctrlKey,altKey:f.altKey,shiftKey:f.shiftKey});t(f.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(p).trigger("focus")}).on("click.jstree",".jstree-leaf > .jstree-ocl",(function(f){f.stopImmediatePropagation();var p=t.Event("click",{metaKey:f.metaKey,ctrlKey:f.ctrlKey,altKey:f.altKey,shiftKey:f.shiftKey});t(f.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(p).trigger("focus")}).bind(this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",(function(f){return f.stopImmediatePropagation(),this.is_disabled(f.currentTarget)||this.hover_node(f.currentTarget),!1}).bind(this)).on("mouseleave.jstree",".jstree-node",(function(f){this.dehover_node(f.currentTarget)}).bind(this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),v.teardown.call(this)},this.redraw_node=function(f,p,y,h){if(f=v.redraw_node.apply(this,arguments),f){var _=E.cloneNode(!0);t.inArray(f.id,this._data.core.selected)!==-1&&(_.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===f.id&&(_.className+=" jstree-wholerow-hovered"),f.insertBefore(_,f.childNodes[0])}return f}},window.customElements&&Object&&Object.create){var k=Object.create(HTMLElement.prototype);k.createdCallback=function(){var u={core:{},plugins:[]},v;for(v in t.jstree.plugins)t.jstree.plugins.hasOwnProperty(v)&&this.attributes[v]&&(u.plugins.push(v),this.getAttribute(v)&&JSON.parse(this.getAttribute(v))&&(u[v]=JSON.parse(this.getAttribute(v))));for(v in t.jstree.defaults.core)t.jstree.defaults.core.hasOwnProperty(v)&&this.attributes[v]&&(u.core[v]=JSON.parse(this.getAttribute(v))||this.getAttribute(v));t(this).jstree(u)};try{window.customElements.define("vakata-jstree",function(){},{prototype:k})}catch{}}}})})(cL);var uL=Uw();const ut=kl(uL);function Jw(e){return e?e.replace(/\b\w/g,t=>t.toUpperCase()):""}function qw(e,t){if(!e)return{formatted:"",readableDate:""};let n;if(typeof e=="number"||/^\d+$/.test(String(e)))n=new Date(Number(e)*1e3);else{let l=String(e).trim();l=l.replace(/^[A-Za-z]{3},\s*/,"");const c=l.match(/^(\d{1,2})(st|nd|rd|th)\s([A-Za-z]+),\s(\d{4})/);if(c){const[,d,,g,b]=c;l=`${d} ${g} ${b}`}if(!l.endsWith("Z")&&!(l.split(" ").length>2)&&(l+="Z"),n=new Date(l),isNaN(n.getTime())){const d=l.replace(/\s([A-Za-z]{3})$/,"");n=new Date(d)}if(isNaN(n.getTime()))return{formatted:"",readableDate:""}}const r=Intl.DateTimeFormat().resolvedOptions().timeZone,i=new Date,o=n.toLocaleDateString("en-US",{timeZone:r})===i.toLocaleDateString("en-US",{timeZone:r})?n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",timeZone:r}):t?t.replace("YYYY",String(n.getFullYear())).replace("MM",String(n.getMonth()+1).padStart(2,"0")).replace("DD",String(n.getDate()).padStart(2,"0")).replace("HH",String(n.getHours()).padStart(2,"0")).replace("mm",String(n.getMinutes()).padStart(2,"0")).replace("ss",String(n.getSeconds()).padStart(2,"0")):`${n.toLocaleDateString("en-US",{timeZone:r})} ${n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",timeZone:r})}`,a=[n.toLocaleDateString("en-US",{day:"numeric",timeZone:r}),n.toLocaleString("en-US",{month:"short",timeZone:r}),n.toLocaleDateString("en-US",{year:"2-digit",timeZone:r}),n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0,timeZone:r})].join(" ");return{formatted:o,readableDate:a}}const Mg=(e,t)=>{const n=e.replace(/\\/g,"/"),r=t.replace(/\\/g,"/"),i=n.split("/"),s=r.split("/");return s.length>i.length&&s.slice(0,i.length).join("/")===i.join("/")};function dL(e){return Array.isArray(e)?e.reduce((t,n)=>(n.metadata_value!==null&&(t[n.metadata_key]=n.metadata_value),t),{}):{}}function Rg(e){return{...e,absolute_path:e.name||e.object_name,fullPath:e.fullPath||e.name||e.object_name,parentPath:e.parentPath||"",object_type:void 0,object_name:void 0,scan_object_metadata:void 0,scan_object_results:void 0,...dL(e.scan_object_metadata||[])}}function Kw(e,t){const[n,r]=M.useState(e);return M.useEffect(()=>{const i=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(i)}},[e,t]),n}const Pg=50,Qw="-",Ld={attribute_mapping:"attribute_mapping",confidence_metadata:"confidence_metadata"},fL="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwIDRIMjBDMjAuNTUwNyA0IDIxIDQuNDQ5MjggMjEgNVYxOUMyMSAxOS41NTA3IDIwLjU1MDcgMjAgMjAgMjBINEMzLjQ0OTIyIDIwIDMgMTkuNTUwNyAzIDE5VjVDMyA0LjQ0OTI4IDMuNDQ5MjIgNCA0IDRIMTBMMTIgNkgxMFoiIGZpbGw9ImN1cnJlbnRDb2xvciIvPgo8L3N2Zz4K",hL="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE0IDJINkMyLjg5NTQzIDIgMiAyLjg5NTQzIDIgNlYxOEMyIDE5LjEwNDYgMi44OTU0MyAyMCA0IDIwSDE4QzE5LjEwNDYgMjAgMjAgMTkuMTA0NiAyMCAxOFY4TDE0IDJaIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTE0IDJWOEgyMCIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",gL=({scanConnectorUuid:e,api:t,bulkActions:n,handleBulkAction:r,isEditable:i,encryptedFilesFilter:s="",outlookContentTypeFilter:o="",fileSearch:a="",scanDetails:l})=>{const c=M.useRef(null),{showLoader:d,hideLoader:g}=Ed(),b=Kw(a,500),[x,w]=M.useState([]),[C,E]=M.useState(!1),[k,u]=M.useState(null),[v,f]=M.useState([]),[p,y]=M.useState(),[h,_]=M.useState([]),[I,A]=M.useState(""),[R,D]=M.useState(new Set),[B,N]=M.useState([]),F=M.useRef(!1),j=M.useRef(!1);let H=new Set;const L=new Map,G=Y=>Object.keys(Y).map(re=>({value:re,label:Y[re]})),$=Y=>{y((Y==null?void 0:Y.value)||""),Y!=null&&Y.value&&r&&r(Y.value,v,()=>{f([])},()=>{y("")})},Z=(Y,le="",re=!1)=>{const ge=[];if(Y.filter(he=>{const be=he.fullPath||he.absolute_path,ye=he.name||he.object_name;return be&&ye&&ye.trim()!==""}).forEach((he,be)=>{if(he.fullPath){const q=he.fullPath.replace(/\\/g,"/").split("/").filter(Me=>Me.trim()!=="");let Ie=0;le&&le!==""&&(Ie=le.replace(/\\/g,"/").split("/").filter(je=>je.trim()!=="").length);let Le=ge;for(let Me=Ie;Me<q.length;Me++){const je=q[Me],gt=Me===q.length-1,Ve=q.slice(0,Me+1).join("/"),_e=/^[A-Z]:$/.test(je),Oe=gt&&!_e&&(he.object_type==="file"||he.isFile===!0||he.isDirectory===!1&&he.object_type!=="folder"&&he.object_type!=="directory");let nt=Le.find(pt=>pt.text===je&&pt.full_path===Ve&&pt.type===(Oe?"file":"folder"));if(!nt){const pt=Le.find(Qt=>Qt.text===je&&Qt.type===(Oe?"file":"folder"));pt?nt=pt:(nt={text:je,children:[],type:Oe?"file":"folder",id:Ve+`_${be}_${Me}`,data:Oe?he:null,full_path:Ve,state:{opened:!1,disabled:!1,selected:!1},original:{full_path:Ve,type:Oe?"file":"folder"},a_attr:{title:he.fullPath||Ve},...Oe?{}:{children:!0}},Le.push(nt))}Oe||(Le=nt.children)}}else if(he.absolute_path){const q=he.absolute_path.replace(/\\/g,"/").split("/").filter(Me=>Me.trim()!=="");let Ie=0;le&&le!==""&&(Ie=le.replace(/\\/g,"/").split("/").filter(je=>je.trim()!=="").length);let Le=ge;for(let Me=Ie;Me<q.length;Me++){const je=q[Me],gt=Me===q.length-1,Ve=q.slice(0,Me+1).join("/"),_e=/^[A-Z]:$/.test(je),Oe=gt&&!_e&&(he.object_type==="file"||he.isFile===!0||he.isDirectory===!1&&he.object_type!=="folder"&&he.object_type!=="directory");let nt=Le.find(pt=>pt.text===je&&pt.full_path===Ve&&pt.type===(Oe?"file":"folder"));nt||(nt={text:je,children:[],type:Oe?"file":"folder",id:Ve+`_${be}_${Me}`,data:Oe?he:null,full_path:Ve,original:{full_path:Ve,type:Oe?"file":"folder"},a_attr:{title:he.absolute_path||Ve}},Le.push(nt)),Oe||(Le=nt.children)}}}),re&&le!==void 0){const he={text:"Load More...",children:[],type:"load_more",id:`load_more_${le}`,data:null,full_path:le,original:{full_path:le,type:"load_more"},a_attr:{title:"Click to load more items",style:"cursor: pointer; color: #007bff; font-weight: bold;"}};ge.push(he)}return ge},U=async(Y,le=0,re=!1)=>{var be;if(Y&&!Y.includes("/")&&!Y.includes("\\")&&c.current){const q=ut(c.current).jstree(!0).get_json("#",{flat:!0}).find(Ie=>Ie.id===Y||Ie.text===Y);q&&((be=q.original)!=null&&be.full_path)&&(Y=q.original.full_path)}const ge=`${Y}_${s}_${o}_${b}`,ne=L.get(ge);if(R.has(Y)||ne!=null&&ne.loading||le===0&&H.has(Y)&&!re||j.current)return;D(ye=>new Set(ye).add(Y)),ne?L.set(ge,{page:le,hasMore:ne.hasMore??!1,loading:!0}):L.set(ge,{page:0,hasMore:!1,loading:!0}),d();const he=!!(l!=null&&l.end_time&&l.end_time.length>0);try{const ye=await t.readIndexScanObjectsForPath(e,Y,s,o,b,le,Pg,he);if(ye!=null&&ye.data){L.set(ge,{page:le,hasMore:ye.hasMore??!1,loading:!1});const q=ye.data.map(Ie=>Rg(Ie));re&&le>0?se(Y,q,ye.hasMore??!1):(H.add(Y),ee(Y,q,ye.hasMore??!1)),L.set(ge,{page:le,hasMore:ye.hasMore??!1,loading:!1})}}catch(ye){console.error("Error loading children for path:",ye),L.set(ge,{page:le,hasMore:!1,loading:!1})}finally{g(),D(ye=>{const q=new Set(ye);return q.delete(Y),q})}},ee=(Y,le,re=!1)=>{var ge;if(!(!c.current||j.current)){j.current=!0;try{const he=ut(c.current).jstree(!0).get_json("#",{flat:!0}).find(Me=>{var je;return Me.text===Y||((je=Me.a_attr)==null?void 0:je.title)===Y});if(!he){console.error("Parent node not found for path:",Y);return}const be=(ge=he.state)==null?void 0:ge.opened;if(he.children&&he.children.length>0&&he.children.forEach(Me=>{c.current&&ut(c.current).jstree("delete_node",Me)}),c.current){const Me=ut(c.current).jstree("get_children_dom",he.id);Me&&Me.length&&ut(Me).each((je,gt)=>{const Ve=ut(gt).attr("id");Ve&&(Ve.includes("_loading")||Ve.includes("_placeholder"))&&c.current&&ut(c.current).jstree("delete_node",Ve)})}Z(le,Y,re).map(Me=>Me.type==="folder"?{...Me,children:Me.children&&Me.children.length>0?Me.children:[{text:"",children:[],type:"placeholder",id:`${Me.id}_placeholder`,state:{opened:!1,disabled:!0,selected:!1},original:{full_path:Me.full_path,type:"placeholder"},li_attr:{style:"display: none;"}}],state:{opened:!1,disabled:!1,selected:!1}}:Me).forEach(Me=>{c.current&&ut(c.current).jstree("create_node",he.id,Me,"last")});const Ie=`${Y}_${s}_${o}_${b}`;L.get(Ie)||L.set(Ie,{page:0,hasMore:re,loading:!1}),be&&c.current&&ut(c.current).jstree("open_node",he.id),setTimeout(()=>{j.current=!1},100)}catch(ne){console.error("Error in updateTreeWithChildren:",ne),j.current=!1}}},se=(Y,le,re=!1)=>{var q;if(!c.current)return;let ge,ne;if(Y==="")ne="#",ge={id:"#",text:"root",type:"root"};else if(ge=ut(c.current).jstree(!0).get_json("#",{flat:!0}).find(Le=>{var Me;return Le.text===Y||((Me=Le.a_attr)==null?void 0:Me.title)===Y}),ne=ge==null?void 0:ge.id,!ge){console.error("Parent node not found for path:",Y);return}const he=`load_more_${Y}`;if(c.current){const Ie=ut(c.current).jstree("get_node",he);if(Ie&&ut(c.current).jstree("delete_node",Ie),Y!==""&&ge){const Le=ut(c.current).jstree("get_children_dom",ge.id);Le&&Le.length&&ut(Le).each((Me,je)=>{const gt=ut(je).attr("id");gt&&(gt.includes("_loading")||gt.includes("_placeholder"))&&c.current&&ut(c.current).jstree("delete_node",gt)})}}Z(le,Y,re).map(Ie=>Ie.type==="folder"?{...Ie,children:Ie.children&&Ie.children.length>0?Ie.children:[{text:"",children:[],type:"placeholder",id:`${Ie.id}_placeholder`,state:{opened:!1,disabled:!0,selected:!1},original:{full_path:Ie.full_path,type:"placeholder"},li_attr:{style:"display: none;"}}],state:{opened:!1,disabled:!1,selected:!1}}:Ie).forEach((Ie,Le)=>{if(c.current)try{ut(c.current).jstree("create_node",ne,Ie,"last")}catch(Me){console.error(`appendChildrenToPath - Error creating child ${Le}:`,Me)}}),Y!==""&&ge&&((q=ge.state)!=null&&q.opened)&&c.current&&ut(c.current).jstree("open_node",ge.id)},ie=async()=>{if(!F.current)try{F.current=!0,E(!1),d(),H=new Set,N([]),u(null);const Y=!!(l!=null&&l.end_time&&l.end_time.length>0),le=await t.readIndexScanObjectsForPath(e,"",s,o,b,0,Pg,Y);if(le!=null&&le.data){const re=le.data.map(be=>Rg(be));w(re);const ge=`_${s}_${o}_${b}`,he=Z(re,"",le.hasMore??!1).map(be=>be.type==="folder"?{...be,children:be.children&&be.children.length>0?be.children:[{text:"",children:[],type:"placeholder",id:`${be.id}_placeholder`,state:{opened:!1,disabled:!0,selected:!1},original:{full_path:be.full_path,type:"placeholder"},li_attr:{style:"display: none;"}}],state:{opened:!1,disabled:!1,selected:!1}}:be);N(he),H.add(""),L.set(ge,{page:0,hasMore:le.hasMore??!1,loading:!1})}else w([]),N([])}catch(Y){console.error("[FileBrowser] Error fetching root level data:",Y),w([]),N([])}finally{F.current=!1,g(),E(!0)}};M.useEffect(()=>{e?ie():E(!0)},[e,s,o,b]),M.useEffect(()=>{if(C&&c.current){ut(c.current).jstree(!0)&&ut(c.current).jstree("destroy");const Y={plugins:["types","state"],types:{folder:{icon:fL},file:{icon:hL},load_more:{icon:"jstree-file"}}};i&&(Y.plugins.push("checkbox"),Y.checkbox={three_state:!0,whole_node:!1,tie_selection:!1}),ut(c.current).jstree({core:{data:B,themes:{name:"default",responsive:!0},check_callback:!0},...Y}),ut(c.current).on("open_node.jstree",(le,re)=>{var he,be,ye;const ge=re.node;let ne=((he=ge.original)==null?void 0:he.full_path)||ge.full_path||ge.id;if(ne&&!ne.includes("/")&&!ne.includes("\\")&&c.current){const Ie=ut(c.current).jstree(!0).get_json("#",{flat:!0}).find(Le=>Le.id===ge.id);Ie&&((be=Ie.original)!=null&&be.full_path)&&(ne=Ie.original.full_path)}if((!ne||!ne.includes("/")&&!ne.includes("\\"))&&c.current){const q=ut(c.current).jstree(!0).get_json("#",{flat:!0}),Ie=q.find(Le=>Le.id===ge.id);if(Ie&&Ie.parent&&Ie.parent!=="#"){const Le=q.find(Me=>Me.id===Ie.parent);Le&&((ye=Le.original)!=null&&ye.full_path)&&(ne=`${Le.original.full_path}/${ge.text}`)}}ge.type==="folder"&&/^[A-Z]:$/.test(ge.text)&&(ne=ge.text),ge.type==="folder"&&ne&&(H.has(ne)||U(ne))}),ut(c.current).on("click.jstree",le=>{var ne;const ge=ut(le.target).closest("li").attr("id");if(ge&&ge.startsWith("load_more_")){const he=c.current?ut(c.current).jstree("get_node",ge):null,be=((ne=he==null?void 0:he.original)==null?void 0:ne.full_path)||(he==null?void 0:he.full_path)||ge.replace("load_more_",""),ye=be===""?`_${s}_${o}_${b}`:`${be}_${s}_${o}_${b}`,q=L.get(ye);if(q&&q.hasMore&&!q.loading){const Ie=q.page+1;U(be,Ie,!0)}else q||(L.set(ye,{page:0,hasMore:!0,loading:!1}),U(be,1,!0));return le.preventDefault(),le.stopPropagation(),!1}return!0}),ut(c.current).on("select_node.jstree",(le,re)=>{var ne;const ge=re.node;if(ge.type==="load_more"&&((ne=ge.original)!=null&&ne.full_path)){const he=ge.original.full_path,be=`${he}_${s}_${o}_${b}`,ye=L.get(be);ye&&ye.hasMore&&!ye.loading&&U(he,ye.page+1,!0);return}ge.data?u(ge.data):u(null)}),ut(c.current).on("check_node.jstree uncheck_node.jstree",function(le,re){const ge=re.node,ne=ge.original.full_path;ge.state.checked?f(he=>{const be=he.filter(q=>q!==ne&&!Mg(ne,q));let ye=ge;for(;ye.parent!=="#";)if(c.current){const q=ut(c.current).jstree("get_node",ye.parent);if(q.children.every(Le=>{if(c.current)return ut(c.current).jstree("get_node",Le).state.checked}))return be.filter(Le=>!Le.startsWith(q.original.full_path)).concat(q.original.full_path);ye=q}return be.concat(ne)}):f(he=>{const be=he.filter(q=>q!==ne&&!Mg(ne,q));let ye=ge;for(;ye.parent!=="#";)if(c.current){const q=ut(c.current).jstree("get_node",ye.parent);if(q.children.some(Le=>{if(c.current)return ut(c.current).jstree("get_node",Le).state.checked})){const Le=q.children.filter(Me=>{if(c.current)return ut(c.current).jstree("get_node",Me).state.checked}).map(Me=>{if(c.current)return ut(c.current).jstree("get_node",Me).original.full_path});return be.filter(Me=>!Me.startsWith(q.original.full_path)).concat(Le)}ye=q}return be})})}return()=>{c.current&&ut(c.current).jstree("destroy").empty()}},[B,C]);const fe=[{header:"Key",accessorKey:"key",minSize:180,maxSize:180},{header:"Value",accessorKey:"value",cell:({row:{original:Y}})=>O.jsx("p",{className:"break-words",title:Y.value,children:Y.value.length>30?Y.value.substring(0,30)+"...":Y.value})}],Se=(Y,le)=>{if(typeof le=="boolean"||Y.startsWith("is_"))return le===!0||le===1||le==="1"?"Yes":"No";if(Y==="file_size")return Zp(+le);if(["last_modified","creation_time","last_accessed","created_at","updated_at"].includes(Y))try{return Tu(le).format("ddd, DD MMM YYYY hh:mm:ss A")}catch{return qw(le).readableDate}return le};M.useEffect(()=>{if(k){const Y=k.type==="Email"||k.type==="Attachment"||k.object_type==="Email"||k.object_type==="Attachment",le=Object.entries(k).filter(([re,ge])=>!["id","scan_id","created_at","updated_at","content_preview","file_system_type","file_system_flags",...Y?["absolute_path"]:[]].includes(re)&&ge!==null).map(([re,ge])=>{let ne=Se(re,ge);if(Y&&re==="name"&&typeof ge=="string"){const he=ge.lastIndexOf("/");he!==-1&&(ne=ge.substring(he+1))}return{id:re,key:Jw(re.split("_").join(" ")),value:ne}});_(le)}else _([])},[k]);const ve=I&&h?h.filter(Y=>Y.key.toLowerCase().includes(I.toLowerCase())||String(Y.value).toLowerCase().includes(I.toLowerCase())):h,xe=()=>{c.current&&ut(c.current).jstree("close_all")};return!x||x.length===0||!C?O.jsx("div",{className:"flex items-center gap-2 p-6 mt-2 text-lg font-semibold rounded-lg shadow-sm",style:{backgroundColor:"var(--hover-bg-color)",border:"1px solid var(--border-color)",color:"var(--text-color)"},children:C&&O.jsxs(O.Fragment,{children:[O.jsx(gy,{className:"w-6 h-6",style:{color:"var(--secondary-text-color)"}}),O.jsx("span",{children:"No metadata available to display."})]})}):O.jsxs("div",{className:"flex",style:{minHeight:"75vh"},children:[O.jsxs("div",{className:"w-1/2 border-r pt-4 pb-4 overflow-x-auto",children:[O.jsx("div",{className:"flex items-center gap-2 mb-4",children:O.jsx("button",{onClick:xe,className:"px-3 py-1 text-sm text-white rounded-md transition-colors",style:{backgroundColor:"var(--brand-orange)"},onMouseEnter:Y=>{Y.currentTarget.style.backgroundColor="#e65a03"},onMouseLeave:Y=>{Y.currentTarget.style.backgroundColor="var(--brand-orange)"},children:"Collapse All"})}),O.jsx("div",{className:"overflow-y-auto file-browser-tree",children:O.jsx("div",{ref:c})})]}),O.jsx("div",{className:"w-1/2 pt-4 pl-4 pr-2",children:v.length>0&&n&&r?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"relative w-48 px-4 z-40",children:O.jsx(il,{placeholder:"Bulk Action",options:G(n),selectedOptions:p?G(n).filter(Y=>Y.value===p):[],handleChange:$,isMulti:!1,isClearable:!0})}),O.jsx("div",{className:"py-4",children:O.jsx(Zh,{type:Za.FILE,columns:[{header:"Folders",accessorKey:"folder"}],data:v.map(Y=>({id:Y,folder:Y}))||[],paginationEnabled:!1,exportEnabled:!1})})]}):k?O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"flex w-full h-[2rem] rounded-md overflow-hidden shadow-sm",style:{border:"1px solid var(--border-color)"},children:[O.jsx("input",{type:"text",placeholder:"Search Metadata",value:I,onChange:Y=>A(Y.target.value),className:"flex-grow px-4 py-2 text-sm focus:outline-none w-full",style:{backgroundColor:"var(--bg-color)",color:"var(--text-color)"}}),O.jsx("button",{className:"px-4 py-0 transition-colors",style:{backgroundColor:"var(--brand-light)",color:"var(--brand-dark)"},onMouseEnter:Y=>Y.currentTarget.style.backgroundColor="var(--hover-bg-color)",onMouseLeave:Y=>Y.currentTarget.style.backgroundColor="var(--brand-light)",tabIndex:-1,type:"button","aria-label":"Search",disabled:!0,children:O.jsx(y_,{size:18})})]}),O.jsx(Zh,{tableWrapperClass:"metadata-table overflow-y-auto",type:Za.FILEBROWSER,columns:fe,data:ve||[],paginationEnabled:!1,exportEnabled:!1})]}):O.jsx("p",{className:"px-4",style:{color:"var(--secondary-text-color)"},children:"Select a file or folder to take action."})})]})};function Sn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Sn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Ng={exports:{}},oh={},Lc={exports:{}},ah={};/**
208
- * @license React
209
- * use-sync-external-store-shim.production.js
210
- *
211
- * Copyright (c) Meta Platforms, Inc. and affiliates.
212
- *
213
- * This source code is licensed under the MIT license found in the
214
- * LICENSE file in the root directory of this source tree.
215
- */var Sx;function pL(){if(Sx)return ah;Sx=1;var e=M;function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(g,b){var x=b(),w=r({inst:{value:x,getSnapshot:b}}),C=w[0].inst,E=w[1];return s(function(){C.value=x,C.getSnapshot=b,l(C)&&E({inst:C})},[g,x,b]),i(function(){return l(C)&&E({inst:C}),g(function(){l(C)&&E({inst:C})})},[g]),o(x),x}function l(g){var b=g.getSnapshot;g=g.value;try{var x=b();return!n(g,x)}catch{return!0}}function c(g,b){return b()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return ah.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,ah}var lh={};/**
216
- * @license React
217
- * use-sync-external-store-shim.development.js
218
- *
219
- * Copyright (c) Meta Platforms, Inc. and affiliates.
220
- *
221
- * This source code is licensed under the MIT license found in the
222
- * LICENSE file in the root directory of this source tree.
223
- */var Ex;function mL(){return Ex||(Ex=1,process.env.NODE_ENV!=="production"&&function(){function e(x,w){return x===w&&(x!==0||1/x===1/w)||x!==x&&w!==w}function t(x,w){d||i.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var C=w();if(!g){var E=w();s(C,E)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),g=!0)}E=o({inst:{value:C,getSnapshot:w}});var k=E[0].inst,u=E[1];return l(function(){k.value=C,k.getSnapshot=w,n(k)&&u({inst:k})},[x,C,w]),a(function(){return n(k)&&u({inst:k}),x(function(){n(k)&&u({inst:k})})},[x]),c(C),C}function n(x){var w=x.getSnapshot;x=x.value;try{var C=w();return!s(x,C)}catch{return!0}}function r(x,w){return w()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=M,s=typeof Object.is=="function"?Object.is:e,o=i.useState,a=i.useEffect,l=i.useLayoutEffect,c=i.useDebugValue,d=!1,g=!1,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;lh.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),lh}var Ix;function eC(){return Ix||(Ix=1,process.env.NODE_ENV==="production"?Lc.exports=pL():Lc.exports=mL()),Lc.exports}/**
224
- * @license React
225
- * use-sync-external-store-shim/with-selector.production.js
226
- *
227
- * Copyright (c) Meta Platforms, Inc. and affiliates.
228
- *
229
- * This source code is licensed under the MIT license found in the
230
- * LICENSE file in the root directory of this source tree.
231
- */var kx;function bL(){if(kx)return oh;kx=1;var e=M,t=eC();function n(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,s=e.useRef,o=e.useEffect,a=e.useMemo,l=e.useDebugValue;return oh.useSyncExternalStoreWithSelector=function(c,d,g,b,x){var w=s(null);if(w.current===null){var C={hasValue:!1,value:null};w.current=C}else C=w.current;w=a(function(){function k(y){if(!u){if(u=!0,v=y,y=b(y),x!==void 0&&C.hasValue){var h=C.value;if(x(h,y))return f=h}return f=y}if(h=f,r(v,y))return h;var _=b(y);return x!==void 0&&x(h,_)?(v=y,h):(v=y,f=_)}var u=!1,v,f,p=g===void 0?null:g;return[function(){return k(d())},p===null?void 0:function(){return k(p())}]},[d,g,b,x]);var E=i(c,w[0],w[1]);return o(function(){C.hasValue=!0,C.value=E},[E]),l(E),E},oh}var ch={};/**
232
- * @license React
233
- * use-sync-external-store-shim/with-selector.development.js
234
- *
235
- * Copyright (c) Meta Platforms, Inc. and affiliates.
236
- *
237
- * This source code is licensed under the MIT license found in the
238
- * LICENSE file in the root directory of this source tree.
239
- */var Ax;function vL(){return Ax||(Ax=1,process.env.NODE_ENV!=="production"&&function(){function e(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=M,n=eC(),r=typeof Object.is=="function"?Object.is:e,i=n.useSyncExternalStore,s=t.useRef,o=t.useEffect,a=t.useMemo,l=t.useDebugValue;ch.useSyncExternalStoreWithSelector=function(c,d,g,b,x){var w=s(null);if(w.current===null){var C={hasValue:!1,value:null};w.current=C}else C=w.current;w=a(function(){function k(y){if(!u){if(u=!0,v=y,y=b(y),x!==void 0&&C.hasValue){var h=C.value;if(x(h,y))return f=h}return f=y}if(h=f,r(v,y))return h;var _=b(y);return x!==void 0&&x(h,_)?(v=y,h):(v=y,f=_)}var u=!1,v,f,p=g===void 0?null:g;return[function(){return k(d())},p===null?void 0:function(){return k(p())}]},[d,g,b,x]);var E=i(c,w[0],w[1]);return o(function(){C.hasValue=!0,C.value=E},[E]),l(E),E},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ch}process.env.NODE_ENV==="production"?Ng.exports=bL():Ng.exports=vL();var xL=Ng.exports;const yL=kl(xL),_L={},Mx=e=>{let t;const n=new Set,r=(d,g)=>{const b=typeof d=="function"?d(t):d;if(!Object.is(b,t)){const x=t;t=g??(typeof b!="object"||b===null)?b:Object.assign({},t,b),n.forEach(w=>w(t,x))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(_L?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,l);return l},wL=e=>e?Mx(e):Mx,{useDebugValue:CL}=M,{useSyncExternalStoreWithSelector:SL}=yL,EL=e=>e;function tC(e,t=EL,n){const r=SL(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return CL(r),r}const Rx=(e,t)=>{const n=wL(e),r=(i,s=t)=>tC(n,i,s);return Object.assign(r,n),r},IL=(e,t)=>e?Rx(e,t):Rx;function cn(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var kL={value:()=>{}};function jd(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new cu(n)}function cu(e){this._=e}function AL(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}cu.prototype=jd.prototype={constructor:cu,on:function(e,t){var n=this._,r=AL(e+"",n),i,s=-1,o=r.length;if(arguments.length<2){for(;++s<o;)if((i=(e=r[s]).type)&&(i=ML(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<o;)if(i=(e=r[s]).type)n[i]=Px(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Px(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new cu(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function ML(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Px(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=kL,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Tg="http://www.w3.org/1999/xhtml";const Nx={svg:"http://www.w3.org/2000/svg",xhtml:Tg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Bd(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Nx.hasOwnProperty(t)?{space:Nx[t],local:e}:e}function RL(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Tg&&t.documentElement.namespaceURI===Tg?t.createElement(e):t.createElementNS(n,e)}}function PL(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function nC(e){var t=Bd(e);return(t.local?PL:RL)(t)}function NL(){}function am(e){return e==null?NL:function(){return this.querySelector(e)}}function TL(e){typeof e!="function"&&(e=am(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],o=s.length,a=r[i]=new Array(o),l,c,d=0;d<o;++d)(l=s[d])&&(c=e.call(l,l.__data__,d,s))&&("__data__"in l&&(c.__data__=l.__data__),a[d]=c);return new rr(r,this._parents)}function OL(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function DL(){return[]}function rC(e){return e==null?DL:function(){return this.querySelectorAll(e)}}function FL(e){return function(){return OL(e.apply(this,arguments))}}function LL(e){typeof e=="function"?e=FL(e):e=rC(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var o=t[s],a=o.length,l,c=0;c<a;++c)(l=o[c])&&(r.push(e.call(l,l.__data__,c,o)),i.push(l));return new rr(r,i)}function iC(e){return function(){return this.matches(e)}}function sC(e){return function(t){return t.matches(e)}}var jL=Array.prototype.find;function BL(e){return function(){return jL.call(this.children,e)}}function VL(){return this.firstElementChild}function zL(e){return this.select(e==null?VL:BL(typeof e=="function"?e:sC(e)))}var HL=Array.prototype.filter;function GL(){return Array.from(this.children)}function WL(e){return function(){return HL.call(this.children,e)}}function $L(e){return this.selectAll(e==null?GL:WL(typeof e=="function"?e:sC(e)))}function XL(e){typeof e!="function"&&(e=iC(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],o=s.length,a=r[i]=[],l,c=0;c<o;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&a.push(l);return new rr(r,this._parents)}function oC(e){return new Array(e.length)}function YL(){return new rr(this._enter||this._groups.map(oC),this._parents)}function id(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}id.prototype={constructor:id,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function ZL(e){return function(){return e}}function UL(e,t,n,r,i,s){for(var o=0,a,l=t.length,c=s.length;o<c;++o)(a=t[o])?(a.__data__=s[o],r[o]=a):n[o]=new id(e,s[o]);for(;o<l;++o)(a=t[o])&&(i[o]=a)}function JL(e,t,n,r,i,s,o){var a,l,c=new Map,d=t.length,g=s.length,b=new Array(d),x;for(a=0;a<d;++a)(l=t[a])&&(b[a]=x=o.call(l,l.__data__,a,t)+"",c.has(x)?i[a]=l:c.set(x,l));for(a=0;a<g;++a)x=o.call(e,s[a],a,s)+"",(l=c.get(x))?(r[a]=l,l.__data__=s[a],c.delete(x)):n[a]=new id(e,s[a]);for(a=0;a<d;++a)(l=t[a])&&c.get(b[a])===l&&(i[a]=l)}function qL(e){return e.__data__}function KL(e,t){if(!arguments.length)return Array.from(this,qL);var n=t?JL:UL,r=this._parents,i=this._groups;typeof e!="function"&&(e=ZL(e));for(var s=i.length,o=new Array(s),a=new Array(s),l=new Array(s),c=0;c<s;++c){var d=r[c],g=i[c],b=g.length,x=QL(e.call(d,d&&d.__data__,c,r)),w=x.length,C=a[c]=new Array(w),E=o[c]=new Array(w),k=l[c]=new Array(b);n(d,g,C,E,k,x,t);for(var u=0,v=0,f,p;u<w;++u)if(f=C[u]){for(u>=v&&(v=u+1);!(p=E[v])&&++v<w;);f._next=p||null}}return o=new rr(o,r),o._enter=a,o._exit=l,o}function QL(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ej(){return new rr(this._exit||this._groups.map(oC),this._parents)}function tj(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function nj(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,o=Math.min(i,s),a=new Array(i),l=0;l<o;++l)for(var c=n[l],d=r[l],g=c.length,b=a[l]=new Array(g),x,w=0;w<g;++w)(x=c[w]||d[w])&&(b[w]=x);for(;l<i;++l)a[l]=n[l];return new rr(a,this._parents)}function rj(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],o;--i>=0;)(o=r[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function ij(e){e||(e=sj);function t(g,b){return g&&b?e(g.__data__,b.__data__):!g-!b}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var o=n[s],a=o.length,l=i[s]=new Array(a),c,d=0;d<a;++d)(c=o[d])&&(l[d]=c);l.sort(t)}return new rr(i,this._parents).order()}function sj(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function oj(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function aj(){return Array.from(this)}function lj(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var o=r[i];if(o)return o}return null}function cj(){let e=0;for(const t of this)++e;return e}function uj(){return!this.node()}function dj(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,o=i.length,a;s<o;++s)(a=i[s])&&e.call(a,a.__data__,s,i);return this}function fj(e){return function(){this.removeAttribute(e)}}function hj(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gj(e,t){return function(){this.setAttribute(e,t)}}function pj(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function mj(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function bj(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function vj(e,t){var n=Bd(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?hj:fj:typeof t=="function"?n.local?bj:mj:n.local?pj:gj)(n,t))}function aC(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function xj(e){return function(){this.style.removeProperty(e)}}function yj(e,t,n){return function(){this.style.setProperty(e,t,n)}}function _j(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function wj(e,t,n){return arguments.length>1?this.each((t==null?xj:typeof t=="function"?_j:yj)(e,t,n??"")):Do(this.node(),e)}function Do(e,t){return e.style.getPropertyValue(t)||aC(e).getComputedStyle(e,null).getPropertyValue(t)}function Cj(e){return function(){delete this[e]}}function Sj(e,t){return function(){this[e]=t}}function Ej(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ij(e,t){return arguments.length>1?this.each((t==null?Cj:typeof t=="function"?Ej:Sj)(e,t)):this.node()[e]}function lC(e){return e.trim().split(/^|\s+/)}function lm(e){return e.classList||new cC(e)}function cC(e){this._node=e,this._names=lC(e.getAttribute("class")||"")}cC.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function uC(e,t){for(var n=lm(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function dC(e,t){for(var n=lm(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function kj(e){return function(){uC(this,e)}}function Aj(e){return function(){dC(this,e)}}function Mj(e,t){return function(){(t.apply(this,arguments)?uC:dC)(this,e)}}function Rj(e,t){var n=lC(e+"");if(arguments.length<2){for(var r=lm(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Mj:t?kj:Aj)(n,t))}function Pj(){this.textContent=""}function Nj(e){return function(){this.textContent=e}}function Tj(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Oj(e){return arguments.length?this.each(e==null?Pj:(typeof e=="function"?Tj:Nj)(e)):this.node().textContent}function Dj(){this.innerHTML=""}function Fj(e){return function(){this.innerHTML=e}}function Lj(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function jj(e){return arguments.length?this.each(e==null?Dj:(typeof e=="function"?Lj:Fj)(e)):this.node().innerHTML}function Bj(){this.nextSibling&&this.parentNode.appendChild(this)}function Vj(){return this.each(Bj)}function zj(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Hj(){return this.each(zj)}function Gj(e){var t=typeof e=="function"?e:nC(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Wj(){return null}function $j(e,t){var n=typeof e=="function"?e:nC(e),r=t==null?Wj:typeof t=="function"?t:am(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Xj(){var e=this.parentNode;e&&e.removeChild(this)}function Yj(){return this.each(Xj)}function Zj(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Uj(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Jj(e){return this.select(e?Uj:Zj)}function qj(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Kj(e){return function(t){e.call(this,t,this.__data__)}}function Qj(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function eB(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function tB(e,t,n){return function(){var r=this.__on,i,s=Kj(t);if(r){for(var o=0,a=r.length;o<a;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}function nB(e,t,n){var r=Qj(e+""),i,s=r.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,d;l<c;++l)for(i=0,d=a[l];i<s;++i)if((o=r[i]).type===d.type&&o.name===d.name)return d.value}return}for(a=t?tB:eB,i=0;i<s;++i)this.each(a(r[i],t,n));return this}function fC(e,t,n){var r=aC(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function rB(e,t){return function(){return fC(this,e,t)}}function iB(e,t){return function(){return fC(this,e,t.apply(this,arguments))}}function sB(e,t){return this.each((typeof t=="function"?iB:rB)(e,t))}function*oB(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,o;i<s;++i)(o=r[i])&&(yield o)}var hC=[null];function rr(e,t){this._groups=e,this._parents=t}function Dl(){return new rr([[document.documentElement]],hC)}function aB(){return this}rr.prototype=Dl.prototype={constructor:rr,select:TL,selectAll:LL,selectChild:zL,selectChildren:$L,filter:XL,data:KL,enter:YL,exit:ej,join:tj,merge:nj,selection:aB,order:rj,sort:ij,call:oj,nodes:aj,node:lj,size:cj,empty:uj,each:dj,attr:vj,style:wj,property:Ij,classed:Rj,text:Oj,html:jj,raise:Vj,lower:Hj,append:Gj,insert:$j,remove:Yj,clone:Jj,datum:qj,on:nB,dispatch:sB,[Symbol.iterator]:oB};function dr(e){return typeof e=="string"?new rr([[document.querySelector(e)]],[document.documentElement]):new rr([[e]],hC)}function lB(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Sr(e,t){if(e=lB(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const cB={passive:!1},bl={capture:!0,passive:!1};function uh(e){e.stopImmediatePropagation()}function Co(e){e.preventDefault(),e.stopImmediatePropagation()}function gC(e){var t=e.document.documentElement,n=dr(e).on("dragstart.drag",Co,bl);"onselectstart"in t?n.on("selectstart.drag",Co,bl):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function pC(e,t){var n=e.document.documentElement,r=dr(e).on("dragstart.drag",null);t&&(r.on("click.drag",Co,bl),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const jc=e=>()=>e;function Og(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:s,x:o,y:a,dx:l,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}Og.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function uB(e){return!e.ctrlKey&&!e.button}function dB(){return this.parentNode}function fB(e,t){return t??{x:e.x,y:e.y}}function hB(){return navigator.maxTouchPoints||"ontouchstart"in this}function gB(){var e=uB,t=dB,n=fB,r=hB,i={},s=jd("start","drag","end"),o=0,a,l,c,d,g=0;function b(f){f.on("mousedown.drag",x).filter(r).on("touchstart.drag",E).on("touchmove.drag",k,cB).on("touchend.drag touchcancel.drag",u).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(f,p){if(!(d||!e.call(this,f,p))){var y=v(this,t.call(this,f,p),f,p,"mouse");y&&(dr(f.view).on("mousemove.drag",w,bl).on("mouseup.drag",C,bl),gC(f.view),uh(f),c=!1,a=f.clientX,l=f.clientY,y("start",f))}}function w(f){if(Co(f),!c){var p=f.clientX-a,y=f.clientY-l;c=p*p+y*y>g}i.mouse("drag",f)}function C(f){dr(f.view).on("mousemove.drag mouseup.drag",null),pC(f.view,c),Co(f),i.mouse("end",f)}function E(f,p){if(e.call(this,f,p)){var y=f.changedTouches,h=t.call(this,f,p),_=y.length,I,A;for(I=0;I<_;++I)(A=v(this,h,f,p,y[I].identifier,y[I]))&&(uh(f),A("start",f,y[I]))}}function k(f){var p=f.changedTouches,y=p.length,h,_;for(h=0;h<y;++h)(_=i[p[h].identifier])&&(Co(f),_("drag",f,p[h]))}function u(f){var p=f.changedTouches,y=p.length,h,_;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),h=0;h<y;++h)(_=i[p[h].identifier])&&(uh(f),_("end",f,p[h]))}function v(f,p,y,h,_,I){var A=s.copy(),R=Sr(I||y,p),D,B,N;if((N=n.call(f,new Og("beforestart",{sourceEvent:y,target:b,identifier:_,active:o,x:R[0],y:R[1],dx:0,dy:0,dispatch:A}),h))!=null)return D=N.x-R[0]||0,B=N.y-R[1]||0,function F(j,H,L){var G=R,$;switch(j){case"start":i[_]=F,$=o++;break;case"end":delete i[_],--o;case"drag":R=Sr(L||H,p),$=o;break}A.call(j,f,new Og(j,{sourceEvent:H,subject:N,target:b,identifier:_,active:$,x:R[0]+D,y:R[1]+B,dx:R[0]-G[0],dy:R[1]-G[1],dispatch:A}),h)}}return b.filter=function(f){return arguments.length?(e=typeof f=="function"?f:jc(!!f),b):e},b.container=function(f){return arguments.length?(t=typeof f=="function"?f:jc(f),b):t},b.subject=function(f){return arguments.length?(n=typeof f=="function"?f:jc(f),b):n},b.touchable=function(f){return arguments.length?(r=typeof f=="function"?f:jc(!!f),b):r},b.on=function(){var f=s.on.apply(s,arguments);return f===s?b:f},b.clickDistance=function(f){return arguments.length?(g=(f=+f)*f,b):Math.sqrt(g)},b}var Fo=0,Ma=0,da=0,mC=1e3,sd,Ra,od=0,$s=0,Vd=0,vl=typeof performance=="object"&&performance.now?performance:Date,bC=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function cm(){return $s||(bC(pB),$s=vl.now()+Vd)}function pB(){$s=0}function ad(){this._call=this._time=this._next=null}ad.prototype=vC.prototype={constructor:ad,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?cm():+n)+(t==null?0:+t),!this._next&&Ra!==this&&(Ra?Ra._next=this:sd=this,Ra=this),this._call=e,this._time=n,Dg()},stop:function(){this._call&&(this._call=null,this._time=1/0,Dg())}};function vC(e,t,n){var r=new ad;return r.restart(e,t,n),r}function mB(){cm(),++Fo;for(var e=sd,t;e;)(t=$s-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Fo}function Tx(){$s=(od=vl.now())+Vd,Fo=Ma=0;try{mB()}finally{Fo=0,vB(),$s=0}}function bB(){var e=vl.now(),t=e-od;t>mC&&(Vd-=t,od=e)}function vB(){for(var e,t=sd,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:sd=n);Ra=e,Dg(r)}function Dg(e){if(!Fo){Ma&&(Ma=clearTimeout(Ma));var t=e-$s;t>24?(e<1/0&&(Ma=setTimeout(Tx,e-vl.now()-Vd)),da&&(da=clearInterval(da))):(da||(od=vl.now(),da=setInterval(bB,mC)),Fo=1,bC(Tx))}}function Ox(e,t,n){var r=new ad;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var xB=jd("start","end","cancel","interrupt"),yB=[],xC=0,Dx=1,Fg=2,uu=3,Fx=4,Lg=5,du=6;function zd(e,t,n,r,i,s){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;_B(e,n,{name:t,index:r,group:i,on:xB,tween:yB,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:xC})}function um(e,t){var n=Nr(e,t);if(n.state>xC)throw new Error("too late; already scheduled");return n}function ni(e,t){var n=Nr(e,t);if(n.state>uu)throw new Error("too late; already running");return n}function Nr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function _B(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=vC(s,0,n.time);function s(c){n.state=Dx,n.timer.restart(o,n.delay,n.time),n.delay<=c&&o(c-n.delay)}function o(c){var d,g,b,x;if(n.state!==Dx)return l();for(d in r)if(x=r[d],x.name===n.name){if(x.state===uu)return Ox(o);x.state===Fx?(x.state=du,x.timer.stop(),x.on.call("interrupt",e,e.__data__,x.index,x.group),delete r[d]):+d<t&&(x.state=du,x.timer.stop(),x.on.call("cancel",e,e.__data__,x.index,x.group),delete r[d])}if(Ox(function(){n.state===uu&&(n.state=Fx,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Fg,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Fg){for(n.state=uu,i=new Array(b=n.tween.length),d=0,g=-1;d<b;++d)(x=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++g]=x);i.length=g+1}}function a(c){for(var d=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Lg,1),g=-1,b=i.length;++g<b;)i[g].call(e,d);n.state===Lg&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=du,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function fu(e,t){var n=e.__transition,r,i,s=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){s=!1;continue}i=r.state>Fg&&r.state<Lg,r.state=du,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}s&&delete e.__transition}}function wB(e){return this.each(function(){fu(this,e)})}function CB(e,t){var n,r;return function(){var i=ni(this,e),s=i.tween;if(s!==n){r=n=s;for(var o=0,a=r.length;o<a;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function SB(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=ni(this,e),o=s.tween;if(o!==r){i=(r=o).slice();for(var a={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=a;break}l===c&&i.push(a)}s.tween=i}}function EB(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Nr(this.node(),n).tween,i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?CB:SB)(n,e,t))}function dm(e,t,n){var r=e._id;return e.each(function(){var i=ni(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Nr(i,r).value[t]}}function yC(e,t){var n;return(typeof t=="number"?Bi:t instanceof gl?xx:(n=gl(t))?(t=n,xx):D7)(e,t)}function IB(e){return function(){this.removeAttribute(e)}}function kB(e){return function(){this.removeAttributeNS(e.space,e.local)}}function AB(e,t,n){var r,i=n+"",s;return function(){var o=this.getAttribute(e);return o===i?null:o===r?s:s=t(r=o,n)}}function MB(e,t,n){var r,i=n+"",s;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?s:s=t(r=o,n)}}function RB(e,t,n){var r,i,s;return function(){var o,a=n(this),l;return a==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=a+"",o===l?null:o===r&&l===i?s:(i=l,s=t(r=o,a)))}}function PB(e,t,n){var r,i,s;return function(){var o,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=a+"",o===l?null:o===r&&l===i?s:(i=l,s=t(r=o,a)))}}function NB(e,t){var n=Bd(e),r=n==="transform"?B7:yC;return this.attrTween(e,typeof t=="function"?(n.local?PB:RB)(n,r,dm(this,"attr."+e,t)):t==null?(n.local?kB:IB)(n):(n.local?MB:AB)(n,r,t))}function TB(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function OB(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function DB(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&OB(e,s)),n}return i._value=t,i}function FB(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&TB(e,s)),n}return i._value=t,i}function LB(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Bd(e);return this.tween(n,(r.local?DB:FB)(r,t))}function jB(e,t){return function(){um(this,e).delay=+t.apply(this,arguments)}}function BB(e,t){return t=+t,function(){um(this,e).delay=t}}function VB(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?jB:BB)(t,e)):Nr(this.node(),t).delay}function zB(e,t){return function(){ni(this,e).duration=+t.apply(this,arguments)}}function HB(e,t){return t=+t,function(){ni(this,e).duration=t}}function GB(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?zB:HB)(t,e)):Nr(this.node(),t).duration}function WB(e,t){if(typeof t!="function")throw new Error;return function(){ni(this,e).ease=t}}function $B(e){var t=this._id;return arguments.length?this.each(WB(t,e)):Nr(this.node(),t).ease}function XB(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ni(this,e).ease=n}}function YB(e){if(typeof e!="function")throw new Error;return this.each(XB(this._id,e))}function ZB(e){typeof e!="function"&&(e=iC(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],o=s.length,a=r[i]=[],l,c=0;c<o;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&a.push(l);return new ki(r,this._parents,this._name,this._id)}function UB(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),o=new Array(r),a=0;a<s;++a)for(var l=t[a],c=n[a],d=l.length,g=o[a]=new Array(d),b,x=0;x<d;++x)(b=l[x]||c[x])&&(g[x]=b);for(;a<r;++a)o[a]=t[a];return new ki(o,this._parents,this._name,this._id)}function JB(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function qB(e,t,n){var r,i,s=JB(t)?um:ni;return function(){var o=s(this,e),a=o.on;a!==r&&(i=(r=a).copy()).on(t,n),o.on=i}}function KB(e,t){var n=this._id;return arguments.length<2?Nr(this.node(),n).on.on(e):this.each(qB(n,e,t))}function QB(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function eV(){return this.on("end.remove",QB(this._id))}function tV(e){var t=this._name,n=this._id;typeof e!="function"&&(e=am(e));for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o)for(var a=r[o],l=a.length,c=s[o]=new Array(l),d,g,b=0;b<l;++b)(d=a[b])&&(g=e.call(d,d.__data__,b,a))&&("__data__"in d&&(g.__data__=d.__data__),c[b]=g,zd(c[b],t,n,b,c,Nr(d,n)));return new ki(s,this._parents,t,n)}function nV(e){var t=this._name,n=this._id;typeof e!="function"&&(e=rC(e));for(var r=this._groups,i=r.length,s=[],o=[],a=0;a<i;++a)for(var l=r[a],c=l.length,d,g=0;g<c;++g)if(d=l[g]){for(var b=e.call(d,d.__data__,g,l),x,w=Nr(d,n),C=0,E=b.length;C<E;++C)(x=b[C])&&zd(x,t,n,C,b,w);s.push(b),o.push(d)}return new ki(s,o,t,n)}var rV=Dl.prototype.constructor;function iV(){return new rV(this._groups,this._parents)}function sV(e,t){var n,r,i;return function(){var s=Do(this,e),o=(this.style.removeProperty(e),Do(this,e));return s===o?null:s===n&&o===r?i:i=t(n=s,r=o)}}function _C(e){return function(){this.style.removeProperty(e)}}function oV(e,t,n){var r,i=n+"",s;return function(){var o=Do(this,e);return o===i?null:o===r?s:s=t(r=o,n)}}function aV(e,t,n){var r,i,s;return function(){var o=Do(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),Do(this,e))),o===l?null:o===r&&l===i?s:(i=l,s=t(r=o,a))}}function lV(e,t){var n,r,i,s="style."+t,o="end."+s,a;return function(){var l=ni(this,e),c=l.on,d=l.value[s]==null?a||(a=_C(t)):void 0;(c!==n||i!==d)&&(r=(n=c).copy()).on(o,i=d),l.on=r}}function cV(e,t,n){var r=(e+="")=="transform"?j7:yC;return t==null?this.styleTween(e,sV(e,r)).on("end.style."+e,_C(e)):typeof t=="function"?this.styleTween(e,aV(e,r,dm(this,"style."+e,t))).each(lV(this._id,e)):this.styleTween(e,oV(e,r,t),n).on("end.style."+e,null)}function uV(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function dV(e,t,n){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&uV(e,o,n)),r}return s._value=t,s}function fV(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,dV(e,t,n??""))}function hV(e){return function(){this.textContent=e}}function gV(e){return function(){var t=e(this);this.textContent=t??""}}function pV(e){return this.tween("text",typeof e=="function"?gV(dm(this,"text",e)):hV(e==null?"":e+""))}function mV(e){return function(t){this.textContent=e.call(this,t)}}function bV(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&mV(i)),t}return r._value=e,r}function vV(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,bV(e))}function xV(){for(var e=this._name,t=this._id,n=wC(),r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],a=o.length,l,c=0;c<a;++c)if(l=o[c]){var d=Nr(l,t);zd(l,e,n,c,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ki(r,this._parents,e,n)}function yV(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,o){var a={value:o},l={value:function(){--i===0&&s()}};n.each(function(){var c=ni(this,r),d=c.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),c.on=t}),i===0&&s()})}var _V=0;function ki(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function wC(){return++_V}var ai=Dl.prototype;ki.prototype={constructor:ki,select:tV,selectAll:nV,selectChild:ai.selectChild,selectChildren:ai.selectChildren,filter:ZB,merge:UB,selection:iV,transition:xV,call:ai.call,nodes:ai.nodes,node:ai.node,size:ai.size,empty:ai.empty,each:ai.each,on:KB,attr:NB,attrTween:LB,style:cV,styleTween:fV,text:pV,textTween:vV,remove:eV,tween:EB,delay:VB,duration:GB,ease:$B,easeVarying:YB,end:yV,[Symbol.iterator]:ai[Symbol.iterator]};function wV(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var CV={time:null,delay:0,duration:250,ease:wV};function SV(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function EV(e){var t,n;e instanceof ki?(t=e._id,e=e._name):(t=wC(),(n=CV).time=cm(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],a=o.length,l,c=0;c<a;++c)(l=o[c])&&zd(l,e,t,c,o,n||SV(l,t));return new ki(r,this._parents,e,t)}Dl.prototype.interrupt=wB;Dl.prototype.transition=EV;const Bc=e=>()=>e;function IV(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function wi(e,t,n){this.k=e,this.x=t,this.y=n}wi.prototype={constructor:wi,scale:function(e){return e===1?this:new wi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new wi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Si=new wi(1,0,0);wi.prototype;function dh(e){e.stopImmediatePropagation()}function fa(e){e.preventDefault(),e.stopImmediatePropagation()}function kV(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function AV(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Lx(){return this.__zoom||Si}function MV(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function RV(){return navigator.maxTouchPoints||"ontouchstart"in this}function PV(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function CC(){var e=kV,t=AV,n=PV,r=MV,i=RV,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,l=G7,c=jd("start","zoom","end"),d,g,b,x=500,w=150,C=0,E=10;function k(N){N.property("__zoom",Lx).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",A).filter(i).on("touchstart.zoom",R).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",B).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function(N,F,j,H){var L=N.selection?N.selection():N;L.property("__zoom",Lx),N!==L?p(N,F,j,H):L.interrupt().each(function(){y(this,arguments).event(H).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},k.scaleBy=function(N,F,j,H){k.scaleTo(N,function(){var L=this.__zoom.k,G=typeof F=="function"?F.apply(this,arguments):F;return L*G},j,H)},k.scaleTo=function(N,F,j,H){k.transform(N,function(){var L=t.apply(this,arguments),G=this.__zoom,$=j==null?f(L):typeof j=="function"?j.apply(this,arguments):j,Z=G.invert($),U=typeof F=="function"?F.apply(this,arguments):F;return n(v(u(G,U),$,Z),L,o)},j,H)},k.translateBy=function(N,F,j,H){k.transform(N,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof j=="function"?j.apply(this,arguments):j),t.apply(this,arguments),o)},null,H)},k.translateTo=function(N,F,j,H,L){k.transform(N,function(){var G=t.apply(this,arguments),$=this.__zoom,Z=H==null?f(G):typeof H=="function"?H.apply(this,arguments):H;return n(Si.translate(Z[0],Z[1]).scale($.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof j=="function"?-j.apply(this,arguments):-j),G,o)},H,L)};function u(N,F){return F=Math.max(s[0],Math.min(s[1],F)),F===N.k?N:new wi(F,N.x,N.y)}function v(N,F,j){var H=F[0]-j[0]*N.k,L=F[1]-j[1]*N.k;return H===N.x&&L===N.y?N:new wi(N.k,H,L)}function f(N){return[(+N[0][0]+ +N[1][0])/2,(+N[0][1]+ +N[1][1])/2]}function p(N,F,j,H){N.on("start.zoom",function(){y(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){y(this,arguments).event(H).end()}).tween("zoom",function(){var L=this,G=arguments,$=y(L,G).event(H),Z=t.apply(L,G),U=j==null?f(Z):typeof j=="function"?j.apply(L,G):j,ee=Math.max(Z[1][0]-Z[0][0],Z[1][1]-Z[0][1]),se=L.__zoom,ie=typeof F=="function"?F.apply(L,G):F,fe=l(se.invert(U).concat(ee/se.k),ie.invert(U).concat(ee/ie.k));return function(Se){if(Se===1)Se=ie;else{var ve=fe(Se),xe=ee/ve[2];Se=new wi(xe,U[0]-ve[0]*xe,U[1]-ve[1]*xe)}$.zoom(null,Se)}})}function y(N,F,j){return!j&&N.__zooming||new h(N,F)}function h(N,F){this.that=N,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(N,F),this.taps=0}h.prototype={event:function(N){return N&&(this.sourceEvent=N),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(N,F){return this.mouse&&N!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&N!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&N!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(N){var F=dr(this.that).datum();c.call(N,this.that,new IV(N,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:c}),F)}};function _(N,...F){if(!e.apply(this,arguments))return;var j=y(this,F).event(N),H=this.__zoom,L=Math.max(s[0],Math.min(s[1],H.k*Math.pow(2,r.apply(this,arguments)))),G=Sr(N);if(j.wheel)(j.mouse[0][0]!==G[0]||j.mouse[0][1]!==G[1])&&(j.mouse[1]=H.invert(j.mouse[0]=G)),clearTimeout(j.wheel);else{if(H.k===L)return;j.mouse=[G,H.invert(G)],fu(this),j.start()}fa(N),j.wheel=setTimeout($,w),j.zoom("mouse",n(v(u(H,L),j.mouse[0],j.mouse[1]),j.extent,o));function $(){j.wheel=null,j.end()}}function I(N,...F){if(b||!e.apply(this,arguments))return;var j=N.currentTarget,H=y(this,F,!0).event(N),L=dr(N.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",ee,!0),G=Sr(N,j),$=N.clientX,Z=N.clientY;gC(N.view),dh(N),H.mouse=[G,this.__zoom.invert(G)],fu(this),H.start();function U(se){if(fa(se),!H.moved){var ie=se.clientX-$,fe=se.clientY-Z;H.moved=ie*ie+fe*fe>C}H.event(se).zoom("mouse",n(v(H.that.__zoom,H.mouse[0]=Sr(se,j),H.mouse[1]),H.extent,o))}function ee(se){L.on("mousemove.zoom mouseup.zoom",null),pC(se.view,H.moved),fa(se),H.event(se).end()}}function A(N,...F){if(e.apply(this,arguments)){var j=this.__zoom,H=Sr(N.changedTouches?N.changedTouches[0]:N,this),L=j.invert(H),G=j.k*(N.shiftKey?.5:2),$=n(v(u(j,G),H,L),t.apply(this,F),o);fa(N),a>0?dr(this).transition().duration(a).call(p,$,H,N):dr(this).call(k.transform,$,H,N)}}function R(N,...F){if(e.apply(this,arguments)){var j=N.touches,H=j.length,L=y(this,F,N.changedTouches.length===H).event(N),G,$,Z,U;for(dh(N),$=0;$<H;++$)Z=j[$],U=Sr(Z,this),U=[U,this.__zoom.invert(U),Z.identifier],L.touch0?!L.touch1&&L.touch0[2]!==U[2]&&(L.touch1=U,L.taps=0):(L.touch0=U,G=!0,L.taps=1+!!d);d&&(d=clearTimeout(d)),G&&(L.taps<2&&(g=U[0],d=setTimeout(function(){d=null},x)),fu(this),L.start())}}function D(N,...F){if(this.__zooming){var j=y(this,F).event(N),H=N.changedTouches,L=H.length,G,$,Z,U;for(fa(N),G=0;G<L;++G)$=H[G],Z=Sr($,this),j.touch0&&j.touch0[2]===$.identifier?j.touch0[0]=Z:j.touch1&&j.touch1[2]===$.identifier&&(j.touch1[0]=Z);if($=j.that.__zoom,j.touch1){var ee=j.touch0[0],se=j.touch0[1],ie=j.touch1[0],fe=j.touch1[1],Se=(Se=ie[0]-ee[0])*Se+(Se=ie[1]-ee[1])*Se,ve=(ve=fe[0]-se[0])*ve+(ve=fe[1]-se[1])*ve;$=u($,Math.sqrt(Se/ve)),Z=[(ee[0]+ie[0])/2,(ee[1]+ie[1])/2],U=[(se[0]+fe[0])/2,(se[1]+fe[1])/2]}else if(j.touch0)Z=j.touch0[0],U=j.touch0[1];else return;j.zoom("touch",n(v($,Z,U),j.extent,o))}}function B(N,...F){if(this.__zooming){var j=y(this,F).event(N),H=N.changedTouches,L=H.length,G,$;for(dh(N),b&&clearTimeout(b),b=setTimeout(function(){b=null},x),G=0;G<L;++G)$=H[G],j.touch0&&j.touch0[2]===$.identifier?delete j.touch0:j.touch1&&j.touch1[2]===$.identifier&&delete j.touch1;if(j.touch1&&!j.touch0&&(j.touch0=j.touch1,delete j.touch1),j.touch0)j.touch0[1]=this.__zoom.invert(j.touch0[0]);else if(j.end(),j.taps===2&&($=Sr($,this),Math.hypot(g[0]-$[0],g[1]-$[1])<E)){var Z=dr(this).on("dblclick.zoom");Z&&Z.apply(this,arguments)}}}return k.wheelDelta=function(N){return arguments.length?(r=typeof N=="function"?N:Bc(+N),k):r},k.filter=function(N){return arguments.length?(e=typeof N=="function"?N:Bc(!!N),k):e},k.touchable=function(N){return arguments.length?(i=typeof N=="function"?N:Bc(!!N),k):i},k.extent=function(N){return arguments.length?(t=typeof N=="function"?N:Bc([[+N[0][0],+N[0][1]],[+N[1][0],+N[1][1]]]),k):t},k.scaleExtent=function(N){return arguments.length?(s[0]=+N[0],s[1]=+N[1],k):[s[0],s[1]]},k.translateExtent=function(N){return arguments.length?(o[0][0]=+N[0][0],o[1][0]=+N[1][0],o[0][1]=+N[0][1],o[1][1]=+N[1][1],k):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},k.constrain=function(N){return arguments.length?(n=N,k):n},k.duration=function(N){return arguments.length?(a=+N,k):a},k.interpolate=function(N){return arguments.length?(l=N,k):l},k.on=function(){var N=c.on.apply(c,arguments);return N===c?k:N},k.clickDistance=function(N){return arguments.length?(C=(N=+N)*N,k):Math.sqrt(C)},k.tapDistance=function(N){return arguments.length?(E=+N,k):E},k}const Hd=M.createContext(null),NV=Hd.Provider,Pr={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},SC=Pr.error001();function zt(e,t){const n=M.useContext(Hd);if(n===null)throw new Error(SC);return tC(n,e,t)}const un=()=>{const e=M.useContext(Hd);if(e===null)throw new Error(SC);return M.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},TV=e=>e.userSelectionActive?"none":"all";function fm({position:e,children:t,className:n,style:r,...i}){const s=zt(TV),o=`${e}`.split("-");return M.createElement("div",{className:Sn(["react-flow__panel",n,...o]),style:{...r,pointerEvents:s},...i},t)}function OV({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:M.createElement(fm,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},M.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const DV=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:i=!0,labelBgStyle:s={},labelBgPadding:o=[2,4],labelBgBorderRadius:a=2,children:l,className:c,...d})=>{const g=M.useRef(null),[b,x]=M.useState({x:0,y:0,width:0,height:0}),w=Sn(["react-flow__edge-textwrapper",c]);return M.useEffect(()=>{if(g.current){const C=g.current.getBBox();x({x:C.x,y:C.y,width:C.width,height:C.height})}},[n]),typeof n>"u"||!n?null:M.createElement("g",{transform:`translate(${e-b.width/2} ${t-b.height/2})`,className:w,visibility:b.width?"visible":"hidden",...d},i&&M.createElement("rect",{width:b.width+2*o[0],x:-o[0],y:-o[1],height:b.height+2*o[1],className:"react-flow__edge-textbg",style:s,rx:a,ry:a}),M.createElement("text",{className:"react-flow__edge-text",y:b.height/2,dy:"0.3em",ref:g,style:r},n),l)};var FV=M.memo(DV);const hm=e=>({width:e.offsetWidth,height:e.offsetHeight}),Lo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),gm=(e={x:0,y:0},t)=>({x:Lo(e.x,t[0][0],t[1][0]),y:Lo(e.y,t[0][1],t[1][1])}),jx=(e,t,n)=>e<t?Lo(Math.abs(e-t),1,50)/50:e>n?-Lo(Math.abs(e-n),1,50)/50:0,EC=(e,t)=>{const n=jx(e.x,35,t.width-35)*20,r=jx(e.y,35,t.height-35)*20;return[n,r]},IC=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},kC=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),xl=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),AC=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Bx=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),LV=(e,t)=>AC(kC(xl(e),xl(t))),jg=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},jV=e=>hr(e.width)&&hr(e.height)&&hr(e.x)&&hr(e.y),hr=e=>!isNaN(e)&&isFinite(e),qt=Symbol.for("internals"),MC=["Enter"," ","Escape"],RC=(e,t)=>{process.env.NODE_ENV==="development"&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)},BV=e=>"nativeEvent"in e;function Bg(e){var i,s;const t=BV(e)?e.nativeEvent:e,n=((s=(i=t.composedPath)==null?void 0:i.call(t))==null?void 0:s[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n==null?void 0:n.nodeName)||(n==null?void 0:n.hasAttribute("contenteditable"))||!!(n!=null&&n.closest(".nokey"))}const PC=e=>"clientX"in e,Ui=(e,t)=>{var s,o;const n=PC(e),r=n?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,i=n?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},ld=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},Fl=({id:e,path:t,labelX:n,labelY:r,label:i,labelStyle:s,labelShowBg:o,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,style:d,markerEnd:g,markerStart:b,interactionWidth:x=20})=>M.createElement(M.Fragment,null,M.createElement("path",{id:e,style:d,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:g,markerStart:b}),x&&M.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:x,className:"react-flow__edge-interaction"}),i&&hr(n)&&hr(r)?M.createElement(FV,{x:n,y:r,label:i,labelStyle:s,labelShowBg:o,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c}):null);Fl.displayName="BaseEdge";function ha(e,t,n){return n===void 0?n:r=>{const i=t().edges.find(s=>s.id===e);i&&n(r,{...i})}}function NC({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,s=n<e?n+i:n-i,o=Math.abs(r-t)/2,a=r<t?r+o:r-o;return[s,a,i,o]}function TC({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:s,targetControlX:o,targetControlY:a}){const l=e*.125+i*.375+o*.375+n*.125,c=t*.125+s*.375+a*.375+r*.125,d=Math.abs(l-e),g=Math.abs(c-t);return[l,c,d,g]}var Xs;(function(e){e.Strict="strict",e.Loose="loose"})(Xs||(Xs={}));var Es;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Es||(Es={}));var yl;(function(e){e.Partial="partial",e.Full="full"})(yl||(yl={}));var zi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(zi||(zi={}));var _l;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(_l||(_l={}));var Be;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Be||(Be={}));function Vx({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Be.Left||e===Be.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function OC({sourceX:e,sourceY:t,sourcePosition:n=Be.Bottom,targetX:r,targetY:i,targetPosition:s=Be.Top}){const[o,a]=Vx({pos:n,x1:e,y1:t,x2:r,y2:i}),[l,c]=Vx({pos:s,x1:r,y1:i,x2:e,y2:t}),[d,g,b,x]=TC({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:a,targetControlX:l,targetControlY:c});return[`M${e},${t} C${o},${a} ${l},${c} ${r},${i}`,d,g,b,x]}const pm=M.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=Be.Bottom,targetPosition:s=Be.Top,label:o,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:g,style:b,markerEnd:x,markerStart:w,interactionWidth:C})=>{const[E,k,u]=OC({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:s});return M.createElement(Fl,{path:E,labelX:k,labelY:u,label:o,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:g,style:b,markerEnd:x,markerStart:w,interactionWidth:C})});pm.displayName="SimpleBezierEdge";const zx={[Be.Left]:{x:-1,y:0},[Be.Right]:{x:1,y:0},[Be.Top]:{x:0,y:-1},[Be.Bottom]:{x:0,y:1}},VV=({source:e,sourcePosition:t=Be.Bottom,target:n})=>t===Be.Left||t===Be.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Hx=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function zV({source:e,sourcePosition:t=Be.Bottom,target:n,targetPosition:r=Be.Top,center:i,offset:s}){const o=zx[t],a=zx[r],l={x:e.x+o.x*s,y:e.y+o.y*s},c={x:n.x+a.x*s,y:n.y+a.y*s},d=VV({source:l,sourcePosition:t,target:c}),g=d.x!==0?"x":"y",b=d[g];let x=[],w,C;const E={x:0,y:0},k={x:0,y:0},[u,v,f,p]=NC({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(o[g]*a[g]===-1){w=i.x??u,C=i.y??v;const h=[{x:w,y:l.y},{x:w,y:c.y}],_=[{x:l.x,y:C},{x:c.x,y:C}];o[g]===b?x=g==="x"?h:_:x=g==="x"?_:h}else{const h=[{x:l.x,y:c.y}],_=[{x:c.x,y:l.y}];if(g==="x"?x=o.x===b?_:h:x=o.y===b?h:_,t===r){const B=Math.abs(e[g]-n[g]);if(B<=s){const N=Math.min(s-1,s-B);o[g]===b?E[g]=(l[g]>e[g]?-1:1)*N:k[g]=(c[g]>n[g]?-1:1)*N}}if(t!==r){const B=g==="x"?"y":"x",N=o[g]===a[B],F=l[B]>c[B],j=l[B]<c[B];(o[g]===1&&(!N&&F||N&&j)||o[g]!==1&&(!N&&j||N&&F))&&(x=g==="x"?h:_)}const I={x:l.x+E.x,y:l.y+E.y},A={x:c.x+k.x,y:c.y+k.y},R=Math.max(Math.abs(I.x-x[0].x),Math.abs(A.x-x[0].x)),D=Math.max(Math.abs(I.y-x[0].y),Math.abs(A.y-x[0].y));R>=D?(w=(I.x+A.x)/2,C=x[0].y):(w=x[0].x,C=(I.y+A.y)/2)}return[[e,{x:l.x+E.x,y:l.y+E.y},...x,{x:c.x+k.x,y:c.y+k.y},n],w,C,f,p]}function HV(e,t,n,r){const i=Math.min(Hx(e,t)/2,Hx(t,n)/2,r),{x:s,y:o}=t;if(e.x===s&&s===n.x||e.y===o&&o===n.y)return`L${s} ${o}`;if(e.y===o){const c=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${s+i*c},${o}Q ${s},${o} ${s},${o+i*d}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${s},${o+i*l}Q ${s},${o} ${s+i*a},${o}`}function Vg({sourceX:e,sourceY:t,sourcePosition:n=Be.Bottom,targetX:r,targetY:i,targetPosition:s=Be.Top,borderRadius:o=5,centerX:a,centerY:l,offset:c=20}){const[d,g,b,x,w]=zV({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:s,center:{x:a,y:l},offset:c});return[d.reduce((E,k,u)=>{let v="";return u>0&&u<d.length-1?v=HV(d[u-1],k,d[u+1],o):v=`${u===0?"M":"L"}${k.x} ${k.y}`,E+=v,E},""),g,b,x,w]}const Gd=M.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:s,labelShowBg:o,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,style:d,sourcePosition:g=Be.Bottom,targetPosition:b=Be.Top,markerEnd:x,markerStart:w,pathOptions:C,interactionWidth:E})=>{const[k,u,v]=Vg({sourceX:e,sourceY:t,sourcePosition:g,targetX:n,targetY:r,targetPosition:b,borderRadius:C==null?void 0:C.borderRadius,offset:C==null?void 0:C.offset});return M.createElement(Fl,{path:k,labelX:u,labelY:v,label:i,labelStyle:s,labelShowBg:o,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,style:d,markerEnd:x,markerStart:w,interactionWidth:E})});Gd.displayName="SmoothStepEdge";const mm=M.memo(e=>{var t;return M.createElement(Gd,{...e,pathOptions:M.useMemo(()=>{var n;return{borderRadius:0,offset:(n=e.pathOptions)==null?void 0:n.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});mm.displayName="StepEdge";function GV({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,s,o,a]=NC({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,s,o,a]}const bm=M.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:s,labelShowBg:o,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,style:d,markerEnd:g,markerStart:b,interactionWidth:x})=>{const[w,C,E]=GV({sourceX:e,sourceY:t,targetX:n,targetY:r});return M.createElement(Fl,{path:w,labelX:C,labelY:E,label:i,labelStyle:s,labelShowBg:o,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,style:d,markerEnd:g,markerStart:b,interactionWidth:x})});bm.displayName="StraightEdge";function Vc(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Gx({pos:e,x1:t,y1:n,x2:r,y2:i,c:s}){switch(e){case Be.Left:return[t-Vc(t-r,s),n];case Be.Right:return[t+Vc(r-t,s),n];case Be.Top:return[t,n-Vc(n-i,s)];case Be.Bottom:return[t,n+Vc(i-n,s)]}}function DC({sourceX:e,sourceY:t,sourcePosition:n=Be.Bottom,targetX:r,targetY:i,targetPosition:s=Be.Top,curvature:o=.25}){const[a,l]=Gx({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[c,d]=Gx({pos:s,x1:r,y1:i,x2:e,y2:t,c:o}),[g,b,x,w]=TC({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:d});return[`M${e},${t} C${a},${l} ${c},${d} ${r},${i}`,g,b,x,w]}const cd=M.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=Be.Bottom,targetPosition:s=Be.Top,label:o,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:g,style:b,markerEnd:x,markerStart:w,pathOptions:C,interactionWidth:E})=>{const[k,u,v]=DC({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:s,curvature:C==null?void 0:C.curvature});return M.createElement(Fl,{path:k,labelX:u,labelY:v,label:o,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:g,style:b,markerEnd:x,markerStart:w,interactionWidth:E})});cd.displayName="BezierEdge";const vm=M.createContext(null),WV=vm.Provider;vm.Consumer;const $V=()=>M.useContext(vm),XV=e=>"id"in e&&"source"in e&&"target"in e,YV=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,zg=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,ZV=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),UV=(e,t)=>{if(!e.source||!e.target)return RC("006",Pr.error006()),t;let n;return XV(e)?n={...e}:n={...e,id:YV(e)},ZV(n,t)?t:t.concat(n)},Hg=({x:e,y:t},[n,r,i],s,[o,a])=>{const l={x:(e-n)/i,y:(t-r)/i};return s?{x:o*Math.round(l.x/o),y:a*Math.round(l.y/a)}:l},FC=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),Os=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],i={x:e.position.x-n,y:e.position.y-r};return{...i,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:i}},Wd=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const{x:s,y:o}=Os(i,t).positionAbsolute;return kC(r,xl({x:s,y:o,width:i.width||0,height:i.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return AC(n)},LC=(e,t,[n,r,i]=[0,0,1],s=!1,o=!1,a=[0,0])=>{const l={x:(t.x-n)/i,y:(t.y-r)/i,width:t.width/i,height:t.height/i},c=[];return e.forEach(d=>{const{width:g,height:b,selectable:x=!0,hidden:w=!1}=d;if(o&&!x||w)return!1;const{positionAbsolute:C}=Os(d,a),E={x:C.x,y:C.y,width:g||0,height:b||0},k=jg(l,E),u=typeof g>"u"||typeof b>"u"||g===null||b===null,v=s&&k>0,f=(g||0)*(b||0);(u||v||k>=f||d.dragging)&&c.push(d)}),c},jC=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},BC=(e,t,n,r,i,s=.1)=>{const o=t/(e.width*(1+s)),a=n/(e.height*(1+s)),l=Math.min(o,a),c=Lo(l,r,i),d=e.x+e.width/2,g=e.y+e.height/2,b=t/2-d*c,x=n/2-g*c;return{x:b,y:x,zoom:c}},bs=(e,t=0)=>e.transition().duration(t);function Wx(e,t,n,r){return(t[n]||[]).reduce((i,s)=>{var o,a;return`${e.id}-${s.id}-${n}`!==r&&i.push({id:s.id||null,type:n,nodeId:e.id,x:(((o=e.positionAbsolute)==null?void 0:o.x)??0)+s.x+s.width/2,y:(((a=e.positionAbsolute)==null?void 0:a.y)??0)+s.y+s.height/2}),i},[])}function JV(e,t,n,r,i,s){const{x:o,y:a}=Ui(e),c=t.elementsFromPoint(o,a).find(w=>w.classList.contains("react-flow__handle"));if(c){const w=c.getAttribute("data-nodeid");if(w){const C=xm(void 0,c),E=c.getAttribute("data-handleid"),k=s({nodeId:w,id:E,type:C});if(k){const u=i.find(v=>v.nodeId===w&&v.type===C&&v.id===E);return{handle:{id:E,type:C,nodeId:w,x:(u==null?void 0:u.x)||n.x,y:(u==null?void 0:u.y)||n.y},validHandleResult:k}}}}let d=[],g=1/0;if(i.forEach(w=>{const C=Math.sqrt((w.x-n.x)**2+(w.y-n.y)**2);if(C<=r){const E=s(w);C<=g&&(C<g?d=[{handle:w,validHandleResult:E}]:C===g&&d.push({handle:w,validHandleResult:E}),g=C)}}),!d.length)return{handle:null,validHandleResult:VC()};if(d.length===1)return d[0];const b=d.some(({validHandleResult:w})=>w.isValid),x=d.some(({handle:w})=>w.type==="target");return d.find(({handle:w,validHandleResult:C})=>x?w.type==="target":b?C.isValid:!0)||d[0]}const qV={source:null,target:null,sourceHandle:null,targetHandle:null},VC=()=>({handleDomNode:null,isValid:!1,connection:qV,endHandle:null});function zC(e,t,n,r,i,s,o){const a=i==="target",l=o.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),c={...VC(),handleDomNode:l};if(l){const d=xm(void 0,l),g=l.getAttribute("data-nodeid"),b=l.getAttribute("data-handleid"),x=l.classList.contains("connectable"),w=l.classList.contains("connectableend"),C={source:a?g:n,sourceHandle:a?b:r,target:a?n:g,targetHandle:a?r:b};c.connection=C,x&&w&&(t===Xs.Strict?a&&d==="source"||!a&&d==="target":g!==n||b!==r)&&(c.endHandle={nodeId:g,handleId:b,type:d},c.isValid=s(C))}return c}function KV({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((i,s)=>{if(s[qt]){const{handleBounds:o}=s[qt];let a=[],l=[];o&&(a=Wx(s,o,"source",`${t}-${n}-${r}`),l=Wx(s,o,"target",`${t}-${n}-${r}`)),i.push(...a,...l)}return i},[])}function xm(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function fh(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function QV(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function HC({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:i,getState:s,setState:o,isValidConnection:a,edgeUpdaterType:l,onReconnectEnd:c}){const d=IC(e.target),{connectionMode:g,domNode:b,autoPanOnConnect:x,connectionRadius:w,onConnectStart:C,panBy:E,getNodes:k,cancelConnection:u}=s();let v=0,f;const{x:p,y}=Ui(e),h=d==null?void 0:d.elementFromPoint(p,y),_=xm(l,h),I=b==null?void 0:b.getBoundingClientRect();if(!I||!_)return;let A,R=Ui(e,I),D=!1,B=null,N=!1,F=null;const j=KV({nodes:k(),nodeId:n,handleId:t,handleType:_}),H=()=>{if(!x)return;const[$,Z]=EC(R,I);E({x:$,y:Z}),v=requestAnimationFrame(H)};o({connectionPosition:R,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:_,connectionStartHandle:{nodeId:n,handleId:t,type:_},connectionEndHandle:null}),C==null||C(e,{nodeId:n,handleId:t,handleType:_});function L($){const{transform:Z}=s();R=Ui($,I);const{handle:U,validHandleResult:ee}=JV($,d,Hg(R,Z,!1,[1,1]),w,j,se=>zC(se,g,n,t,i?"target":"source",a,d));if(f=U,D||(H(),D=!0),F=ee.handleDomNode,B=ee.connection,N=ee.isValid,o({connectionPosition:f&&N?FC({x:f.x,y:f.y},Z):R,connectionStatus:QV(!!f,N),connectionEndHandle:ee.endHandle}),!f&&!N&&!F)return fh(A);B.source!==B.target&&F&&(fh(A),A=F,F.classList.add("connecting","react-flow__handle-connecting"),F.classList.toggle("valid",N),F.classList.toggle("react-flow__handle-valid",N))}function G($){var Z,U;(f||F)&&B&&N&&(r==null||r(B)),(U=(Z=s()).onConnectEnd)==null||U.call(Z,$),l&&(c==null||c($)),fh(A),u(),cancelAnimationFrame(v),D=!1,N=!1,B=null,F=null,d.removeEventListener("mousemove",L),d.removeEventListener("mouseup",G),d.removeEventListener("touchmove",L),d.removeEventListener("touchend",G)}d.addEventListener("mousemove",L),d.addEventListener("mouseup",G),d.addEventListener("touchmove",L),d.addEventListener("touchend",G)}const $x=()=>!0,ez=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),tz=(e,t,n)=>r=>{const{connectionStartHandle:i,connectionEndHandle:s,connectionClickStartHandle:o}=r;return{connecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===n||(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.handleId)===t&&(s==null?void 0:s.type)===n,clickConnecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.handleId)===t&&(o==null?void 0:o.type)===n}},GC=M.forwardRef(({type:e="source",position:t=Be.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:s=!0,id:o,onConnect:a,children:l,className:c,onMouseDown:d,onTouchStart:g,...b},x)=>{var I,A;const w=o||null,C=e==="target",E=un(),k=$V(),{connectOnClick:u,noPanClassName:v}=zt(ez,cn),{connecting:f,clickConnecting:p}=zt(tz(k,w,e),cn);k||(A=(I=E.getState()).onError)==null||A.call(I,"010",Pr.error010());const y=R=>{const{defaultEdgeOptions:D,onConnect:B,hasDefaultEdges:N}=E.getState(),F={...D,...R};if(N){const{edges:j,setEdges:H}=E.getState();H(UV(F,j))}B==null||B(F),a==null||a(F)},h=R=>{if(!k)return;const D=PC(R);i&&(D&&R.button===0||!D)&&HC({event:R,handleId:w,nodeId:k,onConnect:y,isTarget:C,getState:E.getState,setState:E.setState,isValidConnection:n||E.getState().isValidConnection||$x}),D?d==null||d(R):g==null||g(R)},_=R=>{const{onClickConnectStart:D,onClickConnectEnd:B,connectionClickStartHandle:N,connectionMode:F,isValidConnection:j}=E.getState();if(!k||!N&&!i)return;if(!N){D==null||D(R,{nodeId:k,handleId:w,handleType:e}),E.setState({connectionClickStartHandle:{nodeId:k,type:e,handleId:w}});return}const H=IC(R.target),L=n||j||$x,{connection:G,isValid:$}=zC({nodeId:k,id:w,type:e},F,N.nodeId,N.handleId||null,N.type,L,H);$&&y(G),B==null||B(R),E.setState({connectionClickStartHandle:null})};return M.createElement("div",{"data-handleid":w,"data-nodeid":k,"data-handlepos":t,"data-id":`${k}-${w}-${e}`,className:Sn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",v,c,{source:!C,target:C,connectable:r,connectablestart:i,connectableend:s,connecting:p,connectionindicator:r&&(i&&!f||s&&f)}]),onMouseDown:h,onTouchStart:h,onClick:u?_:void 0,ref:x,...b},l)});GC.displayName="Handle";var gi=M.memo(GC);const WC=({data:e,isConnectable:t,targetPosition:n=Be.Top,sourcePosition:r=Be.Bottom})=>M.createElement(M.Fragment,null,M.createElement(gi,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,M.createElement(gi,{type:"source",position:r,isConnectable:t}));WC.displayName="DefaultNode";var Gg=M.memo(WC);const $C=({data:e,isConnectable:t,sourcePosition:n=Be.Bottom})=>M.createElement(M.Fragment,null,e==null?void 0:e.label,M.createElement(gi,{type:"source",position:n,isConnectable:t}));$C.displayName="InputNode";var XC=M.memo($C);const YC=({data:e,isConnectable:t,targetPosition:n=Be.Top})=>M.createElement(M.Fragment,null,M.createElement(gi,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label);YC.displayName="OutputNode";var ZC=M.memo(YC);const ym=()=>null;ym.displayName="GroupNode";const nz=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected).map(t=>({...t}))}),zc=e=>e.id;function rz(e,t){return cn(e.selectedNodes.map(zc),t.selectedNodes.map(zc))&&cn(e.selectedEdges.map(zc),t.selectedEdges.map(zc))}const UC=M.memo(({onSelectionChange:e})=>{const t=un(),{selectedNodes:n,selectedEdges:r}=zt(nz,rz);return M.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChange.forEach(s=>s(i))},[n,r,e]),null});UC.displayName="SelectionListener";const iz=e=>!!e.onSelectionChange;function sz({onSelectionChange:e}){const t=zt(iz);return e||t?M.createElement(UC,{onSelectionChange:e}):null}const oz=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function oo(e,t){M.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function ot(e,t,n){M.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const az=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:i,onConnectStart:s,onConnectEnd:o,onClickConnectStart:a,onClickConnectEnd:l,nodesDraggable:c,nodesConnectable:d,nodesFocusable:g,edgesFocusable:b,edgesUpdatable:x,elevateNodesOnSelect:w,minZoom:C,maxZoom:E,nodeExtent:k,onNodesChange:u,onEdgesChange:v,elementsSelectable:f,connectionMode:p,snapGrid:y,snapToGrid:h,translateExtent:_,connectOnClick:I,defaultEdgeOptions:A,fitView:R,fitViewOptions:D,onNodesDelete:B,onEdgesDelete:N,onNodeDrag:F,onNodeDragStart:j,onNodeDragStop:H,onSelectionDrag:L,onSelectionDragStart:G,onSelectionDragStop:$,noPanClassName:Z,nodeOrigin:U,rfId:ee,autoPanOnConnect:se,autoPanOnNodeDrag:ie,onError:fe,connectionRadius:Se,isValidConnection:ve,nodeDragThreshold:xe})=>{const{setNodes:Y,setEdges:le,setDefaultNodesAndEdges:re,setMinZoom:ge,setMaxZoom:ne,setTranslateExtent:he,setNodeExtent:be,reset:ye}=zt(oz,cn),q=un();return M.useEffect(()=>{const Ie=r==null?void 0:r.map(Le=>({...Le,...A}));return re(n,Ie),()=>{ye()}},[]),ot("defaultEdgeOptions",A,q.setState),ot("connectionMode",p,q.setState),ot("onConnect",i,q.setState),ot("onConnectStart",s,q.setState),ot("onConnectEnd",o,q.setState),ot("onClickConnectStart",a,q.setState),ot("onClickConnectEnd",l,q.setState),ot("nodesDraggable",c,q.setState),ot("nodesConnectable",d,q.setState),ot("nodesFocusable",g,q.setState),ot("edgesFocusable",b,q.setState),ot("edgesUpdatable",x,q.setState),ot("elementsSelectable",f,q.setState),ot("elevateNodesOnSelect",w,q.setState),ot("snapToGrid",h,q.setState),ot("snapGrid",y,q.setState),ot("onNodesChange",u,q.setState),ot("onEdgesChange",v,q.setState),ot("connectOnClick",I,q.setState),ot("fitViewOnInit",R,q.setState),ot("fitViewOnInitOptions",D,q.setState),ot("onNodesDelete",B,q.setState),ot("onEdgesDelete",N,q.setState),ot("onNodeDrag",F,q.setState),ot("onNodeDragStart",j,q.setState),ot("onNodeDragStop",H,q.setState),ot("onSelectionDrag",L,q.setState),ot("onSelectionDragStart",G,q.setState),ot("onSelectionDragStop",$,q.setState),ot("noPanClassName",Z,q.setState),ot("nodeOrigin",U,q.setState),ot("rfId",ee,q.setState),ot("autoPanOnConnect",se,q.setState),ot("autoPanOnNodeDrag",ie,q.setState),ot("onError",fe,q.setState),ot("connectionRadius",Se,q.setState),ot("isValidConnection",ve,q.setState),ot("nodeDragThreshold",xe,q.setState),oo(e,Y),oo(t,le),oo(C,ge),oo(E,ne),oo(_,he),oo(k,be),null},Xx={display:"none"},lz={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},JC="react-flow__node-desc",qC="react-flow__edge-desc",cz="react-flow__aria-live",uz=e=>e.ariaLiveMessage;function dz({rfId:e}){const t=zt(uz);return M.createElement("div",{id:`${cz}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:lz},t)}function fz({rfId:e,disableKeyboardA11y:t}){return M.createElement(M.Fragment,null,M.createElement("div",{id:`${JC}-${e}`,style:Xx},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),M.createElement("div",{id:`${qC}-${e}`,style:Xx},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&M.createElement(dz,{rfId:e}))}var wl=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=M.useState(!1),i=M.useRef(!1),s=M.useRef(new Set([])),[o,a]=M.useMemo(()=>{if(e!==null){const c=(Array.isArray(e)?e:[e]).filter(g=>typeof g=="string").map(g=>g.split("+")),d=c.reduce((g,b)=>g.concat(...b),[]);return[c,d]}return[[],[]]},[e]);return M.useEffect(()=>{const l=typeof document<"u"?document:null,c=(t==null?void 0:t.target)||l;if(e!==null){const d=x=>{if(i.current=x.ctrlKey||x.metaKey||x.shiftKey,(!i.current||i.current&&!t.actInsideInputWithModifier)&&Bg(x))return!1;const C=Zx(x.code,a);s.current.add(x[C]),Yx(o,s.current,!1)&&(x.preventDefault(),r(!0))},g=x=>{if((!i.current||i.current&&!t.actInsideInputWithModifier)&&Bg(x))return!1;const C=Zx(x.code,a);Yx(o,s.current,!0)?(r(!1),s.current.clear()):s.current.delete(x[C]),x.key==="Meta"&&s.current.clear(),i.current=!1},b=()=>{s.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",d),c==null||c.addEventListener("keyup",g),window.addEventListener("blur",b),()=>{c==null||c.removeEventListener("keydown",d),c==null||c.removeEventListener("keyup",g),window.removeEventListener("blur",b)}}},[e,r]),n};function Yx(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function Zx(e,t){return t.includes(e)?"code":"key"}function KC(e,t,n,r){var a,l;const i=e.parentNode||e.parentId;if(!i)return n;const s=t.get(i),o=Os(s,r);return KC(s,t,{x:(n.x??0)+o.x,y:(n.y??0)+o.y,z:(((a=s[qt])==null?void 0:a.z)??0)>(n.z??0)?((l=s[qt])==null?void 0:l.z)??0:n.z??0},r)}function QC(e,t,n){e.forEach(r=>{var s;const i=r.parentNode||r.parentId;if(i&&!e.has(i))throw new Error(`Parent node ${i} not found`);if(i||n!=null&&n[r.id]){const{x:o,y:a,z:l}=KC(r,e,{...r.position,z:((s=r[qt])==null?void 0:s.z)??0},t);r.positionAbsolute={x:o,y:a},r[qt].z=l,n!=null&&n[r.id]&&(r[qt].isParent=!0)}})}function hh(e,t,n,r){const i=new Map,s={},o=r?1e3:0;return e.forEach(a=>{var x;const l=(hr(a.zIndex)?a.zIndex:0)+(a.selected?o:0),c=t.get(a.id),d={...a,positionAbsolute:{x:a.position.x,y:a.position.y}},g=a.parentNode||a.parentId;g&&(s[g]=!0);const b=(c==null?void 0:c.type)&&(c==null?void 0:c.type)!==a.type;Object.defineProperty(d,qt,{enumerable:!1,value:{handleBounds:b||(x=c==null?void 0:c[qt])==null?void 0:x.handleBounds,z:l}}),i.set(a.id,d)}),QC(i,n,s),i}function eS(e,t={}){const{getNodes:n,width:r,height:i,minZoom:s,maxZoom:o,d3Zoom:a,d3Selection:l,fitViewOnInitDone:c,fitViewOnInit:d,nodeOrigin:g}=e(),b=t.initial&&!c&&d;if(a&&l&&(b||!t.initial)){const w=n().filter(E=>{var u;const k=t.includeHiddenNodes?E.width&&E.height:!E.hidden;return(u=t.nodes)!=null&&u.length?k&&t.nodes.some(v=>v.id===E.id):k}),C=w.every(E=>E.width&&E.height);if(w.length>0&&C){const E=Wd(w,g),{x:k,y:u,zoom:v}=BC(E,r,i,t.minZoom??s,t.maxZoom??o,t.padding??.1),f=Si.translate(k,u).scale(v);return typeof t.duration=="number"&&t.duration>0?a.transform(bs(l,t.duration),f):a.transform(l,f),!0}}return!1}function hz(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[qt]:r[qt],selected:n.selected})}),new Map(t)}function gz(e,t){return t.map(n=>{const r=e.find(i=>i.id===n.id);return r&&(n.selected=r.selected),n})}function Hc({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:i,edges:s,onNodesChange:o,onEdgesChange:a,hasDefaultNodes:l,hasDefaultEdges:c}=n();e!=null&&e.length&&(l&&r({nodeInternals:hz(e,i)}),o==null||o(e)),t!=null&&t.length&&(c&&r({edges:gz(t,s)}),a==null||a(t))}const ao=()=>{},pz={zoomIn:ao,zoomOut:ao,zoomTo:ao,getZoom:()=>1,setViewport:ao,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:ao,fitBounds:ao,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},mz=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),bz=()=>{const e=un(),{d3Zoom:t,d3Selection:n}=zt(mz,cn);return M.useMemo(()=>n&&t?{zoomIn:i=>t.scaleBy(bs(n,i==null?void 0:i.duration),1.2),zoomOut:i=>t.scaleBy(bs(n,i==null?void 0:i.duration),1/1.2),zoomTo:(i,s)=>t.scaleTo(bs(n,s==null?void 0:s.duration),i),getZoom:()=>e.getState().transform[2],setViewport:(i,s)=>{const[o,a,l]=e.getState().transform,c=Si.translate(i.x??o,i.y??a).scale(i.zoom??l);t.transform(bs(n,s==null?void 0:s.duration),c)},getViewport:()=>{const[i,s,o]=e.getState().transform;return{x:i,y:s,zoom:o}},fitView:i=>eS(e.getState,i),setCenter:(i,s,o)=>{const{width:a,height:l,maxZoom:c}=e.getState(),d=typeof(o==null?void 0:o.zoom)<"u"?o.zoom:c,g=a/2-i*d,b=l/2-s*d,x=Si.translate(g,b).scale(d);t.transform(bs(n,o==null?void 0:o.duration),x)},fitBounds:(i,s)=>{const{width:o,height:a,minZoom:l,maxZoom:c}=e.getState(),{x:d,y:g,zoom:b}=BC(i,o,a,l,c,(s==null?void 0:s.padding)??.1),x=Si.translate(d,g).scale(b);t.transform(bs(n,s==null?void 0:s.duration),x)},project:i=>{const{transform:s,snapToGrid:o,snapGrid:a}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),Hg(i,s,o,a)},screenToFlowPosition:i=>{const{transform:s,snapToGrid:o,snapGrid:a,domNode:l}=e.getState();if(!l)return i;const{x:c,y:d}=l.getBoundingClientRect(),g={x:i.x-c,y:i.y-d};return Hg(g,s,o,a)},flowToScreenPosition:i=>{const{transform:s,domNode:o}=e.getState();if(!o)return i;const{x:a,y:l}=o.getBoundingClientRect(),c=FC(i,s);return{x:c.x+a,y:c.y+l}},viewportInitialized:!0}:pz,[t,n])};function _m(){const e=bz(),t=un(),n=M.useCallback(()=>t.getState().getNodes().map(C=>({...C})),[]),r=M.useCallback(C=>t.getState().nodeInternals.get(C),[]),i=M.useCallback(()=>{const{edges:C=[]}=t.getState();return C.map(E=>({...E}))},[]),s=M.useCallback(C=>{const{edges:E=[]}=t.getState();return E.find(k=>k.id===C)},[]),o=M.useCallback(C=>{const{getNodes:E,setNodes:k,hasDefaultNodes:u,onNodesChange:v}=t.getState(),f=E(),p=typeof C=="function"?C(f):C;if(u)k(p);else if(v){const y=p.length===0?f.map(h=>({type:"remove",id:h.id})):p.map(h=>({item:h,type:"reset"}));v(y)}},[]),a=M.useCallback(C=>{const{edges:E=[],setEdges:k,hasDefaultEdges:u,onEdgesChange:v}=t.getState(),f=typeof C=="function"?C(E):C;if(u)k(f);else if(v){const p=f.length===0?E.map(y=>({type:"remove",id:y.id})):f.map(y=>({item:y,type:"reset"}));v(p)}},[]),l=M.useCallback(C=>{const E=Array.isArray(C)?C:[C],{getNodes:k,setNodes:u,hasDefaultNodes:v,onNodesChange:f}=t.getState();if(v){const y=[...k(),...E];u(y)}else if(f){const p=E.map(y=>({item:y,type:"add"}));f(p)}},[]),c=M.useCallback(C=>{const E=Array.isArray(C)?C:[C],{edges:k=[],setEdges:u,hasDefaultEdges:v,onEdgesChange:f}=t.getState();if(v)u([...k,...E]);else if(f){const p=E.map(y=>({item:y,type:"add"}));f(p)}},[]),d=M.useCallback(()=>{const{getNodes:C,edges:E=[],transform:k}=t.getState(),[u,v,f]=k;return{nodes:C().map(p=>({...p})),edges:E.map(p=>({...p})),viewport:{x:u,y:v,zoom:f}}},[]),g=M.useCallback(({nodes:C,edges:E})=>{const{nodeInternals:k,getNodes:u,edges:v,hasDefaultNodes:f,hasDefaultEdges:p,onNodesDelete:y,onEdgesDelete:h,onNodesChange:_,onEdgesChange:I}=t.getState(),A=(C||[]).map(F=>F.id),R=(E||[]).map(F=>F.id),D=u().reduce((F,j)=>{const H=j.parentNode||j.parentId,L=!A.includes(j.id)&&H&&F.find($=>$.id===H);return(typeof j.deletable=="boolean"?j.deletable:!0)&&(A.includes(j.id)||L)&&F.push(j),F},[]),B=v.filter(F=>typeof F.deletable=="boolean"?F.deletable:!0),N=B.filter(F=>R.includes(F.id));if(D||N){const F=jC(D,B),j=[...N,...F],H=j.reduce((L,G)=>(L.includes(G.id)||L.push(G.id),L),[]);if((p||f)&&(p&&t.setState({edges:v.filter(L=>!H.includes(L.id))}),f&&(D.forEach(L=>{k.delete(L.id)}),t.setState({nodeInternals:new Map(k)}))),H.length>0&&(h==null||h(j),I&&I(H.map(L=>({id:L,type:"remove"})))),D.length>0&&(y==null||y(D),_)){const L=D.map(G=>({id:G.id,type:"remove"}));_(L)}}},[]),b=M.useCallback(C=>{const E=jV(C),k=E?null:t.getState().nodeInternals.get(C.id);return!E&&!k?[null,null,E]:[E?C:Bx(k),k,E]},[]),x=M.useCallback((C,E=!0,k)=>{const[u,v,f]=b(C);return u?(k||t.getState().getNodes()).filter(p=>{if(!f&&(p.id===v.id||!p.positionAbsolute))return!1;const y=Bx(p),h=jg(y,u);return E&&h>0||h>=u.width*u.height}):[]},[]),w=M.useCallback((C,E,k=!0)=>{const[u]=b(C);if(!u)return!1;const v=jg(u,E);return k&&v>0||v>=u.width*u.height},[]);return M.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:i,getEdge:s,setNodes:o,setEdges:a,addNodes:l,addEdges:c,toObject:d,deleteElements:g,getIntersectingNodes:x,isNodeIntersecting:w}),[e,n,r,i,s,o,a,l,c,d,g,x,w])}const vz={actInsideInputWithModifier:!1};var xz=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=un(),{deleteElements:r}=_m(),i=wl(e,vz),s=wl(t);M.useEffect(()=>{if(i){const{edges:o,getNodes:a}=n.getState(),l=a().filter(d=>d.selected),c=o.filter(d=>d.selected);r({nodes:l,edges:c}),n.setState({nodesSelectionActive:!1})}},[i]),M.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])};function yz(e){const t=un();M.useEffect(()=>{let n;const r=()=>{var s,o;if(!e.current)return;const i=hm(e.current);(i.height===0||i.width===0)&&((o=(s=t.getState()).onError)==null||o.call(s,"004",Pr.error004())),t.setState({width:i.width||500,height:i.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}const wm={position:"absolute",width:"100%",height:"100%",top:0,left:0},_z=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Gc=e=>({x:e.x,y:e.y,zoom:e.k}),lo=(e,t)=>e.target.closest(`.${t}`),Ux=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Jx=e=>{const t=e.ctrlKey&&ld()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},wz=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),Cz=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:i=!0,zoomOnPinch:s=!0,panOnScroll:o=!1,panOnScrollSpeed:a=.5,panOnScrollMode:l=Es.Free,zoomOnDoubleClick:c=!0,elementsSelectable:d,panOnDrag:g=!0,defaultViewport:b,translateExtent:x,minZoom:w,maxZoom:C,zoomActivationKeyCode:E,preventScrolling:k=!0,children:u,noWheelClassName:v,noPanClassName:f})=>{const p=M.useRef(),y=un(),h=M.useRef(!1),_=M.useRef(!1),I=M.useRef(null),A=M.useRef({x:0,y:0,zoom:0}),{d3Zoom:R,d3Selection:D,d3ZoomHandler:B,userSelectionActive:N}=zt(wz,cn),F=wl(E),j=M.useRef(0),H=M.useRef(!1),L=M.useRef();return yz(I),M.useEffect(()=>{if(I.current){const G=I.current.getBoundingClientRect(),$=CC().scaleExtent([w,C]).translateExtent(x),Z=dr(I.current).call($),U=Si.translate(b.x,b.y).scale(Lo(b.zoom,w,C)),ee=[[0,0],[G.width,G.height]],se=$.constrain()(U,ee,x);$.transform(Z,se),$.wheelDelta(Jx),y.setState({d3Zoom:$,d3Selection:Z,d3ZoomHandler:Z.on("wheel.zoom"),transform:[se.x,se.y,se.k],domNode:I.current.closest(".react-flow")})}},[]),M.useEffect(()=>{D&&R&&(o&&!F&&!N?D.on("wheel.zoom",G=>{if(lo(G,v))return!1;G.preventDefault(),G.stopImmediatePropagation();const $=D.property("__zoom").k||1;if(G.ctrlKey&&s){const ve=Sr(G),xe=Jx(G),Y=$*Math.pow(2,xe);R.scaleTo(D,Y,ve,G);return}const Z=G.deltaMode===1?20:1;let U=l===Es.Vertical?0:G.deltaX*Z,ee=l===Es.Horizontal?0:G.deltaY*Z;!ld()&&G.shiftKey&&l!==Es.Vertical&&(U=G.deltaY*Z,ee=0),R.translateBy(D,-(U/$)*a,-(ee/$)*a,{internal:!0});const se=Gc(D.property("__zoom")),{onViewportChangeStart:ie,onViewportChange:fe,onViewportChangeEnd:Se}=y.getState();clearTimeout(L.current),H.current||(H.current=!0,t==null||t(G,se),ie==null||ie(se)),H.current&&(e==null||e(G,se),fe==null||fe(se),L.current=setTimeout(()=>{n==null||n(G,se),Se==null||Se(se),H.current=!1},150))},{passive:!1}):typeof B<"u"&&D.on("wheel.zoom",function(G,$){if(!k&&G.type==="wheel"&&!G.ctrlKey||lo(G,v))return null;G.preventDefault(),B.call(this,G,$)},{passive:!1}))},[N,o,l,D,R,B,F,s,k,v,t,e,n]),M.useEffect(()=>{R&&R.on("start",G=>{var U,ee;if(!G.sourceEvent||G.sourceEvent.internal)return null;j.current=(U=G.sourceEvent)==null?void 0:U.button;const{onViewportChangeStart:$}=y.getState(),Z=Gc(G.transform);h.current=!0,A.current=Z,((ee=G.sourceEvent)==null?void 0:ee.type)==="mousedown"&&y.setState({paneDragging:!0}),$==null||$(Z),t==null||t(G.sourceEvent,Z)})},[R,t]),M.useEffect(()=>{R&&(N&&!h.current?R.on("zoom",null):N||R.on("zoom",G=>{var Z;const{onViewportChange:$}=y.getState();if(y.setState({transform:[G.transform.x,G.transform.y,G.transform.k]}),_.current=!!(r&&Ux(g,j.current??0)),(e||$)&&!((Z=G.sourceEvent)!=null&&Z.internal)){const U=Gc(G.transform);$==null||$(U),e==null||e(G.sourceEvent,U)}}))},[N,R,e,g,r]),M.useEffect(()=>{R&&R.on("end",G=>{if(!G.sourceEvent||G.sourceEvent.internal)return null;const{onViewportChangeEnd:$}=y.getState();if(h.current=!1,y.setState({paneDragging:!1}),r&&Ux(g,j.current??0)&&!_.current&&r(G.sourceEvent),_.current=!1,(n||$)&&_z(A.current,G.transform)){const Z=Gc(G.transform);A.current=Z,clearTimeout(p.current),p.current=setTimeout(()=>{$==null||$(Z),n==null||n(G.sourceEvent,Z)},o?150:0)}})},[R,o,g,n,r]),M.useEffect(()=>{R&&R.filter(G=>{const $=F||i,Z=s&&G.ctrlKey;if((g===!0||Array.isArray(g)&&g.includes(1))&&G.button===1&&G.type==="mousedown"&&(lo(G,"react-flow__node")||lo(G,"react-flow__edge")))return!0;if(!g&&!$&&!o&&!c&&!s||N||!c&&G.type==="dblclick"||lo(G,v)&&G.type==="wheel"||lo(G,f)&&(G.type!=="wheel"||o&&G.type==="wheel"&&!F)||!s&&G.ctrlKey&&G.type==="wheel"||!$&&!o&&!Z&&G.type==="wheel"||!g&&(G.type==="mousedown"||G.type==="touchstart")||Array.isArray(g)&&!g.includes(G.button)&&G.type==="mousedown")return!1;const U=Array.isArray(g)&&g.includes(G.button)||!G.button||G.button<=1;return(!G.ctrlKey||G.type==="wheel")&&U})},[N,R,i,s,o,c,g,d,F]),M.createElement("div",{className:"react-flow__renderer",ref:I,style:wm},u)},Sz=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Ez(){const{userSelectionActive:e,userSelectionRect:t}=zt(Sz,cn);return e&&t?M.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function qx(e,t){const n=t.parentNode||t.parentId,r=e.find(i=>i.id===n);if(r){const i=t.position.x+t.width-r.width,s=t.position.y+t.height-r.height;if(i>0||s>0||t.position.x<0||t.position.y<0){if(r.style={...r.style},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,i>0&&(r.style.width+=i),s>0&&(r.style.height+=s),t.position.x<0){const o=Math.abs(t.position.x);r.position.x=r.position.x-o,r.style.width+=o,t.position.x=0}if(t.position.y<0){const o=Math.abs(t.position.y);r.position.y=r.position.y-o,r.style.height+=o,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function tS(e,t){if(e.some(r=>r.type==="reset"))return e.filter(r=>r.type==="reset").map(r=>r.item);const n=e.filter(r=>r.type==="add").map(r=>r.item);return t.reduce((r,i)=>{const s=e.filter(a=>a.id===i.id);if(s.length===0)return r.push(i),r;const o={...i};for(const a of s)if(a)switch(a.type){case"select":{o.selected=a.selected;break}case"position":{typeof a.position<"u"&&(o.position=a.position),typeof a.positionAbsolute<"u"&&(o.positionAbsolute=a.positionAbsolute),typeof a.dragging<"u"&&(o.dragging=a.dragging),o.expandParent&&qx(r,o);break}case"dimensions":{typeof a.dimensions<"u"&&(o.width=a.dimensions.width,o.height=a.dimensions.height),typeof a.updateStyle<"u"&&(o.style={...o.style||{},...a.dimensions}),typeof a.resizing=="boolean"&&(o.resizing=a.resizing),o.expandParent&&qx(r,o);break}case"remove":return r}return r.push(o),r},n)}function nS(e,t){return tS(e,t)}function Iz(e,t){return tS(e,t)}const Vi=(e,t)=>({id:e,type:"select",selected:t});function po(e,t){return e.reduce((n,r)=>{const i=t.includes(r.id);return!r.selected&&i?(r.selected=!0,n.push(Vi(r.id,!0))):r.selected&&!i&&(r.selected=!1,n.push(Vi(r.id,!1))),n},[])}const gh=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},kz=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),rS=M.memo(({isSelecting:e,selectionMode:t=yl.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:i,onPaneClick:s,onPaneContextMenu:o,onPaneScroll:a,onPaneMouseEnter:l,onPaneMouseMove:c,onPaneMouseLeave:d,children:g})=>{const b=M.useRef(null),x=un(),w=M.useRef(0),C=M.useRef(0),E=M.useRef(),{userSelectionActive:k,elementsSelectable:u,dragging:v}=zt(kz,cn),f=()=>{x.setState({userSelectionActive:!1,userSelectionRect:null}),w.current=0,C.current=0},p=B=>{s==null||s(B),x.getState().resetSelectedElements(),x.setState({nodesSelectionActive:!1})},y=B=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){B.preventDefault();return}o==null||o(B)},h=a?B=>a(B):void 0,_=B=>{const{resetSelectedElements:N,domNode:F}=x.getState();if(E.current=F==null?void 0:F.getBoundingClientRect(),!u||!e||B.button!==0||B.target!==b.current||!E.current)return;const{x:j,y:H}=Ui(B,E.current);N(),x.setState({userSelectionRect:{width:0,height:0,startX:j,startY:H,x:j,y:H}}),r==null||r(B)},I=B=>{const{userSelectionRect:N,nodeInternals:F,edges:j,transform:H,onNodesChange:L,onEdgesChange:G,nodeOrigin:$,getNodes:Z}=x.getState();if(!e||!E.current||!N)return;x.setState({userSelectionActive:!0,nodesSelectionActive:!1});const U=Ui(B,E.current),ee=N.startX??0,se=N.startY??0,ie={...N,x:U.x<ee?U.x:ee,y:U.y<se?U.y:se,width:Math.abs(U.x-ee),height:Math.abs(U.y-se)},fe=Z(),Se=LC(F,ie,H,t===yl.Partial,!0,$),ve=jC(Se,j).map(Y=>Y.id),xe=Se.map(Y=>Y.id);if(w.current!==xe.length){w.current=xe.length;const Y=po(fe,xe);Y.length&&(L==null||L(Y))}if(C.current!==ve.length){C.current=ve.length;const Y=po(j,ve);Y.length&&(G==null||G(Y))}x.setState({userSelectionRect:ie})},A=B=>{if(B.button!==0)return;const{userSelectionRect:N}=x.getState();!k&&N&&B.target===b.current&&(p==null||p(B)),x.setState({nodesSelectionActive:w.current>0}),f(),i==null||i(B)},R=B=>{k&&(x.setState({nodesSelectionActive:w.current>0}),i==null||i(B)),f()},D=u&&(e||k);return M.createElement("div",{className:Sn(["react-flow__pane",{dragging:v,selection:e}]),onClick:D?void 0:gh(p,b),onContextMenu:gh(y,b),onWheel:gh(h,b),onMouseEnter:D?void 0:l,onMouseDown:D?_:void 0,onMouseMove:D?I:c,onMouseUp:D?A:void 0,onMouseLeave:D?R:d,ref:b,style:wm},g,M.createElement(Ez,null))});rS.displayName="Pane";function iS(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return r?r.selected?!0:iS(r,t):!1}function Kx(e,t,n){let r=e;do{if(r!=null&&r.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function Az(e,t,n,r){return Array.from(e.values()).filter(i=>(i.selected||i.id===r)&&(!i.parentNode||i.parentId||!iS(i,e))&&(i.draggable||t&&typeof i.draggable>"u")).map(i=>{var s,o;return{id:i.id,position:i.position||{x:0,y:0},positionAbsolute:i.positionAbsolute||{x:0,y:0},distance:{x:n.x-(((s=i.positionAbsolute)==null?void 0:s.x)??0),y:n.y-(((o=i.positionAbsolute)==null?void 0:o.y)??0)},delta:{x:0,y:0},extent:i.extent,parentNode:i.parentNode||i.parentId,parentId:i.parentNode||i.parentId,width:i.width,height:i.height,expandParent:i.expandParent}})}function Mz(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function sS(e,t,n,r,i=[0,0],s){const o=Mz(e,e.extent||r);let a=o;const l=e.parentNode||e.parentId;if(e.extent==="parent"&&!e.expandParent)if(l&&e.width&&e.height){const g=n.get(l),{x:b,y:x}=Os(g,i).positionAbsolute;a=g&&hr(b)&&hr(x)&&hr(g.width)&&hr(g.height)?[[b+e.width*i[0],x+e.height*i[1]],[b+g.width-e.width+e.width*i[0],x+g.height-e.height+e.height*i[1]]]:a}else s==null||s("005",Pr.error005()),a=o;else if(e.extent&&l&&e.extent!=="parent"){const g=n.get(l),{x:b,y:x}=Os(g,i).positionAbsolute;a=[[e.extent[0][0]+b,e.extent[0][1]+x],[e.extent[1][0]+b,e.extent[1][1]+x]]}let c={x:0,y:0};if(l){const g=n.get(l);c=Os(g,i).positionAbsolute}const d=a&&a!=="parent"?gm(t,a):t;return{position:{x:d.x-c.x,y:d.y-c.y},positionAbsolute:d}}function ph({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(i=>({...n.get(i.id),position:i.position,positionAbsolute:i.positionAbsolute}));return[e?r.find(i=>i.id===e):r[0],r]}const Qx=(e,t,n,r)=>{const i=t.querySelectorAll(e);if(!i||!i.length)return null;const s=Array.from(i),o=t.getBoundingClientRect(),a={x:o.width*r[0],y:o.height*r[1]};return s.map(l=>{const c=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(c.left-o.left-a.x)/n,y:(c.top-o.top-a.y)/n,...hm(l)}})};function ga(e,t,n){return n===void 0?n:r=>{const i=t().nodeInternals.get(e);i&&n(r,{...i})}}function Wg({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:s,multiSelectionActive:o,nodeInternals:a,onError:l}=t.getState(),c=a.get(e);if(!c){l==null||l("012",Pr.error012(e));return}t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&o)&&(s({nodes:[c],edges:[]}),requestAnimationFrame(()=>{var d;return(d=r==null?void 0:r.current)==null?void 0:d.blur()})):i([e])}function Rz(){const e=un();return M.useCallback(({sourceEvent:n})=>{const{transform:r,snapGrid:i,snapToGrid:s}=e.getState(),o=n.touches?n.touches[0].clientX:n.clientX,a=n.touches?n.touches[0].clientY:n.clientY,l={x:(o-r[0])/r[2],y:(a-r[1])/r[2]};return{xSnapped:s?i[0]*Math.round(l.x/i[0]):l.x,ySnapped:s?i[1]*Math.round(l.y/i[1]):l.y,...l}},[])}function mh(e){return(t,n,r)=>e==null?void 0:e(t,r)}function oS({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:s,selectNodesOnDrag:o}){const a=un(),[l,c]=M.useState(!1),d=M.useRef([]),g=M.useRef({x:null,y:null}),b=M.useRef(0),x=M.useRef(null),w=M.useRef({x:0,y:0}),C=M.useRef(null),E=M.useRef(!1),k=M.useRef(!1),u=M.useRef(!1),v=Rz();return M.useEffect(()=>{if(e!=null&&e.current){const f=dr(e.current),p=({x:_,y:I})=>{const{nodeInternals:A,onNodeDrag:R,onSelectionDrag:D,updateNodePositions:B,nodeExtent:N,snapGrid:F,snapToGrid:j,nodeOrigin:H,onError:L}=a.getState();g.current={x:_,y:I};let G=!1,$={x:0,y:0,x2:0,y2:0};if(d.current.length>1&&N){const U=Wd(d.current,H);$=xl(U)}if(d.current=d.current.map(U=>{const ee={x:_-U.distance.x,y:I-U.distance.y};j&&(ee.x=F[0]*Math.round(ee.x/F[0]),ee.y=F[1]*Math.round(ee.y/F[1]));const se=[[N[0][0],N[0][1]],[N[1][0],N[1][1]]];d.current.length>1&&N&&!U.extent&&(se[0][0]=U.positionAbsolute.x-$.x+N[0][0],se[1][0]=U.positionAbsolute.x+(U.width??0)-$.x2+N[1][0],se[0][1]=U.positionAbsolute.y-$.y+N[0][1],se[1][1]=U.positionAbsolute.y+(U.height??0)-$.y2+N[1][1]);const ie=sS(U,ee,A,se,H,L);return G=G||U.position.x!==ie.position.x||U.position.y!==ie.position.y,U.position=ie.position,U.positionAbsolute=ie.positionAbsolute,U}),!G)return;B(d.current,!0,!0),c(!0);const Z=i?R:mh(D);if(Z&&C.current){const[U,ee]=ph({nodeId:i,dragItems:d.current,nodeInternals:A});Z(C.current,U,ee)}},y=()=>{if(!x.current)return;const[_,I]=EC(w.current,x.current);if(_!==0||I!==0){const{transform:A,panBy:R}=a.getState();g.current.x=(g.current.x??0)-_/A[2],g.current.y=(g.current.y??0)-I/A[2],R({x:_,y:I})&&p(g.current)}b.current=requestAnimationFrame(y)},h=_=>{var H;const{nodeInternals:I,multiSelectionActive:A,nodesDraggable:R,unselectNodesAndEdges:D,onNodeDragStart:B,onSelectionDragStart:N}=a.getState();k.current=!0;const F=i?B:mh(N);(!o||!s)&&!A&&i&&((H=I.get(i))!=null&&H.selected||D()),i&&s&&o&&Wg({id:i,store:a,nodeRef:e});const j=v(_);if(g.current=j,d.current=Az(I,R,j,i),F&&d.current){const[L,G]=ph({nodeId:i,dragItems:d.current,nodeInternals:I});F(_.sourceEvent,L,G)}};if(t)f.on(".drag",null);else{const _=gB().on("start",I=>{const{domNode:A,nodeDragThreshold:R}=a.getState();R===0&&h(I),u.current=!1;const D=v(I);g.current=D,x.current=(A==null?void 0:A.getBoundingClientRect())||null,w.current=Ui(I.sourceEvent,x.current)}).on("drag",I=>{var B,N;const A=v(I),{autoPanOnNodeDrag:R,nodeDragThreshold:D}=a.getState();if(I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1&&(u.current=!0),!u.current){if(!E.current&&k.current&&R&&(E.current=!0,y()),!k.current){const F=A.xSnapped-(((B=g==null?void 0:g.current)==null?void 0:B.x)??0),j=A.ySnapped-(((N=g==null?void 0:g.current)==null?void 0:N.y)??0);Math.sqrt(F*F+j*j)>D&&h(I)}(g.current.x!==A.xSnapped||g.current.y!==A.ySnapped)&&d.current&&k.current&&(C.current=I.sourceEvent,w.current=Ui(I.sourceEvent,x.current),p(A))}}).on("end",I=>{if(!(!k.current||u.current)&&(c(!1),E.current=!1,k.current=!1,cancelAnimationFrame(b.current),d.current)){const{updateNodePositions:A,nodeInternals:R,onNodeDragStop:D,onSelectionDragStop:B}=a.getState(),N=i?D:mh(B);if(A(d.current,!1,!1),N){const[F,j]=ph({nodeId:i,dragItems:d.current,nodeInternals:R});N(I.sourceEvent,F,j)}}}).filter(I=>{const A=I.target;return!I.button&&(!n||!Kx(A,`.${n}`,e))&&(!r||Kx(A,r,e))});return f.call(_),()=>{f.on(".drag",null)}}}},[e,t,n,r,s,a,i,o,v]),l}function aS(){const e=un();return M.useCallback(n=>{const{nodeInternals:r,nodeExtent:i,updateNodePositions:s,getNodes:o,snapToGrid:a,snapGrid:l,onError:c,nodesDraggable:d}=e.getState(),g=o().filter(u=>u.selected&&(u.draggable||d&&typeof u.draggable>"u")),b=a?l[0]:5,x=a?l[1]:5,w=n.isShiftPressed?4:1,C=n.x*b*w,E=n.y*x*w,k=g.map(u=>{if(u.positionAbsolute){const v={x:u.positionAbsolute.x+C,y:u.positionAbsolute.y+E};a&&(v.x=l[0]*Math.round(v.x/l[0]),v.y=l[1]*Math.round(v.y/l[1]));const{positionAbsolute:f,position:p}=sS(u,v,r,i,void 0,c);u.position=p,u.positionAbsolute=f}return u});s(k,!0,!1)},[])}const So={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var pa=e=>{const t=({id:n,type:r,data:i,xPos:s,yPos:o,xPosOrigin:a,yPosOrigin:l,selected:c,onClick:d,onMouseEnter:g,onMouseMove:b,onMouseLeave:x,onContextMenu:w,onDoubleClick:C,style:E,className:k,isDraggable:u,isSelectable:v,isConnectable:f,isFocusable:p,selectNodesOnDrag:y,sourcePosition:h,targetPosition:_,hidden:I,resizeObserver:A,dragHandle:R,zIndex:D,isParent:B,noDragClassName:N,noPanClassName:F,initialized:j,disableKeyboardA11y:H,ariaLabel:L,rfId:G,hasHandleBounds:$})=>{const Z=un(),U=M.useRef(null),ee=M.useRef(null),se=M.useRef(h),ie=M.useRef(_),fe=M.useRef(r),Se=v||u||d||g||b||x,ve=aS(),xe=ga(n,Z.getState,g),Y=ga(n,Z.getState,b),le=ga(n,Z.getState,x),re=ga(n,Z.getState,w),ge=ga(n,Z.getState,C),ne=ye=>{const{nodeDragThreshold:q}=Z.getState();if(v&&(!y||!u||q>0)&&Wg({id:n,store:Z,nodeRef:U}),d){const Ie=Z.getState().nodeInternals.get(n);Ie&&d(ye,{...Ie})}},he=ye=>{if(!Bg(ye)&&!H)if(MC.includes(ye.key)&&v){const q=ye.key==="Escape";Wg({id:n,store:Z,unselect:q,nodeRef:U})}else u&&c&&Object.prototype.hasOwnProperty.call(So,ye.key)&&(Z.setState({ariaLiveMessage:`Moved selected node ${ye.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~s}, y: ${~~o}`}),ve({x:So[ye.key].x,y:So[ye.key].y,isShiftPressed:ye.shiftKey}))};M.useEffect(()=>()=>{ee.current&&(A==null||A.unobserve(ee.current),ee.current=null)},[]),M.useEffect(()=>{if(U.current&&!I){const ye=U.current;(!j||!$||ee.current!==ye)&&(ee.current&&(A==null||A.unobserve(ee.current)),A==null||A.observe(ye),ee.current=ye)}},[I,j,$]),M.useEffect(()=>{const ye=fe.current!==r,q=se.current!==h,Ie=ie.current!==_;U.current&&(ye||q||Ie)&&(ye&&(fe.current=r),q&&(se.current=h),Ie&&(ie.current=_),Z.getState().updateNodeDimensions([{id:n,nodeElement:U.current,forceUpdate:!0}]))},[n,r,h,_]);const be=oS({nodeRef:U,disabled:I||!u,noDragClassName:N,handleSelector:R,nodeId:n,isSelectable:v,selectNodesOnDrag:y});return I?null:M.createElement("div",{className:Sn(["react-flow__node",`react-flow__node-${r}`,{[F]:u},k,{selected:c,selectable:v,parent:B,dragging:be}]),ref:U,style:{zIndex:D,transform:`translate(${a}px,${l}px)`,pointerEvents:Se?"all":"none",visibility:j?"visible":"hidden",...E},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:xe,onMouseMove:Y,onMouseLeave:le,onContextMenu:re,onClick:ne,onDoubleClick:ge,onKeyDown:p?he:void 0,tabIndex:p?0:void 0,role:p?"button":void 0,"aria-describedby":H?void 0:`${JC}-${G}`,"aria-label":L},M.createElement(WV,{value:n},M.createElement(e,{id:n,data:i,type:r,xPos:s,yPos:o,selected:c,isConnectable:f,sourcePosition:h,targetPosition:_,dragging:be,dragHandle:R,zIndex:D})))};return t.displayName="NodeWrapper",M.memo(t)};const Pz=e=>{const t=e.getNodes().filter(n=>n.selected);return{...Wd(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function Nz({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=un(),{width:i,height:s,x:o,y:a,transformString:l,userSelectionActive:c}=zt(Pz,cn),d=aS(),g=M.useRef(null);if(M.useEffect(()=>{var w;n||(w=g.current)==null||w.focus({preventScroll:!0})},[n]),oS({nodeRef:g}),c||!i||!s)return null;const b=e?w=>{const C=r.getState().getNodes().filter(E=>E.selected);e(w,C)}:void 0,x=w=>{Object.prototype.hasOwnProperty.call(So,w.key)&&d({x:So[w.key].x,y:So[w.key].y,isShiftPressed:w.shiftKey})};return M.createElement("div",{className:Sn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l}},M.createElement("div",{ref:g,className:"react-flow__nodesselection-rect",onContextMenu:b,tabIndex:n?void 0:-1,onKeyDown:n?void 0:x,style:{width:i,height:s,top:a,left:o}}))}var Tz=M.memo(Nz);const Oz=e=>e.nodesSelectionActive,lS=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:o,deleteKeyCode:a,onMove:l,onMoveStart:c,onMoveEnd:d,selectionKeyCode:g,selectionOnDrag:b,selectionMode:x,onSelectionStart:w,onSelectionEnd:C,multiSelectionKeyCode:E,panActivationKeyCode:k,zoomActivationKeyCode:u,elementsSelectable:v,zoomOnScroll:f,zoomOnPinch:p,panOnScroll:y,panOnScrollSpeed:h,panOnScrollMode:_,zoomOnDoubleClick:I,panOnDrag:A,defaultViewport:R,translateExtent:D,minZoom:B,maxZoom:N,preventScrolling:F,onSelectionContextMenu:j,noWheelClassName:H,noPanClassName:L,disableKeyboardA11y:G})=>{const $=zt(Oz),Z=wl(g),U=wl(k),ee=U||A,se=U||y,ie=Z||b&&ee!==!0;return xz({deleteKeyCode:a,multiSelectionKeyCode:E}),M.createElement(Cz,{onMove:l,onMoveStart:c,onMoveEnd:d,onPaneContextMenu:s,elementsSelectable:v,zoomOnScroll:f,zoomOnPinch:p,panOnScroll:se,panOnScrollSpeed:h,panOnScrollMode:_,zoomOnDoubleClick:I,panOnDrag:!Z&&ee,defaultViewport:R,translateExtent:D,minZoom:B,maxZoom:N,zoomActivationKeyCode:u,preventScrolling:F,noWheelClassName:H,noPanClassName:L},M.createElement(rS,{onSelectionStart:w,onSelectionEnd:C,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:o,panOnDrag:ee,isSelecting:!!ie,selectionMode:x},e,$&&M.createElement(Tz,{onSelectionContextMenu:j,noPanClassName:L,disableKeyboardA11y:G})))};lS.displayName="FlowRenderer";var Dz=M.memo(lS);function Fz(e){return zt(M.useCallback(n=>e?LC(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}function Lz(e){const t={input:pa(e.input||XC),default:pa(e.default||Gg),output:pa(e.output||ZC),group:pa(e.group||ym)},n={},r=Object.keys(e).filter(i=>!["input","default","output","group"].includes(i)).reduce((i,s)=>(i[s]=pa(e[s]||Gg),i),n);return{...t,...r}}const jz=({x:e,y:t,width:n,height:r,origin:i})=>!n||!r?{x:e,y:t}:i[0]<0||i[1]<0||i[0]>1||i[1]>1?{x:e,y:t}:{x:e-n*i[0],y:t-r*i[1]},Bz=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),cS=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,updateNodeDimensions:s,onError:o}=zt(Bz,cn),a=Fz(e.onlyRenderVisibleElements),l=M.useRef(),c=M.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const d=new ResizeObserver(g=>{const b=g.map(x=>({id:x.target.getAttribute("data-id"),nodeElement:x.target,forceUpdate:!0}));s(b)});return l.current=d,d},[]);return M.useEffect(()=>()=>{var d;(d=l==null?void 0:l.current)==null||d.disconnect()},[]),M.createElement("div",{className:"react-flow__nodes",style:wm},a.map(d=>{var p,y,h;let g=d.type||"default";e.nodeTypes[g]||(o==null||o("003",Pr.error003(g)),g="default");const b=e.nodeTypes[g]||e.nodeTypes.default,x=!!(d.draggable||t&&typeof d.draggable>"u"),w=!!(d.selectable||i&&typeof d.selectable>"u"),C=!!(d.connectable||n&&typeof d.connectable>"u"),E=!!(d.focusable||r&&typeof d.focusable>"u"),k=e.nodeExtent?gm(d.positionAbsolute,e.nodeExtent):d.positionAbsolute,u=(k==null?void 0:k.x)??0,v=(k==null?void 0:k.y)??0,f=jz({x:u,y:v,width:d.width??0,height:d.height??0,origin:e.nodeOrigin});return M.createElement(b,{key:d.id,id:d.id,className:d.className,style:d.style,type:g,data:d.data,sourcePosition:d.sourcePosition||Be.Bottom,targetPosition:d.targetPosition||Be.Top,hidden:d.hidden,xPos:u,yPos:v,xPosOrigin:f.x,yPosOrigin:f.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!d.selected,isDraggable:x,isSelectable:w,isConnectable:C,isFocusable:E,resizeObserver:c,dragHandle:d.dragHandle,zIndex:((p=d[qt])==null?void 0:p.z)??0,isParent:!!((y=d[qt])!=null&&y.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!d.width&&!!d.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:d.ariaLabel,hasHandleBounds:!!((h=d[qt])!=null&&h.handleBounds)})}))};cS.displayName="NodeRenderer";var Vz=M.memo(cS);const zz=(e,t,n)=>n===Be.Left?e-t:n===Be.Right?e+t:e,Hz=(e,t,n)=>n===Be.Top?e-t:n===Be.Bottom?e+t:e,ey="react-flow__edgeupdater",ty=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:s,onMouseOut:o,type:a})=>M.createElement("circle",{onMouseDown:i,onMouseEnter:s,onMouseOut:o,className:Sn([ey,`${ey}-${a}`]),cx:zz(t,r,e),cy:Hz(n,r,e),r,stroke:"transparent",fill:"transparent"}),Gz=()=>!0;var co=e=>{const t=({id:n,className:r,type:i,data:s,onClick:o,onEdgeDoubleClick:a,selected:l,animated:c,label:d,labelStyle:g,labelShowBg:b,labelBgStyle:x,labelBgPadding:w,labelBgBorderRadius:C,style:E,source:k,target:u,sourceX:v,sourceY:f,targetX:p,targetY:y,sourcePosition:h,targetPosition:_,elementsSelectable:I,hidden:A,sourceHandleId:R,targetHandleId:D,onContextMenu:B,onMouseEnter:N,onMouseMove:F,onMouseLeave:j,reconnectRadius:H,onReconnect:L,onReconnectStart:G,onReconnectEnd:$,markerEnd:Z,markerStart:U,rfId:ee,ariaLabel:se,isFocusable:ie,isReconnectable:fe,pathOptions:Se,interactionWidth:ve,disableKeyboardA11y:xe})=>{const Y=M.useRef(null),[le,re]=M.useState(!1),[ge,ne]=M.useState(!1),he=un(),be=M.useMemo(()=>`url('#${zg(U,ee)}')`,[U,ee]),ye=M.useMemo(()=>`url('#${zg(Z,ee)}')`,[Z,ee]);if(A)return null;const q=vt=>{var on;const{edges:ft,addSelectedEdges:_t,unselectNodesAndEdges:Ot,multiSelectionActive:dn}=he.getState(),mn=ft.find(ir=>ir.id===n);mn&&(I&&(he.setState({nodesSelectionActive:!1}),mn.selected&&dn?(Ot({nodes:[],edges:[mn]}),(on=Y.current)==null||on.blur()):_t([n])),o&&o(vt,mn))},Ie=ha(n,he.getState,a),Le=ha(n,he.getState,B),Me=ha(n,he.getState,N),je=ha(n,he.getState,F),gt=ha(n,he.getState,j),Ve=(vt,ft)=>{if(vt.button!==0)return;const{edges:_t,isValidConnection:Ot}=he.getState(),dn=ft?u:k,mn=(ft?D:R)||null,on=ft?"target":"source",ir=Ot||Gz,vr=ft,xr=_t.find(Ee=>Ee.id===n);ne(!0),G==null||G(vt,xr,on);const bn=Ee=>{ne(!1),$==null||$(Ee,xr,on)};HC({event:vt,handleId:mn,nodeId:dn,onConnect:Ee=>L==null?void 0:L(xr,Ee),isTarget:vr,getState:he.getState,setState:he.setState,isValidConnection:ir,edgeUpdaterType:on,onReconnectEnd:bn})},_e=vt=>Ve(vt,!0),Oe=vt=>Ve(vt,!1),nt=()=>re(!0),pt=()=>re(!1),Qt=!I&&!o,Dn=vt=>{var ft;if(!xe&&MC.includes(vt.key)&&I){const{unselectNodesAndEdges:_t,addSelectedEdges:Ot,edges:dn}=he.getState();vt.key==="Escape"?((ft=Y.current)==null||ft.blur(),_t({edges:[dn.find(on=>on.id===n)]})):Ot([n])}};return M.createElement("g",{className:Sn(["react-flow__edge",`react-flow__edge-${i}`,r,{selected:l,animated:c,inactive:Qt,updating:le}]),onClick:q,onDoubleClick:Ie,onContextMenu:Le,onMouseEnter:Me,onMouseMove:je,onMouseLeave:gt,onKeyDown:ie?Dn:void 0,tabIndex:ie?0:void 0,role:ie?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":se===null?void 0:se||`Edge from ${k} to ${u}`,"aria-describedby":ie?`${qC}-${ee}`:void 0,ref:Y},!ge&&M.createElement(e,{id:n,source:k,target:u,selected:l,animated:c,label:d,labelStyle:g,labelShowBg:b,labelBgStyle:x,labelBgPadding:w,labelBgBorderRadius:C,data:s,style:E,sourceX:v,sourceY:f,targetX:p,targetY:y,sourcePosition:h,targetPosition:_,sourceHandleId:R,targetHandleId:D,markerStart:be,markerEnd:ye,pathOptions:Se,interactionWidth:ve}),fe&&M.createElement(M.Fragment,null,(fe==="source"||fe===!0)&&M.createElement(ty,{position:h,centerX:v,centerY:f,radius:H,onMouseDown:_e,onMouseEnter:nt,onMouseOut:pt,type:"source"}),(fe==="target"||fe===!0)&&M.createElement(ty,{position:_,centerX:p,centerY:y,radius:H,onMouseDown:Oe,onMouseEnter:nt,onMouseOut:pt,type:"target"})))};return t.displayName="EdgeWrapper",M.memo(t)};function Wz(e){const t={default:co(e.default||cd),straight:co(e.bezier||bm),step:co(e.step||mm),smoothstep:co(e.step||Gd),simplebezier:co(e.simplebezier||pm)},n={},r=Object.keys(e).filter(i=>!["default","bezier"].includes(i)).reduce((i,s)=>(i[s]=co(e[s]||cd),i),n);return{...t,...r}}function ny(e,t,n=null){const r=((n==null?void 0:n.x)||0)+t.x,i=((n==null?void 0:n.y)||0)+t.y,s=(n==null?void 0:n.width)||t.width,o=(n==null?void 0:n.height)||t.height;switch(e){case Be.Top:return{x:r+s/2,y:i};case Be.Right:return{x:r+s,y:i+o/2};case Be.Bottom:return{x:r+s/2,y:i+o};case Be.Left:return{x:r,y:i+o/2}}}function ry(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const $z=(e,t,n,r,i,s)=>{const o=ny(n,e,t),a=ny(s,r,i);return{sourceX:o.x,sourceY:o.y,targetX:a.x,targetY:a.y}};function Xz({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:i,targetHeight:s,width:o,height:a,transform:l}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+r,t.y+s)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const d=xl({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:o/l[2],height:a/l[2]}),g=Math.max(0,Math.min(d.x2,c.x2)-Math.max(d.x,c.x)),b=Math.max(0,Math.min(d.y2,c.y2)-Math.max(d.y,c.y));return Math.ceil(g*b)>0}function iy(e){var r,i,s,o,a;const t=((r=e==null?void 0:e[qt])==null?void 0:r.handleBounds)||null,n=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.x)<"u"&&typeof((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.y)<"u";return[{x:((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.x)||0,y:((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!n]}const Yz=[{level:0,isMaxLevel:!0,edges:[]}];function Zz(e,t,n=!1){let r=-1;const i=e.reduce((o,a)=>{var d,g;const l=hr(a.zIndex);let c=l?a.zIndex:0;if(n){const b=t.get(a.target),x=t.get(a.source),w=a.selected||(b==null?void 0:b.selected)||(x==null?void 0:x.selected),C=Math.max(((d=x==null?void 0:x[qt])==null?void 0:d.z)||0,((g=b==null?void 0:b[qt])==null?void 0:g.z)||0,1e3);c=(l?a.zIndex:0)+(w?C:0)}return o[c]?o[c].push(a):o[c]=[a],r=c>r?c:r,o},{}),s=Object.entries(i).map(([o,a])=>{const l=+o;return{edges:a,level:l,isMaxLevel:l===r}});return s.length===0?Yz:s}function Uz(e,t,n){const r=zt(M.useCallback(i=>e?i.edges.filter(s=>{const o=t.get(s.source),a=t.get(s.target);return(o==null?void 0:o.width)&&(o==null?void 0:o.height)&&(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&Xz({sourcePos:o.positionAbsolute||{x:0,y:0},targetPos:a.positionAbsolute||{x:0,y:0},sourceWidth:o.width,sourceHeight:o.height,targetWidth:a.width,targetHeight:a.height,width:i.width,height:i.height,transform:i.transform})}):i.edges,[e,t]));return Zz(r,t,n)}const Jz=({color:e="none",strokeWidth:t=1})=>M.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),qz=({color:e="none",strokeWidth:t=1})=>M.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),sy={[_l.Arrow]:Jz,[_l.ArrowClosed]:qz};function Kz(e){const t=un();return M.useMemo(()=>{var i,s;return Object.prototype.hasOwnProperty.call(sy,e)?sy[e]:((s=(i=t.getState()).onError)==null||s.call(i,"009",Pr.error009(e)),null)},[e])}const Qz=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:s="strokeWidth",strokeWidth:o,orient:a="auto-start-reverse"})=>{const l=Kz(t);return l?M.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:a,refX:"0",refY:"0"},M.createElement(l,{color:n,strokeWidth:o})):null},eH=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((i,s)=>([s.markerStart,s.markerEnd].forEach(o=>{if(o&&typeof o=="object"){const a=zg(o,t);r.includes(a)||(i.push({id:a,color:o.color||e,...o}),r.push(a))}}),i),[]).sort((i,s)=>i.id.localeCompare(s.id))},uS=({defaultColor:e,rfId:t})=>{const n=zt(M.useCallback(eH({defaultColor:e,rfId:t}),[e,t]),(r,i)=>!(r.length!==i.length||r.some((s,o)=>s.id!==i[o].id)));return M.createElement("defs",null,n.map(r=>M.createElement(Qz,{id:r.id,key:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient})))};uS.displayName="MarkerDefinitions";var tH=M.memo(uS);const nH=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),dS=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:i,noPanClassName:s,onEdgeContextMenu:o,onEdgeMouseEnter:a,onEdgeMouseMove:l,onEdgeMouseLeave:c,onEdgeClick:d,onEdgeDoubleClick:g,onReconnect:b,onReconnectStart:x,onReconnectEnd:w,reconnectRadius:C,children:E,disableKeyboardA11y:k})=>{const{edgesFocusable:u,edgesUpdatable:v,elementsSelectable:f,width:p,height:y,connectionMode:h,nodeInternals:_,onError:I}=zt(nH,cn),A=Uz(t,_,n);return p?M.createElement(M.Fragment,null,A.map(({level:R,edges:D,isMaxLevel:B})=>M.createElement("svg",{key:R,style:{zIndex:R},width:p,height:y,className:"react-flow__edges react-flow__container"},B&&M.createElement(tH,{defaultColor:e,rfId:r}),M.createElement("g",null,D.map(N=>{const[F,j,H]=iy(_.get(N.source)),[L,G,$]=iy(_.get(N.target));if(!H||!$)return null;let Z=N.type||"default";i[Z]||(I==null||I("011",Pr.error011(Z)),Z="default");const U=i[Z]||i.default,ee=h===Xs.Strict?G.target:(G.target??[]).concat(G.source??[]),se=ry(j.source,N.sourceHandle),ie=ry(ee,N.targetHandle),fe=(se==null?void 0:se.position)||Be.Bottom,Se=(ie==null?void 0:ie.position)||Be.Top,ve=!!(N.focusable||u&&typeof N.focusable>"u"),xe=N.reconnectable||N.updatable,Y=typeof b<"u"&&(xe||v&&typeof xe>"u");if(!se||!ie)return I==null||I("008",Pr.error008(se,N)),null;const{sourceX:le,sourceY:re,targetX:ge,targetY:ne}=$z(F,se,fe,L,ie,Se);return M.createElement(U,{key:N.id,id:N.id,className:Sn([N.className,s]),type:Z,data:N.data,selected:!!N.selected,animated:!!N.animated,hidden:!!N.hidden,label:N.label,labelStyle:N.labelStyle,labelShowBg:N.labelShowBg,labelBgStyle:N.labelBgStyle,labelBgPadding:N.labelBgPadding,labelBgBorderRadius:N.labelBgBorderRadius,style:N.style,source:N.source,target:N.target,sourceHandleId:N.sourceHandle,targetHandleId:N.targetHandle,markerEnd:N.markerEnd,markerStart:N.markerStart,sourceX:le,sourceY:re,targetX:ge,targetY:ne,sourcePosition:fe,targetPosition:Se,elementsSelectable:f,onContextMenu:o,onMouseEnter:a,onMouseMove:l,onMouseLeave:c,onClick:d,onEdgeDoubleClick:g,onReconnect:b,onReconnectStart:x,onReconnectEnd:w,reconnectRadius:C,rfId:r,ariaLabel:N.ariaLabel,isFocusable:ve,isReconnectable:Y,pathOptions:"pathOptions"in N?N.pathOptions:void 0,interactionWidth:N.interactionWidth,disableKeyboardA11y:k})})))),E):null};dS.displayName="EdgeRenderer";var rH=M.memo(dS);const iH=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function sH({children:e}){const t=zt(iH);return M.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function oH(e){const t=_m(),n=M.useRef(!1);M.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const aH={[Be.Left]:Be.Right,[Be.Right]:Be.Left,[Be.Top]:Be.Bottom,[Be.Bottom]:Be.Top},fS=({nodeId:e,handleType:t,style:n,type:r=zi.Bezier,CustomComponent:i,connectionStatus:s})=>{var y,h,_;const{fromNode:o,handleId:a,toX:l,toY:c,connectionMode:d}=zt(M.useCallback(I=>({fromNode:I.nodeInternals.get(e),handleId:I.connectionHandleId,toX:(I.connectionPosition.x-I.transform[0])/I.transform[2],toY:(I.connectionPosition.y-I.transform[1])/I.transform[2],connectionMode:I.connectionMode}),[e]),cn),g=(y=o==null?void 0:o[qt])==null?void 0:y.handleBounds;let b=g==null?void 0:g[t];if(d===Xs.Loose&&(b=b||(g==null?void 0:g[t==="source"?"target":"source"])),!o||!b)return null;const x=a?b.find(I=>I.id===a):b[0],w=x?x.x+x.width/2:(o.width??0)/2,C=x?x.y+x.height/2:o.height??0,E=(((h=o.positionAbsolute)==null?void 0:h.x)??0)+w,k=(((_=o.positionAbsolute)==null?void 0:_.y)??0)+C,u=x==null?void 0:x.position,v=u?aH[u]:null;if(!u||!v)return null;if(i)return M.createElement(i,{connectionLineType:r,connectionLineStyle:n,fromNode:o,fromHandle:x,fromX:E,fromY:k,toX:l,toY:c,fromPosition:u,toPosition:v,connectionStatus:s});let f="";const p={sourceX:E,sourceY:k,sourcePosition:u,targetX:l,targetY:c,targetPosition:v};return r===zi.Bezier?[f]=DC(p):r===zi.Step?[f]=Vg({...p,borderRadius:0}):r===zi.SmoothStep?[f]=Vg(p):r===zi.SimpleBezier?[f]=OC(p):f=`M${E},${k} ${l},${c}`,M.createElement("path",{d:f,fill:"none",className:"react-flow__connection-path",style:n})};fS.displayName="ConnectionLine";const lH=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function cH({containerStyle:e,style:t,type:n,component:r}){const{nodeId:i,handleType:s,nodesConnectable:o,width:a,height:l,connectionStatus:c}=zt(lH,cn);return!(i&&s&&a&&o)?null:M.createElement("svg",{style:e,width:a,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},M.createElement("g",{className:Sn(["react-flow__connection",c])},M.createElement(fS,{nodeId:i,handleType:s,style:t,type:n,CustomComponent:r,connectionStatus:c})))}function oy(e,t){const n=M.useRef(null),r=un();return M.useMemo(()=>{var s,o;if(process.env.NODE_ENV==="development"){const a=Object.keys(e);cn(n.current,a)&&((o=(s=r.getState()).onError)==null||o.call(s,"002",Pr.error002())),n.current=a}return t(e)},[e])}const hS=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:i,onInit:s,onNodeClick:o,onEdgeClick:a,onNodeDoubleClick:l,onEdgeDoubleClick:c,onNodeMouseEnter:d,onNodeMouseMove:g,onNodeMouseLeave:b,onNodeContextMenu:x,onSelectionContextMenu:w,onSelectionStart:C,onSelectionEnd:E,connectionLineType:k,connectionLineStyle:u,connectionLineComponent:v,connectionLineContainerStyle:f,selectionKeyCode:p,selectionOnDrag:y,selectionMode:h,multiSelectionKeyCode:_,panActivationKeyCode:I,zoomActivationKeyCode:A,deleteKeyCode:R,onlyRenderVisibleElements:D,elementsSelectable:B,selectNodesOnDrag:N,defaultViewport:F,translateExtent:j,minZoom:H,maxZoom:L,preventScrolling:G,defaultMarkerColor:$,zoomOnScroll:Z,zoomOnPinch:U,panOnScroll:ee,panOnScrollSpeed:se,panOnScrollMode:ie,zoomOnDoubleClick:fe,panOnDrag:Se,onPaneClick:ve,onPaneMouseEnter:xe,onPaneMouseMove:Y,onPaneMouseLeave:le,onPaneScroll:re,onPaneContextMenu:ge,onEdgeContextMenu:ne,onEdgeMouseEnter:he,onEdgeMouseMove:be,onEdgeMouseLeave:ye,onReconnect:q,onReconnectStart:Ie,onReconnectEnd:Le,reconnectRadius:Me,noDragClassName:je,noWheelClassName:gt,noPanClassName:Ve,elevateEdgesOnSelect:_e,disableKeyboardA11y:Oe,nodeOrigin:nt,nodeExtent:pt,rfId:Qt})=>{const Dn=oy(e,Lz),vt=oy(t,Wz);return oH(s),M.createElement(Dz,{onPaneClick:ve,onPaneMouseEnter:xe,onPaneMouseMove:Y,onPaneMouseLeave:le,onPaneContextMenu:ge,onPaneScroll:re,deleteKeyCode:R,selectionKeyCode:p,selectionOnDrag:y,selectionMode:h,onSelectionStart:C,onSelectionEnd:E,multiSelectionKeyCode:_,panActivationKeyCode:I,zoomActivationKeyCode:A,elementsSelectable:B,onMove:n,onMoveStart:r,onMoveEnd:i,zoomOnScroll:Z,zoomOnPinch:U,zoomOnDoubleClick:fe,panOnScroll:ee,panOnScrollSpeed:se,panOnScrollMode:ie,panOnDrag:Se,defaultViewport:F,translateExtent:j,minZoom:H,maxZoom:L,onSelectionContextMenu:w,preventScrolling:G,noDragClassName:je,noWheelClassName:gt,noPanClassName:Ve,disableKeyboardA11y:Oe},M.createElement(sH,null,M.createElement(rH,{edgeTypes:vt,onEdgeClick:a,onEdgeDoubleClick:c,onlyRenderVisibleElements:D,onEdgeContextMenu:ne,onEdgeMouseEnter:he,onEdgeMouseMove:be,onEdgeMouseLeave:ye,onReconnect:q,onReconnectStart:Ie,onReconnectEnd:Le,reconnectRadius:Me,defaultMarkerColor:$,noPanClassName:Ve,elevateEdgesOnSelect:!!_e,disableKeyboardA11y:Oe,rfId:Qt},M.createElement(cH,{style:u,type:k,component:v,containerStyle:f})),M.createElement("div",{className:"react-flow__edgelabel-renderer"}),M.createElement(Vz,{nodeTypes:Dn,onNodeClick:o,onNodeDoubleClick:l,onNodeMouseEnter:d,onNodeMouseMove:g,onNodeMouseLeave:b,onNodeContextMenu:x,selectNodesOnDrag:N,onlyRenderVisibleElements:D,noPanClassName:Ve,noDragClassName:je,disableKeyboardA11y:Oe,nodeOrigin:nt,nodeExtent:pt,rfId:Qt})))};hS.displayName="GraphView";var uH=M.memo(hS);const $g=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Li={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:$g,nodeExtent:$g,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Xs.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:RC,isValidConnection:void 0},dH=()=>IL((e,t)=>({...Li,setNodes:n=>{const{nodeInternals:r,nodeOrigin:i,elevateNodesOnSelect:s}=t();e({nodeInternals:hh(n,r,i,s)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(i=>({...r,...i}))})},setDefaultNodesAndEdges:(n,r)=>{const i=typeof n<"u",s=typeof r<"u",o=i?hh(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:o,edges:s?r:[],hasDefaultNodes:i,hasDefaultEdges:s})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:i,fitViewOnInit:s,fitViewOnInitDone:o,fitViewOnInitOptions:a,domNode:l,nodeOrigin:c}=t(),d=l==null?void 0:l.querySelector(".react-flow__viewport");if(!d)return;const g=window.getComputedStyle(d),{m22:b}=new window.DOMMatrixReadOnly(g.transform),x=n.reduce((C,E)=>{const k=i.get(E.id);if(k!=null&&k.hidden)i.set(k.id,{...k,[qt]:{...k[qt],handleBounds:void 0}});else if(k){const u=hm(E.nodeElement);!!(u.width&&u.height&&(k.width!==u.width||k.height!==u.height||E.forceUpdate))&&(i.set(k.id,{...k,[qt]:{...k[qt],handleBounds:{source:Qx(".source",E.nodeElement,b,c),target:Qx(".target",E.nodeElement,b,c)}},...u}),C.push({id:k.id,type:"dimensions",dimensions:u}))}return C},[]);QC(i,c);const w=o||s&&!o&&eS(t,{initial:!0,...a});e({nodeInternals:new Map(i),fitViewOnInitDone:w}),(x==null?void 0:x.length)>0&&(r==null||r(x))},updateNodePositions:(n,r=!0,i=!1)=>{const{triggerNodeChanges:s}=t(),o=n.map(a=>{const l={id:a.id,type:"position",dragging:i};return r&&(l.positionAbsolute=a.positionAbsolute,l.position=a.position),l});s(o)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:i,hasDefaultNodes:s,nodeOrigin:o,getNodes:a,elevateNodesOnSelect:l}=t();if(n!=null&&n.length){if(s){const c=nS(n,a()),d=hh(c,i,o,l);e({nodeInternals:d})}r==null||r(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:i,getNodes:s}=t();let o,a=null;r?o=n.map(l=>Vi(l,!0)):(o=po(s(),n),a=po(i,[])),Hc({changedNodes:o,changedEdges:a,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:i,getNodes:s}=t();let o,a=null;r?o=n.map(l=>Vi(l,!0)):(o=po(i,n),a=po(s(),[])),Hc({changedNodes:a,changedEdges:o,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:i,getNodes:s}=t(),o=n||s(),a=r||i,l=o.map(d=>(d.selected=!1,Vi(d.id,!1))),c=a.map(d=>Vi(d.id,!1));Hc({changedNodes:l,changedEdges:c,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:i}=t();r==null||r.scaleExtent([n,i]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:i}=t();r==null||r.scaleExtent([i,n]),e({maxZoom:n})},setTranslateExtent:n=>{var r;(r=t().d3Zoom)==null||r.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t(),s=r().filter(a=>a.selected).map(a=>Vi(a.id,!1)),o=n.filter(a=>a.selected).map(a=>Vi(a.id,!1));Hc({changedNodes:s,changedEdges:o,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(i=>{i.positionAbsolute=gm(i.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:i,height:s,d3Zoom:o,d3Selection:a,translateExtent:l}=t();if(!o||!a||!n.x&&!n.y)return!1;const c=Si.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),d=[[0,0],[i,s]],g=o==null?void 0:o.constrain()(c,d,l);return o.transform(a,g),r[0]!==g.x||r[1]!==g.y||r[2]!==g.k},cancelConnection:()=>e({connectionNodeId:Li.connectionNodeId,connectionHandleId:Li.connectionHandleId,connectionHandleType:Li.connectionHandleType,connectionStatus:Li.connectionStatus,connectionStartHandle:Li.connectionStartHandle,connectionEndHandle:Li.connectionEndHandle}),reset:()=>e({...Li})}),Object.is),gS=({children:e})=>{const t=M.useRef(null);return t.current||(t.current=dH()),M.createElement(NV,{value:t.current},e)};gS.displayName="ReactFlowProvider";const pS=({children:e})=>M.useContext(Hd)?M.createElement(M.Fragment,null,e):M.createElement(gS,null,e);pS.displayName="ReactFlowWrapper";const fH={input:XC,default:Gg,output:ZC,group:ym},hH={default:cd,straight:bm,step:mm,smoothstep:Gd,simplebezier:pm},gH=[0,0],pH=[15,15],mH={x:0,y:0,zoom:1},bH={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},mS=M.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:s=fH,edgeTypes:o=hH,onNodeClick:a,onEdgeClick:l,onInit:c,onMove:d,onMoveStart:g,onMoveEnd:b,onConnect:x,onConnectStart:w,onConnectEnd:C,onClickConnectStart:E,onClickConnectEnd:k,onNodeMouseEnter:u,onNodeMouseMove:v,onNodeMouseLeave:f,onNodeContextMenu:p,onNodeDoubleClick:y,onNodeDragStart:h,onNodeDrag:_,onNodeDragStop:I,onNodesDelete:A,onEdgesDelete:R,onSelectionChange:D,onSelectionDragStart:B,onSelectionDrag:N,onSelectionDragStop:F,onSelectionContextMenu:j,onSelectionStart:H,onSelectionEnd:L,connectionMode:G=Xs.Strict,connectionLineType:$=zi.Bezier,connectionLineStyle:Z,connectionLineComponent:U,connectionLineContainerStyle:ee,deleteKeyCode:se="Backspace",selectionKeyCode:ie="Shift",selectionOnDrag:fe=!1,selectionMode:Se=yl.Full,panActivationKeyCode:ve="Space",multiSelectionKeyCode:xe=ld()?"Meta":"Control",zoomActivationKeyCode:Y=ld()?"Meta":"Control",snapToGrid:le=!1,snapGrid:re=pH,onlyRenderVisibleElements:ge=!1,selectNodesOnDrag:ne=!0,nodesDraggable:he,nodesConnectable:be,nodesFocusable:ye,nodeOrigin:q=gH,edgesFocusable:Ie,edgesUpdatable:Le,elementsSelectable:Me,defaultViewport:je=mH,minZoom:gt=.5,maxZoom:Ve=2,translateExtent:_e=$g,preventScrolling:Oe=!0,nodeExtent:nt,defaultMarkerColor:pt="#b1b1b7",zoomOnScroll:Qt=!0,zoomOnPinch:Dn=!0,panOnScroll:vt=!1,panOnScrollSpeed:ft=.5,panOnScrollMode:_t=Es.Free,zoomOnDoubleClick:Ot=!0,panOnDrag:dn=!0,onPaneClick:mn,onPaneMouseEnter:on,onPaneMouseMove:ir,onPaneMouseLeave:vr,onPaneScroll:xr,onPaneContextMenu:bn,children:zn,onEdgeContextMenu:Ee,onEdgeDoubleClick:De,onEdgeMouseEnter:Pe,onEdgeMouseMove:Qe,onEdgeMouseLeave:Ht,onEdgeUpdate:vn,onEdgeUpdateStart:Yt,onEdgeUpdateEnd:kt,onReconnect:Pt,onReconnectStart:Fn,onReconnectEnd:Ni,reconnectRadius:ri=10,edgeUpdaterRadius:ue=10,onNodesChange:He,onEdgesChange:Re,noDragClassName:mt="nodrag",noWheelClassName:Lt="nowheel",noPanClassName:en="nopan",fitView:Un=!1,fitViewOptions:Jn,connectOnClick:Ti=!0,attributionPosition:Ll,proOptions:Zo,defaultEdgeOptions:Uo,elevateNodesOnSelect:Js=!0,elevateEdgesOnSelect:jl=!1,disableKeyboardA11y:Bl=!1,autoPanOnConnect:os=!0,autoPanOnNodeDrag:Vl=!0,connectionRadius:zl=20,isValidConnection:Hl,onError:Gl,style:$d,id:qs,nodeDragThreshold:Xd,...Yd},Wl)=>{const Ks=qs||"1";return M.createElement("div",{...Yd,style:{...$d,...bH},ref:Wl,className:Sn(["react-flow",i]),"data-testid":"rf__wrapper",id:qs},M.createElement(pS,null,M.createElement(uH,{onInit:c,onMove:d,onMoveStart:g,onMoveEnd:b,onNodeClick:a,onEdgeClick:l,onNodeMouseEnter:u,onNodeMouseMove:v,onNodeMouseLeave:f,onNodeContextMenu:p,onNodeDoubleClick:y,nodeTypes:s,edgeTypes:o,connectionLineType:$,connectionLineStyle:Z,connectionLineComponent:U,connectionLineContainerStyle:ee,selectionKeyCode:ie,selectionOnDrag:fe,selectionMode:Se,deleteKeyCode:se,multiSelectionKeyCode:xe,panActivationKeyCode:ve,zoomActivationKeyCode:Y,onlyRenderVisibleElements:ge,selectNodesOnDrag:ne,defaultViewport:je,translateExtent:_e,minZoom:gt,maxZoom:Ve,preventScrolling:Oe,zoomOnScroll:Qt,zoomOnPinch:Dn,zoomOnDoubleClick:Ot,panOnScroll:vt,panOnScrollSpeed:ft,panOnScrollMode:_t,panOnDrag:dn,onPaneClick:mn,onPaneMouseEnter:on,onPaneMouseMove:ir,onPaneMouseLeave:vr,onPaneScroll:xr,onPaneContextMenu:bn,onSelectionContextMenu:j,onSelectionStart:H,onSelectionEnd:L,onEdgeContextMenu:Ee,onEdgeDoubleClick:De,onEdgeMouseEnter:Pe,onEdgeMouseMove:Qe,onEdgeMouseLeave:Ht,onReconnect:Pt??vn,onReconnectStart:Fn??Yt,onReconnectEnd:Ni??kt,reconnectRadius:ri??ue,defaultMarkerColor:pt,noDragClassName:mt,noWheelClassName:Lt,noPanClassName:en,elevateEdgesOnSelect:jl,rfId:Ks,disableKeyboardA11y:Bl,nodeOrigin:q,nodeExtent:nt}),M.createElement(az,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:x,onConnectStart:w,onConnectEnd:C,onClickConnectStart:E,onClickConnectEnd:k,nodesDraggable:he,nodesConnectable:be,nodesFocusable:ye,edgesFocusable:Ie,edgesUpdatable:Le,elementsSelectable:Me,elevateNodesOnSelect:Js,minZoom:gt,maxZoom:Ve,nodeExtent:nt,onNodesChange:He,onEdgesChange:Re,snapToGrid:le,snapGrid:re,connectionMode:G,translateExtent:_e,connectOnClick:Ti,defaultEdgeOptions:Uo,fitView:Un,fitViewOptions:Jn,onNodesDelete:A,onEdgesDelete:R,onNodeDragStart:h,onNodeDrag:_,onNodeDragStop:I,onSelectionDrag:N,onSelectionDragStart:B,onSelectionDragStop:F,noPanClassName:en,nodeOrigin:q,rfId:Ks,autoPanOnConnect:os,autoPanOnNodeDrag:Vl,onError:Gl,connectionRadius:zl,isValidConnection:Hl,nodeDragThreshold:Xd}),M.createElement(sz,{onSelectionChange:D}),zn,M.createElement(OV,{proOptions:Zo,position:Ll}),M.createElement(fz,{rfId:Ks,disableKeyboardA11y:Bl})))});mS.displayName="ReactFlow";function bS(e){return t=>{const[n,r]=M.useState(t),i=M.useCallback(s=>r(o=>e(s,o)),[]);return[n,r,i]}}const vH=bS(nS),xH=bS(Iz),vS=({id:e,x:t,y:n,width:r,height:i,style:s,color:o,strokeColor:a,strokeWidth:l,className:c,borderRadius:d,shapeRendering:g,onClick:b,selected:x})=>{const{background:w,backgroundColor:C}=s||{},E=o||w||C;return M.createElement("rect",{className:Sn(["react-flow__minimap-node",{selected:x},c]),x:t,y:n,rx:d,ry:d,width:r,height:i,fill:E,stroke:a,strokeWidth:l,shapeRendering:g,onClick:b?k=>b(k,e):void 0})};vS.displayName="MiniMapNode";var yH=M.memo(vS);const _H=e=>e.nodeOrigin,wH=e=>e.getNodes().filter(t=>!t.hidden&&t.width&&t.height),bh=e=>e instanceof Function?e:()=>e;function CH({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i=2,nodeComponent:s=yH,onClick:o}){const a=zt(wH,cn),l=zt(_H),c=bh(t),d=bh(e),g=bh(n),b=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return M.createElement(M.Fragment,null,a.map(x=>{const{x:w,y:C}=Os(x,l).positionAbsolute;return M.createElement(s,{key:x.id,x:w,y:C,width:x.width,height:x.height,style:x.style,selected:x.selected,className:g(x),color:c(x),borderRadius:r,strokeColor:d(x),strokeWidth:i,shapeRendering:b,onClick:o,id:x.id})}))}var SH=M.memo(CH);const EH=200,IH=150,kH=e=>{const t=e.getNodes(),n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:t.length>0?LV(Wd(t,e.nodeOrigin),n):n,rfId:e.rfId}},AH="react-flow__minimap-desc";function xS({style:e,className:t,nodeStrokeColor:n="transparent",nodeColor:r="#e2e2e2",nodeClassName:i="",nodeBorderRadius:s=5,nodeStrokeWidth:o=2,nodeComponent:a,maskColor:l="rgb(240, 240, 240, 0.6)",maskStrokeColor:c="none",maskStrokeWidth:d=1,position:g="bottom-right",onClick:b,onNodeClick:x,pannable:w=!1,zoomable:C=!1,ariaLabel:E="React Flow mini map",inversePan:k=!1,zoomStep:u=10,offsetScale:v=5}){const f=un(),p=M.useRef(null),{boundingRect:y,viewBB:h,rfId:_}=zt(kH,cn),I=(e==null?void 0:e.width)??EH,A=(e==null?void 0:e.height)??IH,R=y.width/I,D=y.height/A,B=Math.max(R,D),N=B*I,F=B*A,j=v*B,H=y.x-(N-y.width)/2-j,L=y.y-(F-y.height)/2-j,G=N+j*2,$=F+j*2,Z=`${AH}-${_}`,U=M.useRef(0);U.current=B,M.useEffect(()=>{if(p.current){const ie=dr(p.current),fe=xe=>{const{transform:Y,d3Selection:le,d3Zoom:re}=f.getState();if(xe.sourceEvent.type!=="wheel"||!le||!re)return;const ge=-xe.sourceEvent.deltaY*(xe.sourceEvent.deltaMode===1?.05:xe.sourceEvent.deltaMode?1:.002)*u,ne=Y[2]*Math.pow(2,ge);re.scaleTo(le,ne)},Se=xe=>{const{transform:Y,d3Selection:le,d3Zoom:re,translateExtent:ge,width:ne,height:he}=f.getState();if(xe.sourceEvent.type!=="mousemove"||!le||!re)return;const be=U.current*Math.max(1,Y[2])*(k?-1:1),ye={x:Y[0]-xe.sourceEvent.movementX*be,y:Y[1]-xe.sourceEvent.movementY*be},q=[[0,0],[ne,he]],Ie=Si.translate(ye.x,ye.y).scale(Y[2]),Le=re.constrain()(Ie,q,ge);re.transform(le,Le)},ve=CC().on("zoom",w?Se:null).on("zoom.wheel",C?fe:null);return ie.call(ve),()=>{ie.on("zoom",null)}}},[w,C,k,u]);const ee=b?ie=>{const fe=Sr(ie);b(ie,{x:fe[0],y:fe[1]})}:void 0,se=x?(ie,fe)=>{const Se=f.getState().nodeInternals.get(fe);x(ie,Se)}:void 0;return M.createElement(fm,{position:g,style:e,className:Sn(["react-flow__minimap",t]),"data-testid":"rf__minimap"},M.createElement("svg",{width:I,height:A,viewBox:`${H} ${L} ${G} ${$}`,role:"img","aria-labelledby":Z,ref:p,onClick:ee},E&&M.createElement("title",{id:Z},E),M.createElement(SH,{onClick:se,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:a}),M.createElement("path",{className:"react-flow__minimap-mask",d:`M${H-j},${L-j}h${G+j*2}v${$+j*2}h${-G-j*2}z
240
- M${h.x},${h.y}h${h.width}v${h.height}h${-h.width}z`,fill:l,fillRule:"evenodd",stroke:c,strokeWidth:d,pointerEvents:"none"})))}xS.displayName="MiniMap";var MH=M.memo(xS);function RH(){return M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},M.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function PH(){return M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},M.createElement("path",{d:"M0 0h32v4.2H0z"}))}function NH(){return M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},M.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function TH(){return M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},M.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function OH(){return M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},M.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const Pa=({children:e,className:t,...n})=>M.createElement("button",{type:"button",className:Sn(["react-flow__controls-button",t]),...n},e);Pa.displayName="ControlButton";const DH=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),yS=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:s,onZoomOut:o,onFitView:a,onInteractiveChange:l,className:c,children:d,position:g="bottom-left"})=>{const b=un(),[x,w]=M.useState(!1),{isInteractive:C,minZoomReached:E,maxZoomReached:k}=zt(DH,cn),{zoomIn:u,zoomOut:v,fitView:f}=_m();if(M.useEffect(()=>{w(!0)},[]),!x)return null;const p=()=>{u(),s==null||s()},y=()=>{v(),o==null||o()},h=()=>{f(i),a==null||a()},_=()=>{b.setState({nodesDraggable:!C,nodesConnectable:!C,elementsSelectable:!C}),l==null||l(!C)};return M.createElement(fm,{className:Sn(["react-flow__controls",c]),position:g,style:e,"data-testid":"rf__controls"},t&&M.createElement(M.Fragment,null,M.createElement(Pa,{onClick:p,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:k},M.createElement(RH,null)),M.createElement(Pa,{onClick:y,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:E},M.createElement(PH,null))),n&&M.createElement(Pa,{className:"react-flow__controls-fitview",onClick:h,title:"fit view","aria-label":"fit view"},M.createElement(NH,null)),r&&M.createElement(Pa,{className:"react-flow__controls-interactive",onClick:_,title:"toggle interactivity","aria-label":"toggle interactivity"},C?M.createElement(OH,null):M.createElement(TH,null)),d)};yS.displayName="Controls";var FH=M.memo(yS),Mr;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Mr||(Mr={}));function LH({color:e,dimensions:t,lineWidth:n}){return M.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function jH({color:e,radius:t}){return M.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const BH={[Mr.Dots]:"#91919a",[Mr.Lines]:"#eee",[Mr.Cross]:"#e2e2e2"},VH={[Mr.Dots]:1,[Mr.Lines]:1,[Mr.Cross]:6},zH=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function _S({id:e,variant:t=Mr.Dots,gap:n=20,size:r,lineWidth:i=1,offset:s=2,color:o,style:a,className:l}){const c=M.useRef(null),{transform:d,patternId:g}=zt(zH,cn),b=o||BH[t],x=r||VH[t],w=t===Mr.Dots,C=t===Mr.Cross,E=Array.isArray(n)?n:[n,n],k=[E[0]*d[2]||1,E[1]*d[2]||1],u=x*d[2],v=C?[u,u]:k,f=w?[u/s,u/s]:[v[0]/s,v[1]/s];return M.createElement("svg",{className:Sn(["react-flow__background",l]),style:{...a,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:c,"data-testid":"rf__background"},M.createElement("pattern",{id:g+e,x:d[0]%k[0],y:d[1]%k[1],width:k[0],height:k[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${f[0]},-${f[1]})`},w?M.createElement(jH,{color:b,radius:u/s}):M.createElement(LH,{dimensions:v,color:b,lineWidth:i})),M.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${g+e})`}))}_S.displayName="Background";var HH=M.memo(_S);function GH(e,t,n,r,i=!1){if(!e||typeof e!="object"||Object.keys(e).length===0)return null;let s=`${t}.${n}`;i&&(s=n);const o=e[s];return!o||typeof o!="object"||Object.keys(o).length===0?null:o[r]??null}function wS(e,t,n=!1,r=""){const{id:i,uuid:s,scan_id:o,object_name:a,source:l,created_at:c,updated_at:d,scan_object_metadata:g}=e;let[b,...x]=a.split(".");(r==null?void 0:r.length)>0&&(b=r,x=[a]);const w=x.join(".");let C=(r==null?void 0:r.length)>0;const E=Object.keys(t??{});n&&E.length>0&&E[0].includes(".")&&w.includes(".")&&E[0].split(".").length===2&&(C=!0);const k={id:i,uuid:s,scan_id:o,db_name:(r==null?void 0:r.length)>0?r:b,table_name:w,column_name:l,created_at:c,updated_at:d};let u=null,v=null;for(const p of g||[]){const{metadata_key:y,metadata_value:h}=p;switch(y){case"total_values":k.total_rows=h;break;case"empty_values":k.empty_rows=h;break;case"referenced_table":u=h;break;case"referenced_column":v=h;break;default:k[y]=h;break}}const f=GH(t,b,w,l,C);return f&&(k[Ld.attribute_mapping]=f),u&&v&&(k.foreign_key=`${u}.${v}`),{result:k,skipDbName:C}}function Xg(e){if(!Array.isArray(e))return{};const t=e.find(n=>n.metadata_key===Ld.attribute_mapping);if(!t||typeof t.metadata_value!="string")return{};try{const n=JSON.parse(t.metadata_value);if(typeof n=="object"&&n!==null)return n}catch(n){console.error("Failed to parse attribute_mapping metadata_value:",n)}return{}}function CS(e){if(!Array.isArray(e))return{};const t=e.find(n=>n.metadata_key===Ld.confidence_metadata);if(!t||typeof t.metadata_value!="string")return{};try{const n=JSON.parse(t.metadata_value);if(typeof n=="object"&&n!==null)return n}catch(n){console.error("Failed to parse confidence_metadata metadata_value:",n)}return{}}const SS=e=>e>=.8?"bg-green-600":e>=.4?"bg-yellow-600":"bg-red-600",Yg="Unassigned",WH=({handleAttributeClick:e,confidenceMetadata:t})=>({databaseSchema:M.memo(({data:n})=>O.jsxs("div",{className:"border-[3px] overflow-hidden rounded-lg min-w-[300px] shadow-md",style:{backgroundColor:"var(--bg-color)",borderColor:n.selected?"var(--brand-orange)":"transparent"},children:[O.jsx("div",{className:"text-white px-1 py-2 text-center",style:{backgroundColor:n.selected?"#10b981":"var(--brand-orange)"},children:O.jsx("strong",{children:n.label})}),O.jsxs("div",{className:"py-2",style:{backgroundColor:"var(--hover-bg-color)"},children:[O.jsxs("div",{className:"flex justify-between px-2 pb-1",children:[O.jsx("span",{className:"font-normal text-[11px]",style:{color:"var(--secondary-text-color)"},children:"Total Rows:"}),O.jsx("span",{className:"font-semibold text-[11px]",style:{color:"var(--text-color)"},children:n.metadata.total_rows})]}),O.jsxs("div",{className:"flex justify-between px-2",style:{backgroundColor:"var(--hover-bg-color)"},children:[O.jsx("span",{className:"font-normal text-[11px]",style:{color:"var(--secondary-text-color)"},children:"Empty Rows:"}),O.jsx("span",{className:"font-semibold text-[11px]",style:{color:"var(--text-color)"},children:n.metadata.empty_rows})]})]}),O.jsx("table",{className:"border-spacing-10 overflow-visible w-full",children:O.jsx("tbody",{children:n.schema.map(r=>{var i,s,o,a,l,c,d,g,b,x;return O.jsxs("tr",{className:"relative text-xs py-1 px-2 h-7",style:{borderBottom:"1px solid var(--border-color)"},children:[O.jsxs("td",{className:"pr-6 font-light pl-2",style:{verticalAlign:"middle",color:"var(--text-color)"},children:[O.jsx(gi,{type:"target",position:Be.Left,id:r.id}),O.jsxs("span",{className:"flex gap-1",children:[r.title,r.is_primary_key&&O.jsx(S4,{style:{color:"var(--text-color)"}}),r.is_unique_key&&O.jsx(_4,{style:{color:"var(--text-color)"}}),!!r.encryption_type&&O.jsx(E4,{style:{color:"var(--text-color)"}})]})]}),O.jsxs("td",{className:"text-right font-thin pr-2",style:{verticalAlign:"middle",color:"var(--secondary-text-color)"},children:[O.jsx("span",{children:r.type}),O.jsx(gi,{type:"source",position:Be.Right,id:r.id})]}),O.jsxs("td",{className:"text-right font-thin pr-2 pl-4",style:{verticalAlign:"middle"},children:[O.jsx("div",{className:"flex items-center justify-end gap-2",children:((s=(i=t[n.label])==null?void 0:i[r.title])==null?void 0:s.confidence_score)!==void 0?O.jsx(F_,{confidenceData:((o=t[n.label])==null?void 0:o[r.title])||{},position:"top",children:O.jsxs("span",{className:`text-xs rounded p-1 text-white ${SS(((l=(a=t[n.label])==null?void 0:a[r.title])==null?void 0:l.confidence_score)||0)}`,children:[(((d=(c=t[n.label])==null?void 0:c[r.title])==null?void 0:d.confidence_score)*100).toFixed(0),"%"]})}):O.jsx(jo,{text:"Confidence score not available",position:"top",children:O.jsx("span",{className:"text-xs px-2 py-1 rounded-full cursor-pointer",style:{backgroundColor:"var(--hover-bg-color)",color:"var(--secondary-text-color)"},children:Qw})})}),O.jsx(gi,{type:"source",position:Be.Right,id:r.id})]}),O.jsxs("td",{className:"text-right font-thin pr-2 pl-4",style:{verticalAlign:"middle"},children:[O.jsx("div",{className:"flex items-center justify-end gap-2",children:O.jsx("span",{className:"underline cursor-pointer font-bold",style:{color:!((g=r.attribute_mapping)!=null&&g.value)||((b=r.attribute_mapping)==null?void 0:b.value)==="undefined"?"var(--secondary-text-color)":"var(--brand-orange)"},onClick:()=>e(n,r),children:((x=r.attribute_mapping)==null?void 0:x.label)??Yg})}),O.jsx(gi,{type:"source",position:Be.Right,id:r.id})]})]},r.title)})})})]})),default:M.memo(({data:n})=>O.jsxs("div",{className:"p-2 rounded-lg text-center",style:{backgroundColor:"var(--hover-bg-color)",border:"1px solid var(--border-color)",color:"var(--text-color)"},children:[O.jsx("strong",{children:n.label}),O.jsx(gi,{type:"source",position:Be.Bottom,className:"-bottom-2",style:{backgroundColor:"var(--border-color)"}})]}))}),$H=e=>{const t=[],n=[],r={};e.forEach(x=>{const{db_name:w,table_name:C,column_name:E,column_type:k,is_primary_key:u,is_unique_key:v,foreign_key:f,total_rows:p,empty_rows:y,encryption_type:h,attribute_mapping:_}=x;r[w]||(r[w]={}),r[w][C]||(r[w][C]={columns:[],primaryKey:[],uniqueKey:[],foreignKeys:[],metadata:{total_rows:p,empty_rows:y}}),r[w][C].columns.push({id:`${w}-${C}-${E}`,title:E,type:k||"varchar",is_primary_key:u&&u!=="0",is_unique_key:v&&v!=="0",encryption_type:h,attribute_mapping:_}),u&&u!=="0"&&r[w][C].primaryKey.push(E),v&&v!=="0"&&r[w][C].uniqueKey.push(E),f&&r[w][C].foreignKeys.push({column:E,reference:f})});const a=[];Object.keys(r).forEach(x=>{Object.keys(r[x]).forEach(w=>{a.push({dbName:x,tableName:w,table:r[x][w]})})});const l=a.length,c=Math.ceil(Math.sqrt(l)),d=50,g=75,b=new Array(c).fill(0);return a.forEach(({dbName:x,tableName:w,table:C},E)=>{const k=50+C.columns.length*30,u=E%c,v=u*(500+d),f=b[u];b[u]=f+k+g,t.push({id:`table-${x}-${w}`,type:"databaseSchema",position:{x:v,y:f},data:{id:`table-${x}-${w}`,label:w,db_name:x,metadata:C.metadata,schema:C.columns,selected:!1}})}),a.forEach(({dbName:x,tableName:w,table:C})=>{const E=`table-${x}-${w}`;C.foreignKeys.forEach(k=>{if(k.reference&&k.reference.includes(".")){const[u,v]=k.reference.split("."),f=r[x][u],p=C.columns.find(h=>h.title===k.column),y=f==null?void 0:f.columns.find(h=>h.title===v);f&&y&&n.push({id:`fk-edge-${E}-${k.column}`,source:E,sourceHandle:p==null?void 0:p.id,target:`table-${x}-${u}`,targetHandle:y==null?void 0:y.id,markerEnd:{type:_l.ArrowClosed,width:15,height:15,color:"skyblue"},style:{strokeWidth:2,stroke:"lightblue"},type:"smoothstep",label:`FK: ${k.column} -> ${v}`})}})}),{nodes:t,edges:n}},XH=()=>{const[e,t]=M.useState(()=>typeof window<"u"&&document.documentElement.classList.contains("dark"));return M.useEffect(()=>{const n=new MutationObserver(()=>{t(document.documentElement.classList.contains("dark"))});return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()},[]),e},YH=({bulkActions:e,handleBulkAction:t,scanConnectorUuid:n,api:r,connectorMetadata:i,updateAttributeMappingForConnector:s,isScanRunning:o,isEditable:a,connectionType:l,loadScanReports:c,handleScanStatus:d,setActiveScreen:g,resetStates:b,activeConnector:x,activeReport:w})=>{var zn;const{showLoader:C,hideLoader:E}=Ed(),{showToast:k}=Ep(),[u,v]=M.useState(!1),[f,p]=M.useState([]),[y,h]=M.useState([]),[_,I]=M.useState({}),[A,R]=M.useState(""),[D,B]=M.useState([]),[N,F]=M.useState(!1),[j,H]=M.useState(!1),[L,G]=M.useState(!1),[$,Z]=M.useState(null),[U,ee]=M.useState(),[se,ie]=M.useState(!1),[fe,Se]=M.useState(!1),ve=M.useRef(null),xe=M.useRef(null),[Y,le]=M.useState({x:0,y:0,zoom:1}),re=M.useRef(!1),ge=XH(),{nodes:ne,edges:he}=M.useMemo(()=>$H(_[A]||[]),[A,_,y]),[be,ye,q]=vH(ne),[Ie,Le,Me]=xH(he),je=M.useRef({});M.useEffect(()=>{be.forEach(Ee=>{je.current[Ee.id]||(je.current[Ee.id]={x:Ee.position.x,y:Ee.position.y})})},[be]);const gt=Ee=>Ee.map(De=>({...De,position:je.current[De.id]||De.position})),Ve=Ee=>!!Ee&&typeof Ee.x=="number"&&typeof Ee.y=="number"&&typeof Ee.zoom=="number"&&Ee.zoom>.001&&Ee.zoom<=2,_e=M.useCallback((Ee,De)=>{le(De)},[]);M.useEffect(()=>{xe.current&&be.length>0&&Ve(Y)&&xe.current.setViewport(Y)},[A]),M.useEffect(()=>{xe.current&&be.length>0&&!re.current&&(xe.current.fitView({padding:.2,duration:800}),re.current=!0)},[be.length]),M.useEffect(()=>{const Ee=gt(ne.map(De=>D.find(Pe=>Pe.table===De.data.label&&Pe.db_name===A)?{...De,data:{...De.data,selected:!0}}:De));ye(Ee),Le(he)},[A,ne]);const Oe=M.useMemo(()=>Xg(i??[]),[i]),nt=M.useMemo(()=>CS(i??[]),[i]);M.useEffect(()=>{(!i||i&&typeof Oe=="object")&&(n?(async()=>{var De;v(!1),C();try{const{data:Pe}=await r.readIndexScanObjects(n),Qe=await r.readConfig({onlyActive:!0});p(Qe.data??[]);const Ht=(De=Pe==null?void 0:Pe.filter(Yt=>Yt.object_type==="table"))==null?void 0:De.map(Yt=>{const{result:kt,skipDbName:Pt}=wS(Yt,Oe,l==="mssql"||l==="salesforce",l==="salesforce"?"Default":"");return Pt&&!j&&H(!0),kt});h(Ht);const vn=Ht.reduce((Yt,kt)=>{const Pt=kt.db_name;return Yt[Pt]||(Yt[Pt]=[]),Yt[Pt].push(kt),Yt},{});vn&&Object.keys(vn).length>0&&(I(vn),(!A||!vn[A])&&R(Object.keys(vn)[0])),v(!0)}catch(Pe){console.error("Error fetching scan metadata:",Pe),v(!0)}finally{E()}})():v(!0))},[n,i,Oe,r]);const pt=(Ee,De)=>{const Pe=Ee.schema.filter(Qe=>Qe!==De);Z({...Ee,schema:[{...De},...Pe]}),ee(De.attribute_mapping),G(!0)},Qt=M.useMemo(()=>WH({handleAttributeClick:pt,confidenceMetadata:nt}),[nt]),Dn=()=>{if(U&&$){const Ee=`${$.db_name}.${$.label}`,De=$.schema[0].title,Qe={...Xg(i??[])};Qe[Ee]||(Qe[Ee]={}),Qe[Ee][De]=U,s(Qe,()=>{G(!1),ee(void 0),Z(null)})}},vt=async()=>{if(D.length===0){k(ln.WARNING,"Please select at least one table to scan.");return}if(await(o==null?void 0:o())){k(ln.WARNING,"A scan is already running. Please wait for it to complete.");return}ie(!0)},ft=async()=>{var Ee,De,Pe,Qe;try{Se(!0);let Ht=x==null?void 0:x.connector_id;if(!Ht&&((De=(Ee=w==null?void 0:w.scan)==null?void 0:Ee.connectors)!=null&&De.length)){const kt=w.scan.connectors.find(Pt=>Pt.uuid===n);kt!=null&&kt.connector_id&&(Ht=kt.connector_id)}if(!Ht&&n)try{const kt=await r.readScanReportDetails({arg:n});if((Qe=(Pe=kt==null?void 0:kt.scan)==null?void 0:Pe.connectors)!=null&&Qe.length){const Pt=kt.scan.connectors.find(Fn=>Fn.uuid===n);Pt!=null&&Pt.connector_id&&(Ht=Pt.connector_id)}}catch(kt){console.error("Error getting scan details for fallback:",kt)}if(!Ht){k(ln.WARNING,"Unable to find connector ID for this scan.");return}const vn=D.map(kt=>`${kt.db_name}.${kt.table}`),Yt=await r.startSelectedTableScan({connectionType:l||"",indexScan:!1,connectorIDs:Ht,selectedTables:vn});Yt&&!Yt.startsWith("Error:")?(k(ln.SUCCESS,"Selected table scan started successfully!"),ie(!1),B([]),g&&g("reports"),b&&b(),setTimeout(()=>{c&&c(),d&&d()},1e3)):k(ln.ERROR,`Failed to start scan: ${Yt}`)}catch(Ht){console.error("Error starting selected table scan:",Ht),k(ln.ERROR,"Failed to start selected table scan. Please try again.")}finally{Se(!1)}},_t=M.useCallback(Ee=>{Ee.forEach(De=>{De.type==="position"&&De.position&&De.id&&(je.current[De.id]=De.position)}),q(Ee)},[q]),Ot=D.reduce((Ee,De)=>(Ee[De.db_name]||(Ee[De.db_name]=[]),Ee[De.db_name].push(De.table),Ee),{}),dn=M.useMemo(()=>Object.keys(_).map(Ee=>{const De=new Set(_[Ee].map(Pe=>Pe.table_name));return{value:Ee,label:`${Ee} (${De.size})`}}),[_,y]),mn=M.useMemo(()=>f!=null&&f.length?f.map(Ee=>({value:Ee.uuid,label:Ee.name,countries:Ee.country_data||[]})):[],[f]),on=M.useMemo(()=>{var De;const Ee=new Set(((De=_[A])==null?void 0:De.map(Pe=>Pe.table_name))||[]);return`${A} (${Ee.size||0})`},[_,A]),ir=M.useMemo(()=>O.jsx("div",{className:"flex flex-col items-center gap-4",children:O.jsx("div",{className:"w-full py-2",children:O.jsx("div",{className:"max-h-60 overflow-y-auto rounded p-3",style:{border:"1px solid var(--border-color)",backgroundColor:"var(--hover-bg-color)"},children:Object.entries(Ot).map(([Ee,De])=>O.jsxs("div",{className:"mb-3",children:[O.jsxs("div",{className:"font-semibold mb-1",style:{color:"var(--text-color)"},children:["Database: ",Ee]}),O.jsx("ul",{className:"ml-4",children:De.map(Pe=>O.jsx("li",{className:"text-sm list-disc",style:{color:"var(--secondary-text-color)"},children:Pe},Pe))})]},Ee))})})}),[D,Ot]),vr=M.useMemo(()=>O.jsxs("div",{className:"flex flex-col items-center gap-4",children:[f.length===0&&O.jsx(D_,{}),O.jsx("div",{className:"w-full flex items-center gap-4",style:{color:"var(--text-color)"},children:fe?"Scanning Selected Tables...":"Are you sure you want to scan the following selected tables?"}),O.jsxs("div",{className:"w-full",children:[O.jsxs("div",{className:"text-sm font-medium mb-2",style:{color:"var(--text-color)"},children:["Selected Tables (",D.length,"):"]}),O.jsx("div",{className:"max-h-60 overflow-y-auto rounded p-3",style:{border:"1px solid var(--border-color)",backgroundColor:"var(--hover-bg-color)"},children:Object.entries(Ot).map(([Ee,De])=>O.jsxs("div",{className:"mb-3",children:[O.jsxs("div",{className:"font-semibold mb-1",style:{color:"var(--text-color)"},children:["Database: ",Ee]}),O.jsx("ul",{className:"ml-4",children:De.map(Pe=>O.jsx("li",{className:"text-sm list-disc",style:{color:"var(--secondary-text-color)"},children:Pe},Pe))})]},Ee))})]}),O.jsx("div",{className:"w-full text-sm",style:{color:"var(--secondary-text-color)"},children:O.jsx("p",{children:"This will initiate a scan for only the selected tables, which may be faster than scanning the entire database."})})]}),[D,Ot,fe,f.length]),xr=({data:Ee,isSelected:De})=>{let Pe=null;if(Ee.countries&&Ee.countries.length>0){const Ht=Ee.countries.slice(0,3),vn=Ee.countries.length>3,Yt=vn?Ee.countries.map(Pt=>Pt.country).join(", "):"",kt=Ht.map((Pt,Fn)=>O.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs border-[1px] flex-shrink-0",style:{borderColor:De?"white":"var(--brand-orange)",color:De?"white":"var(--brand-orange)"},children:[O.jsx(w4,{className:"mr-1 h-2.5 w-2.5 flex-shrink-0",style:{color:De?"white":"var(--brand-orange)"}}),O.jsx("span",{className:"truncate max-w-[80px]",children:Pt.country})]},`${Ee.value}-${Pt.id}-${Fn}`));vn?Pe=O.jsxs("div",{className:"flex items-center gap-1 ml-2 whitespace-nowrap",children:[kt,O.jsx(jo,{text:Yt,position:"top",children:O.jsxs("span",{className:"text-xs cursor-pointer flex-shrink-0 px-1",style:{color:De?"white":"var(--secondary-text-color)"},children:["+",Ee.countries.length-3," more"]})})]}):Pe=O.jsx("div",{className:"flex items-center gap-1 ml-2 whitespace-nowrap",children:kt})}return O.jsxs("div",{className:"flex items-center w-full min-w-0",children:[O.jsx("div",{className:`font-medium whitespace-nowrap mr-1 ${De?"text-white":""}`,children:Ee.label}),Pe]})},bn=M.useMemo(()=>{const Ee=U?mn.find(Pe=>Pe.value===U.value):null,De={value:(U==null?void 0:U.value)||"undefined",label:(Ee==null?void 0:Ee.label)??Yg,countries:(Ee==null?void 0:Ee.countries)||[]};return O.jsx(il,{className:"min-w-[400px] text-sm mt-2",menuPosition:"fixed",placeholder:"Select an attribute",options:[{label:Yg,value:"undefined"},...mn],handleChange:Pe=>{ee(Pe??void 0)},selectedOptions:[De],isMulti:!1,isClearable:!1,customOptionRenderer:Pe=>O.jsx(xr,{...Pe}),customStyles:{menu:Pe=>({...Pe,width:"auto",minWidth:"100%"}),option:(Pe,Qe)=>({...Pe,backgroundColor:Qe.isSelected?"var(--brand-orange)":Pe.backgroundColor,color:Qe.isSelected?"#fff":Pe.color,cursor:"pointer",whiteSpace:"normal",minHeight:"40px",":active":{backgroundColor:Qe.isSelected?"var(--brand-orange)":Pe.backgroundColor}})}})},[mn,U]);return!y||y.length===0||!u?O.jsx("div",{className:"flex items-center gap-2 p-6 mt-2 text-lg font-semibold rounded-lg shadow-sm",style:{backgroundColor:"var(--hover-bg-color)",border:"1px solid var(--border-color)",color:"var(--text-color)"},children:u&&O.jsxs(O.Fragment,{children:[O.jsx(gy,{className:"w-6 h-6",style:{color:"var(--secondary-text-color)"}}),O.jsx("span",{children:"No metadata available to display."})]})}):O.jsxs("div",{style:{width:"100%",height:"80vh",overflow:"hidden"},className:"dbschema-wrapper",children:[O.jsx("div",{children:O.jsxs("div",{className:"flex justify-between items-center",children:[O.jsxs("div",{className:"py-2 flex items-center",children:[O.jsx("h2",{className:"text-lg font-semibold mr-3",children:"Databases"}),O.jsx(il,{className:"w-52 text-sm",placeholder:"Select a database",options:dn,selectedOptions:[{value:A,label:on}],handleChange:Ee=>Ee&&R(Ee.value),isMulti:!1,isClearable:!1})]}),D.length>0&&O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("button",{onClick:()=>{F(!0)},className:"bg-brand-primary text-white px-4 py-2 rounded transition-colors duration-150 shadow-sm font-medium footer-button mr-2",style:{minWidth:140},children:"View Selections"}),O.jsx("button",{onClick:vt,className:"bg-brand-primary text-white px-4 py-2 rounded transition-colors duration-150 shadow-sm font-medium footer-button",style:{minWidth:170},disabled:!a,children:"Scan Selected Tables"})]})]})}),O.jsxs(mS,{ref:ve,onInit:Ee=>{xe.current=Ee,re.current||(Ee.fitView({padding:.2,duration:800,minZoom:.15}),Ee.setViewport({x:50,y:50,zoom:.15}),re.current=!0)},nodes:be,edges:Ie,onNodesChange:_t,onEdgesChange:Me,onMove:_e,nodeTypes:Qt,style:{maxHeight:D.length>0?"84%":"90%"},unselectable:"on",minZoom:.001,maxZoom:2,zoomOnDoubleClick:!1,defaultViewport:Y,fitViewOptions:{padding:.2},fitView:!(be.length>70),proOptions:{hideAttribution:!0},onNodeClick:(Ee,De)=>{De.type==="default"||!a||(D.find(Pe=>Pe.db_name===A&&Pe.table===De.data.label)?B(Pe=>Pe.filter(Qe=>!(Qe.db_name===A&&Qe.table===De.data.label))):B(Pe=>[...Pe,{db_name:A,table:De.data.label}]),ye(Pe=>Pe.map(Qe=>{var Ht;return Qe.id===De.id?{...Qe,data:{...Qe.data,selected:!((Ht=Qe.data)!=null&&Ht.selected)}}:Qe})))},children:[O.jsx(MH,{style:{background:"var(--bg-color)",border:"1px solid var(--border-color)",borderRadius:6},nodeColor:Ee=>"var(--brand-orange)",maskColor:ge?"rgba(44, 44, 44, 0.6)":"rgba(218, 224, 232, 0.6)"}),O.jsx(HH,{}),O.jsx(FH,{})]}),O.jsx(mo,{isOpen:N,title:"Selected Tables",customFooter:O.jsx("div",{className:"flex justify-end",children:O.jsx("button",{onClick:()=>{F(!1)},className:"bg-gray-100 text-gray-700 px-4 py-2 rounded hover:bg-gray-300 border border-gray-300 dark:bg-gray-800 dark:text-gray-100 dark:hover:bg-white dark:border-gray-400 footer-button",children:"Close"})}),onClose:()=>{F(!1)},body:ir,cancelButtonText:"Cancel"}),L&&$&&O.jsx(mo,{onClose:()=>G(!1),title:`${$.db_name}.${$.label}`,isOpen:L,isUuidSubtitle:!1,subtitle:O.jsxs("div",{className:"flex flex-col gap-1",children:[O.jsxs("div",{className:"flex gap-1 items-center",children:[O.jsx("b",{className:"text-black dark:text-gray-200",children:"Column Name:"}),O.jsx("span",{className:"dark:text-gray-300",children:$.schema[0].title})]}),O.jsxs("div",{className:"flex gap-1 items-center",children:[O.jsx("b",{className:"text-black dark:text-gray-200",children:"Current Mapping:"}),O.jsx("span",{className:"dark:text-gray-300",children:((zn=$.schema[0].attribute_mapping)==null?void 0:zn.label)??"-"})]})]}),body:bn,onConfirm:Dn}),O.jsx(mo,{isOpen:se,title:"Scan Selected Tables",onClose:()=>{fe||ie(!1)},onConfirm:()=>{fe||ft()},confirmButtonText:fe?"Scanning...":"Start Scan",disableConfirm:fe,body:vr,customWidth:"w-full max-w-lg",customFooter:O.jsxs("div",{className:"flex justify-between mt-4 space-x-2",children:[O.jsx("button",{onClick:()=>{fe||ie(!1)},disabled:fe,className:"bg-gray-100 text-gray-700 px-4 py-2 rounded hover:bg-gray-300 border border-gray-300 dark:bg-gray-800 dark:text-gray-100 dark:hover:bg-white dark:border-gray-400 footer-button",children:"Cancel"}),O.jsx("button",{onClick:()=>{fe||ft()},disabled:fe,className:"bg-brand-primary text-white px-4 py-2 rounded-md hover:bg-[#0b86e6] footer-button",children:fe?"Scanning...":"Start Scan"})]})})]})},ZH=({children:e,customProviders:t=[],onToastShow:n,themeConfig:r,defaultTheme:i})=>[...[({children:a})=>O.jsx(J2,{defaultTheme:i,config:r,children:a}),k_,({children:a})=>O.jsx(w_,{onToastShow:n,children:a})],...t].reduceRight((a,l)=>O.jsx(l,{children:a}),O.jsx(O.Fragment,{children:e})),UH=({callback:e,onScroll:t=!0,onResize:n=!0,onEscape:r=!0})=>{const i=M.useRef(null);return M.useEffect(()=>{const s=l=>{var c;i.current&&((c=l.target)!=null&&c.closest("[data-dropdown-ref]")||i.current.contains(l.target)||e())},o=()=>{e()},a=l=>{l.key==="Escape"&&r&&e()};return document.addEventListener("mousedown",s),t&&window.addEventListener("scroll",o),n&&window.addEventListener("resize",o),r&&document.addEventListener("keydown",a),()=>{document.removeEventListener("mousedown",s),t&&window.removeEventListener("scroll",o),n&&window.removeEventListener("resize",o),r&&document.removeEventListener("keydown",a)}},[e,t,n,r]),i};let Zg=null,ES=null,IS=null,ay=!1;function JH(){if(!ay){ay=!0;try{const e=require("react-redux"),t=require("@reduxjs/toolkit");Zg=e.useDispatch,ES=e.useSelector,IS=t.createSelector}catch{}}}const qH=e=>{const{metric:t,fetchFunction:n,cacheKey:r,...i}=e,[s,o]=M.useState({}),[a,l]=M.useState(!1),[c,d]=M.useState(null),g=M.useMemo(()=>r||`${t}_${JSON.stringify(i)}`,[r,t,JSON.stringify(i)]);return JH(),Zg&&ES&&IS&&!Zg()?ly({metric:t,fetchFunction:n,cacheKey:g,...i}):ly({metric:t,fetchFunction:n,cacheKey:g,...i})};function ly(e){const{fetchFunction:t,cacheKey:n}=e,[r,i]=M.useState({}),[s,o]=M.useState(!1),[a,l]=M.useState(null),c=r[n||""]||{data:null,loading:!1,error:null};M.useEffect(()=>{!c.data&&!c.loading&&t&&(o(!0),t(e).then(g=>{i(b=>({...b,[n||""]:{data:g,loading:!1,error:null}})),o(!1)}).catch(g=>{l(g),o(!1)}))},[n,t]);const d=()=>{i(g=>{const b={...g};return delete b[n||""],b})};return{data:c.data,loading:c.loading||s,error:c.error||a,clearCache:d}}const ud=(e,t)=>{if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(typeof e!="object")return e===t;if(Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!ud(e[i],t[i]))return!1;return!0}const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(t,i)||!ud(e[i],t[i]))return!1;return!0},KH=(e,t)=>{const n=["country_iso2","department_name"];for(const r of n)if(!ud(e[r],t[r]))return!1;return!0};exports.Alert=v4;exports.ApiMetric=py;exports.CHECKBOX_STYLE=Yh;exports.CSVImporter=w9;exports.CSVType=my;exports.ChartHeader=S9;exports.ComponentErrorBoundary=o9;exports.ConfidenceScoreTooltip=F_;exports.ConfirmationModal=e9;exports.ContextProvider=ZH;exports.CountryBox=h9;exports.CustomLegends=Ap;exports.DbSchemaBrowser=YH;exports.DonutChart=nD;exports.Dropdown=sA;exports.ErrorBoundary=P_;exports.ErrorBoundaryDefault=P_;exports.FILE_BROWSER_PAGE_SIZE=Pg;exports.FileBrowser=gL;exports.FileTypeIcon=f9;exports.GaugeChart=cD;exports.GeoChart=lL;exports.HorizontalBarChart=oD;exports.ImagePreviewModal=m9;exports.InstallUpdateLoader=p9;exports.Loader=x4;exports.LoaderProvider=k_;exports.METADATA_KEYS=Ld;exports.Modal=mo;exports.MultiSelect=il;exports.NOT_APPLICABLE=Qw;exports.NoActiveAttributeWarning=D_;exports.NoDataChart=C9;exports.NotificationType=by;exports.PAGE_INDEX=Qc;exports.PAGE_SIZE=Kc;exports.PAGINATION_INPUT_BUFFER_CH=Xh;exports.PieChart=iD;exports.ResourceUsageBadge=a9;exports.RiskScoreLabel=d9;exports.STATUS_BADGE_CLASSES=wr;exports.STATUS_CONFIGURATIONS=vh;exports.ScaleType=vs;exports.ShowMultiData=l9;exports.StatusBadge=W4;exports.StatusIcon=mu;exports.StorageChart=aD;exports.Table=Zh;exports.TableType=Za;exports.TaskResult=g9;exports.ThemeProvider=J2;exports.Timer=i9;exports.Toast=V4;exports.ToastProvider=w_;exports.ToastType=ln;exports.ToggleSwitch=$4;exports.ToolTip=jo;exports.VerticalBarChart=sD;exports.cn=er;exports.conditionalClass=M4;exports.convertScanObjectToDbSchema=wS;exports.convertScanObjectToFiledata=Rg;exports.deepEqual=ud;exports.extractAttributeMapping=Xg;exports.extractConfidenceMetadata=CS;exports.formatBytes=Zp;exports.formatDateTime=qw;exports.getConfidenceColor=SS;exports.getRiskLevel=kp;exports.getRiskScoreInfo=N_;exports.getStatusConfig=Jg;exports.globalFiltersEqual=KH;exports.isChildPath=Mg;exports.isFailedStatus=H4;exports.isHighRisk=u9;exports.isReduxAvailable=E_;exports.isRunningStatus=z4;exports.isSuccessStatus=G4;exports.switchClass=R4;exports.ucwords=Jw;exports.useApiCache=qH;exports.useAppDispatch=C_;exports.useAppSelector=S_;exports.useAssetPath=T_;exports.useBodyScrollLock=Ug;exports.useClickOutside=UH;exports.useDebounce=Kw;exports.useFileIconPath=O_;exports.useFilterCache=A_;exports.useLoader=Ed;exports.useTheme=Pd;exports.useToast=Ep;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-6n5-C3qh.js");exports.Alert=e.Alert;exports.ApiMetric=e.ApiMetric;exports.CHECKBOX_STYLE=e.CHECKBOX_STYLE;exports.CSVImporter=e.CSVImporter;exports.CSVType=e.CSVType;exports.ChartHeader=e.ChartHeader;exports.ComponentErrorBoundary=e.ComponentErrorBoundary;exports.ConfidenceScoreTooltip=e.ConfidenceScoreTooltip;exports.ConfirmationModal=e.ConfirmationModal;exports.ContextProvider=e.ContextProvider;exports.CountryBox=e.CountryBox;exports.CustomLegends=e.CustomLegends;exports.DbSchemaBrowser=e.DbSchemaBrowser;exports.DonutChart=e.DonutChart;exports.Dropdown=e.Dropdown;exports.ErrorBoundary=e.ErrorBoundary;exports.ErrorBoundaryDefault=e.ErrorBoundary;exports.FILE_BROWSER_PAGE_SIZE=e.FILE_BROWSER_PAGE_SIZE;exports.FileBrowser=e.FileBrowser;exports.FileTypeIcon=e.FileTypeIcon;exports.GaugeChart=e.GaugeChart;exports.GeoChart=e.GeoChart;exports.HorizontalBarChart=e.HorizontalBarChart;exports.ImagePreviewModal=e.ImagePreviewModal;exports.InstallUpdateLoader=e.InstallUpdateLoader;exports.Loader=e.Loader;exports.LoaderProvider=e.LoaderProvider;exports.METADATA_KEYS=e.METADATA_KEYS;exports.Modal=e.Modal;exports.MultiSelect=e.MultiSelect;exports.NOT_APPLICABLE=e.NOT_APPLICABLE;exports.NoActiveAttributeWarning=e.NoActiveAttributeWarning;exports.NoDataChart=e.NoDataChart;exports.NotificationType=e.NotificationType;exports.PAGE_INDEX=e.PAGE_INDEX;exports.PAGE_SIZE=e.PAGE_SIZE;exports.PAGINATION_INPUT_BUFFER_CH=e.PAGINATION_INPUT_BUFFER_CH;exports.PieChart=e.PieChart;exports.ResourceUsageBadge=e.ResourceUsageBadge;exports.RiskScoreLabel=e.RiskScoreLabel;exports.STATUS_BADGE_CLASSES=e.STATUS_BADGE_CLASSES;exports.STATUS_CONFIGURATIONS=e.STATUS_CONFIGURATIONS;exports.ScaleType=e.ScaleType;exports.ShowMultiData=e.ShowMultiData;exports.StatusBadge=e.StatusBadge;exports.StatusIcon=e.StatusIcon;exports.StorageChart=e.StorageChart;exports.Table=e.Table;exports.TableType=e.TableType;exports.TaskResult=e.TaskResult;exports.ThemeProvider=e.ThemeProvider;exports.Timer=e.Timer;exports.Toast=e.Toast;exports.ToastProvider=e.ToastProvider;exports.ToastType=e.ToastType;exports.ToggleSwitch=e.ToggleSwitch;exports.ToolTip=e.ToolTip;exports.VerticalBarChart=e.VerticalBarChart;exports.cn=e.cn;exports.conditionalClass=e.conditionalClass;exports.convertScanObjectToDbSchema=e.convertScanObjectToDbSchema;exports.convertScanObjectToFiledata=e.convertScanObjectToFiledata;exports.deepEqual=e.deepEqual;exports.extractAttributeMapping=e.extractAttributeMapping;exports.extractConfidenceMetadata=e.extractConfidenceMetadata;exports.formatBytes=e.formatBytes;exports.formatDateTime=e.formatDateTime;exports.getConfidenceColor=e.getConfidenceColor;exports.getRiskLevel=e.getRiskLevel;exports.getRiskScoreInfo=e.getRiskScoreInfo;exports.getStatusConfig=e.getStatusConfig;exports.globalFiltersEqual=e.globalFiltersEqual;exports.isChildPath=e.isChildPath;exports.isFailedStatus=e.isFailedStatus;exports.isHighRisk=e.isHighRisk;exports.isReduxAvailable=e.isReduxAvailable;exports.isRunningStatus=e.isRunningStatus;exports.isSuccessStatus=e.isSuccessStatus;exports.switchClass=e.switchClass;exports.ucwords=e.ucwords;exports.useApiCache=e.useApiCache;exports.useAppDispatch=e.useAppDispatch;exports.useAppSelector=e.useAppSelector;exports.useAssetPath=e.useAssetPath;exports.useBodyScrollLock=e.useBodyScrollLock;exports.useClickOutside=e.useClickOutside;exports.useDebounce=e.useDebounce;exports.useFileIconPath=e.useFileIconPath;exports.useFilterCache=e.useFilterCache;exports.useLoader=e.useLoader;exports.useTheme=e.useTheme;exports.useToast=e.useToast;