@percy.ai/heatmap 0.0.12 → 0.0.14
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/package.json +2 -2
- package/dist/heatmap.cjs +0 -3
- package/dist/heatmap.cjs.map +0 -1
- package/dist/heatmap.d.cts +0 -2
- package/dist/heatmap.d.ts +0 -2
- package/dist/heatmap.js +0 -3
- package/dist/heatmap.js.map +0 -1
- package/dist/styles.css +0 -13501
- package/dist/umd/heatmap.js +0 -68227
- package/dist/umd/heatmap.js.map +0 -1
- package/dist/umd/heatmap.min.js +0 -19
- package/dist/umd/heatmap.min.js.map +0 -1
package/dist/umd/heatmap.min.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).React,e.ReactDOM)}(this,(function(e,t){function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r=n(e),o=n(t),i=Object.defineProperty,a=(e,t,n)=>(((e,t,n)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const u={stringify:e=>`${e}`,parse:e=>parseFloat(e)},l={stringify:e=>e.name,parse:(e,t)=>{const n=typeof window<"u"&&e in window?window[e]:typeof global<"u"&&e in global?global[e]:void 0;return"function"==typeof n?n.bind(t):void 0}},s={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)},c={string:{stringify:e=>e,parse:e=>e},number:u,boolean:{stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},function:l,json:s},d=Symbol.for("r2wc.render"),f=Symbol.for("r2wc.connected"),h=Symbol.for("r2wc.context"),v=Symbol.for("r2wc.props");function p(e=""){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var m,b=t;function y(t,n,r){const o=m(t),i=e.createElement(n,r);return o.render(i),{root:o,ReactComponent:n}}function g({root:t,ReactComponent:n},r){const o=e.createElement(n,r);t.render(o)}function w({root:e}){e.unmount()}function x(){return x=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},x.apply(this,arguments)}function k(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function O(...t){return e.useCallback(k(...t),t)}m=b.createRoot,b.hydrateRoot;const j=e.forwardRef(((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(M);if(a){const t=a.props.children,r=i.map((n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n));return e.createElement(S,x({},o,{ref:n}),e.isValidElement(t)?e.cloneElement(t,void 0,r):null)}return e.createElement(S,x({},o,{ref:n}),r)}));j.displayName="Slot";const S=e.forwardRef(((t,n)=>{const{children:r,...o}=t;return e.isValidElement(r)?e.cloneElement(r,{...C(o,r.props),ref:n?k(n,r.ref):r.ref}):e.Children.count(r)>1?e.Children.only(null):null}));S.displayName="SlotClone";const N=({children:t})=>e.createElement(e.Fragment,null,t);function M(t){return e.isValidElement(t)&&t.type===N}function C(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function A(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=A(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function T(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=A(e))&&(r&&(r+=" "),r+=t);return r}const E=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,D=T,P=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return D(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map((e=>{const t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;const a=E(t)||E(r);return o[e][a]})),u=n&&Object.entries(n).reduce(((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e}),{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce(((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every((e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...u}[t]):{...i,...u}[t]===n}))?[...e,n,r]:e}),[]);return D(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)};function I(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=L(e))&&(r&&(r+=" "),r+=t);return r}function L(e){if("string"==typeof e)return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=L(e[r]))&&(n&&(n+=" "),n+=t);return n}var _="-";function F(e){var t=function(e){var t=e.theme,n=e.prefix,r={nextPart:new Map,validators:[]},o=function(e,t){if(!t)return e;return e.map((function(e){return[e[0],e[1].map((function(e){return"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((function(e){var n=e[0],r=e[1];return[t+n,r]}))):e}))]}))}(Object.entries(e.classGroups),n);return o.forEach((function(e){var n=e[0];z(e[1],r,n,t)})),r}(e),n=e.conflictingClassGroups,r=e.conflictingClassGroupModifiers,o=void 0===r?{}:r;return{getClassGroupId:function(e){var n=e.split(_);return""===n[0]&&1!==n.length&&n.shift(),R(n,t)||function(e){if(B.test(e)){var t=B.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}(e)},getConflictingClassGroupIds:function(e,t){var r=n[e]||[];return t&&o[e]?[].concat(r,o[e]):r}}}function R(e,t){if(0===e.length)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),o=r?R(e.slice(1),r):void 0;if(o)return o;if(0!==t.validators.length){var i=e.join(_);return t.validators.find((function(e){return(0,e.validator)(i)}))?.classGroupId}}var B=/^\[(.+)\]$/;function z(e,t,n,r){e.forEach((function(e){if("string"!=typeof e){if("function"==typeof e)return e.isThemeGetter?void z(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((function(e){var o=e[0];z(e[1],$(t,o),n,r)}))}else{(""===e?t:$(t,e)).classGroupId=n}}))}function $(e,t){var n=e;return t.split(_).forEach((function(e){n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n}function W(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function o(o,i){n.set(o,i),++t>e&&(t=0,r=n,n=new Map)}return{get:function(e){var t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set:function(e,t){n.has(e)?n.set(e,t):o(e,t)}}}var V="!";function U(e){var t=e.separator||":",n=1===t.length,r=t[0],o=t.length;return function(e){for(var i,a=[],u=0,l=0,s=0;s<e.length;s++){var c=e[s];if(0===u){if(c===r&&(n||e.slice(s,s+o)===t)){a.push(e.slice(l,s)),l=s+o;continue}if("/"===c){i=s;continue}}"["===c?u++:"]"===c&&u--}var d=0===a.length?e:e.substring(l),f=d.startsWith(V);return{modifiers:a,hasImportantModifier:f,baseClassName:f?d.substring(1):d,maybePostfixModifierPosition:i&&i>l?i-l:void 0}}}var H=/\s+/;function q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o,i,a=function(e){var n=t[0],l=t.slice(1).reduce((function(e,t){return t(e)}),n());return r=function(e){return{cache:W(e.cacheSize),splitModifiers:U(e),...F(e)}}(l),o=r.cache.get,i=r.cache.set,a=u,u(e)};function u(e){var t=o(e);if(t)return t;var n=function(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(H).map((function(e){var t=n(e),o=t.modifiers,i=t.hasImportantModifier,a=t.baseClassName,u=t.maybePostfixModifierPosition,l=r(u?a.substring(0,u):a),s=Boolean(u);if(!l){if(!u)return{isTailwindClass:!1,originalClassName:e};if(!(l=r(a)))return{isTailwindClass:!1,originalClassName:e};s=!1}var c=function(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach((function(e){"["===e[0]?(t.push.apply(t,n.sort().concat([e])),n=[]):n.push(e)})),t.push.apply(t,n.sort()),t}(o).join(":");return{isTailwindClass:!0,modifierId:i?c+V:c,classGroupId:l,originalClassName:e,hasPostfixModifier:s}})).reverse().filter((function(e){if(!e.isTailwindClass)return!0;var t=e.modifierId,n=e.classGroupId,r=e.hasPostfixModifier,a=t+n;return!i.has(a)&&(i.add(a),o(n,r).forEach((function(e){return i.add(t+e)})),!0)})).reverse().map((function(e){return e.originalClassName})).join(" ")}(e,r);return i(e,n),n}return function(){return a(I.apply(null,arguments))}}function K(e){var t=function(t){return t[e]||[]};return t.isThemeGetter=!0,t}var G=/^\[(?:([a-z-]+):)?(.+)\]$/i,Y=/^\d+\/\d+$/,X=new Set(["px","full","screen"]),Z=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Q=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,J=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function ee(e){return ae(e)||X.has(e)||Y.test(e)||te(e)}function te(e){return he(e,"length",ve)}function ne(e){return he(e,"size",pe)}function re(e){return he(e,"position",pe)}function oe(e){return he(e,"url",me)}function ie(e){return he(e,"number",ae)}function ae(e){return!Number.isNaN(Number(e))}function ue(e){return e.endsWith("%")&&ae(e.slice(0,-1))}function le(e){return be(e)||he(e,"number",be)}function se(e){return G.test(e)}function ce(){return!0}function de(e){return Z.test(e)}function fe(e){return he(e,"",ye)}function he(e,t,n){var r=G.exec(e);return!!r&&(r[1]?r[1]===t:n(r[2]))}function ve(e){return Q.test(e)}function pe(){return!1}function me(e){return e.startsWith("url(")}function be(e){return Number.isInteger(Number(e))}function ye(e){return J.test(e)}function ge(){var e=K("colors"),t=K("spacing"),n=K("blur"),r=K("brightness"),o=K("borderColor"),i=K("borderRadius"),a=K("borderSpacing"),u=K("borderWidth"),l=K("contrast"),s=K("grayscale"),c=K("hueRotate"),d=K("invert"),f=K("gap"),h=K("gradientColorStops"),v=K("gradientColorStopPositions"),p=K("inset"),m=K("margin"),b=K("opacity"),y=K("padding"),g=K("saturate"),w=K("scale"),x=K("sepia"),k=K("skew"),O=K("space"),j=K("translate"),S=function(){return["auto",se,t]},N=function(){return[se,t]},M=function(){return["",ee]},C=function(){return["auto",ae,se]},A=function(){return["","0",se]},T=function(){return[ae,ie]},E=function(){return[ae,se]};return{cacheSize:500,theme:{colors:[ce],spacing:[ee],blur:["none","",de,se],brightness:T(),borderColor:[e],borderRadius:["none","","full",de,se],borderSpacing:N(),borderWidth:M(),contrast:T(),grayscale:A(),hueRotate:E(),invert:A(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[ue,te],inset:S(),margin:S(),opacity:T(),padding:N(),saturate:T(),scale:T(),sepia:A(),skew:E(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",se]}],container:["container"],columns:[{columns:[de]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[se])}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",le]}],basis:[{basis:S()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",se]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",le]}],"grid-cols":[{"grid-cols":[ce]}],"col-start-end":[{col:["auto",{span:["full",le]},se]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[ce]}],"row-start-end":[{row:["auto",{span:[le]},se]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",se]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal"].concat(["start","end","center","between","around","evenly","stretch"])}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(["start","end","center","between","around","evenly","stretch"],["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(["start","end","center","between","around","evenly","stretch"],["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",se,t]}],"min-w":[{"min-w":["min","max","fit",se,ee]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[de]},de,se]}],h:[{h:[se,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",se,ee]}],"max-h":[{"max-h":[se,t,"min","max","fit"]}],"font-size":[{text:["base",de,te]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ie]}],"font-family":[{font:[ce]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",se]}],"line-clamp":[{"line-clamp":["none",ae,ie]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",se,ee]}],"list-image":[{"list-image":["none",se]}],"list-style-type":[{list:["none","disc","decimal",se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(["solid","dashed","dotted","double","none"],["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",ee]}],"underline-offset":[{"underline-offset":["auto",se,ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[re])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ne]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},oe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[].concat(["solid","dashed","dotted","double","none"],["hidden"])}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:[""].concat(["solid","dashed","dotted","double","none"])}],"outline-offset":[{"outline-offset":[se,ee]}],"outline-w":[{outline:[ee]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[ee]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",de,fe]}],"shadow-color":[{shadow:[ce]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",de,se]}],grayscale:[{grayscale:[s]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[s]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",se]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",se]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[le,se]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",se]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ee,ie]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}var we=Object.prototype.hasOwnProperty,xe=new Set(["string","number","boolean"]);function ke(e,t,n){if(we.call(e,t)&&!xe.has(typeof n)&&null!==n){if(Array.isArray(n)&&Array.isArray(e[t]))e[t]=e[t].concat(n);else if("object"==typeof n&&"object"==typeof e[t]){if(null===e[t])return void(e[t]=n);for(var r in n)ke(e[t],r,n[r])}}else e[t]=n}var Oe=q(ge);function je(t,n=[]){let r=[];const o=()=>{const n=r.map((t=>e.createContext(t)));return function(r){const o=(null==r?void 0:r[t])||n;return e.useMemo((()=>({[`__scope${t}`]:{...r,[t]:o}})),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;function u(n){const{scope:r,children:o,...u}=n,l=(null==r?void 0:r[t][a])||i,s=e.useMemo((()=>u),Object.values(u));return e.createElement(l.Provider,{value:s},o)}return r=[...r,o],u.displayName=n+"Provider",[u,function(r,u){const l=(null==u?void 0:u[t][a])||i,s=e.useContext(l);if(s)return s;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Se(o,...n)]}function Se(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}function Ne(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t})),e.useMemo((()=>(...e)=>{var t;return null===(t=n.current)||void 0===t?void 0:t.call(n,...e)}),[])}const Me=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{};function Ce(){return Ce=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},Ce.apply(this,arguments)}const Ae=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const r=e.forwardRef(((t,r)=>{const{asChild:o,...i}=t,a=o?j:n;return e.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.createElement(a,Ce({},i,{ref:r}))}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});function Te(e,n){e&&t.flushSync((()=>e.dispatchEvent(n)))}const Ee="Avatar",[De,Pe]=je(Ee),[Ie,Le]=De(Ee);const _e=e.forwardRef(((t,n)=>{const{N:r,...o}=t,[i,a]=e.useState("idle");return e.createElement(Ie,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:a},e.createElement(Ae.span,x({},o,{ref:n})))})),Fe=e.forwardRef(((t,n)=>{const{N:r,src:o,onLoadingStatusChange:i=(()=>{}),...a}=t,u=Le("AvatarImage",r),l=function(t){const[n,r]=e.useState("idle");return e.useEffect((()=>{if(!t)return void r("error");let e=!0;const n=new window.Image,o=t=>()=>{e&&r(t)};return r("loading"),n.onload=o("loaded"),n.onerror=o("error"),n.src=t,()=>{e=!1}}),[t]),n}(o),s=Ne((e=>{i(e),u.onImageLoadingStatusChange(e)}));return Me((()=>{"idle"!==l&&s(l)}),[l,s]),"loaded"===l?e.createElement(Ae.img,x({},a,{ref:n,src:o})):null})),Re=e.forwardRef(((t,n)=>{const{N:r,delayMs:o,...i}=t,a=Le("AvatarFallback",r),[u,l]=e.useState(void 0===o);return e.useEffect((()=>{if(void 0!==o){const e=window.setTimeout((()=>l(!0)),o);return()=>window.clearTimeout(e)}}),[o]),u&&"loaded"!==a.imageLoadingStatus?e.createElement(Ae.span,x({},i,{ref:n})):null})),Be="Progress",ze=100,[$e,We]=je(Be),[Ve,Ue]=$e(Be),He=e.forwardRef(((t,n)=>{const{C:r,value:o,max:i,getValueLabel:a=qe,...u}=t,l=Ye(i)?i:ze,s=Xe(o,l)?o:null,c=Ge(s)?a(s,l):void 0;return e.createElement(Ve,{scope:r,value:s,max:l},e.createElement(Ae.div,x({"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Ge(s)?s:void 0,"aria-valuetext":c,role:"progressbar","data-state":Ke(s,l),"data-value":null!=s?s:void 0,"data-max":l},u,{ref:n})))}));He.propTypes={max(e,t,n){const r=e[t],o=String(r);return r&&!Ye(r)?new Error(function(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`}(o,n)):null},value(e,t,n){const r=e[t],o=String(r),i=Ye(e.max)?e.max:ze;return null==r||Xe(r,i)?null:new Error(function(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)\n - \`null\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}(o,n))}};function qe(e,t){return`${Math.round(e/t*100)}%`}function Ke(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Ge(e){return"number"==typeof e}function Ye(e){return Ge(e)&&!isNaN(e)&&e>0}function Xe(e,t){return Ge(e)&&!isNaN(e)&&e<=t&&e>=0}const Ze=He,Qe=e.forwardRef(((t,n)=>{var r;const{C:o,...i}=t,a=Ue("ProgressIndicator",o);return e.createElement(Ae.div,x({"data-state":Ke(a.value,a.max),"data-value":null!==(r=a.value)&&void 0!==r?r:void 0,"data-max":a.max},i,{ref:n}))}));function Je(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const et="dismissableLayer.update",tt="dismissableLayer.pointerDownOutside",nt="dismissableLayer.focusOutside";let rt;const ot=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),it=e.forwardRef(((t,n)=>{var r;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:l,onDismiss:s,...c}=t,d=e.useContext(ot),[f,h]=e.useState(null),v=null!==(r=null==f?void 0:f.ownerDocument)&&void 0!==r?r:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,p]=e.useState({}),m=O(n,(e=>h(e))),b=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),g=b.indexOf(y),w=f?b.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,k=w>=g,j=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Ne(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){const a={originalEvent:e};function t(){ut(tt,r,a,{discrete:!0})}"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}o.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==l||l(e),e.defaultPrevented||null==s||s())}),v),S=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Ne(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){ut(nt,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(null==u||u(e),null==l||l(e),e.defaultPrevented||null==s||s())}),v);return function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Ne(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e),()=>n.removeEventListener("keydown",e)}),[r,n])}((e=>{w===d.layers.size-1&&(null==i||i(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),v),e.useEffect((()=>{if(f)return o&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(rt=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),at(),()=>{o&&1===d.layersWithOutsidePointerEventsDisabled.size&&(v.body.style.pointerEvents=rt)}}),[f,v,o,d]),e.useEffect((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),at())}),[f,d]),e.useEffect((()=>{const e=()=>p({});return document.addEventListener(et,e),()=>document.removeEventListener(et,e)}),[]),e.createElement(Ae.div,Ce({},c,{ref:m,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:Je(t.onFocusCapture,S.onFocusCapture),onBlurCapture:Je(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Je(t.onPointerDownCapture,j.onPointerDownCapture)}))}));function at(){const e=new CustomEvent(et);document.dispatchEvent(e)}function ut(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Te(o,i):o.dispatchEvent(i)}const lt=it,st=e.forwardRef(((t,n)=>{const r=e.useContext(ot),o=e.useRef(null),i=O(n,o);return e.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),e.createElement(Ae.div,Ce({},t,{ref:i}))})),ct=r["useId".toString()]||(()=>{});let dt=0;function ft(e){const[t,n]=r.useState(ct());return Me((()=>{e||n((e=>null!=e?e:String(dt++)))}),[e]),e||(t?`radix-${t}`:"")}const ht=["top","right","bottom","left"],vt=Math.min,pt=Math.max,mt=Math.round,bt=Math.floor,yt=e=>({x:e,y:e}),gt={left:"right",right:"left",bottom:"top",top:"bottom"},wt={start:"end",end:"start"};function xt(e,t,n){return pt(e,vt(t,n))}function kt(e,t){return"function"==typeof e?e(t):e}function Ot(e){return e.split("-")[0]}function jt(e){return e.split("-")[1]}function St(e){return"x"===e?"y":"x"}function Nt(e){return"y"===e?"height":"width"}function Mt(e){return["top","bottom"].includes(Ot(e))?"y":"x"}function Ct(e){return St(Mt(e))}function At(e){return e.replace(/start|end/g,(e=>wt[e]))}function Tt(e){return e.replace(/left|right|bottom|top/g,(e=>gt[e]))}function Et(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Pt(e,t,n){let{reference:r,floating:o}=e;const i=Mt(t),a=Ct(t),u=Nt(a),l=Ot(t),s="y"===i,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[u]/2-o[u]/2;let h;switch(l){case"top":h={x:c,y:r.y-o.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(jt(t)){case"start":h[a]-=f*(n&&s?-1:1);break;case"end":h[a]+=f*(n&&s?-1:1)}return h}async function It(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:u,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=kt(t,e),v=Et(h),p=u[f?"floating"===d?"reference":"floating":d],m=Dt(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(p)))||n?p:p.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(u.floating)),boundary:s,rootBoundary:c,strategy:l})),b="floating"===d?{...a.floating,x:r,y:o}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(u.floating)),g=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=Dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:y,strategy:l}):b);return{top:(m.top-w.top+v.top)/g.y,bottom:(w.bottom-m.bottom+v.bottom)/g.y,left:(m.left-w.left+v.left)/g.x,right:(w.right-m.right+v.right)/g.x}}const Lt=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:u}=t,{element:l,padding:s=0}=kt(e,t)||{};if(null==l)return{};const c=Et(s),d={x:n,y:r},f=Ct(o),h=Nt(f),v=await a.getDimensions(l),p="y"===f,m=p?"top":"left",b=p?"bottom":"right",y=p?"clientHeight":"clientWidth",g=i.reference[h]+i.reference[f]-d[f]-i.floating[h],w=d[f]-i.reference[f],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l));let k=x?x[y]:0;k&&await(null==a.isElement?void 0:a.isElement(x))||(k=u.floating[y]||i.floating[h]);const O=g/2-w/2,j=k/2-v[h]/2-1,S=vt(c[m],j),N=vt(c[b],j),M=S,C=k-v[h]-N,A=k/2-v[h]/2+O,T=xt(M,A,C),E=null!=jt(o)&&A!=T&&i.reference[h]/2-(A<M?S:N)-v[h]/2<0?A<M?M-A:C-A:0;return{[f]:d[f]-E,data:{[f]:T,centerOffset:A-T+E}}}}),_t=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:u,elements:l}=t,{mainAxis:s=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...p}=kt(e,t),m=Ot(r),b=Ot(a)===a,y=await(null==u.isRTL?void 0:u.isRTL(l.floating)),g=d||(b||!v?[Tt(a)]:function(e){const t=Tt(e);return[At(e),t,At(t)]}(a));d||"none"===h||g.push(...function(e,t,n,r){const o=jt(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(Ot(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(At)))),i}(a,v,h,y));const w=[a,...g],x=await It(t,p),k=[];let O=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&k.push(x[m]),c){const e=function(e,t,n){void 0===n&&(n=!1);const r=jt(e),o=Ct(e),i=Nt(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Tt(a)),[a,Tt(a)]}(r,i,y);k.push(x[e[0]],x[e[1]])}if(O=[...O,{placement:r,overflows:k}],!k.every((e=>e<=0))){var j,S;const e=((null==(j=o.flip)?void 0:j.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let n=null==(S=O.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!n)switch(f){case"bestFit":{var N;const e=null==(N=O.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function Ft(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Rt(e){return ht.some((t=>e[t]>=0))}const Bt=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=kt(e,t);switch(r){case"referenceHidden":{const e=Ft(await It(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Rt(e)}}}case"escaped":{const e=Ft(await It(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Rt(e)}}}default:return{}}}}};const zt=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Ot(n),u=jt(n),l="y"===Mt(n),s=["left","top"].includes(a)?-1:1,c=i&&l?-1:1,d=kt(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:v}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return u&&"number"==typeof v&&(h="end"===u?-1*v:v),l?{x:h*c,y:f*s}:{x:f*s,y:h*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},$t=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=kt(e,t),s={x:n,y:r},c=await It(t,l),d=Mt(Ot(o)),f=St(d);let h=s[f],v=s[d];if(i){const e="y"===f?"bottom":"right";h=xt(h+c["y"===f?"top":"left"],h,h-c[e])}if(a){const e="y"===d?"bottom":"right";v=xt(v+c["y"===d?"top":"left"],v,v-c[e])}const p=u.fn({...t,[f]:h,[d]:v});return{...p,data:{x:p.x-n,y:p.y-r}}}}},Wt=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:u=0,mainAxis:l=!0,crossAxis:s=!0}=kt(e,t),c={x:n,y:r},d=Mt(o),f=St(d);let h=c[f],v=c[d];const p=kt(u,t),m="number"==typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+m.mainAxis,n=i.reference[f]+i.reference[e]-m.mainAxis;h<t?h=t:h>n&&(h=n)}if(s){var b,y;const e="y"===f?"width":"height",t=["top","left"].includes(Ot(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(b=a.offset)?void 0:b[d])||0)+(t?0:m.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?m.crossAxis:0);v<n?v=n:v>r&&(v=r)}return{[f]:h,[d]:v}}}},Vt=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=(()=>{}),...u}=kt(e,t),l=await It(t,u),s=Ot(n),c=jt(n),d="y"===Mt(n),{width:f,height:h}=r.floating;let v,p;"top"===s||"bottom"===s?(v=s,p=c===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(p=s,v="end"===c?"top":"bottom");const m=h-l[v],b=f-l[p],y=!t.middlewareData.shift;let g=m,w=b;if(d){const e=f-l.left-l.right;w=c||y?vt(b,e):e}else{const e=h-l.top-l.bottom;g=c||y?vt(m,e):e}if(y&&!c){const e=pt(l.left,0),t=pt(l.right,0),n=pt(l.top,0),r=pt(l.bottom,0);d?w=f-2*(0!==e||0!==t?e+t:pt(l.left,l.right)):g=h-2*(0!==n||0!==r?n+r:pt(l.top,l.bottom))}await a({...t,availableWidth:w,availableHeight:g});const x=await o.getDimensions(i.floating);return f!==x.width||h!==x.height?{reset:{rects:!0}}:{}}}};function Ut(e){return Kt(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function qt(e){var t;return null==(t=(Kt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Kt(e){return e instanceof Node||e instanceof Ht(e).Node}function Gt(e){return e instanceof Element||e instanceof Ht(e).Element}function Yt(e){return e instanceof HTMLElement||e instanceof Ht(e).HTMLElement}function Xt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot)}function Zt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Qt(e){return["table","td","th"].includes(Ut(e))}function Jt(e){const t=en(),n=nn(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function en(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function tn(e){return["html","body","#document"].includes(Ut(e))}function nn(e){return Ht(e).getComputedStyle(e)}function rn(e){return Gt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function on(e){if("html"===Ut(e))return e;const t=e.assignedSlot||e.parentNode||Xt(e)&&e.host||qt(e);return Xt(t)?t.host:t}function an(e){const t=on(e);return tn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yt(t)&&Zt(t)?t:an(t)}function un(e,t){var n;void 0===t&&(t=[]);const r=an(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Ht(r);return o?t.concat(i,i.visualViewport||[],Zt(r)?r:[]):t.concat(r,un(r))}function ln(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Yt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,u=mt(n)!==i||mt(r)!==a;return u&&(n=i,r=a),{width:n,height:r,$:u}}function sn(e){return Gt(e)?e:e.contextElement}function cn(e){const t=sn(e);if(!Yt(t))return yt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ln(t);let a=(i?mt(n.width):n.width)/r,u=(i?mt(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),u&&Number.isFinite(u)||(u=1),{x:a,y:u}}const dn=yt(0);function fn(e){const t=Ht(e);return en()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:dn}function hn(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=sn(e);let a=yt(1);t&&(r?Gt(r)&&(a=cn(r)):a=cn(e));const u=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ht(e))&&t}(i,n,r)?fn(i):yt(0);let l=(o.left+u.x)/a.x,s=(o.top+u.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=Ht(i),t=r&&Gt(r)?Ht(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=cn(n),t=n.getBoundingClientRect(),r=nn(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,s*=e.y,c*=e.x,d*=e.y,l+=o,s+=i,n=Ht(n).frameElement}}return Dt({width:c,height:d,x:l,y:s})}function vn(e){return hn(qt(e)).left+rn(e).scrollLeft}function pn(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ht(e),r=qt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,u=0,l=0;if(o){i=o.width,a=o.height;const e=en();(!e||e&&"fixed"===t)&&(u=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:u,y:l}}(e,n);else if("document"===t)r=function(e){const t=qt(e),n=rn(e),r=e.ownerDocument.body,o=pt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=pt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+vn(e);const u=-n.scrollTop;return"rtl"===nn(r).direction&&(a+=pt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:u}}(qt(e));else if(Gt(t))r=function(e,t){const n=hn(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Yt(e)?cn(e):yt(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=fn(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return Dt(r)}function mn(e,t){const n=on(e);return!(n===t||!Gt(n)||tn(n))&&("fixed"===nn(n).position||mn(n,t))}function bn(e,t,n){const r=Yt(t),o=qt(t),i="fixed"===n,a=hn(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const l=yt(0);if(r||!r&&!i)if(("body"!==Ut(t)||Zt(o))&&(u=rn(t)),r){const e=hn(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=vn(o));return{x:a.left+u.scrollLeft-l.x,y:a.top+u.scrollTop-l.y,width:a.width,height:a.height}}function yn(e,t){return Yt(e)&&"fixed"!==nn(e).position?t?t(e):e.offsetParent:null}function gn(e,t){const n=Ht(e);if(!Yt(e))return n;let r=yn(e,t);for(;r&&Qt(r)&&"static"===nn(r).position;)r=yn(r,t);return r&&("html"===Ut(r)||"body"===Ut(r)&&"static"===nn(r).position&&!Jt(r))?n:r||function(e){let t=on(e);for(;Yt(t)&&!tn(t);){if(Jt(t))return t;t=on(t)}return null}(e)||n}const wn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Yt(n),i=qt(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},u=yt(1);const l=yt(0);if((o||!o&&"fixed"!==r)&&(("body"!==Ut(n)||Zt(i))&&(a=rn(n)),Yt(n))){const e=hn(n);u=cn(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-a.scrollLeft*u.x+l.x,y:t.y*u.y-a.scrollTop*u.y+l.y}},getDocumentElement:qt,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=un(e).filter((e=>Gt(e)&&"body"!==Ut(e))),o=null;const i="fixed"===nn(e).position;let a=i?on(e):e;for(;Gt(a)&&!tn(a);){const t=nn(a),n=Jt(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Zt(a)&&!n&&mn(e,a))?r=r.filter((e=>e!==a)):o=t,a=on(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],u=i.reduce(((e,n)=>{const r=pn(t,n,o);return e.top=pt(r.top,e.top),e.right=vt(r.right,e.right),e.bottom=vt(r.bottom,e.bottom),e.left=pt(r.left,e.left),e}),pn(t,a,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:gn,getElementRects:async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||gn,i=this.getDimensions;return{reference:bn(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return ln(e)},getScale:cn,isElement:Gt,isRTL:function(e){return"rtl"===nn(e).direction}};function xn(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,s=sn(e),c=o||i?[...s?un(s):[],...un(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=s&&u?function(e,t){let n,r=null;const o=qt(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function a(u,l){void 0===u&&(u=!1),void 0===l&&(l=1),i();const{left:s,top:c,width:d,height:f}=e.getBoundingClientRect();if(u||t(),!d||!f)return;const h={rootMargin:-bt(c)+"px "+-bt(o.clientWidth-(s+d))+"px "+-bt(o.clientHeight-(c+f))+"px "+-bt(s)+"px",threshold:pt(0,vt(1,l))||1};let v=!0;function p(e){const t=e[0].intersectionRatio;if(t!==l){if(!v)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}v=!1}try{r=new IntersectionObserver(p,{...h,root:o.ownerDocument})}catch(Dae){r=new IntersectionObserver(p,h)}r.observe(e)}(!0),i}(s,n):null;let f,h=-1,v=null;a&&(v=new ResizeObserver((e=>{let[r]=e;r&&r.target===s&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{v&&v.observe(t)}))),n()})),s&&!l&&v.observe(s),v.observe(t));let p=l?hn(e):null;return l&&function t(){const r=hn(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n();p=r,f=requestAnimationFrame(t)}(),n(),()=>{c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),v&&v.disconnect(),v=null,l&&cancelAnimationFrame(f)}}const kn=(e,t,n)=>{const r=new Map,o={platform:wn,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,u=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let s=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=Pt(s,r,l),f=r,h={},v=0;for(let p=0;p<u.length;p++){const{name:n,fn:i}=u[p],{x:m,y:b,data:y,reset:g}=await i({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:s,platform:a,elements:{reference:e,floating:t}});c=null!=m?m:c,d=null!=b?b:d,h={...h,[n]:{...h[n],...y}},g&&v<=50&&(v++,"object"==typeof g&&(g.placement&&(f=g.placement),g.rects&&(s=!0===g.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):g.rects),({x:c,y:d}=Pt(s,f,l))),p=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})},On=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Lt({element:n.current,padding:r}).fn(t):{}:n?Lt({element:n,padding:r}).fn(t):{};var o}});var jn="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Sn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Sn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Sn(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Nn(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mn(e,t){const n=Nn(e);return Math.round(t*n)/n}function Cn(e){const t=r.useRef(e);return jn((()=>{t.current=e})),t}function An(t){const[n,r]=e.useState(void 0);return Me((()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;r({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)}),[t]),n}const Tn="Popper",[En,Dn]=je(Tn),[Pn,In]=En(Tn),Ln=e.forwardRef(((t,n)=>{const{F:r,virtualRef:o,...i}=t,a=In("PopperAnchor",r),u=e.useRef(null),l=O(n,u);return e.useEffect((()=>{a.onAnchorChange((null==o?void 0:o.current)||u.current)})),o?null:e.createElement(Ae.div,Ce({},i,{ref:l}))})),_n="PopperContent",[Fn,Rn]=En(_n),Bn=e.forwardRef(((t,n)=>{var i,a,u,l,s,c,d,f;const{F:h,side:v="bottom",sideOffset:p=0,align:m="center",alignOffset:b=0,arrowPadding:y=0,collisionBoundary:g=[],collisionPadding:w=0,sticky:x="partial",hideWhenDetached:k=!1,avoidCollisions:j=!0,onPlaced:S,...N}=t,M=In(_n,h),[C,A]=e.useState(null),T=O(n,(e=>A(e))),[E,D]=e.useState(null),P=An(E),I=null!==(i=null==P?void 0:P.width)&&void 0!==i?i:0,L=null!==(a=null==P?void 0:P.height)&&void 0!==a?a:0,_=v+("center"!==m?"-"+m:""),F="number"==typeof w?w:{top:0,right:0,bottom:0,left:0,...w},R=Array.isArray(g)?g:[g],B=R.length>0,z={padding:F,boundary:R.filter(zn),altBoundary:B},{refs:$,floatingStyles:W,placement:V,isPositioned:U,middlewareData:H}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:a,elements:{reference:u,floating:l}={},transform:s=!0,whileElementsMounted:c,open:d}=e,[f,h]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,p]=r.useState(i);Sn(v,i)||p(i);const[m,b]=r.useState(null),[y,g]=r.useState(null),w=r.useCallback((e=>{e!=j.current&&(j.current=e,b(e))}),[b]),x=r.useCallback((e=>{e!==S.current&&(S.current=e,g(e))}),[g]),k=u||m,O=l||y,j=r.useRef(null),S=r.useRef(null),N=r.useRef(f),M=Cn(c),C=Cn(a),A=r.useCallback((()=>{if(!j.current||!S.current)return;const e={placement:t,strategy:n,middleware:v};C.current&&(e.platform=C.current),kn(j.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};T.current&&!Sn(N.current,t)&&(N.current=t,o.flushSync((()=>{h(t)})))}))}),[v,t,n,C]);jn((()=>{!1===d&&N.current.isPositioned&&(N.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[d]);const T=r.useRef(!1);jn((()=>(T.current=!0,()=>{T.current=!1})),[]),jn((()=>{if(k&&(j.current=k),O&&(S.current=O),k&&O){if(M.current)return M.current(k,O,A);A()}}),[k,O,A,M]);const E=r.useMemo((()=>({reference:j,floating:S,setReference:w,setFloating:x})),[w,x]),D=r.useMemo((()=>({reference:k,floating:O})),[k,O]),P=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=Mn(D.floating,f.x),r=Mn(D.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Nn(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,D.floating,f.x,f.y]);return r.useMemo((()=>({...f,update:A,refs:E,elements:D,floatingStyles:P})),[f,A,E,D,P])}({strategy:"fixed",placement:_,whileElementsMounted:xn,elements:{reference:M.anchor},middleware:[zt({mainAxis:p+L,alignmentAxis:b}),j&&$t({mainAxis:!0,crossAxis:!1,limiter:"partial"===x?Wt():void 0,...z}),j&&_t({...z}),Vt({...z,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),E&&On({element:E,padding:y}),$n({arrowWidth:I,arrowHeight:L}),k&&Bt({strategy:"referenceHidden"})]}),[q,K]=Wn(V),G=Ne(S);Me((()=>{U&&(null==G||G())}),[U,G]);const Y=null===(u=H.arrow)||void 0===u?void 0:u.x,X=null===(l=H.arrow)||void 0===l?void 0:l.y,Z=0!==(null===(s=H.arrow)||void 0===s?void 0:s.centerOffset),[Q,J]=e.useState();return Me((()=>{C&&J(window.getComputedStyle(C).zIndex)}),[C]),e.createElement("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:U?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[null===(c=H.transformOrigin)||void 0===c?void 0:c.x,null===(d=H.transformOrigin)||void 0===d?void 0:d.y].join(" ")},dir:t.dir},e.createElement(Fn,{scope:h,placedSide:q,onArrowChange:D,arrowX:Y,arrowY:X,shouldHideArrow:Z},e.createElement(Ae.div,Ce({"data-side":q,"data-align":K},N,{ref:T,style:{...N.style,animation:U?void 0:"none",opacity:null!==(f=H.hide)&&void 0!==f&&f.referenceHidden?0:void 0}}))))}));function zn(e){return null!==e}const $n=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:u,rects:l,middlewareData:s}=t,c=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[h,v]=Wn(u),p={start:"0%",center:"50%",end:"100%"}[v],m=(null!==(r=null===(o=s.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,b=(null!==(i=null===(a=s.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let y="",g="";return"bottom"===h?(y=c?p:`${m}px`,g=-f+"px"):"top"===h?(y=c?p:`${m}px`,g=`${l.floating.height+f}px`):"right"===h?(y=-f+"px",g=c?p:`${b}px`):"left"===h&&(y=`${l.floating.width+f}px`,g=c?p:`${b}px`),{data:{x:y,y:g}}}});function Wn(e){const[t,n="center"]=e.split("-");return[t,n]}const Vn=Ln,Un=Bn,Hn=e.forwardRef(((n,r)=>{var o;const{container:i=(null===globalThis||void 0===globalThis||null===(o=globalThis.document)||void 0===o?void 0:o.body),...a}=n;return i?t.createPortal(e.createElement(Ae.div,Ce({},a,{ref:r})),i):null}));const qn=n=>{const{present:r,children:o}=n,i=function(n){const[r,o]=e.useState(),i=e.useRef({}),a=e.useRef(n),u=e.useRef("none"),l=n?"mounted":"unmounted",[s,c]=function(t,n){return e.useReducer(((e,t)=>{const r=n[e][t];return null!=r?r:e}),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=Kn(i.current);u.current="mounted"===s?e:"none"}),[s]),Me((()=>{const e=i.current,t=a.current;if(t!==n){const r=u.current,o=Kn(e);if(n)c("MOUNT");else if("none"===o||"none"===(null==e?void 0:e.display))c("UNMOUNT");else{c(t&&r!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=n}}),[n,c]),Me((()=>{if(r){const e=e=>{const n=Kn(i.current).includes(e.animationName);e.target===r&&n&&t.flushSync((()=>c("ANIMATION_END")))},n=e=>{e.target===r&&(u.current=Kn(i.current))};return r.addEventListener("animationstart",n),r.addEventListener("animationcancel",e),r.addEventListener("animationend",e),()=>{r.removeEventListener("animationstart",n),r.removeEventListener("animationcancel",e),r.removeEventListener("animationend",e)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(i.current=getComputedStyle(e)),o(e)}),[])}}(r),a="function"==typeof o?o({present:i.isPresent}):e.Children.only(o),u=O(i.ref,a.ref);return"function"==typeof o||i.isPresent?e.cloneElement(a,{ref:u}):null};function Kn(e){return(null==e?void 0:e.animationName)||"none"}function Gn({prop:t,defaultProp:n,onChange:r=(()=>{})}){const[o,i]=function({defaultProp:t,onChange:n}){const r=e.useState(t),[o]=r,i=e.useRef(o),a=Ne(n);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==t,u=a?t:o,l=Ne(r);return[u,e.useCallback((e=>{if(a){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else i(e)}),[a,t,i,l])]}qn.displayName="Presence";const Yn=e.forwardRef(((t,n)=>e.createElement(Ae.span,Ce({},t,{ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}})))),Xn=Yn,[Zn,Qn]=je("Tooltip",[Dn]),Jn=Dn(),er="tooltip.open",[tr,nr]=Zn("TooltipProvider"),rr="Tooltip",[or,ir]=Zn(rr),[ar,ur]=Zn("TooltipPortal",{forceMount:void 0}),lr="TooltipContent",sr=e.forwardRef(((t,n)=>{const r=ur(lr,t.J),{forceMount:o=r.forceMount,side:i="top",...a}=t,u=ir(lr,t.J);return e.createElement(qn,{present:o||u.open},u.disableHoverableContent?e.createElement(hr,x({side:i},a,{ref:n})):e.createElement(cr,x({side:i},a,{ref:n})))})),cr=e.forwardRef(((t,n)=>{const r=ir(lr,t.J),o=nr(lr,t.J),i=e.useRef(null),a=O(n,i),[u,l]=e.useState(null),{trigger:s,onClose:c}=r,d=i.current,{onPointerInTransitChange:f}=o,h=e.useCallback((()=>{l(null),f(!1)}),[f]),v=e.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect()),i=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,o),a=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...i,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);l(a),f(!0)}),[f]);return e.useEffect((()=>()=>h()),[h]),e.useEffect((()=>{if(s&&d){const e=e=>v(e,d),t=e=>v(e,s);return s.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{s.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[s,d,v,h]),e.useEffect((()=>{if(u){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==s?void 0:s.contains(t))||(null==d?void 0:d.contains(t)),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const e=t[i].x,u=t[i].y,l=t[a].x,s=t[a].y;u>r!=s>r&&n<(l-e)*(r-u)/(s-u)+e&&(o=!o)}return o}(n,u);r?h():o&&(h(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[s,d,u,c,h]),e.createElement(hr,x({},t,{ref:a}))})),[dr,fr]=Zn(rr,{isInside:!1}),hr=e.forwardRef(((t,n)=>{const{J:r,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:u,...l}=t,s=ir(lr,r),c=Jn(r),{onClose:d}=s;return e.useEffect((()=>(document.addEventListener(er,d),()=>document.removeEventListener(er,d))),[d]),e.useEffect((()=>{if(s.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(s.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[s.trigger,d]),e.createElement(it,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:d},e.createElement(Un,x({"data-state":s.stateAttribute},c,l,{ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),e.createElement(N,null,o),e.createElement(dr,{scope:r,isInside:!0},e.createElement(Xn,{id:s.contentId,role:"tooltip"},i||o))))}));const vr=sr,pr="focusScope.autoFocusOnMount",mr="focusScope.autoFocusOnUnmount",br={bubbles:!1,cancelable:!0},yr=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...u}=t,[l,s]=e.useState(null),c=Ne(i),d=Ne(a),f=e.useRef(null),h=O(n,(e=>s(e))),v=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){function e(e){if(v.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:kr(f.current,{select:!0})}function t(e){if(v.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||kr(f.current,{select:!0}))}function n(e){const t=document.activeElement;for(const n of e)n.removedNodes.length>0&&(null!=l&&l.contains(t)||kr(l))}document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,l,v.paused]),e.useEffect((()=>{if(l){Or.add(v);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(pr,br);l.addEventListener(pr,c),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(kr(r,{select:t}),document.activeElement!==n)return}((e=gr(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&kr(l))}return()=>{l.removeEventListener(pr,c),setTimeout((()=>{const e=new CustomEvent(mr,br);l.addEventListener(mr,d),l.dispatchEvent(e),e.defaultPrevented||kr(null!=t?t:document.body,{select:!0}),l.removeEventListener(mr,d),Or.remove(v)}),0)}}var e}),[l,c,d,v]);const p=e.useCallback((e=>{if(!r&&!o)return;if(v.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=gr(e),n=wr(t,e),r=wr(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&kr(i,{select:!0})):(e.preventDefault(),r&&kr(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,v.paused]);return e.createElement(Ae.div,Ce({tabIndex:-1},u,{ref:h,onKeyDown:p}))}));function gr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wr(e,t){for(const n of e)if(!xr(n,{upTo:t}))return n}function xr(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function kr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const Or=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=jr(e,t),e.unshift(t)},remove(t){var n;e=jr(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function jr(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}let Sr=0;function Nr(){e.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:Mr()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:Mr()),Sr++,()=>{1===Sr&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Sr--}}),[])}function Mr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Cr=function(){return Cr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Cr.apply(this,arguments)};function Ar(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function Tr(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var Er="right-scroll-bar-position",Dr="width-before-scroll-bar";function Pr(t,n){return r=n||null,o=function(e){return t.forEach((function(t){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(t,e)}))},i=e.useState((function(){return{value:r,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0],i.callback=o,i.facade;var r,o,i}function Ir(e){return e}function Lr(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Ir);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return o}(null);return t.options=Cr({async:!0,ssr:!1},e),t}var _r=function(e){var t=e.sideCar,n=Ar(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return r.createElement(o,Cr({},n))};function Fr(e,t){return e.useMedium(t),_r}_r.isSideCarExport=!0;var Rr=Lr(),Br=function(){},zr=r.forwardRef((function(e,t){var n=r.useRef(null),o=r.useState({onScrollCapture:Br,onWheelCapture:Br,onTouchMoveCapture:Br}),i=o[0],a=o[1],u=e.forwardProps,l=e.children,s=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,v=e.noIsolation,p=e.inert,m=e.allowPinchZoom,b=e.as,y=void 0===b?"div":b,g=Ar(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=h,x=Pr([n,t]),k=Cr(Cr({},g),i);return r.createElement(r.Fragment,null,d&&r.createElement(w,{sideCar:Rr,removeScrollBar:c,shards:f,noIsolation:v,inert:p,setCallbacks:a,allowPinchZoom:!!m,lockRef:n}),u?r.cloneElement(r.Children.only(l),Cr(Cr({},k),{ref:x})):r.createElement(y,Cr({},k,{className:s,ref:x}),l))}));zr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},zr.classNames={fullWidth:Dr,zeroRight:Er};function $r(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var Wr=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=$r())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Vr=function(){var e,t=(e=Wr(),function(t,n){r.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Ur={left:0,top:0,right:0,gap:0},Hr=function(e){return parseInt(e||"",10)||0},qr=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Ur;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Hr(n),Hr(r),Hr(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Kr=Vr(),Gr=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,u=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(u,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(u,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Er," {\n right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(Dr," {\n margin-right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(Er," .").concat(Er," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Dr," .").concat(Dr," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(u,"px;\n }\n")},Yr=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o,a=r.useMemo((function(){return qr(i)}),[i]);return r.createElement(Kr,{styles:Gr(a,!t,i,n?"":"!important")})},Xr=!1;if("undefined"!=typeof window)try{var Zr=Object.defineProperty({},"passive",{get:function(){return Xr=!0,!0}});window.addEventListener("test",Zr,Zr),window.removeEventListener("test",Zr,Zr)}catch(jde){Xr=!1}var Qr=!!Xr&&{passive:!1},Jr=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},eo=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),to(e,n)){var r=no(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},to=function(e,t){return"v"===e?function(e){return Jr(e,"overflowY")}(t):function(e){return Jr(e,"overflowX")}(t)},no=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},ro=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oo=function(e){return[e.deltaX,e.deltaY]},io=function(e){return e&&"current"in e?e.current:e},ao=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},uo=0,lo=[];var so=Fr(Rr,(function(e){var t=r.useRef([]),n=r.useRef([0,0]),o=r.useRef(),i=r.useState(uo++)[0],a=r.useState((function(){return Vr()}))[0],u=r.useRef(e);r.useEffect((function(){u.current=e}),[e]),r.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=Tr([e.lockRef.current],(e.shards||[]).map(io),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=r.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!u.current.allowPinchZoom;var r,i=ro(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],s="deltaY"in e?e.deltaY:a[1]-i[1],c=e.target,d=Math.abs(l)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=eo(d,c);if(!f)return!0;if(f?r=d:(r="v"===d?"h":"v",f=eo(d,c)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||s)&&(o.current=r),!r)return!0;var h=o.current||r;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,u=n.target,l=t.contains(u),s=!1,c=a>0,d=0,f=0;do{var h=no(e,u),v=h[0],p=h[1]-h[2]-i*v;(v||p)&&to(e,u)&&(d+=p,f+=v),u=u.parentNode}while(!l&&u!==document.body||l&&(t.contains(u)||t===u));return(c&&(o&&0===d||!o&&a>d)||!c&&(o&&0===f||!o&&-a>f))&&(s=!0),s}(h,t,e,"h"===h?l:s,!0)}),[]),s=r.useCallback((function(e){var n=e;if(lo.length&&lo[lo.length-1]===a){var r="deltaY"in n?oo(n):ro(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(u.current.shards||[]).map(io).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?l(n,i[0]):!u.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),c=r.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=r.useCallback((function(e){n.current=ro(e),o.current=void 0}),[]),f=r.useCallback((function(t){c(t.type,oo(t),t.target,l(t,e.lockRef.current))}),[]),h=r.useCallback((function(t){c(t.type,ro(t),t.target,l(t,e.lockRef.current))}),[]);r.useEffect((function(){return lo.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",s,Qr),document.addEventListener("touchmove",s,Qr),document.addEventListener("touchstart",d,Qr),function(){lo=lo.filter((function(e){return e!==a})),document.removeEventListener("wheel",s,Qr),document.removeEventListener("touchmove",s,Qr),document.removeEventListener("touchstart",d,Qr)}}),[]);var v=e.removeScrollBar,p=e.inert;return r.createElement(r.Fragment,null,p?r.createElement(a,{styles:ao(i)}):null,v?r.createElement(Yr,{gapMode:"margin"}):null)})),co=r.forwardRef((function(e,t){return r.createElement(zr,Cr({},e,{ref:t,sideCar:so}))}));co.classNames=zr.classNames;var fo=co,ho=new WeakMap,vo=new WeakMap,po={},mo=0,bo=function(e){return e&&(e.host||bo(e.parentNode))},yo=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=bo(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);po[n]||(po[n]=new WeakMap);var i=po[n],a=[],u=new Set,l=new Set(o),s=function(e){e&&!u.has(e)&&(u.add(e),s(e.parentNode))};o.forEach(s);var c=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(u.has(e))c(e);else{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(ho.get(e)||0)+1,s=(i.get(e)||0)+1;ho.set(e,l),i.set(e,s),a.push(e),1===l&&o&&vo.set(e,!0),1===s&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}}))};return c(t),u.clear(),mo++,function(){a.forEach((function(e){var t=ho.get(e)-1,o=i.get(e)-1;ho.set(e,t),i.set(e,o),t||(vo.has(e)||e.removeAttribute(r),vo.delete(e)),o||e.removeAttribute(n)})),--mo||(ho=new WeakMap,ho=new WeakMap,vo=new WeakMap,po={})}},go=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),yo(r,o,n,"aria-hidden")):function(){return null}};const wo="Dialog",[xo,ko]=je(wo),[Oo,jo]=xo(wo),So=e.forwardRef(((t,n)=>{const{ee:r,...o}=t,i=jo("DialogTrigger",r),a=O(n,i.triggerRef);return e.createElement(Ae.button,x({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":$o(i.open)},o,{ref:a,onClick:Je(t.onClick,i.onOpenToggle)}))})),No="DialogPortal",[Mo,Co]=xo(No,{forceMount:void 0}),Ao="DialogOverlay",To=e.forwardRef(((t,n)=>{const r=Co(Ao,t.ee),{forceMount:o=r.forceMount,...i}=t,a=jo(Ao,t.ee);return a.modal?e.createElement(qn,{present:o||a.open},e.createElement(Eo,x({},i,{ref:n}))):null})),Eo=e.forwardRef(((t,n)=>{const{ee:r,...o}=t,i=jo(Ao,r);return e.createElement(fo,{as:j,allowPinchZoom:!0,shards:[i.contentRef]},e.createElement(Ae.div,x({"data-state":$o(i.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))})),Do="DialogContent",Po=e.forwardRef(((t,n)=>{const r=Co(Do,t.ee),{forceMount:o=r.forceMount,...i}=t,a=jo(Do,t.ee);return e.createElement(qn,{present:o||a.open},a.modal?e.createElement(Io,x({},i,{ref:n})):e.createElement(Lo,x({},i,{ref:n})))})),Io=e.forwardRef(((t,n)=>{const r=jo(Do,t.ee),o=e.useRef(null),i=O(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return go(e)}),[]),e.createElement(_o,x({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Je(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Je(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Je(t.onFocusOutside,(e=>e.preventDefault()))}))})),Lo=e.forwardRef(((t,n)=>{const r=jo(Do,t.ee),o=e.useRef(!1),i=e.useRef(!1);return e.createElement(_o,x({},t,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{var n,a;(null===(n=t.onCloseAutoFocus)||void 0===n||n.call(t,e),e.defaultPrevented)||(o.current||null===(a=r.triggerRef.current)||void 0===a||a.focus(),e.preventDefault());o.current=!1,i.current=!1},onInteractOutside:e=>{var n,a;null===(n=t.onInteractOutside)||void 0===n||n.call(t,e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const u=e.target;(null===(a=r.triggerRef.current)||void 0===a?void 0:a.contains(u))&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}}))})),_o=e.forwardRef(((t,n)=>{const{ee:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...u}=t,l=jo(Do,r),s=O(n,e.useRef(null));return Nr(),e.createElement(e.Fragment,null,e.createElement(yr,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a},e.createElement(it,x({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":$o(l.open)},u,{ref:s,onDismiss:()=>l.onOpenChange(!1)}))),!1)})),Fo="DialogTitle",Ro=e.forwardRef(((t,n)=>{const{ee:r,...o}=t,i=jo(Fo,r);return e.createElement(Ae.h2,x({id:i.titleId},o,{ref:n}))})),Bo=e.forwardRef(((t,n)=>{const{ee:r,...o}=t,i=jo("DialogDescription",r);return e.createElement(Ae.p,x({id:i.descriptionId},o,{ref:n}))})),zo=e.forwardRef(((t,n)=>{const{ee:r,...o}=t,i=jo("DialogClose",r);return e.createElement(Ae.button,x({type:"button"},o,{ref:n,onClick:Je(t.onClick,(()=>i.onOpenChange(!1)))}))}));function $o(e){return e?"open":"closed"}const[Wo,Vo]=function(t,n){const r=e.createContext(n);function o(t){const{children:n,...o}=t,i=e.useMemo((()=>o),Object.values(o));return e.createElement(r.Provider,{value:i},n)}return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(r);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}("DialogTitleWarning",{contentName:Do,titleName:Fo,docsSlug:"dialog"}),Uo=t=>{const{ee:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:u=!0}=t,l=e.useRef(null),s=e.useRef(null),[c=!1,d]=Gn({prop:o,defaultProp:i,onChange:a});return e.createElement(Oo,{scope:n,triggerRef:l,contentRef:s,contentId:ft(),titleId:ft(),descriptionId:ft(),open:c,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:u},r)},Ho=So,qo=t=>{const{ee:n,forceMount:r,children:o,container:i}=t,a=jo(No,n);return e.createElement(Mo,{scope:n,forceMount:r},e.Children.map(o,(t=>e.createElement(qn,{present:r||a.open},e.createElement(Hn,{asChild:!0,container:i},t)))))},Ko=To,Go=Po,Yo=Ro,Xo=Bo,Zo=zo;function Qo(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var Jo=["color"],ei=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Qo(t,Jo);return e.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),e.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),ti=["color"],ni=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Qo(t,ti);return e.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),e.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),ri=["color"],oi=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Qo(t,ri);return e.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),e.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),ii=["color"],ai=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Qo(t,ii);return e.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),e.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),ui=["color"],li=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Qo(t,ui);return e.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),e.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),si=["color"],ci=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Qo(t,si);return e.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),e.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:o}))})),di=["color"],fi=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Qo(t,di);return e.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),e.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}));function hi(t){const n=t+"CollectionProvider",[r,o]=je(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),u=t+"CollectionSlot",l=t+"CollectionItemSlot",s="data-radix-collection-item";return[{Provider:t=>{const{scope:n,children:r}=t,o=e.useRef(null),a=e.useRef(new Map).current;return e.createElement(i,{scope:n,itemMap:a,collectionRef:o},r)},Slot:e.forwardRef(((t,n)=>{const{scope:r,children:o}=t,i=O(n,a(u,r).collectionRef);return e.createElement(j,{ref:i},o)})),ItemSlot:e.forwardRef(((t,n)=>{const{scope:r,children:o,...i}=t,u=e.useRef(null),c=O(n,u),d=a(l,r);return e.useEffect((()=>(d.itemMap.set(u,{ref:u,...i}),()=>{d.itemMap.delete(u)}))),e.createElement(j,{[s]:"",ref:c},o)}))},function(n){const r=a(t+"CollectionConsumer",n),o=e.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${s}]`)),n=Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return n}),[r.collectionRef,r.itemMap]);return o},o]}const vi="Collapsible",[pi,mi]=je(vi),[bi,yi]=pi(vi),gi=e.forwardRef(((t,n)=>{const{te:r,open:o,defaultOpen:i,disabled:a,onOpenChange:u,...l}=t,[s=!1,c]=Gn({prop:o,defaultProp:i,onChange:u});return e.createElement(bi,{scope:r,disabled:a,contentId:ft(),open:s,onOpenToggle:e.useCallback((()=>c((e=>!e))),[c])},e.createElement(Ae.div,Ce({"data-state":ji(s),"data-disabled":a?"":void 0},l,{ref:n})))})),wi=e.forwardRef(((t,n)=>{const{te:r,...o}=t,i=yi("CollapsibleTrigger",r);return e.createElement(Ae.button,Ce({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":ji(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},o,{ref:n,onClick:Je(t.onClick,i.onOpenToggle)}))})),xi="CollapsibleContent",ki=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=yi(xi,t.te);return e.createElement(qn,{present:r||i.open},(({present:t})=>e.createElement(Oi,Ce({},o,{ref:n,present:t}))))})),Oi=e.forwardRef(((t,n)=>{const{te:r,present:o,children:i,...a}=t,u=yi(xi,r),[l,s]=e.useState(o),c=e.useRef(null),d=O(n,c),f=e.useRef(0),h=f.current,v=e.useRef(0),p=v.current,m=u.open||l,b=e.useRef(m),y=e.useRef();return e.useEffect((()=>{const e=requestAnimationFrame((()=>b.current=!1));return()=>cancelAnimationFrame(e)}),[]),Me((()=>{const e=c.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();f.current=t.height,v.current=t.width,b.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),s(o)}}),[u.open,o]),e.createElement(Ae.div,Ce({"data-state":ji(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!m},a,{ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...t.style}}),m&&i)}));function ji(e){return e?"open":"closed"}const Si=gi,Ni=wi,Mi=ki,Ci=e.createContext(void 0);function Ai(t){const n=e.useContext(Ci);return t||n||"ltr"}const Ti="Accordion",Ei=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Di,Pi,Ii]=hi(Ti),[Li,_i]=je(Ti,[Ii,mi]),Fi=mi();e.forwardRef(((t,n)=>{const{type:r,...o}=t,i=o,a=o;return e.createElement(Di.Provider,{scope:t.ne},"multiple"===r?e.createElement(Vi,x({},a,{ref:n})):e.createElement(Wi,x({},i,{ref:n})))})).propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):"multiple"===e.type&&"string"==typeof t?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):"single"===e.type&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[Ri,Bi]=Li(Ti),[zi,$i]=Li(Ti,{collapsible:!1}),Wi=e.forwardRef(((t,n)=>{const{value:r,defaultValue:o,onValueChange:i=(()=>{}),collapsible:a=!1,...u}=t,[l,s]=Gn({prop:r,defaultProp:o,onChange:i});return e.createElement(Ri,{scope:t.ne,value:l?[l]:[],onItemOpen:s,onItemClose:e.useCallback((()=>a&&s("")),[a,s])},e.createElement(zi,{scope:t.ne,collapsible:a},e.createElement(qi,x({},u,{ref:n}))))})),Vi=e.forwardRef(((t,n)=>{const{value:r,defaultValue:o,onValueChange:i=(()=>{}),...a}=t,[u=[],l]=Gn({prop:r,defaultProp:o,onChange:i}),s=e.useCallback((e=>l(((t=[])=>[...t,e]))),[l]),c=e.useCallback((e=>l(((t=[])=>t.filter((t=>t!==e))))),[l]);return e.createElement(Ri,{scope:t.ne,value:u,onItemOpen:s,onItemClose:c},e.createElement(zi,{scope:t.ne,collapsible:!0},e.createElement(qi,x({},a,{ref:n}))))})),[Ui,Hi]=Li(Ti),qi=e.forwardRef(((t,n)=>{const{ne:r,disabled:o,dir:i,orientation:a="vertical",...u}=t,l=O(e.useRef(null),n),s=Pi(r),c="ltr"===Ai(i),d=Je(t.onKeyDown,(e=>{var t;if(!Ei.includes(e.key))return;const n=e.target,r=s().filter((e=>{var t;return!(null!==(t=e.ref.current)&&void 0!==t&&t.disabled)})),o=r.findIndex((e=>e.ref.current===n)),i=r.length;if(-1===o)return;e.preventDefault();let u=o;const l=i-1,d=()=>{u=o+1,u>l&&(u=0)},f=()=>{u=o-1,u<0&&(u=l)};switch(e.key){case"Home":u=0;break;case"End":u=l;break;case"ArrowRight":"horizontal"===a&&(c?d():f());break;case"ArrowDown":"vertical"===a&&d();break;case"ArrowLeft":"horizontal"===a&&(c?f():d());break;case"ArrowUp":"vertical"===a&&f()}null===(t=r[u%i].ref.current)||void 0===t||t.focus()}));return e.createElement(Ui,{scope:r,disabled:o,direction:i,orientation:a},e.createElement(Di.Slot,{scope:r},e.createElement(Ae.div,x({},u,{"data-orientation":a,ref:l,onKeyDown:o?void 0:d}))))})),Ki="AccordionItem",[Gi,Yi]=Li(Ki),Xi="AccordionTrigger";function Zi(e){return e?"open":"closed"}const Qi=e.forwardRef(((t,n)=>{const{ne:r,value:o,...i}=t,a=Hi(Ki,r),u=Bi(Ki,r),l=Fi(r),s=ft(),c=o&&u.value.includes(o)||!1,d=a.disabled||t.disabled;return e.createElement(Gi,{scope:r,open:c,disabled:d,triggerId:s},e.createElement(Si,x({"data-orientation":a.orientation,"data-state":Zi(c)},l,i,{ref:n,disabled:d,open:c,onOpenChange:e=>{e?u.onItemOpen(o):u.onItemClose(o)}})))})),Ji=e.forwardRef(((t,n)=>{const{ne:r,...o}=t,i=Hi(Ti,r),a=Yi("AccordionHeader",r);return e.createElement(Ae.h3,x({"data-orientation":i.orientation,"data-state":Zi(a.open),"data-disabled":a.disabled?"":void 0},o,{ref:n}))})),ea=e.forwardRef(((t,n)=>{const{ne:r,...o}=t,i=Hi(Ti,r),a=Yi(Xi,r),u=$i(Xi,r),l=Fi(r);return e.createElement(Di.ItemSlot,{scope:r},e.createElement(Ni,x({"aria-disabled":a.open&&!u.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId},l,o,{ref:n})))})),ta=e.forwardRef(((t,n)=>{const{ne:r,...o}=t,i=Hi(Ti,r),a=Yi("AccordionContent",r),u=Fi(r);return e.createElement(Mi,x({role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation},u,o,{ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}}))})),[na,ra]=je("AlertDialog",[ko]),oa=ko(),ia=e.forwardRef(((t,n)=>{const{re:r,...o}=t,i=oa(r);return e.createElement(Ho,x({},i,o,{ref:n}))})),aa=e.forwardRef(((t,n)=>{const{re:r,...o}=t,i=oa(r);return e.createElement(Ko,x({},i,o,{ref:n}))})),ua="AlertDialogContent",[la,sa]=na(ua),ca=e.forwardRef(((t,n)=>{const{re:r,children:o,...i}=t,a=oa(r),u=O(n,e.useRef(null)),l=e.useRef(null);return e.createElement(Wo,{contentName:ua,titleName:da,docsSlug:"alert-dialog"},e.createElement(la,{scope:r,cancelRef:l},e.createElement(Go,x({role:"alertdialog"},a,i,{ref:u,onOpenAutoFocus:Je(i.onOpenAutoFocus,(e=>{var t;e.preventDefault(),null===(t=l.current)||void 0===t||t.focus({preventScroll:!0})})),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault()}),e.createElement(N,null,o),!1)))})),da="AlertDialogTitle",fa=e.forwardRef(((t,n)=>{const{re:r,...o}=t,i=oa(r);return e.createElement(Yo,x({},i,o,{ref:n}))})),ha=e.forwardRef(((t,n)=>{const{re:r,...o}=t,i=oa(r);return e.createElement(Xo,x({},i,o,{ref:n}))})),va=t=>{const{re:n,...r}=t,o=oa(n);return e.createElement(Uo,x({},o,r,{modal:!0}))},pa=ia,ma=t=>{const{re:n,...r}=t,o=oa(n);return e.createElement(qo,x({},o,r))},ba=aa,ya=ca,ga=e.forwardRef(((t,n)=>{const{re:r,...o}=t,i=oa(r);return e.createElement(Zo,x({},i,o,{ref:n}))})),wa=e.forwardRef(((t,n)=>{const{re:r,...o}=t,{cancelRef:i}=sa("AlertDialogCancel",r),a=oa(r),u=O(n,i);return e.createElement(Zo,x({},a,o,{ref:u}))})),xa=fa,ka=ha;function Oa(e){return Oa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oa(e)}function ja(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Sa(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Na(e){Sa(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Oa(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Ma(e,t){Sa(2,arguments);var n=Na(e),r=ja(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}function Ca(e,t){Sa(2,arguments);var n=Na(e),r=ja(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());return i.setMonth(n.getMonth()+r+1,0),o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}var Aa={};function Ta(){return Aa}function Ea(e,t){var n,r,o,i,a,u,l,s;Sa(1,arguments);var c=Ta(),d=ja(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(u=a.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==o?o:c.weekStartsOn)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(s=l.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=Na(e),h=f.getDay(),v=(h<d?7:0)+h-d;return f.setDate(f.getDate()-v),f.setHours(0,0,0,0),f}function Da(e){return Sa(1,arguments),Ea(e,{weekStartsOn:1})}function Pa(e){Sa(1,arguments);var t=function(e){Sa(1,arguments);var t=Na(e),n=t.getFullYear(),r=new Date(0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);var o=Da(r),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var a=Da(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Da(n)}function Ia(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function La(e){Sa(1,arguments);var t=Na(e);return t.setHours(0,0,0,0),t}var _a=864e5;function Fa(e,t){Sa(2,arguments);var n=La(e),r=La(t),o=n.getTime()-Ia(n),i=r.getTime()-Ia(r);return Math.round((o-i)/_a)}function Ra(e,t){return Sa(2,arguments),Ma(e,7*ja(t))}function Ba(e,t){return Sa(2,arguments),Ca(e,12*ja(t))}function za(e){var t,n;if(Sa(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==Oa(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Na(e);(void 0===n||n<t||isNaN(Number(t)))&&(n=t)})),n||new Date(NaN)}function $a(e){var t,n;if(Sa(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!==Oa(e)||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=Na(e);(void 0===n||n>t||isNaN(t.getDate()))&&(n=t)})),n||new Date(NaN)}function Wa(e,t){Sa(2,arguments);var n=La(e),r=La(t);return n.getTime()===r.getTime()}function Va(e){return Sa(1,arguments),e instanceof Date||"object"===Oa(e)&&"[object Date]"===Object.prototype.toString.call(e)}function Ua(e,t){Sa(2,arguments);var n=Na(e),r=Na(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}var Ha=6048e5;function qa(e){Sa(1,arguments);var t=Na(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Ka(e){Sa(1,arguments);var t=Na(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Ga(e){Sa(1,arguments);var t=Na(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Ya(e,t){var n,r,o,i,a,u,l,s;Sa(1,arguments);var c=Ta(),d=ja(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(u=a.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==o?o:c.weekStartsOn)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(s=l.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=Na(e),h=f.getDay(),v=6+(h<d?-7:0)-(h-d);return f.setDate(f.getDate()+v),f.setHours(23,59,59,999),f}function Xa(e){return Sa(1,arguments),Ya(e,{weekStartsOn:1})}function Za(e,t){return Sa(2,arguments),function(e,t){Sa(2,arguments);var n=Na(e).getTime(),r=ja(t);return new Date(n+r)}(e,-ja(t))}function Qa(e){Sa(1,arguments);var t=Na(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function Ja(e){Sa(1,arguments);var t=Na(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=Qa(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=Qa(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function eu(e){Sa(1,arguments);var t=Na(e),n=Qa(t).getTime()-function(e){Sa(1,arguments);var t=Ja(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),Qa(n)}(t).getTime();return Math.round(n/6048e5)+1}function tu(e,t){var n,r,o,i,a,u,l,s;Sa(1,arguments);var c=Ta(),d=ja(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(u=a.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==o?o:c.weekStartsOn)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(s=l.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=Na(e),h=f.getUTCDay(),v=(h<d?7:0)+h-d;return f.setUTCDate(f.getUTCDate()-v),f.setUTCHours(0,0,0,0),f}function nu(e,t){var n,r,o,i,a,u,l,s;Sa(1,arguments);var c=Na(e),d=c.getUTCFullYear(),f=Ta(),h=ja(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(u=a.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==o?o:f.firstWeekContainsDate)&&void 0!==r?r:null===(l=f.locale)||void 0===l||null===(s=l.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==n?n:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(d+1,0,h),v.setUTCHours(0,0,0,0);var p=tu(v,t),m=new Date(0);m.setUTCFullYear(d,0,h),m.setUTCHours(0,0,0,0);var b=tu(m,t);return c.getTime()>=p.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}function ru(e,t){Sa(1,arguments);var n=Na(e),r=tu(n,t).getTime()-function(e,t){var n,r,o,i,a,u,l,s;Sa(1,arguments);var c=Ta(),d=ja(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(u=a.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==o?o:c.firstWeekContainsDate)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(s=l.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==n?n:1),f=nu(e,t),h=new Date(0);return h.setUTCFullYear(f,0,d),h.setUTCHours(0,0,0,0),tu(h,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function ou(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var iu={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return ou("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):ou(n+1,2)},d:function(e,t){return ou(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return ou(e.getUTCHours()%12||12,t.length)},H:function(e,t){return ou(e.getUTCHours(),t.length)},m:function(e,t){return ou(e.getUTCMinutes(),t.length)},s:function(e,t){return ou(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return ou(Math.floor(r*Math.pow(10,n-3)),t.length)}},au=iu,uu="midnight",lu="noon",su="morning",cu="afternoon",du="evening",fu="night",hu={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return au.y(e,t)},Y:function(e,t,n,r){var o=nu(e,r),i=o>0?o:1-o;return"YY"===t?ou(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):ou(i,t.length)},R:function(e,t){return ou(Ja(e),t.length)},u:function(e,t){return ou(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ou(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ou(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return au.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return ou(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=ru(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):ou(o,t.length)},I:function(e,t,n){var r=eu(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):ou(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):au.d(e,t)},D:function(e,t,n){var r=function(e){Sa(1,arguments);var t=Na(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):ou(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ou(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ou(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return ou(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?lu:0===o?uu:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?du:o>=12?cu:o>=4?su:fu,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return au.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):au.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):ou(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):ou(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):au.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):au.s(e,t)},S:function(e,t){return au.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return pu(o);case"XXXX":case"XX":return mu(o);default:return mu(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return pu(o);case"xxxx":case"xx":return mu(o);default:return mu(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+vu(o,":");default:return"GMT"+mu(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+vu(o,":");default:return"GMT"+mu(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return ou(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return ou((r._originalDate||e).getTime(),t.length)}};function vu(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+ou(i,2)}function pu(e,t){return e%60==0?(e>0?"-":"+")+ou(Math.abs(e)/60,2):mu(e,t)}function mu(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+ou(Math.floor(o/60),2)+n+ou(o%60,2)}var bu=hu,yu=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},gu=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},wu={p:gu,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return yu(e,t);switch(o){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",yu(o,t)).replace("{{time}}",gu(i,t))}},xu=wu,ku=["D","DD"],Ou=["YY","YYYY"];function ju(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Su={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Nu=function(e,t,n){var r,o=Su[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Mu(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var Cu={date:Mu({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Mu({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Mu({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Au={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Tu=function(e,t,n,r){return Au[e]};function Eu(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,u=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[u]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var Du={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Eu({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Eu({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Eu({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Eu({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Eu({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},Pu=Du;function Iu(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,u=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,(function(e){return e.test(u)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,(function(e){return e.test(u)}));return a=e.valueCallback?e.valueCallback(s):s,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(u.length)}}}var Lu,_u={ordinalNumber:(Lu={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(Lu.matchPattern);if(!n)return null;var r=n[0],o=e.match(Lu.parsePattern);if(!o)return null;var i=Lu.valueCallback?Lu.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:Iu({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Iu({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Iu({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Iu({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Iu({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},Fu={code:"en-US",formatDistance:Nu,formatLong:Cu,formatRelative:Tu,localize:Pu,match:_u,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ru=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bu=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zu=/^'([^]*?)'?$/,$u=/''/g,Wu=/[a-zA-Z]/;function Vu(e,t,n){var r,o,i,a,u,l,s,c,d,f,h,v,p,m,b,y,g,w;Sa(2,arguments);var x=String(t),k=Ta(),O=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:k.locale)&&void 0!==r?r:Fu,j=ja(null!==(i=null!==(a=null!==(u=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(s=n.locale)||void 0===s||null===(c=s.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==u?u:k.firstWeekContainsDate)&&void 0!==a?a:null===(d=k.locale)||void 0===d||null===(f=d.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==i?i:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=ja(null!==(h=null!==(v=null!==(p=null!==(m=null==n?void 0:n.weekStartsOn)&&void 0!==m?m:null==n||null===(b=n.locale)||void 0===b||null===(y=b.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==p?p:k.weekStartsOn)&&void 0!==v?v:null===(g=k.locale)||void 0===g||null===(w=g.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==h?h:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var N=Na(e);if(!function(e){if(Sa(1,arguments),!Va(e)&&"number"!=typeof e)return!1;var t=Na(e);return!isNaN(Number(t))}(N))throw new RangeError("Invalid time value");var M=Za(N,Ia(N)),C={firstWeekContainsDate:j,weekStartsOn:S,locale:O,_originalDate:N};return x.match(Bu).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,xu[t])(e,O.formatLong):e})).join("").match(Ru).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return function(e){var t=e.match(zu);if(!t)return e;return t[1].replace($u,"'")}(r);var i,a=bu[o];if(a)return null!=n&&n.useAdditionalWeekYearTokens||(i=r,-1===Ou.indexOf(i))||ju(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==ku.indexOf(e)}(r)||ju(r,t,String(e)),a(M,r,O.localize,C);if(o.match(Wu))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}var Uu=6048e5;function Hu(e){Sa(1,arguments);var t=Na(e),n=Da(t).getTime()-Pa(t).getTime();return Math.round(n/Uu)+1}function qu(e){return Sa(1,arguments),Math.floor(function(e){return Sa(1,arguments),Na(e).getTime()}(e)/1e3)}function Ku(e,t){var n,r,o,i,a,u,l,s;Sa(1,arguments);var c=Ta(),d=ja(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(u=a.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==o?o:c.firstWeekContainsDate)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(s=l.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==n?n:1),f=function(e,t){var n,r,o,i,a,u,l,s;Sa(1,arguments);var c=Na(e),d=c.getFullYear(),f=Ta(),h=ja(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(u=a.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==o?o:f.firstWeekContainsDate)&&void 0!==r?r:null===(l=f.locale)||void 0===l||null===(s=l.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==n?n:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setFullYear(d+1,0,h),v.setHours(0,0,0,0);var p=Ea(v,t),m=new Date(0);m.setFullYear(d,0,h),m.setHours(0,0,0,0);var b=Ea(m,t);return c.getTime()>=p.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}(e,t),h=new Date(0);return h.setFullYear(f,0,d),h.setHours(0,0,0,0),Ea(h,t)}var Gu=6048e5;function Yu(e,t){Sa(1,arguments);var n=Na(e),r=Ea(n,t).getTime()-Ku(n,t).getTime();return Math.round(r/Gu)+1}function Xu(e,t){return Sa(1,arguments),function(e,t,n){Sa(2,arguments);var r=Ea(e,n),o=Ea(t,n),i=r.getTime()-Ia(r),a=o.getTime()-Ia(o);return Math.round((i-a)/Ha)}(function(e){Sa(1,arguments);var t=Na(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}(e),Ka(e),t)+1}function Zu(e,t){Sa(2,arguments);var n=Na(e),r=Na(t);return n.getTime()>r.getTime()}function Qu(e,t){Sa(2,arguments);var n=Na(e),r=Na(t);return n.getTime()<r.getTime()}function Ju(e,t){Sa(2,arguments);var n=Na(e),r=Na(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function el(e,t){Sa(2,arguments);var n=Na(e),r=Na(t);return n.getFullYear()===r.getFullYear()}function tl(e,t){return Sa(2,arguments),Ma(e,-ja(t))}function nl(e,t){Sa(2,arguments);var n=Na(e),r=ja(t),o=n.getFullYear(),i=n.getDate(),a=new Date(0);a.setFullYear(o,r,15),a.setHours(0,0,0,0);var u=function(e){Sa(1,arguments);var t=Na(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return n.setMonth(r,Math.min(i,u)),n}function rl(e,t){Sa(2,arguments);var n=Na(e),r=ja(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function ol(){return La(Date.now())}function il(e,t){if(Sa(2,arguments),!t||"object"!==Oa(t))return new Date(NaN);var n=t.years?ja(t.years):0,r=t.months?ja(t.months):0,o=t.weeks?ja(t.weeks):0,i=t.days?ja(t.days):0,a=t.hours?ja(t.hours):0,u=t.minutes?ja(t.minutes):0,l=t.seconds?ja(t.seconds):0,s=function(e,t){return Sa(2,arguments),Ca(e,-ja(t))}(e,r+12*n),c=tl(s,i+7*o),d=1e3*(l+60*(u+60*a));return new Date(c.getTime()-d)}function al(e,t){return Sa(2,arguments),Ba(e,-ja(t))}var ul,ll=function(){return ll=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ll.apply(this,arguments)},sl=e.createContext(void 0);function cl(t){const n=e.useRef({value:t,previous:t});return e.useMemo((()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous)),[t])}e.createContext(void 0),e.forwardRef((function(t,n){var r=function(){var t=e.useContext(sl);if(!t)throw new Error("useDayPicker must be used within a DayPickerProvider.");return t}(),o=r.classNames,i=r.styles,a=[o.button_reset,o.button];t.className&&a.push(t.className);var u=a.join(" "),l=ll(ll({},i.button_reset),i.button);return t.style&&Object.assign(l,t.style),e.createElement("button",ll({},t,{ref:n,type:"button",className:u,style:l}))})),e.createContext(void 0),e.createContext(void 0),function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(ul||(ul={})),ul.Selected,ul.Disabled,ul.Hidden,ul.Today,ul.RangeEnd,ul.RangeMiddle,ul.RangeStart,ul.Outside,e.createContext(void 0),e.createContext(void 0),e.createContext(void 0);const dl="Checkbox",[fl,hl]=je(dl),[vl,pl]=fl(dl),ml=e.forwardRef(((t,n)=>{const{oe:r,name:o,checked:i,defaultChecked:a,required:u,disabled:l,value:s="on",onCheckedChange:c,...d}=t,[f,h]=e.useState(null),v=O(n,(e=>h(e))),p=e.useRef(!1),m=!f||Boolean(f.closest("form")),[b=!1,y]=Gn({prop:i,defaultProp:a,onChange:c}),g=e.useRef(b);return e.useEffect((()=>{const e=null==f?void 0:f.form;if(e){const t=()=>y(g.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,y]),e.createElement(vl,{scope:r,state:b,disabled:l},e.createElement(Ae.button,x({type:"button",role:"checkbox","aria-checked":yl(b)?"mixed":b,"aria-required":u,"data-state":gl(b),"data-disabled":l?"":void 0,disabled:l,value:s},d,{ref:v,onKeyDown:Je(t.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:Je(t.onClick,(e=>{y((e=>!!yl(e)||!e)),m&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),m&&e.createElement(bl,{control:f,bubbles:!p.current,name:o,value:s,checked:b,required:u,disabled:l,style:{transform:"translateX(-100%)"}}))})),bl=t=>{const{control:n,checked:r,bubbles:o=!0,...i}=t,a=e.useRef(null),u=cl(r),l=An(n);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==r&&n){const t=new Event("click",{bubbles:o});e.indeterminate=yl(r),n.call(e,!yl(r)&&r),e.dispatchEvent(t)}}),[u,r,o]),e.createElement("input",x({type:"checkbox","aria-hidden":!0,defaultChecked:!yl(r)&&r},i,{tabIndex:-1,ref:a,style:{...t.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function yl(e){return"indeterminate"===e}function gl(e){return yl(e)?"indeterminate":e?"checked":"unchecked"}const wl=ml,xl=e.forwardRef(((t,n)=>{const{oe:r,forceMount:o,...i}=t,a=pl("CheckboxIndicator",r);return e.createElement(qn,{present:o||yl(a.state)||!0===a.state},e.createElement(Ae.span,x({"data-state":gl(a.state),"data-disabled":a.disabled?"":void 0},i,{ref:n,style:{pointerEvents:"none",...t.style}})))}));function kl(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function Ol(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function jl(...t){return e.useCallback(Ol(...t),t)}function Sl(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}const Nl=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{},Ml=r["useId".toString()]||(()=>{});let Cl=0;function Al(e){const[t,n]=r.useState(Ml());return Nl((()=>{e||n((e=>null!=e?e:String(Cl++)))}),[e]),e||(t?`radix-${t}`:"")}function Tl(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t})),e.useMemo((()=>(...e)=>{var t;return null===(t=n.current)||void 0===t?void 0:t.call(n,...e)}),[])}function El({prop:t,defaultProp:n,onChange:r=(()=>{})}){const[o,i]=function({defaultProp:t,onChange:n}){const r=e.useState(t),[o]=r,i=e.useRef(o),a=Tl(n);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==t,u=a?t:o,l=Tl(r);return[u,e.useCallback((e=>{if(a){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else i(e)}),[a,t,i,l])]}const Dl=e.forwardRef(((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(Ll);if(a){const t=a.props.children,r=i.map((n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n));return e.createElement(Pl,Ce({},o,{ref:n}),e.isValidElement(t)?e.cloneElement(t,void 0,r):null)}return e.createElement(Pl,Ce({},o,{ref:n}),r)}));Dl.displayName="Slot";const Pl=e.forwardRef(((t,n)=>{const{children:r,...o}=t;return e.isValidElement(r)?e.cloneElement(r,{..._l(o,r.props),ref:Ol(n,r.ref)}):e.Children.count(r)>1?e.Children.only(null):null}));Pl.displayName="SlotClone";const Il=({children:t})=>e.createElement(e.Fragment,null,t);function Ll(t){return e.isValidElement(t)&&t.type===Il}function _l(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?n[r]=(...e)=>{null==i||i(...e),null==o||o(...e)}:"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const Fl=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const r=e.forwardRef(((t,r)=>{const{asChild:o,...i}=t,a=o?Dl:n;return e.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.createElement(a,Ce({},i,{ref:r}))}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});const Rl="dismissableLayer.update",Bl="dismissableLayer.pointerDownOutside",zl="dismissableLayer.focusOutside";let $l;const Wl=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vl=e.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:u,onDismiss:l,...s}=t,c=e.useContext(Wl),[d,f]=e.useState(null),[,h]=e.useState({}),v=jl(n,(e=>f(e))),p=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=p.indexOf(m),y=d?p.indexOf(d):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=b,x=function(t){const n=Tl(t),r=e.useRef(!1),o=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!r.current){const i={originalEvent:e};function t(){Hl(Bl,n,i,{discrete:!0})}"touch"===e.pointerType?(document.removeEventListener("click",o.current),o.current=t,document.addEventListener("click",o.current,{once:!0})):t()}r.current=!1},t=window.setTimeout((()=>{document.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),document.removeEventListener("pointerdown",e),document.removeEventListener("click",o.current)}}),[n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));w&&!n&&(null==i||i(e),null==u||u(e),e.defaultPrevented||null==l||l())})),k=function(t){const n=Tl(t),r=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!r.current){Hl(zl,n,{originalEvent:e},{discrete:!1})}};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)}),[n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==a||a(e),null==u||u(e),e.defaultPrevented||null==l||l())}));return function(t){const n=Tl(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n])}((e=>{y===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))})),e.useEffect((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&($l=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Ul(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(document.body.style.pointerEvents=$l)}}),[d,r,c]),e.useEffect((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Ul())}),[d,c]),e.useEffect((()=>{const e=()=>h({});return document.addEventListener(Rl,e),()=>document.removeEventListener(Rl,e)}),[]),e.createElement(Fl.div,Ce({},s,{ref:v,style:{pointerEvents:g?w?"auto":"none":void 0,...t.style},onFocusCapture:kl(t.onFocusCapture,k.onFocusCapture),onBlurCapture:kl(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:kl(t.onPointerDownCapture,x.onPointerDownCapture)}))}));function Ul(){const e=new CustomEvent(Rl);document.dispatchEvent(e)}function Hl(e,n,r,{discrete:o}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(e,n,{once:!0}),o?function(e,n){e&&t.flushSync((()=>e.dispatchEvent(n)))}(i,a):i.dispatchEvent(a)}const ql="focusScope.autoFocusOnMount",Kl="focusScope.autoFocusOnUnmount",Gl={bubbles:!1,cancelable:!0},Yl=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...u}=t,[l,s]=e.useState(null),c=Tl(i),d=Tl(a),f=e.useRef(null),h=jl(n,(e=>s(e))),v=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){function e(e){if(v.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:Jl(f.current,{select:!0})}function t(e){!v.paused&&l&&(l.contains(e.relatedTarget)||Jl(f.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[o,l,v.paused]),e.useEffect((()=>{if(l){es.add(v);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(ql,Gl);l.addEventListener(ql,c),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Jl(r,{select:t}),document.activeElement!==n)return}((e=Xl(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Jl(l))}return()=>{l.removeEventListener(ql,c),setTimeout((()=>{const e=new CustomEvent(Kl,Gl);l.addEventListener(Kl,d),l.dispatchEvent(e),e.defaultPrevented||Jl(null!=t?t:document.body,{select:!0}),l.removeEventListener(Kl,d),es.remove(v)}),0)}}var e}),[l,c,d,v]);const p=e.useCallback((e=>{if(!r&&!o)return;if(v.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=Xl(e),n=Zl(t,e),r=Zl(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Jl(i,{select:!0})):(e.preventDefault(),r&&Jl(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,v.paused]);return e.createElement(Fl.div,Ce({tabIndex:-1},u,{ref:h,onKeyDown:p}))}));function Xl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zl(e,t){for(const n of e)if(!Ql(n,{upTo:t}))return n}function Ql(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Jl(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const es=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=ts(e,t),e.unshift(t)},remove(t){var n;e=ts(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function ts(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const ns=e.forwardRef(((n,r)=>{var o;const{container:i=(null===globalThis||void 0===globalThis||null===(o=globalThis.document)||void 0===o?void 0:o.body),...a}=n;return i?t.createPortal(e.createElement(Fl.div,Ce({},a,{ref:r})),i):null}));const rs=n=>{const{present:r,children:o}=n,i=function(n){const[r,o]=e.useState(),i=e.useRef({}),a=e.useRef(n),u=e.useRef("none"),l=n?"mounted":"unmounted",[s,c]=function(t,n){return e.useReducer(((e,t)=>{const r=n[e][t];return null!=r?r:e}),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=os(i.current);u.current="mounted"===s?e:"none"}),[s]),Nl((()=>{const e=i.current,t=a.current;if(t!==n){const r=u.current,o=os(e);if(n)c("MOUNT");else if("none"===o||"none"===(null==e?void 0:e.display))c("UNMOUNT");else{c(t&&r!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=n}}),[n,c]),Nl((()=>{if(r){const e=e=>{const n=os(i.current).includes(e.animationName);e.target===r&&n&&t.flushSync((()=>c("ANIMATION_END")))},n=e=>{e.target===r&&(u.current=os(i.current))};return r.addEventListener("animationstart",n),r.addEventListener("animationcancel",e),r.addEventListener("animationend",e),()=>{r.removeEventListener("animationstart",n),r.removeEventListener("animationcancel",e),r.removeEventListener("animationend",e)}}c("ANIMATION_END")}),[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{e&&(i.current=getComputedStyle(e)),o(e)}),[])}}(r),a="function"==typeof o?o({present:i.isPresent}):e.Children.only(o),u=jl(i.ref,a.ref);return"function"==typeof o||i.isPresent?e.cloneElement(a,{ref:u}):null};function os(e){return(null==e?void 0:e.animationName)||"none"}rs.displayName="Presence";let is=0;function as(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var us=Lr(),ls=function(){},ss=r.forwardRef((function(e,t){var n=r.useRef(null),o=r.useState({onScrollCapture:ls,onWheelCapture:ls,onTouchMoveCapture:ls}),i=o[0],a=o[1],u=e.forwardProps,l=e.children,s=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,v=e.noIsolation,p=e.inert,m=e.allowPinchZoom,b=e.as,y=void 0===b?"div":b,g=Ar(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=h,x=Pr([n,t]),k=Cr(Cr({},g),i);return r.createElement(r.Fragment,null,d&&r.createElement(w,{sideCar:us,removeScrollBar:c,shards:f,noIsolation:v,inert:p,setCallbacks:a,allowPinchZoom:!!m,lockRef:n}),u?r.cloneElement(r.Children.only(l),Cr(Cr({},k),{ref:x})):r.createElement(y,Cr({},k,{className:s,ref:x}),l))}));ss.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ss.classNames={fullWidth:Dr,zeroRight:Er};var cs=!1;if("undefined"!=typeof window)try{var ds=Object.defineProperty({},"passive",{get:function(){return cs=!0,!0}});window.addEventListener("test",ds,ds),window.removeEventListener("test",ds,ds)}catch(jde){cs=!1}var fs=!!cs&&{passive:!1},hs=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),vs(e,n)){var r=ps(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},vs=function(e,t){return"v"===e?function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)}(t):function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)}(t)},ps=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},ms=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bs=function(e){return[e.deltaX,e.deltaY]},ys=function(e){return e&&"current"in e?e.current:e},gs=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ws=0,xs=[];var ks=Fr(us,(function(e){var t=r.useRef([]),n=r.useRef([0,0]),o=r.useRef(),i=r.useState(ws++)[0],a=r.useState((function(){return Vr()}))[0],u=r.useRef(e);r.useEffect((function(){u.current=e}),[e]),r.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=Tr([e.lockRef.current],(e.shards||[]).map(ys),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=r.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!u.current.allowPinchZoom;var r,i=ms(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],s="deltaY"in e?e.deltaY:a[1]-i[1],c=e.target,d=Math.abs(l)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=hs(d,c);if(!f)return!0;if(f?r=d:(r="v"===d?"h":"v",f=hs(d,c)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||s)&&(o.current=r),!r)return!0;var h=o.current||r;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,u=n.target,l=t.contains(u),s=!1,c=a>0,d=0,f=0;do{var h=ps(e,u),v=h[0],p=h[1]-h[2]-i*v;(v||p)&&vs(e,u)&&(d+=p,f+=v),u=u.parentNode}while(!l&&u!==document.body||l&&(t.contains(u)||t===u));return(c&&(o&&0===d||!o&&a>d)||!c&&(o&&0===f||!o&&-a>f))&&(s=!0),s}(h,t,e,"h"===h?l:s,!0)}),[]),s=r.useCallback((function(e){var n=e;if(xs.length&&xs[xs.length-1]===a){var r="deltaY"in n?bs(n):ms(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)n.preventDefault();else if(!o){var i=(u.current.shards||[]).map(ys).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?l(n,i[0]):!u.current.noIsolation)&&n.preventDefault()}}}),[]),c=r.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=r.useCallback((function(e){n.current=ms(e),o.current=void 0}),[]),f=r.useCallback((function(t){c(t.type,bs(t),t.target,l(t,e.lockRef.current))}),[]),h=r.useCallback((function(t){c(t.type,ms(t),t.target,l(t,e.lockRef.current))}),[]);r.useEffect((function(){return xs.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",s,fs),document.addEventListener("touchmove",s,fs),document.addEventListener("touchstart",d,fs),function(){xs=xs.filter((function(e){return e!==a})),document.removeEventListener("wheel",s,fs),document.removeEventListener("touchmove",s,fs),document.removeEventListener("touchstart",d,fs)}}),[]);var v=e.removeScrollBar,p=e.inert;return r.createElement(r.Fragment,null,p?r.createElement(a,{styles:gs(i)}):null,v?r.createElement(Yr,{gapMode:"margin"}):null)})),Os=r.forwardRef((function(e,t){return r.createElement(ss,Cr({},e,{ref:t,sideCar:ks}))}));Os.classNames=ss.classNames;var js=Os;const Ss="Dialog",[Ns,Ms]=function(t,n=[]){let r=[];const o=()=>{const n=r.map((t=>e.createContext(t)));return function(r){const o=(null==r?void 0:r[t])||n;return e.useMemo((()=>({[`__scope${t}`]:{...r,[t]:o}})),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;function u(n){const{scope:r,children:o,...u}=n,l=(null==r?void 0:r[t][a])||i,s=e.useMemo((()=>u),Object.values(u));return e.createElement(l.Provider,{value:s},o)}return r=[...r,o],u.displayName=n+"Provider",[u,function(r,u){const l=(null==u?void 0:u[t][a])||i,s=e.useContext(l);if(s)return s;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Sl(o,...n)]}(Ss),[Cs,As]=Ns(Ss),Ts="DialogPortal",[Es,Ds]=Ns(Ts,{forceMount:void 0}),Ps="DialogOverlay",Is=e.forwardRef(((t,n)=>{const r=Ds(Ps,t.ee),{forceMount:o=r.forceMount,...i}=t,a=As(Ps,t.ee);return a.modal?e.createElement(rs,{present:o||a.open},e.createElement(Ls,Ce({},i,{ref:n}))):null})),Ls=e.forwardRef(((t,n)=>{const{ee:r,...o}=t,i=As(Ps,r);return e.createElement(js,{as:Dl,allowPinchZoom:!0,shards:[i.contentRef]},e.createElement(Fl.div,Ce({"data-state":$s(i.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))})),_s="DialogContent",Fs=e.forwardRef(((t,n)=>{const r=Ds(_s,t.ee),{forceMount:o=r.forceMount,...i}=t,a=As(_s,t.ee);return e.createElement(rs,{present:o||a.open},a.modal?e.createElement(Rs,Ce({},i,{ref:n})):e.createElement(Bs,Ce({},i,{ref:n})))})),Rs=e.forwardRef(((t,n)=>{const r=As(_s,t.ee),o=e.useRef(null),i=jl(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return go(e)}),[]),e.createElement(zs,Ce({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:kl(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:kl(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:kl(t.onFocusOutside,(e=>e.preventDefault()))}))})),Bs=e.forwardRef(((t,n)=>{const r=As(_s,t.ee),o=e.useRef(!1);return e.createElement(zs,Ce({},t,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{var n,i;(null===(n=t.onCloseAutoFocus)||void 0===n||n.call(t,e),e.defaultPrevented)||(o.current||null===(i=r.triggerRef.current)||void 0===i||i.focus(),e.preventDefault());o.current=!1},onInteractOutside:e=>{var n,i;null===(n=t.onInteractOutside)||void 0===n||n.call(t,e),e.defaultPrevented||(o.current=!0);const a=e.target;(null===(i=r.triggerRef.current)||void 0===i?void 0:i.contains(a))&&e.preventDefault()}}))})),zs=e.forwardRef(((t,n)=>{const{ee:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...u}=t,l=As(_s,r),s=jl(n,e.useRef(null));return e.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:as()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:as()),is++,()=>{1===is&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),is--}}),[]),e.createElement(e.Fragment,null,e.createElement(Yl,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a},e.createElement(Vl,Ce({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":$s(l.open)},u,{ref:s,onDismiss:()=>l.onOpenChange(!1)}))),!1)}));function $s(e){return e?"open":"closed"}const Ws=t=>{const{ee:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:u=!0}=t,l=e.useRef(null),s=e.useRef(null),[c=!1,d]=El({prop:o,defaultProp:i,onChange:a});return e.createElement(Cs,{scope:n,triggerRef:l,contentRef:s,contentId:Al(),titleId:Al(),descriptionId:Al(),open:c,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:u},r)},Vs=t=>{const{ee:n,forceMount:r,children:o,container:i}=t,a=As(Ts,n);return e.createElement(Es,{scope:n,forceMount:r},e.Children.map(o,(t=>e.createElement(rs,{present:r||a.open},e.createElement(ns,{asChild:!0,container:i},t)))))},Us=Is,Hs=Fs;var qs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ks(e){return e&&e.ie&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gs(e){if(e.ie)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"ie",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var Ys=1,Xs=.9,Zs=.3,Qs=.1,Js=0,ec=.999,tc=.9999,nc=.99,rc=/[\\\/\-_+.# \t"@\[\(\{&]/,oc=/[\\\/\-_+.# \t"@\[\(\{&]/g;function ic(e,t,n,r,o,i){if(i===t.length)return o===e.length?Ys:nc;for(var a,u,l,s=r.charAt(i),c=n.indexOf(s,o),d=0;c>=0;)(a=ic(e,t,n,r,c+1,i+1))>d&&(c===o?a*=Ys:rc.test(e.charAt(c-1))?(a*=Xs,(l=e.slice(o,c-1).match(oc))&&o>0&&(a*=Math.pow(ec,l.length))):rc.test(e.slice(o,c-1))?(a*=Js,o>0&&(a*=Math.pow(ec,c-o))):(a*=Zs,o>0&&(a*=Math.pow(ec,c-o))),e.charAt(c)!==t.charAt(i)&&(a*=tc)),a<Qs&&n.charAt(c-1)===r.charAt(i+1)&&n.charAt(c-1)!==r.charAt(i)&&(u=ic(e,t,n,r,c+1,i+2))*Qs>a&&(a=u*Qs),a>d&&(d=a),c=n.indexOf(s,c+1);return d}var ac=function(e,t){return ic(e,t,e.toLowerCase(),t.toLowerCase(),0,0)},uc=Ks(ac),lc='[cmdk-group=""]',sc='[cmdk-group-items=""]',cc='[cmdk-item=""]',dc=`${cc}:not([aria-disabled="true"])`,fc="cmdk-item-select",hc="data-value",vc=(e,t)=>uc(e,t),pc=r.createContext(void 0),mc=()=>r.useContext(pc),bc=r.createContext(void 0),yc=()=>r.useContext(bc),gc=r.createContext(void 0),wc=r.forwardRef(((e,t)=>{let n=r.useRef(null),o=Ic((()=>({search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}}))),i=Ic((()=>new Set)),a=Ic((()=>new Map)),u=Ic((()=>new Map)),l=Ic((()=>new Set)),s=Dc(e),{label:c,children:d,value:f,onValueChange:h,filter:v,shouldFilter:p,...m}=e,b=r.useId(),y=r.useId(),g=r.useId(),w=Rc();Pc((()=>{if(void 0!==f){let e=f.trim().toLowerCase();o.current.value=e,w(6,M),x.emit()}}),[f]);let x=r.useMemo((()=>({subscribe:e=>(l.current.add(e),()=>l.current.delete(e)),snapshot:()=>o.current,setState:(e,t,n)=>{var r,i,a;if(!Object.is(o.current[e],t)){if(o.current[e]=t,"search"===e)N(),j(),w(1,S);else if("value"===e){if(void 0!==(null==(r=s.current)?void 0:r.value))return void(null==(a=(i=s.current).onValueChange)||a.call(i,t));n||w(5,M)}x.emit()}},emit:()=>{l.current.forEach((e=>e()))}})),[]),k=r.useMemo((()=>({value:(e,t)=>{t!==u.current.get(e)&&(u.current.set(e,t),o.current.filtered.items.set(e,O(t)),w(2,(()=>{j(),x.emit()})))},item:(e,t)=>(i.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),w(3,(()=>{N(),j(),o.current.value||S(),x.emit()})),()=>{u.current.delete(e),i.current.delete(e),o.current.filtered.items.delete(e),w(4,(()=>{N(),S(),x.emit()}))}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{u.current.delete(e),a.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],listId:b,inputId:g,labelId:y})),[]);function O(e){var t;let n=(null==(t=s.current)?void 0:t.filter)??vc;return e?n(e,o.current.search):0}function j(){if(!n.current||!o.current.search||!1===s.current.shouldFilter)return;let e=o.current.filtered.items,t=[];o.current.filtered.groups.forEach((n=>{let r=a.current.get(n),o=0;r.forEach((t=>{let n=e.get(t);o=Math.max(n,o)})),t.push([n,o])}));let r=n.current.querySelector('[cmdk-list-sizer=""]');A().sort(((t,n)=>{let r=t.getAttribute(hc),o=n.getAttribute(hc);return(e.get(o)??0)-(e.get(r)??0)})).forEach((e=>{let t=e.closest(sc);t?t.appendChild(e.parentElement===t?e:e.closest(`${sc} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${sc} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=n.current.querySelector(`${lc}[${hc}="${e[0]}"]`);null==t||t.parentElement.appendChild(t)}))}function S(){let e=A().find((e=>!e.ariaDisabled)),t=null==e?void 0:e.getAttribute(hc);x.setState("value",t||void 0)}function N(){if(!o.current.search||!1===s.current.shouldFilter)return void(o.current.filtered.count=i.current.size);o.current.filtered.groups=new Set;let e=0;for(let t of i.current){let n=O(u.current.get(t));o.current.filtered.items.set(t,n),n>0&&e++}for(let[t,n]of a.current)for(let e of n)if(o.current.filtered.items.get(e)>0){o.current.filtered.groups.add(t);break}o.current.filtered.count=e}function M(){var e,t,n;let r=C();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(lc))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function C(){return n.current.querySelector(`${cc}[aria-selected="true"]`)}function A(){return Array.from(n.current.querySelectorAll(dc))}function T(e){let t=A()[e];t&&x.setState("value",t.getAttribute(hc))}function E(e){var t;let n=C(),r=A(),o=r.findIndex((e=>e===n)),i=r[o+e];null!=(t=s.current)&&t.loop&&(i=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),i&&x.setState("value",i.getAttribute(hc))}function D(e){let t,n=C(),r=null==n?void 0:n.closest(lc);for(;r&&!t;)r=e>0?Tc(r,lc):Ec(r,lc),t=null==r?void 0:r.querySelector(dc);t?x.setState("value",t.getAttribute(hc)):E(e)}let P=()=>T(A().length-1),I=e=>{e.preventDefault(),e.metaKey?P():e.altKey?D(1):E(1)},L=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?D(-1):E(-1)};return r.createElement("div",{ref:Lc([n,t]),...m,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=m.onKeyDown)||t.call(m,e),!e.defaultPrevented)switch(e.key){case"n":case"j":e.ctrlKey&&I(e);break;case"ArrowDown":I(e);break;case"p":case"k":e.ctrlKey&&L(e);break;case"ArrowUp":L(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),P();break;case"Enter":{e.preventDefault();let t=C();if(t){let e=new Event(fc);t.dispatchEvent(e)}}}}},r.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:Bc},c),r.createElement(bc.Provider,{value:x},r.createElement(pc.Provider,{value:k},d)))})),xc=r.forwardRef(((e,t)=>{let n=r.useId(),o=r.useRef(null),i=r.useContext(gc),a=mc(),u=Dc(e);Pc((()=>a.item(n,i)),[]);let l=Fc(n,o,[e.value,e.children,o]),s=yc(),c=_c((e=>e.value&&e.value===l.current)),d=_c((e=>!1===a.filter()||(!e.search||e.filtered.items.get(n)>0)));function f(){var e,t;null==(t=(e=u.current).onSelect)||t.call(e,l.current)}if(r.useEffect((()=>{let t=o.current;if(t&&!e.disabled)return t.addEventListener(fc,f),()=>t.removeEventListener(fc,f)}),[d,e.onSelect,e.disabled]),!d)return null;let{disabled:h,value:v,onSelect:p,...m}=e;return r.createElement("div",{ref:Lc([o,t]),...m,"cmdk-item":"",role:"option","aria-disabled":h||void 0,"aria-selected":c||void 0,"data-selected":c||void 0,onPointerMove:h?void 0:function(){s.setState("value",l.current,!0)},onClick:h?void 0:f},e.children)})),kc=r.forwardRef(((e,t)=>{let{heading:n,children:o,...i}=e,a=r.useId(),u=r.useRef(null),l=r.useRef(null),s=r.useId(),c=mc(),d=_c((e=>!1===c.filter()||(!e.search||e.filtered.groups.has(a))));Pc((()=>c.group(a)),[]),Fc(a,u,[e.value,e.heading,l]);let f=r.createElement(gc.Provider,{value:a},o);return r.createElement("div",{ref:Lc([u,t]),...i,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&r.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:s},n),r.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?s:void 0},f))})),Oc=r.forwardRef(((e,t)=>{let{alwaysRender:n,...o}=e,i=r.useRef(null),a=_c((e=>!e.search));return n||a?r.createElement("div",{ref:Lc([i,t]),...o,"cmdk-separator":"",role:"separator"}):null})),jc=r.forwardRef(((e,t)=>{let{onValueChange:n,...o}=e,i=null!=e.value,a=yc(),u=_c((e=>e.search)),l=mc();return r.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),r.createElement("input",{ref:t,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,id:l.inputId,type:"text",value:i?e.value:u,onChange:e=>{i||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),Sc=r.forwardRef(((e,t)=>{let{children:n,...o}=e,i=r.useRef(null),a=r.useRef(null),u=mc();return r.useEffect((()=>{if(a.current&&i.current){let e,t=a.current,n=i.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.getBoundingClientRect().height;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),r.createElement("div",{ref:Lc([i,t]),...o,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:u.listId,"aria-labelledby":u.inputId},r.createElement("div",{ref:a,"cmdk-list-sizer":""},n))})),Nc=r.forwardRef(((e,t)=>{let{open:n,onOpenChange:o,container:i,...a}=e;return r.createElement(Ws,{open:n,onOpenChange:o},r.createElement(Vs,{container:i},r.createElement(Us,{"cmdk-overlay":""}),r.createElement(Hs,{"aria-label":e.label,"cmdk-dialog":""},r.createElement(wc,{ref:t,...a}))))})),Mc=r.forwardRef(((e,t)=>{let n=r.useRef(!0),o=_c((e=>0===e.filtered.count));return r.useEffect((()=>{n.current=!1}),[]),n.current||!o?null:r.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})})),Cc=r.forwardRef(((e,t)=>{let{progress:n,children:o,...i}=e;return r.createElement("div",{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},r.createElement("div",{"aria-hidden":!0},o))})),Ac=Object.assign(wc,{List:Sc,Item:xc,Input:jc,Group:kc,Separator:Oc,Dialog:Nc,Empty:Mc,Loading:Cc});function Tc(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Ec(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Dc(e){let t=r.useRef(e);return Pc((()=>{t.current=e})),t}var Pc=typeof window>"u"?r.useEffect:r.useLayoutEffect;function Ic(e){let t=r.useRef();return void 0===t.current&&(t.current=e()),t}function Lc(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function _c(e){let t=yc(),n=()=>e(t.snapshot());return r.useSyncExternalStore(t.subscribe,n,n)}function Fc(e,t,n){let o=r.useRef(),i=mc();return Pc((()=>{var r;let a=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim().toLowerCase();if("object"==typeof t&&"current"in t&&t.current)return null==(e=t.current.textContent)?void 0:e.trim().toLowerCase()}})();i.value(e,a),null==(r=t.current)||r.setAttribute(hc,a),o.current=a})),o}var Rc=()=>{let[e,t]=r.useState(),n=Ic((()=>new Map));return Pc((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}},Bc={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const zc="rovingFocusGroup.onEntryFocus",$c={bubbles:!1,cancelable:!0},Wc="RovingFocusGroup",[Vc,Uc,Hc]=hi(Wc),[qc,Kc]=je(Wc,[Hc]),[Gc,Yc]=qc(Wc),Xc=e.forwardRef(((t,n)=>e.createElement(Vc.Provider,{scope:t.ae},e.createElement(Vc.Slot,{scope:t.ae},e.createElement(Zc,Ce({},t,{ref:n})))))),Zc=e.forwardRef(((t,n)=>{const{ae:r,orientation:o,loop:i=!1,dir:a,currentTabStopId:u,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:s,onEntryFocus:c,...d}=t,f=e.useRef(null),h=O(n,f),v=Ai(a),[p=null,m]=Gn({prop:u,defaultProp:l,onChange:s}),[b,y]=e.useState(!1),g=Ne(c),w=Uc(r),x=e.useRef(!1),[k,j]=e.useState(0);return e.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(zc,g),()=>e.removeEventListener(zc,g)}),[g]),e.createElement(Gc,{scope:r,orientation:o,dir:v,loop:i,currentTabStopId:p,onItemFocus:e.useCallback((e=>m(e)),[m]),onItemShiftTab:e.useCallback((()=>y(!0)),[]),onFocusableItemAdd:e.useCallback((()=>j((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>j((e=>e-1))),[])},e.createElement(Ae.div,Ce({tabIndex:b||0===k?-1:0,"data-orientation":o},d,{ref:h,style:{outline:"none",...t.style},onMouseDown:Je(t.onMouseDown,(()=>{x.current=!0})),onFocus:Je(t.onFocus,(e=>{const t=!x.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(zc,$c);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));ed([e.find((e=>e.active)),e.find((e=>e.id===p)),...e].filter(Boolean).map((e=>e.ref.current)))}}x.current=!1})),onBlur:Je(t.onBlur,(()=>y(!1)))})))})),Qc=e.forwardRef(((t,n)=>{const{ae:r,focusable:o=!0,active:i=!1,tabStopId:a,...u}=t,l=ft(),s=a||l,c=Yc("RovingFocusGroupItem",r),d=c.currentTabStopId===s,f=Uc(r),{onFocusableItemAdd:h,onFocusableItemRemove:v}=c;return e.useEffect((()=>{if(o)return h(),()=>v()}),[o,h,v]),e.createElement(Vc.ItemSlot,{scope:r,id:s,focusable:o,active:i},e.createElement(Ae.span,Ce({tabIndex:d?0:-1,"data-orientation":c.orientation},u,{ref:n,onMouseDown:Je(t.onMouseDown,(e=>{o?c.onItemFocus(s):e.preventDefault()})),onFocus:Je(t.onFocus,(()=>c.onItemFocus(s))),onKeyDown:Je(t.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void c.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Jc[r]}(e,c.orientation,c.dir);if(void 0!==t){e.preventDefault();let n=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=c.loop?function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(n,r+1):n.slice(r+1)}setTimeout((()=>ed(n)))}}))})))})),Jc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ed(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const td=Xc,nd=Qc,rd=["Enter"," "],od=["ArrowUp","PageDown","End"],id=["ArrowDown","PageUp","Home",...od],ad={ltr:[...rd,"ArrowRight"],rtl:[...rd,"ArrowLeft"]},ud={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ld="Menu",[sd,cd,dd]=hi(ld),[fd,hd]=je(ld,[dd,Dn,Kc]),vd=Dn(),pd=Kc(),[md,bd]=fd(ld),[yd,gd]=fd(ld),wd=e.forwardRef(((t,n)=>{const{ue:r,...o}=t,i=vd(r);return e.createElement(Vn,Ce({},i,o,{ref:n}))})),xd="MenuPortal",[kd,Od]=fd(xd,{forceMount:void 0}),jd="MenuContent",[Sd,Nd]=fd(jd),Md=e.forwardRef(((t,n)=>{const r=Od(jd,t.ue),{forceMount:o=r.forceMount,...i}=t,a=bd(jd,t.ue),u=gd(jd,t.ue);return e.createElement(sd.Provider,{scope:t.ue},e.createElement(qn,{present:o||a.open},e.createElement(sd.Slot,{scope:t.ue},u.modal?e.createElement(Cd,Ce({},i,{ref:n})):e.createElement(Ad,Ce({},i,{ref:n})))))})),Cd=e.forwardRef(((t,n)=>{const r=bd(jd,t.ue),o=e.useRef(null),i=O(n,o);return e.useEffect((()=>{const e=o.current;if(e)return go(e)}),[]),e.createElement(Td,Ce({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Je(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))})),Ad=e.forwardRef(((t,n)=>{const r=bd(jd,t.ue);return e.createElement(Td,Ce({},t,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)}))})),Td=e.forwardRef(((t,n)=>{const{ue:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:u,disableOutsidePointerEvents:l,onEntryFocus:s,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:v,disableOutsideScroll:p,...m}=t,b=bd(jd,r),y=gd(jd,r),g=vd(r),w=pd(r),x=cd(r),[k,S]=e.useState(null),N=e.useRef(null),M=O(n,N,b.onContentChange),C=e.useRef(0),A=e.useRef(""),T=e.useRef(0),E=e.useRef(null),D=e.useRef("right"),P=e.useRef(0),I=p?fo:e.Fragment,L=p?{as:j,allowPinchZoom:!0}:void 0,_=e=>{var t,n;const r=A.current+e,o=x().filter((e=>!e.disabled)),i=document.activeElement,a=null===(t=o.find((e=>e.ref.current===i)))||void 0===t?void 0:t.textValue,u=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),o=r?t[0]:t,i=n?e.indexOf(n):-1;let a=function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(e,Math.max(i,0));1===o.length&&(a=a.filter((e=>e!==n)));const u=a.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return u!==n?u:void 0}(o.map((e=>e.textValue)),r,a),l=null===(n=o.find((e=>e.textValue===u)))||void 0===n?void 0:n.ref.current;!function e(t){A.current=t,window.clearTimeout(C.current),""!==t&&(C.current=window.setTimeout((()=>e("")),1e3))}(r),l&&setTimeout((()=>l.focus()))};e.useEffect((()=>()=>window.clearTimeout(C.current)),[]),Nr();const F=e.useCallback((e=>{var t,n;return D.current===(null===(t=E.current)||void 0===t?void 0:t.side)&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const e=t[i].x,u=t[i].y,l=t[a].x,s=t[a].y;u>r!=s>r&&n<(l-e)*(r-u)/(s-u)+e&&(o=!o)}return o}(n,t)}(e,null===(n=E.current)||void 0===n?void 0:n.area)}),[]);return e.createElement(Sd,{scope:r,searchRef:A,onItemEnter:e.useCallback((e=>{F(e)&&e.preventDefault()}),[F]),onItemLeave:e.useCallback((e=>{var t;F(e)||(null===(t=N.current)||void 0===t||t.focus(),S(null))}),[F]),onTriggerLeave:e.useCallback((e=>{F(e)&&e.preventDefault()}),[F]),pointerGraceTimerRef:T,onPointerGraceIntentChange:e.useCallback((e=>{E.current=e}),[])},e.createElement(I,L,e.createElement(yr,{asChild:!0,trapped:i,onMountAutoFocus:Je(a,(e=>{var t;e.preventDefault(),null===(t=N.current)||void 0===t||t.focus()})),onUnmountAutoFocus:u},e.createElement(it,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:v},e.createElement(td,Ce({asChild:!0},w,{dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:k,onCurrentTabStopIdChange:S,onEntryFocus:Je(s,(e=>{y.isUsingKeyboardRef.current||e.preventDefault()}))}),e.createElement(Un,Ce({role:"menu","aria-orientation":"vertical","data-state":Gd(b.open),"data-radix-menu-content":"",dir:y.dir},g,m,{ref:M,style:{outline:"none",...m.style},onKeyDown:Je(m.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&_(e.key));const o=N.current;if(e.target!==o)return;if(!id.includes(e.key))return;e.preventDefault();const i=x().filter((e=>!e.disabled)).map((e=>e.ref.current));od.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(i)})),onBlur:Je(t.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(C.current),A.current="")})),onPointerMove:Je(t.onPointerMove,Zd((e=>{const t=e.target,n=P.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>P.current?"right":"left";D.current=t,P.current=e.clientX}})))})))))))})),Ed=e.forwardRef(((t,n)=>{const{ue:r,...o}=t;return e.createElement(Ae.div,Ce({},o,{ref:n}))})),Dd="MenuItem",Pd="menu.itemSelect",Id=e.forwardRef(((t,n)=>{const{disabled:r=!1,onSelect:o,...i}=t,a=e.useRef(null),u=gd(Dd,t.ue),l=Nd(Dd,t.ue),s=O(n,a),c=e.useRef(!1);return e.createElement(Ld,Ce({},i,{ref:s,disabled:r,onClick:Je(t.onClick,(()=>{const e=a.current;if(!r&&e){const t=new CustomEvent(Pd,{bubbles:!0,cancelable:!0});e.addEventListener(Pd,(e=>null==o?void 0:o(e)),{once:!0}),Te(e,t),t.defaultPrevented?c.current=!1:u.onClose()}})),onPointerDown:e=>{var n;null===(n=t.onPointerDown)||void 0===n||n.call(t,e),c.current=!0},onPointerUp:Je(t.onPointerUp,(e=>{var t;c.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:Je(t.onKeyDown,(e=>{const t=""!==l.searchRef.current;r||t&&" "===e.key||rd.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),Ld=e.forwardRef(((t,n)=>{const{ue:r,disabled:o=!1,textValue:i,...a}=t,u=Nd(Dd,r),l=pd(r),s=e.useRef(null),c=O(n,s),[d,f]=e.useState(!1),[h,v]=e.useState("");return e.useEffect((()=>{const e=s.current;var t;e&&v((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),e.createElement(sd.ItemSlot,{scope:r,disabled:o,textValue:null!=i?i:h},e.createElement(nd,Ce({asChild:!0},l,{focusable:!o}),e.createElement(Ae.div,Ce({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0},a,{ref:c,onPointerMove:Je(t.onPointerMove,Zd((e=>{if(o)u.onItemLeave(e);else if(u.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus()}}))),onPointerLeave:Je(t.onPointerLeave,Zd((e=>u.onItemLeave(e)))),onFocus:Je(t.onFocus,(()=>f(!0))),onBlur:Je(t.onBlur,(()=>f(!1)))}))))})),_d=e.forwardRef(((t,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=t;return e.createElement($d,{scope:t.ue,checked:r},e.createElement(Id,Ce({role:"menuitemcheckbox","aria-checked":Yd(r)?"mixed":r},i,{ref:n,"data-state":Xd(r),onSelect:Je(i.onSelect,(()=>null==o?void 0:o(!!Yd(r)||!r)),{checkForDefaultPrevented:!1})})))})),[Fd,Rd]=fd("MenuRadioGroup",{value:void 0,onValueChange:()=>{}}),Bd=e.forwardRef(((t,n)=>{const{value:r,...o}=t,i=Rd("MenuRadioItem",t.ue),a=r===i.value;return e.createElement($d,{scope:t.ue,checked:a},e.createElement(Id,Ce({role:"menuitemradio","aria-checked":a},o,{ref:n,"data-state":Xd(a),onSelect:Je(o.onSelect,(()=>{var e;return null===(e=i.onValueChange)||void 0===e?void 0:e.call(i,r)}),{checkForDefaultPrevented:!1})})))})),zd="MenuItemIndicator",[$d,Wd]=fd(zd,{checked:!1}),Vd=e.forwardRef(((t,n)=>{const{ue:r,forceMount:o,...i}=t,a=Wd(zd,r);return e.createElement(qn,{present:o||Yd(a.checked)||!0===a.checked},e.createElement(Ae.span,Ce({},i,{ref:n,"data-state":Xd(a.checked)})))})),Ud=e.forwardRef(((t,n)=>{const{ue:r,...o}=t;return e.createElement(Ae.div,Ce({role:"separator","aria-orientation":"horizontal"},o,{ref:n}))})),[Hd,qd]=fd("MenuSub"),Kd="MenuSubTrigger";function Gd(e){return e?"open":"closed"}function Yd(e){return"indeterminate"===e}function Xd(e){return Yd(e)?"indeterminate":e?"checked":"unchecked"}function Zd(e){return t=>"mouse"===t.pointerType?e(t):void 0}const Qd=wd,Jd=t=>{const{ue:n,forceMount:r,children:o,container:i}=t,a=bd(xd,n);return e.createElement(kd,{scope:n,forceMount:r},e.createElement(qn,{present:r||a.open},e.createElement(Hn,{asChild:!0,container:i},o)))},ef=Md,tf=Ed,nf=Id,rf=_d,of=Bd,af=Vd,uf=Ud,lf=e.forwardRef(((t,n)=>{const r=bd(Kd,t.ue),o=gd(Kd,t.ue),i=qd(Kd,t.ue),a=Nd(Kd,t.ue),u=e.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:s}=a,c={ue:t.ue},d=e.useCallback((()=>{u.current&&window.clearTimeout(u.current),u.current=null}),[]);return e.useEffect((()=>d),[d]),e.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),s(null)}}),[l,s]),e.createElement(wd,Ce({asChild:!0},c),e.createElement(Ld,Ce({id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":Gd(r.open)},t,{ref:k(n,i.onTriggerChange),onClick:e=>{var n;null===(n=t.onClick)||void 0===n||n.call(t,e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Je(t.onPointerMove,Zd((e=>{a.onItemEnter(e),e.defaultPrevented||t.disabled||r.open||u.current||(a.onPointerGraceIntentChange(null),u.current=window.setTimeout((()=>{r.onOpenChange(!0),d()}),100))}))),onPointerLeave:Je(t.onPointerLeave,Zd((e=>{var t;d();const n=null===(t=r.content)||void 0===t?void 0:t.getBoundingClientRect();if(n){var o;const t=null===(o=r.content)||void 0===o?void 0:o.dataset.side,i="right"===t,u=i?-5:5,s=n[i?"left":"right"],c=n[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+u,y:e.clientY},{x:s,y:n.top},{x:c,y:n.top},{x:c,y:n.bottom},{x:s,y:n.bottom}],side:t}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:Je(t.onKeyDown,(e=>{const n=""!==a.searchRef.current;var i;t.disabled||n&&" "===e.key||ad[o.dir].includes(e.key)&&(r.onOpenChange(!0),null===(i=r.content)||void 0===i||i.focus(),e.preventDefault())}))})))})),sf=e.forwardRef(((t,n)=>{const r=Od(jd,t.ue),{forceMount:o=r.forceMount,...i}=t,a=bd(jd,t.ue),u=gd(jd,t.ue),l=qd("MenuSubContent",t.ue),s=e.useRef(null),c=O(n,s);return e.createElement(sd.Provider,{scope:t.ue},e.createElement(qn,{present:o||a.open},e.createElement(sd.Slot,{scope:t.ue},e.createElement(Td,Ce({id:l.contentId,"aria-labelledby":l.triggerId},i,{ref:c,align:"start",side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;u.isUsingKeyboardRef.current&&(null===(t=s.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Je(t.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:Je(t.onEscapeKeyDown,(e=>{u.onClose(),e.preventDefault()})),onKeyDown:Je(t.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=ud[u.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))})),cf="ContextMenu",[df,ff]=je(cf,[hd]),hf=hd(),[vf,pf]=df(cf),mf=t=>{const{le:n,...r}=t,o=hf(n);return e.createElement(Jd,x({},o,r))},bf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=pf("ContextMenuContent",r),a=hf(r),u=e.useRef(!1);return e.createElement(ef,x({},a,o,{ref:n,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:e=>{var n;null===(n=t.onCloseAutoFocus)||void 0===n||n.call(t,e),!e.defaultPrevented&&u.current&&e.preventDefault(),u.current=!1},onInteractOutside:e=>{var n;null===(n=t.onInteractOutside)||void 0===n||n.call(t,e),e.defaultPrevented||i.modal||(u.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),yf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=hf(r);return e.createElement(tf,x({},i,o,{ref:n}))})),gf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=hf(r);return e.createElement(nf,x({},i,o,{ref:n}))})),wf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=hf(r);return e.createElement(rf,x({},i,o,{ref:n}))})),xf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=hf(r);return e.createElement(of,x({},i,o,{ref:n}))})),kf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=hf(r);return e.createElement(af,x({},i,o,{ref:n}))})),Of=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=hf(r);return e.createElement(uf,x({},i,o,{ref:n}))})),jf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=hf(r);return e.createElement(lf,x({},i,o,{ref:n}))})),Sf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=hf(r);return e.createElement(sf,x({},i,o,{ref:n,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),Nf="DropdownMenu",[Mf,Cf]=je(Nf,[hd]),Af=hd(),[Tf,Ef]=Mf(Nf),Df=t=>{const{se:n,...r}=t,o=Af(n);return e.createElement(Jd,x({},o,r))},Pf=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Ef("DropdownMenuContent",r),a=Af(r),u=e.useRef(!1);return e.createElement(ef,x({id:i.contentId,"aria-labelledby":i.triggerId},a,o,{ref:n,onCloseAutoFocus:Je(t.onCloseAutoFocus,(e=>{var t;u.current||null===(t=i.triggerRef.current)||void 0===t||t.focus(),u.current=!1,e.preventDefault()})),onInteractOutside:Je(t.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.modal&&!r||(u.current=!0)})),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),If=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Af(r);return e.createElement(tf,x({},i,o,{ref:n}))})),Lf=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Af(r);return e.createElement(nf,x({},i,o,{ref:n}))})),_f=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Af(r);return e.createElement(rf,x({},i,o,{ref:n}))})),Ff=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Af(r);return e.createElement(of,x({},i,o,{ref:n}))})),Rf=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Af(r);return e.createElement(af,x({},i,o,{ref:n}))})),Bf=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Af(r);return e.createElement(uf,x({},i,o,{ref:n}))})),zf=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Af(r);return e.createElement(lf,x({},i,o,{ref:n}))})),$f=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Af(r);return e.createElement(sf,x({},i,o,{ref:n,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),Wf=e.createContext(null),Vf=e.forwardRef(((t,n)=>e.createElement(Ae.label,x({},t,{ref:n,onMouseDown:e=>{var n;null===(n=t.onMouseDown)||void 0===n||n.call(t,e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()}})))),Uf="Menubar",[Hf,qf,Kf]=hi(Uf),[Gf,Yf]=je(Uf,[Kf,Kc]),Xf=hd(),Zf=Kc(),[Qf,Jf]=Gf(Uf),eh=e.forwardRef(((t,n)=>{const{ce:r,value:o,onValueChange:i,defaultValue:a,loop:u=!0,dir:l,...s}=t,c=Ai(l),d=Zf(r),[f="",h]=Gn({prop:o,onChange:i,defaultProp:a}),[v,p]=e.useState(null);return e.createElement(Qf,{scope:r,value:f,onMenuOpen:e.useCallback((e=>{h(e),p(e)}),[h]),onMenuClose:e.useCallback((()=>h("")),[h]),onMenuToggle:e.useCallback((e=>{h((t=>Boolean(t)?"":e)),p(e)}),[h]),dir:c,loop:u},e.createElement(Hf.Provider,{scope:r},e.createElement(Hf.Slot,{scope:r},e.createElement(td,x({asChild:!0},d,{orientation:"horizontal",loop:u,dir:c,currentTabStopId:v,onCurrentTabStopIdChange:p}),e.createElement(Ae.div,x({role:"menubar"},s,{ref:n}))))))})),[th,nh]=Gf("MenubarMenu"),rh="MenubarTrigger",oh=e.forwardRef(((t,n)=>{const{ce:r,disabled:o=!1,...i}=t,a=Zf(r),u=Xf(r),l=Jf(rh,r),s=nh(rh,r),c=e.useRef(null),d=O(n,c,s.triggerRef),[f,h]=e.useState(!1),v=l.value===s.value;return e.createElement(Hf.ItemSlot,{scope:r,value:s.value,disabled:o},e.createElement(nd,x({asChild:!0},a,{focusable:!o,tabStopId:s.value}),e.createElement(Qd,x({asChild:!0},u),e.createElement(Ae.button,x({type:"button",role:"menuitem",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":v,"aria-controls":v?s.contentId:void 0,"data-highlighted":f?"":void 0,"data-state":v?"open":"closed","data-disabled":o?"":void 0,disabled:o},i,{ref:d,onPointerDown:Je(t.onPointerDown,(e=>{o||0!==e.button||!1!==e.ctrlKey||(l.onMenuOpen(s.value),v||e.preventDefault())})),onPointerEnter:Je(t.onPointerEnter,(()=>{var e;Boolean(l.value)&&!v&&(l.onMenuOpen(s.value),null===(e=c.current)||void 0===e||e.focus())})),onKeyDown:Je(t.onKeyDown,(e=>{o||(["Enter"," "].includes(e.key)&&l.onMenuToggle(s.value),"ArrowDown"===e.key&&l.onMenuOpen(s.value),["Enter"," ","ArrowDown"].includes(e.key)&&(s.wasKeyboardTriggerOpenRef.current=!0,e.preventDefault()))})),onFocus:Je(t.onFocus,(()=>h(!0))),onBlur:Je(t.onBlur,(()=>h(!1)))})))))})),ih="MenubarContent",ah=e.forwardRef(((t,n)=>{const{ce:r,align:o="start",...i}=t,a=Xf(r),u=Jf(ih,r),l=nh(ih,r),s=qf(r),c=e.useRef(!1);return e.createElement(ef,x({id:l.contentId,"aria-labelledby":l.triggerId,"data-radix-menubar-content":""},a,i,{ref:n,align:o,onCloseAutoFocus:Je(t.onCloseAutoFocus,(e=>{var t;Boolean(u.value)||c.current||(null===(t=l.triggerRef.current)||void 0===t||t.focus());c.current=!1,e.preventDefault()})),onFocusOutside:Je(t.onFocusOutside,(e=>{const t=e.target;s().some((e=>{var n;return null===(n=e.ref.current)||void 0===n?void 0:n.contains(t)}))&&e.preventDefault()})),onInteractOutside:Je(t.onInteractOutside,(()=>{c.current=!0})),onEntryFocus:e=>{l.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:Je(t.onKeyDown,(e=>{if(["ArrowRight","ArrowLeft"].includes(e.key)){const t=e.target,n=t.hasAttribute("data-radix-menubar-subtrigger"),r=t.closest("[data-radix-menubar-content]")!==e.currentTarget,o=("rtl"===u.dir?"ArrowRight":"ArrowLeft")===e.key;if(!o&&n)return;if(r&&o)return;let i=s().filter((e=>!e.disabled)).map((e=>e.value));o&&i.reverse();const a=i.indexOf(l.value);i=u.loop?function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(i,a+1):i.slice(a+1);const[c]=i;c&&u.onMenuOpen(c)}}),{checkForDefaultPrevented:!1}),style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}}))}));const uh=eh,lh=oh,sh=t=>{const{ce:n,...r}=t,o=Xf(n);return e.createElement(Jd,x({},o,r))},ch=ah,dh=e.forwardRef(((t,n)=>{const{ce:r,...o}=t,i=Xf(r);return e.createElement(tf,x({},i,o,{ref:n}))})),fh=e.forwardRef(((t,n)=>{const{ce:r,...o}=t,i=Xf(r);return e.createElement(nf,x({},i,o,{ref:n}))})),hh=e.forwardRef(((t,n)=>{const{ce:r,...o}=t,i=Xf(r);return e.createElement(rf,x({},i,o,{ref:n}))})),vh=e.forwardRef(((t,n)=>{const{ce:r,...o}=t,i=Xf(r);return e.createElement(of,x({},i,o,{ref:n}))})),ph=e.forwardRef(((t,n)=>{const{ce:r,...o}=t,i=Xf(r);return e.createElement(af,x({},i,o,{ref:n}))})),mh=e.forwardRef(((t,n)=>{const{ce:r,...o}=t,i=Xf(r);return e.createElement(uf,x({},i,o,{ref:n}))})),bh=e.forwardRef(((t,n)=>{const{ce:r,...o}=t,i=Xf(r);return e.createElement(lf,x({"data-radix-menubar-subtrigger":""},i,o,{ref:n}))})),yh=e.forwardRef(((t,n)=>{const{ce:r,...o}=t,i=Xf(r);return e.createElement(sf,x({},i,{"data-radix-menubar-content":""},o,{ref:n,style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}}))})),gh="NavigationMenu",[wh,xh,kh]=hi(gh),[Oh,jh,Sh]=hi(gh),[Nh,Mh]=je(gh,[kh,Sh]),[Ch,Ah]=Nh(gh),[Th,Eh]=Nh(gh),Dh=e.forwardRef(((t,n)=>{const{de:r,value:o,onValueChange:i,defaultValue:a,delayDuration:u=200,skipDelayDuration:l=300,orientation:s="horizontal",dir:c,...d}=t,[f,h]=e.useState(null),v=O(n,(e=>h(e))),p=Ai(c),m=e.useRef(0),b=e.useRef(0),y=e.useRef(0),[g,w]=e.useState(!0),[k="",j]=Gn({prop:o,onChange:e=>{const t=l>0;""!==e?(window.clearTimeout(y.current),t&&w(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout((()=>w(!0)),l)),null==i||i(e)},defaultProp:a}),S=e.useCallback((()=>{window.clearTimeout(b.current),b.current=window.setTimeout((()=>j("")),150)}),[j]),N=e.useCallback((e=>{window.clearTimeout(b.current),j(e)}),[j]),M=e.useCallback((e=>{k===e?window.clearTimeout(b.current):m.current=window.setTimeout((()=>{window.clearTimeout(b.current),j(e)}),u)}),[k,j,u]);return e.useEffect((()=>()=>{window.clearTimeout(m.current),window.clearTimeout(b.current),window.clearTimeout(y.current)}),[]),e.createElement(Ph,{scope:r,isRootMenu:!0,value:k,dir:p,orientation:s,rootNavigationMenu:f,onTriggerEnter:e=>{window.clearTimeout(m.current),g?M(e):N(e)},onTriggerLeave:()=>{window.clearTimeout(m.current),S()},onContentEnter:()=>window.clearTimeout(b.current),onContentLeave:S,onItemSelect:e=>{j((t=>t===e?"":e))},onItemDismiss:()=>j("")},e.createElement(Ae.nav,x({"aria-label":"Main","data-orientation":s,dir:p},d,{ref:v})))})),Ph=t=>{const{scope:n,isRootMenu:r,rootNavigationMenu:o,dir:i,orientation:a,children:u,value:l,onItemSelect:s,onItemDismiss:c,onTriggerEnter:d,onTriggerLeave:f,onContentEnter:h,onContentLeave:v}=t,[p,m]=e.useState(null),[b,y]=e.useState(new Map),[g,w]=e.useState(null);return e.createElement(Ch,{scope:n,isRootMenu:r,rootNavigationMenu:o,value:l,previousValue:cl(l),baseId:ft(),dir:i,orientation:a,viewport:p,onViewportChange:m,indicatorTrack:g,onIndicatorTrackChange:w,onTriggerEnter:Ne(d),onTriggerLeave:Ne(f),onContentEnter:Ne(h),onContentLeave:Ne(v),onItemSelect:Ne(s),onItemDismiss:Ne(c),onViewportContentChange:e.useCallback(((e,t)=>{y((n=>(n.set(e,t),new Map(n))))}),[]),onViewportContentRemove:e.useCallback((e=>{y((t=>t.has(e)?(t.delete(e),new Map(t)):t))}),[])},e.createElement(wh.Provider,{scope:n},e.createElement(Th,{scope:n,items:b},u)))},Ih=e.forwardRef(((t,n)=>{const{de:r,...o}=t,i=Ah("NavigationMenuList",r),a=e.createElement(Ae.ul,x({"data-orientation":i.orientation},o,{ref:n}));return e.createElement(Ae.div,{style:{position:"relative"},ref:i.onIndicatorTrackChange},e.createElement(wh.Slot,{scope:r},i.isRootMenu?e.createElement(Xh,{asChild:!0},a):a))})),[Lh,_h]=Nh("NavigationMenuItem"),Fh="NavigationMenuTrigger",Rh=e.forwardRef(((t,n)=>{const{de:r,disabled:o,...i}=t,a=Ah(Fh,t.de),u=_h(Fh,t.de),l=e.useRef(null),s=O(l,u.triggerRef,n),c=nv(a.baseId,u.value),d=rv(a.baseId,u.value),f=e.useRef(!1),h=e.useRef(!1),v=u.value===a.value;return e.createElement(e.Fragment,null,e.createElement(wh.ItemSlot,{scope:r,value:u.value},e.createElement(Qh,{asChild:!0},e.createElement(Ae.button,x({id:c,disabled:o,"data-disabled":o?"":void 0,"data-state":tv(v),"aria-expanded":v,"aria-controls":d},i,{ref:s,onPointerEnter:Je(t.onPointerEnter,(()=>{h.current=!1,u.wasEscapeCloseRef.current=!1})),onPointerMove:Je(t.onPointerMove,ov((()=>{o||h.current||u.wasEscapeCloseRef.current||f.current||(a.onTriggerEnter(u.value),f.current=!0)}))),onPointerLeave:Je(t.onPointerLeave,ov((()=>{o||(a.onTriggerLeave(),f.current=!1)}))),onClick:Je(t.onClick,(()=>{a.onItemSelect(u.value),h.current=v})),onKeyDown:Je(t.onKeyDown,(e=>{const t={horizontal:"ArrowDown",vertical:"rtl"===a.dir?"ArrowLeft":"ArrowRight"}[a.orientation];v&&e.key===t&&(u.onEntryKeyDown(),e.preventDefault())}))})))),v&&e.createElement(e.Fragment,null,e.createElement(Xn,{"aria-hidden":!0,tabIndex:0,ref:u.focusProxyRef,onFocus:e=>{const t=u.contentRef.current,n=e.relatedTarget,r=n===l.current,o=null==t?void 0:t.contains(n);!r&&o||u.onFocusProxyEnter(r?"start":"end")}}),a.viewport&&e.createElement("span",{"aria-owns":d})))})),Bh="NavigationMenuIndicator",zh=e.forwardRef(((n,r)=>{const{forceMount:o,...i}=n,a=Ah(Bh,n.de),u=Boolean(a.value);return a.indicatorTrack?t.createPortal(e.createElement(qn,{present:o||u},e.createElement($h,x({},i,{ref:r}))),a.indicatorTrack):null})),$h=e.forwardRef(((t,n)=>{const{de:r,...o}=t,i=Ah(Bh,r),a=xh(r),[u,l]=e.useState(null),[s,c]=e.useState(null),d="horizontal"===i.orientation,f=Boolean(i.value);e.useEffect((()=>{var e;const t=null===(e=a().find((e=>e.value===i.value)))||void 0===e?void 0:e.ref.current;t&&l(t)}),[a,i.value]);const h=()=>{u&&c({size:d?u.offsetWidth:u.offsetHeight,offset:d?u.offsetLeft:u.offsetTop})};return ev(u,h),ev(i.indicatorTrack,h),s?e.createElement(Ae.div,x({"aria-hidden":!0,"data-state":f?"visible":"hidden","data-orientation":i.orientation},o,{ref:n,style:{position:"absolute",...d?{left:0,width:s.size+"px",transform:`translateX(${s.offset}px)`}:{top:0,height:s.size+"px",transform:`translateY(${s.offset}px)`},...o.style}})):null})),Wh="NavigationMenuContent",Vh=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Ah(Wh,t.de),a=_h(Wh,t.de),u=O(a.contentRef,n),l=a.value===i.value,s={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...o};return i.viewport?e.createElement(Uh,x({forceMount:r},s,{ref:u})):e.createElement(qn,{present:r||l},e.createElement(qh,x({"data-state":tv(l)},s,{ref:u,onPointerEnter:Je(t.onPointerEnter,i.onContentEnter),onPointerLeave:Je(t.onPointerLeave,ov(i.onContentLeave)),style:{pointerEvents:!l&&i.isRootMenu?"none":void 0,...s.style}})))})),Uh=e.forwardRef(((e,t)=>{const n=Ah(Wh,e.de),{onViewportContentChange:r,onViewportContentRemove:o}=n;return Me((()=>{r(e.value,{ref:t,...e})}),[e,t,r]),Me((()=>()=>o(e.value)),[e.value,o]),null})),Hh="navigationMenu.rootContentDismiss",qh=e.forwardRef(((t,n)=>{const{de:r,value:o,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:u,onRootContentClose:l,onContentFocusOutside:s,...c}=t,d=Ah(Wh,r),f=e.useRef(null),h=O(f,n),v=nv(d.baseId,o),p=rv(d.baseId,o),m=xh(r),b=e.useRef(null),{onItemDismiss:y}=d;e.useEffect((()=>{const e=f.current;if(d.isRootMenu&&e){const t=()=>{var t;y(),l(),e.contains(document.activeElement)&&(null===(t=i.current)||void 0===t||t.focus())};return e.addEventListener(Hh,t),()=>e.removeEventListener(Hh,t)}}),[d.isRootMenu,t.value,i,y,l]);const g=e.useMemo((()=>{const e=m().map((e=>e.value));"rtl"===d.dir&&e.reverse();const t=e.indexOf(d.value),n=e.indexOf(d.previousValue),r=o===d.value,i=n===e.indexOf(o);if(!r&&!i)return b.current;const a=(()=>{if(t!==n){if(r&&-1!==n)return t>n?"from-end":"from-start";if(i&&-1!==t)return t>n?"to-start":"to-end"}return null})();return b.current=a,a}),[d.previousValue,d.value,d.dir,m,o]);return e.createElement(Xh,{asChild:!0},e.createElement(it,x({id:p,"aria-labelledby":v,"data-motion":g,"data-orientation":d.orientation},c,{ref:h,onDismiss:()=>{var e;const t=new Event(Hh,{bubbles:!0,cancelable:!0});null===(e=f.current)||void 0===e||e.dispatchEvent(t)},onFocusOutside:Je(t.onFocusOutside,(e=>{var t;s();const n=e.target;null!==(t=d.rootNavigationMenu)&&void 0!==t&&t.contains(n)&&e.preventDefault()})),onPointerDownOutside:Je(t.onPointerDownOutside,(e=>{var t;const n=e.target,r=m().some((e=>{var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(n)})),o=d.isRootMenu&&(null===(t=d.viewport)||void 0===t?void 0:t.contains(n));(r||o||!d.isRootMenu)&&e.preventDefault()})),onKeyDown:Je(t.onKeyDown,(e=>{const t=e.altKey||e.ctrlKey||e.metaKey;if("Tab"===e.key&&!t){const t=function(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}(e.currentTarget),r=document.activeElement,o=t.findIndex((e=>e===r));var n;if(Jh(e.shiftKey?t.slice(0,o).reverse():t.slice(o+1,t.length)))e.preventDefault();else null===(n=a.current)||void 0===n||n.focus()}})),onEscapeKeyDown:Je(t.onEscapeKeyDown,(e=>{u.current=!0}))})))})),Kh="NavigationMenuViewport",Gh=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Ah(Kh,t.de),a=Boolean(i.value);return e.createElement(qn,{present:r||a},e.createElement(Yh,x({},o,{ref:n})))})),Yh=e.forwardRef(((t,n)=>{const{de:r,children:o,...i}=t,a=Ah(Kh,r),u=O(n,a.onViewportChange),l=Eh(Wh,t.de),[s,c]=e.useState(null),[d,f]=e.useState(null),h=s?(null==s?void 0:s.width)+"px":void 0,v=s?(null==s?void 0:s.height)+"px":void 0,p=Boolean(a.value),m=p?a.value:a.previousValue;return ev(d,(()=>{d&&c({width:d.offsetWidth,height:d.offsetHeight})})),e.createElement(Ae.div,x({"data-state":tv(p),"data-orientation":a.orientation},i,{ref:u,style:{pointerEvents:!p&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":h,"--radix-navigation-menu-viewport-height":v,...i.style},onPointerEnter:Je(t.onPointerEnter,a.onContentEnter),onPointerLeave:Je(t.onPointerLeave,ov(a.onContentLeave))}),Array.from(l.items).map((([t,{ref:n,forceMount:r,...o}])=>{const i=m===t;return e.createElement(qn,{key:t,present:r||i},e.createElement(qh,x({},o,{ref:k(n,(e=>{i&&e&&f(e)}))})))})))})),Xh=e.forwardRef(((t,n)=>{const{de:r,...o}=t,i=Ah("FocusGroup",r);return e.createElement(Oh.Provider,{scope:r},e.createElement(Oh.Slot,{scope:r},e.createElement(Ae.div,x({dir:i.dir},o,{ref:n}))))})),Zh=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Qh=e.forwardRef(((t,n)=>{const{de:r,...o}=t,i=jh(r),a=Ah("FocusGroupItem",r);return e.createElement(Oh.ItemSlot,{scope:r},e.createElement(Ae.button,x({},o,{ref:n,onKeyDown:Je(t.onKeyDown,(e=>{if(["Home","End",...Zh].includes(e.key)){let t=i().map((e=>e.ref.current));if(["rtl"===a.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),Zh.includes(e.key)){const n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout((()=>Jh(t))),e.preventDefault()}}))})))}));function Jh(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}function ev(e,t){const n=Ne(t);Me((()=>{let t=0;if(e){const r=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}}),[e,n])}function tv(e){return e?"open":"closed"}function nv(e,t){return`${e}-trigger-${t}`}function rv(e,t){return`${e}-content-${t}`}function ov(e){return t=>"mouse"===t.pointerType?e(t):void 0}const iv=Dh,av=Ih,uv=Rh,lv=zh,sv=Vh,cv=Gh,dv="Popover",[fv,hv]=je(dv,[Dn]),vv=Dn(),[pv,mv]=fv(dv),bv="PopoverPortal",[yv,gv]=fv(bv,{forceMount:void 0}),wv="PopoverContent",xv=e.forwardRef(((t,n)=>{const r=gv(wv,t.fe),{forceMount:o=r.forceMount,...i}=t,a=mv(wv,t.fe);return e.createElement(qn,{present:o||a.open},a.modal?e.createElement(kv,x({},i,{ref:n})):e.createElement(Ov,x({},i,{ref:n})))})),kv=e.forwardRef(((t,n)=>{const r=mv(wv,t.fe),o=e.useRef(null),i=O(n,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return go(e)}),[]),e.createElement(fo,{as:j,allowPinchZoom:!0},e.createElement(jv,x({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Je(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),a.current||null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Je(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:Je(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),Ov=e.forwardRef(((t,n)=>{const r=mv(wv,t.fe),o=e.useRef(!1),i=e.useRef(!1);return e.createElement(jv,x({},t,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{var n,a;(null===(n=t.onCloseAutoFocus)||void 0===n||n.call(t,e),e.defaultPrevented)||(o.current||null===(a=r.triggerRef.current)||void 0===a||a.focus(),e.preventDefault());o.current=!1,i.current=!1},onInteractOutside:e=>{var n,a;null===(n=t.onInteractOutside)||void 0===n||n.call(t,e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const u=e.target;(null===(a=r.triggerRef.current)||void 0===a?void 0:a.contains(u))&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}}))})),jv=e.forwardRef(((t,n)=>{const{fe:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:d,...f}=t,h=mv(wv,r),v=vv(r);return Nr(),e.createElement(yr,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a},e.createElement(it,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1)},e.createElement(Un,x({"data-state":(p=h.open,p?"open":"closed"),role:"dialog",id:h.contentId},v,f,{ref:n,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))));var p}));const Sv=t=>{const{fe:n,forceMount:r,children:o,container:i}=t,a=mv(bv,n);return e.createElement(yv,{scope:n,forceMount:r},e.createElement(qn,{present:r||a.open},e.createElement(Hn,{asChild:!0,container:i},o)))},Nv=xv,Mv="Radio",[Cv,Av]=je(Mv),[Tv,Ev]=Cv(Mv),Dv=e.forwardRef(((t,n)=>{const{he:r,name:o,checked:i=!1,required:a,disabled:u,value:l="on",onCheck:s,...c}=t,[d,f]=e.useState(null),h=O(n,(e=>f(e))),v=e.useRef(!1),p=!d||Boolean(d.closest("form"));return e.createElement(Tv,{scope:r,checked:i,disabled:u},e.createElement(Ae.button,x({type:"button",role:"radio","aria-checked":i,"data-state":Lv(i),"data-disabled":u?"":void 0,disabled:u,value:l},c,{ref:h,onClick:Je(t.onClick,(e=>{i||null==s||s(),p&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())}))})),p&&e.createElement(Iv,{control:d,bubbles:!v.current,name:o,value:l,checked:i,required:a,disabled:u,style:{transform:"translateX(-100%)"}}))})),Pv=e.forwardRef(((t,n)=>{const{he:r,forceMount:o,...i}=t,a=Ev("RadioIndicator",r);return e.createElement(qn,{present:o||a.checked},e.createElement(Ae.span,x({"data-state":Lv(a.checked),"data-disabled":a.disabled?"":void 0},i,{ref:n})))})),Iv=t=>{const{control:n,checked:r,bubbles:o=!0,...i}=t,a=e.useRef(null),u=cl(r),l=An(n);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[u,r,o]),e.createElement("input",x({type:"radio","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:a,style:{...t.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Lv(e){return e?"checked":"unchecked"}const _v=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Fv="RadioGroup",[Rv,Bv]=je(Fv,[Kc,Av]),zv=Kc(),$v=Av(),[Wv,Vv]=Rv(Fv),Uv=e.forwardRef(((t,n)=>{const{ve:r,name:o,defaultValue:i,value:a,required:u=!1,disabled:l=!1,orientation:s,dir:c,loop:d=!0,onValueChange:f,...h}=t,v=zv(r),p=Ai(c),[m,b]=Gn({prop:a,defaultProp:i,onChange:f});return e.createElement(Wv,{scope:r,name:o,required:u,disabled:l,value:m,onValueChange:b},e.createElement(td,x({asChild:!0},v,{orientation:s,dir:p,loop:d}),e.createElement(Ae.div,x({role:"radiogroup","aria-required":u,"aria-orientation":s,"data-disabled":l?"":void 0,dir:p},h,{ref:n}))))})),Hv=Uv,qv=e.forwardRef(((t,n)=>{const{ve:r,disabled:o,...i}=t,a=Vv("RadioGroupItem",r),u=a.disabled||o,l=zv(r),s=$v(r),c=e.useRef(null),d=O(n,c),f=a.value===i.value,h=e.useRef(!1);return e.useEffect((()=>{const e=e=>{_v.includes(e.key)&&(h.current=!0)},t=()=>h.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),e.createElement(nd,x({asChild:!0},l,{focusable:!u,active:f}),e.createElement(Dv,x({disabled:u,required:a.required,checked:f},s,i,{name:a.name,ref:d,onCheck:()=>a.onValueChange(i.value),onKeyDown:Je((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:Je(i.onFocus,(()=>{var e;h.current&&(null===(e=c.current)||void 0===e||e.click())}))})))})),Kv=e.forwardRef(((t,n)=>{const{ve:r,...o}=t,i=$v(r);return e.createElement(Pv,x({},i,o,{ref:n}))}));function Gv(e,[t,n]){return Math.min(n,Math.max(t,e))}const Yv="ScrollArea",[Xv,Zv]=je(Yv),[Qv,Jv]=Xv(Yv),ep=e.forwardRef(((t,n)=>{const{be:r,type:o="hover",dir:i,scrollHideDelay:a=600,...u}=t,[l,s]=e.useState(null),[c,d]=e.useState(null),[f,h]=e.useState(null),[v,p]=e.useState(null),[m,b]=e.useState(null),[y,g]=e.useState(0),[w,k]=e.useState(0),[j,S]=e.useState(!1),[N,M]=e.useState(!1),C=O(n,(e=>s(e))),A=Ai(i);return e.createElement(Qv,{scope:r,type:o,dir:A,scrollHideDelay:a,scrollArea:l,viewport:c,onViewportChange:d,content:f,onContentChange:h,scrollbarX:v,onScrollbarXChange:p,scrollbarXEnabled:j,onScrollbarXEnabledChange:S,scrollbarY:m,onScrollbarYChange:b,scrollbarYEnabled:N,onScrollbarYEnabledChange:M,onCornerWidthChange:g,onCornerHeightChange:k},e.createElement(Ae.div,x({dir:A},u,{ref:C,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":w+"px",...t.style}})))})),tp=e.forwardRef(((t,n)=>{const{be:r,children:o,...i}=t,a=Jv("ScrollAreaViewport",r),u=O(n,e.useRef(null),a.onViewportChange);return e.createElement(e.Fragment,null,e.createElement("style",{dangerouslySetInnerHTML:{ye:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),e.createElement(Ae.div,x({"data-radix-scroll-area-viewport":""},i,{ref:u,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...t.style}}),e.createElement("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"}},o)))})),np="ScrollAreaScrollbar",rp=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Jv(np,t.be),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:u}=i,l="horizontal"===t.orientation;return e.useEffect((()=>(l?a(!0):u(!0),()=>{l?a(!1):u(!1)})),[l,a,u]),"hover"===i.type?e.createElement(op,x({},o,{ref:n,forceMount:r})):"scroll"===i.type?e.createElement(ip,x({},o,{ref:n,forceMount:r})):"auto"===i.type?e.createElement(ap,x({},o,{ref:n,forceMount:r})):"always"===i.type?e.createElement(up,x({},o,{ref:n})):null})),op=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Jv(np,t.be),[a,u]=e.useState(!1);return e.useEffect((()=>{const e=i.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),u(!0)},r=()=>{t=window.setTimeout((()=>u(!1)),i.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}}),[i.scrollArea,i.scrollHideDelay]),e.createElement(qn,{present:r||a},e.createElement(ap,x({"data-state":a?"visible":"hidden"},o,{ref:n})))})),ip=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Jv(np,t.be),a="horizontal"===t.orientation,u=Np((()=>s("SCROLL_END")),100),[l,s]=(c="hidden",d={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},e.useReducer(((e,t)=>{const n=d[e][t];return null!=n?n:e}),c));var c,d;return e.useEffect((()=>{if("idle"===l){const e=window.setTimeout((()=>s("HIDE")),i.scrollHideDelay);return()=>window.clearTimeout(e)}}),[l,i.scrollHideDelay,s]),e.useEffect((()=>{const e=i.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(s("SCROLL"),u()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[i.viewport,a,s,u]),e.createElement(qn,{present:r||"hidden"!==l},e.createElement(up,x({"data-state":"hidden"===l?"hidden":"visible"},o,{ref:n,onPointerEnter:Je(t.onPointerEnter,(()=>s("POINTER_ENTER"))),onPointerLeave:Je(t.onPointerLeave,(()=>s("POINTER_LEAVE")))})))})),ap=e.forwardRef(((t,n)=>{const r=Jv(np,t.be),{forceMount:o,...i}=t,[a,u]=e.useState(!1),l="horizontal"===t.orientation,s=Np((()=>{if(r.viewport){const e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;u(l?e:t)}}),10);return Mp(r.viewport,s),Mp(r.content,s),e.createElement(qn,{present:o||a},e.createElement(up,x({"data-state":a?"visible":"hidden"},i,{ref:n})))})),up=e.forwardRef(((t,n)=>{const{orientation:r="vertical",...o}=t,i=Jv(np,t.be),a=e.useRef(null),u=e.useRef(0),[l,s]=e.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=wp(l.viewport,l.content),d={...o,sizes:l,onSizesChange:s,hasThumb:Boolean(c>0&&c<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:e=>u.current=e};function f(e,t){return function(e,t,n,r="ltr"){const o=xp(n),i=o/2,a=t||i,u=o-a,l=n.scrollbar.paddingStart+a,s=n.scrollbar.size-n.scrollbar.paddingEnd-u,c=n.content-n.viewport,d="ltr"===r?[0,c]:[-1*c,0],f=Op([l,s],d);return f(e)}(e,u.current,l,t)}return"horizontal"===r?e.createElement(lp,x({},d,{ref:n,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=kp(i.viewport.scrollLeft,l,i.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=f(e,i.dir))}})):"vertical"===r?e.createElement(sp,x({},d,{ref:n,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=kp(i.viewport.scrollTop,l);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=f(e))}})):null})),lp=e.forwardRef(((t,n)=>{const{sizes:r,onSizesChange:o,...i}=t,a=Jv(np,t.be),[u,l]=e.useState(),s=e.useRef(null),c=O(n,s,a.onScrollbarXChange);return e.useEffect((()=>{s.current&&l(getComputedStyle(s.current))}),[s]),e.createElement(fp,x({"data-orientation":"horizontal"},i,{ref:c,sizes:r,style:{bottom:0,left:"rtl"===a.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===a.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":xp(r)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.x),onDragScroll:e=>t.onDragScroll(e.x),onWheelScroll:(e,n)=>{if(a.viewport){const r=a.viewport.scrollLeft+e.deltaX;t.onWheelScroll(r),jp(r,n)&&e.preventDefault()}},onResize:()=>{s.current&&a.viewport&&u&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:s.current.clientWidth,paddingStart:gp(u.paddingLeft),paddingEnd:gp(u.paddingRight)}})}}))})),sp=e.forwardRef(((t,n)=>{const{sizes:r,onSizesChange:o,...i}=t,a=Jv(np,t.be),[u,l]=e.useState(),s=e.useRef(null),c=O(n,s,a.onScrollbarYChange);return e.useEffect((()=>{s.current&&l(getComputedStyle(s.current))}),[s]),e.createElement(fp,x({"data-orientation":"vertical"},i,{ref:c,sizes:r,style:{top:0,right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":xp(r)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.y),onDragScroll:e=>t.onDragScroll(e.y),onWheelScroll:(e,n)=>{if(a.viewport){const r=a.viewport.scrollTop+e.deltaY;t.onWheelScroll(r),jp(r,n)&&e.preventDefault()}},onResize:()=>{s.current&&a.viewport&&u&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:s.current.clientHeight,paddingStart:gp(u.paddingTop),paddingEnd:gp(u.paddingBottom)}})}}))})),[cp,dp]=Xv(np),fp=e.forwardRef(((t,n)=>{const{be:r,sizes:o,hasThumb:i,onThumbChange:a,onThumbPointerUp:u,onThumbPointerDown:l,onThumbPositionChange:s,onDragScroll:c,onWheelScroll:d,onResize:f,...h}=t,v=Jv(np,r),[p,m]=e.useState(null),b=O(n,(e=>m(e))),y=e.useRef(null),g=e.useRef(""),w=v.viewport,k=o.content-o.viewport,j=Ne(d),S=Ne(s),N=Np(f,10);function M(e){if(y.current){const t=e.clientX-y.current.left,n=e.clientY-y.current.top;c({x:t,y:n})}}return e.useEffect((()=>{const e=e=>{const t=e.target;(null==p?void 0:p.contains(t))&&j(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[w,p,k,j]),e.useEffect(S,[o,S]),Mp(p,N),Mp(v.content,N),e.createElement(cp,{scope:r,scrollbar:p,hasThumb:i,onThumbChange:Ne(a),onThumbPointerUp:Ne(u),onThumbPositionChange:S,onThumbPointerDown:Ne(l)},e.createElement(Ae.div,x({},h,{ref:b,style:{position:"absolute",...h.style},onPointerDown:Je(t.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),y.current=p.getBoundingClientRect(),g.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M(e)}})),onPointerMove:Je(t.onPointerMove,M),onPointerUp:Je(t.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=g.current,y.current=null}))})))})),hp="ScrollAreaThumb",vp=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=dp(hp,t.be);return e.createElement(qn,{present:r||i.hasThumb},e.createElement(pp,x({ref:n},o)))})),pp=e.forwardRef(((t,n)=>{const{be:r,style:o,...i}=t,a=Jv(hp,r),u=dp(hp,r),{onThumbPositionChange:l}=u,s=O(n,(e=>u.onThumbChange(e))),c=e.useRef(),d=Np((()=>{c.current&&(c.current(),c.current=void 0)}),100);return e.useEffect((()=>{const e=a.viewport;if(e){const t=()=>{if(d(),!c.current){const t=Sp(e,l);c.current=t,l()}};return l(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[a.viewport,d,l]),e.createElement(Ae.div,x({"data-state":u.hasThumb?"visible":"hidden"},i,{ref:s,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:Je(t.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;u.onThumbPointerDown({x:n,y:r})})),onPointerUp:Je(t.onPointerUp,u.onThumbPointerUp)}))})),mp="ScrollAreaCorner",bp=e.forwardRef(((t,n)=>{const r=Jv(mp,t.be),o=Boolean(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&o?e.createElement(yp,x({},t,{ref:n})):null})),yp=e.forwardRef(((t,n)=>{const{be:r,...o}=t,i=Jv(mp,r),[a,u]=e.useState(0),[l,s]=e.useState(0),c=Boolean(a&&l);return Mp(i.scrollbarX,(()=>{var e;const t=(null===(e=i.scrollbarX)||void 0===e?void 0:e.offsetHeight)||0;i.onCornerHeightChange(t),s(t)})),Mp(i.scrollbarY,(()=>{var e;const t=(null===(e=i.scrollbarY)||void 0===e?void 0:e.offsetWidth)||0;i.onCornerWidthChange(t),u(t)})),c?e.createElement(Ae.div,x({},o,{ref:n,style:{width:a,height:l,position:"absolute",right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:0,...t.style}})):null}));function gp(e){return e?parseInt(e,10):0}function wp(e,t){const n=e/t;return isNaN(n)?0:n}function xp(e){const t=wp(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function kp(e,t,n="ltr"){const r=xp(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,u=i-r,l=Gv(e,"ltr"===n?[0,a]:[-1*a,0]);return Op([0,a],[0,u])(l)}function Op(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function jp(e,t){return e>0&&e<t}const Sp=(e,t=(()=>{}))=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=n.left!==i.left,u=n.top!==i.top;(a||u)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Np(t,n){const r=Ne(t),o=e.useRef(0);return e.useEffect((()=>()=>window.clearTimeout(o.current)),[]),e.useCallback((()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,n)}),[r,n])}function Mp(e,t){const n=Ne(t);Me((()=>{let t=0;if(e){const r=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}}),[e,n])}const Cp=ep,Ap=tp,Tp=bp,Ep=[" ","Enter","ArrowUp","ArrowDown"],Dp=[" ","Enter"],Pp="Select",[Ip,Lp,_p]=hi(Pp),[Fp,Rp]=je(Pp,[_p,Dn]),Bp=Dn(),[zp,$p]=Fp(Pp),[Wp,Vp]=Fp(Pp),Up=e.forwardRef(((t,n)=>{const{ge:r,disabled:o=!1,...i}=t,a=Bp(r),u=$p("SelectTrigger",r),l=u.disabled||o,s=O(n,u.onTriggerChange),c=Lp(r),[d,f,h]=pm((e=>{const t=c().filter((e=>!e.disabled)),n=t.find((e=>e.value===u.value)),r=mm(t,e,n);void 0!==r&&u.onValueChange(r.value)})),v=()=>{l||(u.onOpenChange(!0),h())};return e.createElement(Vn,x({asChild:!0},a),e.createElement(Ae.button,x({type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":void 0===u.value?"":void 0},i,{ref:s,onClick:Je(i.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:Je(i.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(v(),u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:Je(i.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||Ep.includes(e.key)&&(v(),e.preventDefault())}))})))})),Hp=e.forwardRef(((t,n)=>{const{ge:r,children:o,...i}=t;return e.createElement(Ae.span,x({"aria-hidden":!0},i,{ref:n}),o||"▼")})),qp="SelectContent",Kp=e.forwardRef(((n,r)=>{const o=$p(qp,n.ge),[i,a]=e.useState();if(Me((()=>{a(new DocumentFragment)}),[]),!o.open){const r=i;return r?t.createPortal(e.createElement(Yp,{scope:n.ge},e.createElement(Ip.Slot,{scope:n.ge},e.createElement("div",null,n.children))),r):null}return e.createElement(Zp,x({},n,{ref:r}))})),Gp=10,[Yp,Xp]=Fp(qp),Zp=e.forwardRef(((t,n)=>{const{ge:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:u,side:l,sideOffset:s,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:v,sticky:p,hideWhenDetached:m,avoidCollisions:b,...y}=t,g=$p(qp,r),[w,k]=e.useState(null),[S,N]=e.useState(null),M=O(n,(e=>k(e))),[C,A]=e.useState(null),[T,E]=e.useState(null),D=Lp(r),[P,I]=e.useState(!1),L=e.useRef(!1);e.useEffect((()=>{if(w)return go(w)}),[w]),Nr();const _=e.useCallback((e=>{const[t,...n]=D().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const i of e){if(i===o)return;if(null==i||i.scrollIntoView({block:"nearest"}),i===t&&S&&(S.scrollTop=0),i===r&&S&&(S.scrollTop=S.scrollHeight),null==i||i.focus(),document.activeElement!==o)return}}),[D,S]),F=e.useCallback((()=>_([C,w])),[_,C,w]);e.useEffect((()=>{P&&F()}),[P,F]);const{onOpenChange:R,triggerPointerDownPosRef:B}=g;e.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=B.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(i=B.current)||void 0===i?void 0:i.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||R(!1),document.removeEventListener("pointermove",t),B.current=null};return null!==B.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[w,R,B]),e.useEffect((()=>{const e=()=>R(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[R]);const[z,$]=pm((e=>{const t=D().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=mm(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),W=e.useCallback(((e,t,n)=>{const r=!L.current&&!n;(void 0!==g.value&&g.value===t||r)&&(A(e),r&&(L.current=!0))}),[g.value]),V=e.useCallback((()=>null==w?void 0:w.focus()),[w]),U=e.useCallback(((e,t,n)=>{const r=!L.current&&!n;(void 0!==g.value&&g.value===t||r)&&E(e)}),[g.value]),H="popper"===o?Jp:Qp,q=H===Jp?{side:l,sideOffset:s,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:v,sticky:p,hideWhenDetached:m,avoidCollisions:b}:{};return e.createElement(Yp,{scope:r,content:w,viewport:S,onViewportChange:N,itemRefCallback:W,selectedItem:C,onItemLeave:V,itemTextRefCallback:U,focusSelectedItem:F,selectedItemText:T,position:o,isPositioned:P,searchRef:z},e.createElement(fo,{as:j,allowPinchZoom:!0},e.createElement(yr,{asChild:!0,trapped:g.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Je(i,(e=>{var t;null===(t=g.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},e.createElement(it,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>g.onOpenChange(!1)},e.createElement(H,x({role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:e=>e.preventDefault()},y,q,{onPlaced:()=>I(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Je(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||$(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=D().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>_(t))),e.preventDefault()}}))}))))))})),Qp=e.forwardRef(((t,n)=>{const{ge:r,onPlaced:o,...i}=t,a=$p(qp,r),u=Xp(qp,r),[l,s]=e.useState(null),[c,d]=e.useState(null),f=O(n,(e=>d(e))),h=Lp(r),v=e.useRef(!1),p=e.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:y,focusSelectedItem:g}=u,w=e.useCallback((()=>{if(a.trigger&&a.valueNode&&l&&c&&m&&b&&y){const e=a.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if("rtl"!==a.dir){const o=r.left-t.left,i=n.left-o,a=e.left-i,u=e.width+a,s=Math.max(u,t.width),c=window.innerWidth-Gp,d=Gv(i,[Gp,c-s]);l.style.minWidth=u+"px",l.style.left=d+"px"}else{const o=t.right-r.right,i=window.innerWidth-n.right-o,a=window.innerWidth-e.right-i,u=e.width+a,s=Math.max(u,t.width),c=window.innerWidth-Gp,d=Gv(i,[Gp,c-s]);l.style.minWidth=u+"px",l.style.right=d+"px"}const i=h(),u=window.innerHeight-2*Gp,s=m.scrollHeight,d=window.getComputedStyle(c),f=parseInt(d.borderTopWidth,10),p=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),w=f+p+s+parseInt(d.paddingBottom,10)+g,x=Math.min(5*b.offsetHeight,w),k=window.getComputedStyle(m),O=parseInt(k.paddingTop,10),j=parseInt(k.paddingBottom,10),S=e.top+e.height/2-Gp,N=u-S,M=b.offsetHeight/2,C=f+p+(b.offsetTop+M),A=w-C;if(C<=S){const e=b===i[i.length-1].ref.current;l.style.bottom="0px";const t=c.clientHeight-m.offsetTop-m.offsetHeight,n=C+Math.max(N,M+(e?j:0)+t+g);l.style.height=n+"px"}else{const e=b===i[0].ref.current;l.style.top="0px";const t=Math.max(S,f+m.offsetTop+(e?O:0)+M)+A;l.style.height=t+"px",m.scrollTop=C-S+m.offsetTop}l.style.margin=`${Gp}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=u+"px",null==o||o(),requestAnimationFrame((()=>v.current=!0))}}),[h,a.trigger,a.valueNode,l,c,m,b,y,a.dir,o]);Me((()=>w()),[w]);const[k,j]=e.useState();Me((()=>{c&&j(window.getComputedStyle(c).zIndex)}),[c]);const S=e.useCallback((e=>{e&&!0===p.current&&(w(),null==g||g(),p.current=!1)}),[w,g]);return e.createElement(em,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:v,onScrollButtonChange:S},e.createElement("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k}},e.createElement(Ae.div,x({},i,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))})),Jp=e.forwardRef(((t,n)=>{const{ge:r,align:o="start",collisionPadding:i=Gp,...a}=t,u=Bp(r);return e.createElement(Un,x({},u,a,{ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[em,tm]=Fp(qp,{}),nm="SelectViewport",rm=e.forwardRef(((t,n)=>{const{ge:r,...o}=t,i=Xp(nm,r),a=tm(nm,r),u=O(n,i.onViewportChange),l=e.useRef(0);return e.createElement(e.Fragment,null,e.createElement("style",{dangerouslySetInnerHTML:{ye:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),e.createElement(Ip.Slot,{scope:r},e.createElement(Ae.div,x({"data-radix-select-viewport":"",role:"presentation"},o,{ref:u,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:Je(o.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=a;if(null!=r&&r.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Gp,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),u=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=u>0?u:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))}))))})),[om,im]=Fp("SelectGroup"),am=e.forwardRef(((t,n)=>{const{ge:r,...o}=t,i=im("SelectLabel",r);return e.createElement(Ae.div,x({id:i.id},o,{ref:n}))})),um="SelectItem",[lm,sm]=Fp(um),cm=e.forwardRef(((t,n)=>{const{ge:r,value:o,disabled:i=!1,textValue:a,...u}=t,l=$p(um,r),s=Xp(um,r),c=l.value===o,[d,f]=e.useState(null!=a?a:""),[h,v]=e.useState(!1),p=O(n,(e=>{var t;return null===(t=s.itemRefCallback)||void 0===t?void 0:t.call(s,e,o,i)})),m=ft(),b=()=>{i||(l.onValueChange(o),l.onOpenChange(!1))};return e.createElement(lm,{scope:r,value:o,disabled:i,textId:m,isSelected:c,onItemTextChange:e.useCallback((e=>{f((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},e.createElement(Ip.ItemSlot,{scope:r,value:o,disabled:i,textValue:d},e.createElement(Ae.div,x({role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},u,{ref:p,onFocus:Je(u.onFocus,(()=>v(!0))),onBlur:Je(u.onBlur,(()=>v(!1))),onPointerUp:Je(u.onPointerUp,b),onPointerMove:Je(u.onPointerMove,(e=>{var t;i?null===(t=s.onItemLeave)||void 0===t||t.call(s):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Je(u.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=s.onItemLeave)||void 0===t||t.call(s))})),onKeyDown:Je(u.onKeyDown,(e=>{var t;""!==(null===(t=s.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(Dp.includes(e.key)&&b()," "===e.key&&e.preventDefault())}))}))))})),dm="SelectItemText",fm=e.forwardRef(((n,r)=>{const{ge:o,className:i,style:a,...u}=n,l=$p(dm,o),s=Xp(dm,o),c=sm(dm,o),d=Vp(dm,o),[f,h]=e.useState(null),v=O(r,(e=>h(e)),c.onItemTextChange,(e=>{var t;return null===(t=s.itemTextRefCallback)||void 0===t?void 0:t.call(s,e,c.value,c.disabled)})),p=null==f?void 0:f.textContent,m=e.useMemo((()=>e.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p)),[c.disabled,c.value,p]),{onNativeOptionAdd:b,onNativeOptionRemove:y}=d;return Me((()=>(b(m),()=>y(m))),[b,y,m]),e.createElement(e.Fragment,null,e.createElement(Ae.span,x({id:c.textId},u,{ref:v})),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren?t.createPortal(u.children,l.valueNode):null)})),hm=e.forwardRef(((t,n)=>{const{ge:r,...o}=t;return sm("SelectItemIndicator",r).isSelected?e.createElement(Ae.span,x({"aria-hidden":!0},o,{ref:n})):null})),vm=e.forwardRef(((t,n)=>{const{ge:r,...o}=t;return e.createElement(Ae.div,x({"aria-hidden":!0},o,{ref:n}))}));function pm(t){const n=Ne(t),r=e.useRef(""),o=e.useRef(0),i=e.useCallback((e=>{const t=r.current+e;n(t),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(t)}),[n]),a=e.useCallback((()=>{r.current="",window.clearTimeout(o.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[r,i,a]}function mm(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(e,Math.max(o,0));1===r.length&&(i=i.filter((e=>e!==n)));const a=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return a!==n?a:void 0}e.forwardRef(((t,n)=>{const{value:r,...o}=t,i=e.useRef(null),a=O(n,i),u=cl(r);return e.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(u!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}}),[u,r]),e.createElement(Yn,{asChild:!0},e.createElement("select",x({},o,{ref:a,defaultValue:r})))})).displayName="BubbleSelect";const bm=Up,ym=Hp,gm=t=>e.createElement(Hn,x({asChild:!0},t)),wm=Kp,xm=rm,km=am,Om=cm,jm=fm,Sm=hm,Nm=vm,Mm="horizontal",Cm=["horizontal","vertical"],Am=e.forwardRef(((t,n)=>{const{decorative:r,orientation:o=Mm,...i}=t,a=Tm(o)?o:Mm,u=r?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return e.createElement(Ae.div,x({"data-orientation":a},u,i,{ref:n}))}));function Tm(e){return Cm.includes(e)}Am.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!Tm(r)?new Error(function(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to \`${Mm}\`.`}(o,n)):null}};const Em=Am,Dm=["PageUp","PageDown"],Pm=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Im={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Lm="Slider",[_m,Fm,Rm]=hi(Lm),[Bm,zm]=je(Lm,[Rm]),[$m,Wm]=Bm(Lm),Vm=e.forwardRef(((t,n)=>{const{name:r,min:o=0,max:i=100,step:a=1,orientation:u="horizontal",disabled:l=!1,minStepsBetweenThumbs:s=0,defaultValue:c=[o],value:d,onValueChange:f=(()=>{}),onValueCommit:h=(()=>{}),inverted:v=!1,...p}=t,[m,b]=e.useState(null),y=O(n,(e=>b(e))),g=e.useRef(new Set),w=e.useRef(0),k="horizontal"===u,j=!m||Boolean(m.closest("form")),S=k?qm:Km,[N=[],M]=Gn({prop:d,defaultProp:c,onChange:e=>{var t;null===(t=[...g.current][w.current])||void 0===t||t.focus(),f(e)}}),C=e.useRef(N);function A(e,t,{commit:n}={commit:!1}){const r=function(e){return(String(e).split(".")[1]||"").length}(a),u=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-o)/a)*a+o,r),l=Gv(u,[o,i]);M(((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,l,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}(e);return Math.min(...n)>=t}return!0}(r,s*a)){w.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&h(r),t?r:e}return e}))}return e.createElement($m,{scope:t.we,disabled:l,min:o,max:i,valueIndexToChangeRef:w,thumbs:g.current,values:N,orientation:u},e.createElement(_m.Provider,{scope:t.we},e.createElement(_m.Slot,{scope:t.we},e.createElement(S,x({"aria-disabled":l,"data-disabled":l?"":void 0},p,{ref:y,onPointerDown:Je(p.onPointerDown,(()=>{l||(C.current=N)})),min:o,max:i,inverted:v,onSlideStart:l?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}(N,e);A(e,t)},onSlideMove:l?void 0:function(e){A(e,w.current)},onSlideEnd:l?void 0:function(){const e=C.current[w.current];N[w.current]!==e&&h(N)},onHomeKeyDown:()=>!l&&A(o,0,{commit:!0}),onEndKeyDown:()=>!l&&A(i,N.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=Dm.includes(e.key)||e.shiftKey&&Pm.includes(e.key)?10:1,r=w.current;A(N[r]+a*n*t,r,{commit:!0})}}})))),j&&N.map(((t,n)=>e.createElement(tb,{key:n,name:r?r+(N.length>1?"[]":""):void 0,value:t}))))})),[Um,Hm]=Bm(Lm,{startEdge:"left",endEdge:"right",size:"width",direction:1}),qm=e.forwardRef(((t,n)=>{const{min:r,max:o,dir:i,inverted:a,onSlideStart:u,onSlideMove:l,onSlideEnd:s,onStepKeyDown:c,...d}=t,[f,h]=e.useState(null),v=O(n,(e=>h(e))),p=e.useRef(),m=Ai(i),b="ltr"===m,y=b&&!a||!b&&a;function g(e){const t=p.current||f.getBoundingClientRect(),n=rb([0,t.width],y?[r,o]:[o,r]);return p.current=t,n(e-t.left)}return e.createElement(Um,{scope:t.we,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width"},e.createElement(Gm,x({dir:m,"data-orientation":"horizontal"},d,{ref:v,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=g(e.clientX);null==u||u(t)},onSlideMove:e=>{const t=g(e.clientX);null==l||l(t)},onSlideEnd:()=>{p.current=void 0,null==s||s()},onStepKeyDown:e=>{const t=Im[y?"from-left":"from-right"].includes(e.key);null==c||c({event:e,direction:t?-1:1})}})))})),Km=e.forwardRef(((t,n)=>{const{min:r,max:o,inverted:i,onSlideStart:a,onSlideMove:u,onSlideEnd:l,onStepKeyDown:s,...c}=t,d=e.useRef(null),f=O(n,d),h=e.useRef(),v=!i;function p(e){const t=h.current||d.current.getBoundingClientRect(),n=rb([0,t.height],v?[o,r]:[r,o]);return h.current=t,n(e-t.top)}return e.createElement(Um,{scope:t.we,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1},e.createElement(Gm,x({"data-orientation":"vertical"},c,{ref:f,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=p(e.clientY);null==a||a(t)},onSlideMove:e=>{const t=p(e.clientY);null==u||u(t)},onSlideEnd:()=>{h.current=void 0,null==l||l()},onStepKeyDown:e=>{const t=Im[v?"from-bottom":"from-top"].includes(e.key);null==s||s({event:e,direction:t?-1:1})}})))})),Gm=e.forwardRef(((t,n)=>{const{we:r,onSlideStart:o,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:u,onEndKeyDown:l,onStepKeyDown:s,...c}=t,d=Wm(Lm,r);return e.createElement(Ae.span,x({},c,{ref:n,onKeyDown:Je(t.onKeyDown,(e=>{"Home"===e.key?(u(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):Dm.concat(Pm).includes(e.key)&&(s(e),e.preventDefault())})),onPointerDown:Je(t.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),d.thumbs.has(t)?t.focus():o(e)})),onPointerMove:Je(t.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)})),onPointerUp:Je(t.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))}))}))})),Ym=e.forwardRef(((t,n)=>{const{we:r,...o}=t,i=Wm("SliderTrack",r);return e.createElement(Ae.span,x({"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation},o,{ref:n}))})),Xm="SliderRange",Zm=e.forwardRef(((t,n)=>{const{we:r,...o}=t,i=Wm(Xm,r),a=Hm(Xm,r),u=O(n,e.useRef(null)),l=i.values.length,s=i.values.map((e=>nb(e,i.min,i.max))),c=l>1?Math.min(...s):0,d=100-Math.max(...s);return e.createElement(Ae.span,x({"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0},o,{ref:u,style:{...t.style,[a.startEdge]:c+"%",[a.endEdge]:d+"%"}}))})),Qm="SliderThumb",Jm=e.forwardRef(((t,n)=>{const r=Fm(t.we),[o,i]=e.useState(null),a=O(n,(e=>i(e))),u=e.useMemo((()=>o?r().findIndex((e=>e.ref.current===o)):-1),[r,o]);return e.createElement(eb,x({},t,{ref:a,index:u}))})),eb=e.forwardRef(((t,n)=>{const{we:r,index:o,...i}=t,a=Wm(Qm,r),u=Hm(Qm,r),[l,s]=e.useState(null),c=O(n,(e=>s(e))),d=An(l),f=a.values[o],h=void 0===f?0:nb(f,a.min,a.max),v=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(o,a.values.length),p=null==d?void 0:d[u.size],m=p?function(e,t,n){const r=e/2,o=rb([0,50],[0,r]);return(r-o(t)*n)*n}(p,h,u.direction):0;return e.useEffect((()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}}),[l,a.thumbs]),e.createElement("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${h}% + ${m}px)`}},e.createElement(_m.ItemSlot,{scope:t.we},e.createElement(Ae.span,x({role:"slider","aria-label":t["aria-label"]||v,"aria-valuemin":a.min,"aria-valuenow":f,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0},i,{ref:c,style:void 0===f?{display:"none"}:t.style,onFocus:Je(t.onFocus,(()=>{a.valueIndexToChangeRef.current=o}))}))))})),tb=t=>{const{value:n,...r}=t,o=e.useRef(null),i=cl(n);return e.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("input",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),e.createElement("input",x({style:{display:"none"}},r,{ref:o,defaultValue:n}))};function nb(e,t,n){return Gv(100/(n-t)*(e-t),[0,100])}function rb(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}const ob=Vm,ib=Ym,ab=Zm,ub=Jm,lb="Switch",[sb,cb]=je(lb),[db,fb]=sb(lb),hb=e.forwardRef(((t,n)=>{const{xe:r,name:o,checked:i,defaultChecked:a,required:u,disabled:l,value:s="on",onCheckedChange:c,...d}=t,[f,h]=e.useState(null),v=O(n,(e=>h(e))),p=e.useRef(!1),m=!f||Boolean(f.closest("form")),[b=!1,y]=Gn({prop:i,defaultProp:a,onChange:c});return e.createElement(db,{scope:r,checked:b,disabled:l},e.createElement(Ae.button,x({type:"button",role:"switch","aria-checked":b,"aria-required":u,"data-state":pb(b),"data-disabled":l?"":void 0,disabled:l,value:s},d,{ref:v,onClick:Je(t.onClick,(e=>{y((e=>!e)),m&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),m&&e.createElement(vb,{control:f,bubbles:!p.current,name:o,value:s,checked:b,required:u,disabled:l,style:{transform:"translateX(-100%)"}}))})),vb=t=>{const{control:n,checked:r,bubbles:o=!0,...i}=t,a=e.useRef(null),u=cl(r),l=An(n);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[u,r,o]),e.createElement("input",x({type:"checkbox","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:a,style:{...t.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function pb(e){return e?"checked":"unchecked"}const mb=hb,bb=e.forwardRef(((t,n)=>{const{xe:r,...o}=t,i=fb("SwitchThumb",r);return e.createElement(Ae.span,x({"data-state":pb(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:n}))})),yb="Tabs",[gb,wb]=je(yb,[Kc]),xb=Kc(),[kb,Ob]=gb(yb),jb=e.forwardRef(((t,n)=>{const{ke:r,loop:o=!0,...i}=t,a=Ob("TabsList",r),u=xb(r);return e.createElement(td,x({asChild:!0},u,{orientation:a.orientation,dir:a.dir,loop:o}),e.createElement(Ae.div,x({role:"tablist","aria-orientation":a.orientation},i,{ref:n})))}));function Sb(e,t){return`${e}-trigger-${t}`}function Nb(e,t){return`${e}-content-${t}`}const Mb=jb,Cb=e.forwardRef(((t,n)=>{const{ke:r,value:o,disabled:i=!1,...a}=t,u=Ob("TabsTrigger",r),l=xb(r),s=Sb(u.baseId,o),c=Nb(u.baseId,o),d=o===u.value;return e.createElement(nd,x({asChild:!0},l,{focusable:!i,active:d}),e.createElement(Ae.button,x({type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:s},a,{ref:n,onMouseDown:Je(t.onMouseDown,(e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():u.onValueChange(o)})),onKeyDown:Je(t.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&u.onValueChange(o)})),onFocus:Je(t.onFocus,(()=>{const e="manual"!==u.activationMode;d||i||!e||u.onValueChange(o)}))})))})),Ab=e.forwardRef(((t,n)=>{const{ke:r,value:o,forceMount:i,children:a,...u}=t,l=Ob("TabsContent",r),s=Sb(l.baseId,o),c=Nb(l.baseId,o),d=o===l.value,f=e.useRef(d);return e.useEffect((()=>{const e=requestAnimationFrame((()=>f.current=!1));return()=>cancelAnimationFrame(e)}),[]),e.createElement(qn,{present:i||d},(({present:r})=>e.createElement(Ae.div,x({"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":s,hidden:!r,id:c,tabIndex:0},u,{ref:n,style:{...t.style,animationDuration:f.current?"0s":void 0}}),r&&a)))})),Tb="ToastProvider",[Eb,Db,Pb]=hi("Toast"),[Ib,Lb]=je("Toast",[Pb]),[_b,Fb]=Ib(Tb),Rb=["F8"],Bb="toast.viewportPause",zb="toast.viewportResume",$b=e.forwardRef(((t,n)=>{const{Oe:r,hotkey:o=Rb,label:i="Notifications ({hotkey})",...a}=t,u=Fb("ToastViewport",r),l=Db(r),s=e.useRef(null),c=e.useRef(null),d=e.useRef(null),f=e.useRef(null),h=O(n,f,u.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=u.toastCount>0;e.useEffect((()=>{const e=e=>{var t;o.every((t=>e[t]||e.code===t))&&(null===(t=f.current)||void 0===t||t.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[o]),e.useEffect((()=>{const e=s.current,t=f.current;if(p&&e&&t){const n=()=>{if(!u.isClosePausedRef.current){const e=new CustomEvent(Bb);t.dispatchEvent(e),u.isClosePausedRef.current=!0}},r=()=>{if(u.isClosePausedRef.current){const e=new CustomEvent(zb);t.dispatchEvent(e),u.isClosePausedRef.current=!1}},o=t=>{!e.contains(t.relatedTarget)&&r()},i=()=>{e.contains(document.activeElement)||r()};return e.addEventListener("focusin",n),e.addEventListener("focusout",o),e.addEventListener("pointermove",n),e.addEventListener("pointerleave",i),window.addEventListener("blur",n),window.addEventListener("focus",r),()=>{e.removeEventListener("focusin",n),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",n),e.removeEventListener("pointerleave",i),window.removeEventListener("blur",n),window.removeEventListener("focus",r)}}}),[p,u.isClosePausedRef]);const m=e.useCallback((({tabbingDirection:e})=>{const t=l().map((t=>{const n=t.ref.current,r=[n,...ry(n)];return"forwards"===e?r:r.reverse()}));return("forwards"===e?t.reverse():t).flat()}),[l]);return e.useEffect((()=>{const e=f.current;if(e){const t=t=>{const n=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!n){const n=document.activeElement,a=t.shiftKey;var r;if(t.target===e&&a)return void(null===(r=c.current)||void 0===r||r.focus());const u=m({tabbingDirection:a?"backwards":"forwards"}),l=u.findIndex((e=>e===n));var o,i;if(oy(u.slice(l+1)))t.preventDefault();else a?null===(o=c.current)||void 0===o||o.focus():null===(i=d.current)||void 0===i||i.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}}),[l,m]),e.createElement(st,{ref:s,role:"region","aria-label":i.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:p?void 0:"none"}},p&&e.createElement(Wb,{ref:c,onFocusFromOutsideViewport:()=>{oy(m({tabbingDirection:"forwards"}))}}),e.createElement(Eb.Slot,{scope:r},e.createElement(Ae.ol,x({tabIndex:-1},a,{ref:h}))),p&&e.createElement(Wb,{ref:d,onFocusFromOutsideViewport:()=>{oy(m({tabbingDirection:"backwards"}))}}))})),Wb=e.forwardRef(((t,n)=>{const{Oe:r,onFocusFromOutsideViewport:o,...i}=t,a=Fb("ToastFocusProxy",r);return e.createElement(Yn,x({"aria-hidden":!0,tabIndex:0},i,{ref:n,style:{position:"fixed"},onFocus:e=>{var t;const n=e.relatedTarget;!(null!==(t=a.viewport)&&void 0!==t&&t.contains(n))&&o()}}))})),Vb="Toast",Ub=e.forwardRef(((t,n)=>{const{forceMount:r,open:o,defaultOpen:i,onOpenChange:a,...u}=t,[l=!0,s]=Gn({prop:o,defaultProp:i,onChange:a});return e.createElement(qn,{present:r||l},e.createElement(Kb,x({open:l},u,{ref:n,onClose:()=>s(!1),onPause:Ne(t.onPause),onResume:Ne(t.onResume),onSwipeStart:Je(t.onSwipeStart,(e=>{e.currentTarget.setAttribute("data-swipe","start")})),onSwipeMove:Je(t.onSwipeMove,(e=>{const{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${n}px`)})),onSwipeCancel:Je(t.onSwipeCancel,(e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")})),onSwipeEnd:Je(t.onSwipeEnd,(e=>{const{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${n}px`),s(!1)}))})))})),[Hb,qb]=Ib(Vb,{onClose(){}}),Kb=e.forwardRef(((n,r)=>{const{Oe:o,type:i="foreground",duration:a,open:u,onClose:l,onEscapeKeyDown:s,onPause:c,onResume:d,onSwipeStart:f,onSwipeMove:h,onSwipeCancel:v,onSwipeEnd:p,...m}=n,b=Fb(Vb,o),[y,g]=e.useState(null),w=O(r,(e=>g(e))),k=e.useRef(null),j=e.useRef(null),S=a||b.duration,N=e.useRef(0),M=e.useRef(S),C=e.useRef(0),{onToastAdd:A,onToastRemove:T}=b,E=Ne((()=>{var e;(null==y?void 0:y.contains(document.activeElement))&&(null===(e=b.viewport)||void 0===e||e.focus()),l()})),D=e.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout(C.current),N.current=(new Date).getTime(),C.current=window.setTimeout(E,e))}),[E]);e.useEffect((()=>{const e=b.viewport;if(e){const t=()=>{D(M.current),null==d||d()},n=()=>{const e=(new Date).getTime()-N.current;M.current=M.current-e,window.clearTimeout(C.current),null==c||c()};return e.addEventListener(Bb,n),e.addEventListener(zb,t),()=>{e.removeEventListener(Bb,n),e.removeEventListener(zb,t)}}}),[b.viewport,S,c,d,D]),e.useEffect((()=>{u&&!b.isClosePausedRef.current&&D(S)}),[u,S,b.isClosePausedRef,D]),e.useEffect((()=>(A(),()=>T())),[A,T]);const P=e.useMemo((()=>y?ey(y):null),[y]);return b.viewport?e.createElement(e.Fragment,null,P&&e.createElement(Gb,{Oe:o,role:"status","aria-live":"foreground"===i?"assertive":"polite","aria-atomic":!0},P),e.createElement(Hb,{scope:o,onClose:E},t.createPortal(e.createElement(Eb.ItemSlot,{scope:o},e.createElement(lt,{asChild:!0,onEscapeKeyDown:Je(s,(()=>{b.isFocusedToastEscapeKeyDownRef.current||E(),b.isFocusedToastEscapeKeyDownRef.current=!1}))},e.createElement(Ae.li,x({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":b.swipeDirection},m,{ref:w,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:Je(n.onKeyDown,(e=>{"Escape"===e.key&&(null==s||s(e.nativeEvent),e.nativeEvent.defaultPrevented||(b.isFocusedToastEscapeKeyDownRef.current=!0,E()))})),onPointerDown:Je(n.onPointerDown,(e=>{0===e.button&&(k.current={x:e.clientX,y:e.clientY})})),onPointerMove:Je(n.onPointerMove,(e=>{if(!k.current)return;const t=e.clientX-k.current.x,n=e.clientY-k.current.y,r=Boolean(j.current),o=["left","right"].includes(b.swipeDirection),i=["left","up"].includes(b.swipeDirection)?Math.min:Math.max,a=o?i(0,t):0,u=o?0:i(0,n),l="touch"===e.pointerType?10:2,s={x:a,y:u},c={originalEvent:e,delta:s};r?(j.current=s,ty("toast.swipeMove",h,c,{discrete:!1})):ny(s,b.swipeDirection,l)?(j.current=s,ty("toast.swipeStart",f,c,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(n)>l)&&(k.current=null)})),onPointerUp:Je(n.onPointerUp,(e=>{const t=j.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),j.current=null,k.current=null,t){const n=e.currentTarget,r={originalEvent:e,delta:t};ny(t,b.swipeDirection,b.swipeThreshold)?ty("toast.swipeEnd",p,r,{discrete:!0}):ty("toast.swipeCancel",v,r,{discrete:!0}),n.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})))),b.viewport))):null}));Kb.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){return new Error(`Invalid prop \`type\` supplied to \`${Vb}\`. Expected \`foreground | background\`.`)}return null}};const Gb=t=>{const{Oe:n,children:r,...o}=t,i=Fb(Vb,n),[a,u]=e.useState(!1),[l,s]=e.useState(!1);return function(e=(()=>{})){const t=Ne(e);Me((()=>{let e=0,n=0;return e=window.requestAnimationFrame((()=>n=window.requestAnimationFrame(t))),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}}),[t])}((()=>u(!0))),e.useEffect((()=>{const e=window.setTimeout((()=>s(!0)),1e3);return()=>window.clearTimeout(e)}),[]),l?null:e.createElement(Hn,{asChild:!0},e.createElement(Yn,o,a&&e.createElement(e.Fragment,null,i.label," ",r)))},Yb=e.forwardRef(((t,n)=>{const{Oe:r,...o}=t;return e.createElement(Ae.div,x({},o,{ref:n}))})),Xb=e.forwardRef(((t,n)=>{const{Oe:r,...o}=t;return e.createElement(Ae.div,x({},o,{ref:n}))})),Zb=e.forwardRef(((t,n)=>{const{altText:r,...o}=t;return r?e.createElement(Jb,{altText:r,asChild:!0},e.createElement(Qb,x({},o,{ref:n}))):null}));Zb.propTypes={altText:e=>e.altText?null:new Error("Missing prop `altText` expected on `ToastAction`")};const Qb=e.forwardRef(((t,n)=>{const{Oe:r,...o}=t,i=qb("ToastClose",r);return e.createElement(Jb,{asChild:!0},e.createElement(Ae.button,x({type:"button"},o,{ref:n,onClick:Je(t.onClick,i.onClose)})))})),Jb=e.forwardRef(((t,n)=>{const{Oe:r,altText:o,...i}=t;return e.createElement(Ae.div,x({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0},i,{ref:n}))}));function ey(e){const t=[];return Array.from(e.childNodes).forEach((e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),function(e){return e.nodeType===e.ELEMENT_NODE}(e)){const n=e.ariaHidden||e.hidden||"none"===e.style.display,r=""===e.dataset.radixToastAnnounceExclude;if(!n)if(r){const n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...ey(e))}})),t}function ty(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Te(o,i):o.dispatchEvent(i)}const ny=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return"left"===t||"right"===t?i&&r>n:!i&&o>n};function ry(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oy(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}const iy=$b,ay=Ub,uy=Yb,ly=Xb,sy=Zb,cy=Qb,dy=e.forwardRef(((t,n)=>{const{pressed:r,defaultPressed:o=!1,onPressedChange:i,...a}=t,[u=!1,l]=Gn({prop:r,onChange:i,defaultProp:o});return e.createElement(Ae.button,x({type:"button","aria-pressed":u,"data-state":u?"on":"off","data-disabled":t.disabled?"":void 0},a,{ref:n,onClick:Je(t.onClick,(()=>{t.disabled||l(!u)}))}))}));var fy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const hy=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vy=(t,n)=>{const r=e.forwardRef((({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:a,children:u,...l},s)=>e.createElement("svg",{ref:s,...fy,width:o,height:o,stroke:r,strokeWidth:a?24*Number(i)/Number(o):i,className:`lucide lucide-${hy(t)}`,...l},[...n.map((([t,n])=>e.createElement(t,n))),...(Array.isArray(u)?u:[u])||[]])));return r.displayName=`${t}`,r},py=vy("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),my=vy("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),by=vy("XOctagon",[["polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2",key:"h1p8hx"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]]),yy=vy("X",[["line",{x1:"18",x2:"6",y1:"6",y2:"18",key:"15jfxm"}],["line",{x1:"6",x2:"18",y1:"6",y2:"18",key:"d1lma3"}]]);var gy,wy;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(gy||(gy={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(wy||(wy={}));const xy=gy.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ky=e=>{switch(typeof e){case"undefined":return xy.undefined;case"string":return xy.string;case"number":return isNaN(e)?xy.nan:xy.number;case"boolean":return xy.boolean;case"function":return xy.function;case"bigint":return xy.bigint;case"symbol":return xy.symbol;case"object":return Array.isArray(e)?xy.array:null===e?xy.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?xy.promise:"undefined"!=typeof Map&&e instanceof Map?xy.map:"undefined"!=typeof Set&&e instanceof Set?xy.set:"undefined"!=typeof Date&&e instanceof Date?xy.date:xy.object;default:return xy.unknown}},Oy=gy.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class jy extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const o of e.issues)if("invalid_union"===o.code)o.unionErrors.map(r);else if("invalid_return_type"===o.code)r(o.returnTypeError);else if("invalid_arguments"===o.code)r(o.argumentsError);else if(0===o.path.length)n._errors.push(t(o));else{let e=n,r=0;for(;r<o.path.length;){const n=o.path[r];r===o.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(o))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,gy.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}jy.create=e=>new jy(e);const Sy=(e,t)=>{let n;switch(e.code){case Oy.invalid_type:n=e.received===xy.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Oy.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,gy.jsonStringifyReplacer)}`;break;case Oy.unrecognized_keys:n=`Unrecognized key(s) in object: ${gy.joinValues(e.keys,", ")}`;break;case Oy.invalid_union:n="Invalid input";break;case Oy.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${gy.joinValues(e.options)}`;break;case Oy.invalid_enum_value:n=`Invalid enum value. Expected ${gy.joinValues(e.options)}, received '${e.received}'`;break;case Oy.invalid_arguments:n="Invalid function arguments";break;case Oy.invalid_return_type:n="Invalid function return type";break;case Oy.invalid_date:n="Invalid date";break;case Oy.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:gy.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Oy.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case Oy.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case Oy.custom:n="Invalid input";break;case Oy.invalid_intersection_types:n="Intersection results could not be merged";break;case Oy.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Oy.not_finite:n="Number must be finite";break;default:n=t.defaultError,gy.assertNever(e)}return{message:n}};let Ny=Sy;function My(){return Ny}const Cy=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};let u="";const l=r.filter((e=>!!e)).slice().reverse();for(const s of l)u=s(a,{data:t,defaultError:u}).message;return{...o,path:i,message:o.message||u}};function Ay(e,t){const n=Cy({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,My(),Sy].filter((e=>!!e))});e.common.issues.push(n)}class Ty{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return Ey;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const r of t)n.push({key:await r.key,value:await r.value});return Ty.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:o}=r;if("aborted"===t.status)return Ey;if("aborted"===o.status)return Ey;"dirty"===t.status&&e.dirty(),"dirty"===o.status&&e.dirty(),"__proto__"===t.value||void 0===o.value&&!r.alwaysSet||(n[t.value]=o.value)}return{status:e.value,value:n}}}const Ey=Object.freeze({status:"aborted"}),Dy=e=>({status:"valid",value:e}),Py=e=>"aborted"===e.status,Iy=e=>"dirty"===e.status,Ly=e=>"valid"===e.status,_y=e=>"undefined"!=typeof Promise&&e instanceof Promise;var Fy;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(Fy||(Fy={}));class Ry{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const By=(e,t)=>{if(Ly(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new jy(e.common.issues);return this._error=t,this._error}}};function zy(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:o};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=r?r:t.defaultError}:{message:null!=n?n:t.defaultError},description:o}}class $y{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return ky(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ky(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ty,ctx:{common:e.parent.common,data:e.data,parsedType:ky(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(_y(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ky(e)},o=this._parseSync({data:e,path:r.path,parent:r});return By(r,o)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ky(e)},r=this._parse({data:e,path:n.path,parent:n}),o=await(_y(r)?r:Promise.resolve(r));return By(n,o)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const o=e(t),i=()=>r.addIssue({code:Oy.custom,...n(t)});return"undefined"!=typeof Promise&&o instanceof Promise?o.then((e=>!!e||(i(),!1))):!!o||(i(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new Sg({schema:this,typeName:Ig.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ng.create(this,this._def)}nullable(){return Mg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cg.create(this,this._def)}promise(){return jg.create(this,this._def)}or(e){return hg.create([this,e],this._def)}and(e){return pg.create(this,e,this._def)}transform(e){return new Sg({...zy(this._def),schema:this,typeName:Ig.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Cg({...zy(this._def),innerType:this,defaultValue:t,typeName:Ig.ZodDefault})}brand(){return new Eg({typeName:Ig.ZodBranded,type:this,...zy(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ag({...zy(this._def),innerType:this,catchValue:t,typeName:Ig.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Dg.create(this,e)}readonly(){return Pg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Wy=/^c[^\s-]{8,}$/i,Vy=/^[a-z][a-z0-9]*$/,Uy=/^[0-9A-HJKMNP-TV-Z]{26}$/,Hy=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,qy=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let Ky;const Gy=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Yy=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Xy=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):0===e.precision?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");class Zy extends $y{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==xy.string){const t=this._getOrReturnCtx(e);return Ay(t,{code:Oy.invalid_type,expected:xy.string,received:t.parsedType}),Ey}const t=new Ty;let n;for(const a of this._def.checks)if("min"===a.kind)e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),Ay(n,{code:Oy.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("max"===a.kind)e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),Ay(n,{code:Oy.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("length"===a.kind){const r=e.data.length>a.value,o=e.data.length<a.value;(r||o)&&(n=this._getOrReturnCtx(e,n),r?Ay(n,{code:Oy.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&Ay(n,{code:Oy.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if("email"===a.kind)qy.test(e.data)||(n=this._getOrReturnCtx(e,n),Ay(n,{validation:"email",code:Oy.invalid_string,message:a.message}),t.dirty());else if("emoji"===a.kind)Ky||(Ky=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Ky.test(e.data)||(n=this._getOrReturnCtx(e,n),Ay(n,{validation:"emoji",code:Oy.invalid_string,message:a.message}),t.dirty());else if("uuid"===a.kind)Hy.test(e.data)||(n=this._getOrReturnCtx(e,n),Ay(n,{validation:"uuid",code:Oy.invalid_string,message:a.message}),t.dirty());else if("cuid"===a.kind)Wy.test(e.data)||(n=this._getOrReturnCtx(e,n),Ay(n,{validation:"cuid",code:Oy.invalid_string,message:a.message}),t.dirty());else if("cuid2"===a.kind)Vy.test(e.data)||(n=this._getOrReturnCtx(e,n),Ay(n,{validation:"cuid2",code:Oy.invalid_string,message:a.message}),t.dirty());else if("ulid"===a.kind)Uy.test(e.data)||(n=this._getOrReturnCtx(e,n),Ay(n,{validation:"ulid",code:Oy.invalid_string,message:a.message}),t.dirty());else if("url"===a.kind)try{new URL(e.data)}catch(i){n=this._getOrReturnCtx(e,n),Ay(n,{validation:"url",code:Oy.invalid_string,message:a.message}),t.dirty()}else if("regex"===a.kind){a.regex.lastIndex=0;a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Ay(n,{validation:"regex",code:Oy.invalid_string,message:a.message}),t.dirty())}else if("trim"===a.kind)e.data=e.data.trim();else if("includes"===a.kind)e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),Ay(n,{code:Oy.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),t.dirty());else if("toLowerCase"===a.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===a.kind)e.data=e.data.toUpperCase();else if("startsWith"===a.kind)e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),Ay(n,{code:Oy.invalid_string,validation:{startsWith:a.value},message:a.message}),t.dirty());else if("endsWith"===a.kind)e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),Ay(n,{code:Oy.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty());else if("datetime"===a.kind){Xy(a).test(e.data)||(n=this._getOrReturnCtx(e,n),Ay(n,{code:Oy.invalid_string,validation:"datetime",message:a.message}),t.dirty())}else"ip"===a.kind?(r=e.data,("v4"!==(o=a.version)&&o||!Gy.test(r))&&("v6"!==o&&o||!Yy.test(r))&&(n=this._getOrReturnCtx(e,n),Ay(n,{validation:"ip",code:Oy.invalid_string,message:a.message}),t.dirty())):gy.assertNever(a);var r,o;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:Oy.invalid_string,...Fy.errToObj(n)})}_addCheck(e){return new Zy({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Fy.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Fy.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Fy.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Fy.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Fy.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Fy.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Fy.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Fy.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...Fy.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Fy.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...Fy.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Fy.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Fy.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Fy.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Fy.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Fy.errToObj(t)})}nonempty(e){return this.min(1,Fy.errToObj(e))}trim(){return new Zy({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Zy({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Zy({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function Qy(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r;return parseInt(e.toFixed(o).replace(".",""))%parseInt(t.toFixed(o).replace(".",""))/Math.pow(10,o)}Zy.create=e=>{var t;return new Zy({checks:[],typeName:Ig.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...zy(e)})};class Jy extends $y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==xy.number){const t=this._getOrReturnCtx(e);return Ay(t,{code:Oy.invalid_type,expected:xy.number,received:t.parsedType}),Ey}let t;const n=new Ty;for(const r of this._def.checks)if("int"===r.kind)gy.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Ay(t,{code:Oy.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty());else if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),Ay(t,{code:Oy.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Ay(t,{code:Oy.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==Qy(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),Ay(t,{code:Oy.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Ay(t,{code:Oy.not_finite,message:r.message}),n.dirty()):gy.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Fy.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Fy.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Fy.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Fy.toString(t))}setLimit(e,t,n,r){return new Jy({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Fy.toString(r)}]})}_addCheck(e){return new Jy({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Fy.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Fy.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Fy.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Fy.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Fy.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Fy.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Fy.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Fy.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Fy.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&gy.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Jy.create=e=>new Jy({checks:[],typeName:Ig.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...zy(e)});class eg extends $y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==xy.bigint){const t=this._getOrReturnCtx(e);return Ay(t,{code:Oy.invalid_type,expected:xy.bigint,received:t.parsedType}),Ey}let t;const n=new Ty;for(const r of this._def.checks)if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),Ay(t,{code:Oy.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Ay(t,{code:Oy.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Ay(t,{code:Oy.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):gy.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Fy.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Fy.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Fy.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Fy.toString(t))}setLimit(e,t,n,r){return new eg({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Fy.toString(r)}]})}_addCheck(e){return new eg({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Fy.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Fy.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Fy.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Fy.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Fy.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}eg.create=e=>{var t;return new eg({checks:[],typeName:Ig.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...zy(e)})};class tg extends $y{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==xy.boolean){const t=this._getOrReturnCtx(e);return Ay(t,{code:Oy.invalid_type,expected:xy.boolean,received:t.parsedType}),Ey}return Dy(e.data)}}tg.create=e=>new tg({typeName:Ig.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...zy(e)});class ng extends $y{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==xy.date){const t=this._getOrReturnCtx(e);return Ay(t,{code:Oy.invalid_type,expected:xy.date,received:t.parsedType}),Ey}if(isNaN(e.data.getTime())){return Ay(this._getOrReturnCtx(e),{code:Oy.invalid_date}),Ey}const t=new Ty;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),Ay(n,{code:Oy.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),Ay(n,{code:Oy.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):gy.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ng({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Fy.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Fy.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ng.create=e=>new ng({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ig.ZodDate,...zy(e)});class rg extends $y{_parse(e){if(this._getType(e)!==xy.symbol){const t=this._getOrReturnCtx(e);return Ay(t,{code:Oy.invalid_type,expected:xy.symbol,received:t.parsedType}),Ey}return Dy(e.data)}}rg.create=e=>new rg({typeName:Ig.ZodSymbol,...zy(e)});class og extends $y{_parse(e){if(this._getType(e)!==xy.undefined){const t=this._getOrReturnCtx(e);return Ay(t,{code:Oy.invalid_type,expected:xy.undefined,received:t.parsedType}),Ey}return Dy(e.data)}}og.create=e=>new og({typeName:Ig.ZodUndefined,...zy(e)});class ig extends $y{_parse(e){if(this._getType(e)!==xy.null){const t=this._getOrReturnCtx(e);return Ay(t,{code:Oy.invalid_type,expected:xy.null,received:t.parsedType}),Ey}return Dy(e.data)}}ig.create=e=>new ig({typeName:Ig.ZodNull,...zy(e)});class ag extends $y{constructor(){super(...arguments),this._any=!0}_parse(e){return Dy(e.data)}}ag.create=e=>new ag({typeName:Ig.ZodAny,...zy(e)});class ug extends $y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Dy(e.data)}}ug.create=e=>new ug({typeName:Ig.ZodUnknown,...zy(e)});class lg extends $y{_parse(e){const t=this._getOrReturnCtx(e);return Ay(t,{code:Oy.invalid_type,expected:xy.never,received:t.parsedType}),Ey}}lg.create=e=>new lg({typeName:Ig.ZodNever,...zy(e)});class sg extends $y{_parse(e){if(this._getType(e)!==xy.undefined){const t=this._getOrReturnCtx(e);return Ay(t,{code:Oy.invalid_type,expected:xy.void,received:t.parsedType}),Ey}return Dy(e.data)}}sg.create=e=>new sg({typeName:Ig.ZodVoid,...zy(e)});class cg extends $y{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==xy.array)return Ay(t,{code:Oy.invalid_type,expected:xy.array,received:t.parsedType}),Ey;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,o=t.data.length<r.exactLength.value;(e||o)&&(Ay(t,{code:e?Oy.too_big:Oy.too_small,minimum:o?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(Ay(t,{code:Oy.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(Ay(t,{code:Oy.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new Ry(t,e,t.path,n))))).then((e=>Ty.mergeArray(n,e)));const o=[...t.data].map(((e,n)=>r.type._parseSync(new Ry(t,e,t.path,n))));return Ty.mergeArray(n,o)}get element(){return this._def.type}min(e,t){return new cg({...this._def,minLength:{value:e,message:Fy.toString(t)}})}max(e,t){return new cg({...this._def,maxLength:{value:e,message:Fy.toString(t)}})}length(e,t){return new cg({...this._def,exactLength:{value:e,message:Fy.toString(t)}})}nonempty(e){return this.min(1,e)}}function dg(e){if(e instanceof fg){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ng.create(dg(r))}return new fg({...e._def,shape:()=>t})}return e instanceof cg?new cg({...e._def,type:dg(e.element)}):e instanceof Ng?Ng.create(dg(e.unwrap())):e instanceof Mg?Mg.create(dg(e.unwrap())):e instanceof mg?mg.create(e.items.map((e=>dg(e)))):e}cg.create=(e,t)=>new cg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ig.ZodArray,...zy(t)});class fg extends $y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=gy.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==xy.object){const t=this._getOrReturnCtx(e);return Ay(t,{code:Oy.invalid_type,expected:xy.object,received:t.parsedType}),Ey}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:o}=this._getCached(),i=[];if(!(this._def.catchall instanceof lg&&"strip"===this._def.unknownKeys))for(const u in n.data)o.includes(u)||i.push(u);const a=[];for(const u of o){const e=r[u],t=n.data[u];a.push({key:{status:"valid",value:u},value:e._parse(new Ry(n,t,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof lg){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of i)a.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===e)i.length>0&&(Ay(n,{code:Oy.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const r=n.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new Ry(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of a){const n=await t.key;e.push({key:n,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>Ty.mergeObjectSync(t,e))):Ty.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return Fy.errToObj,new fg({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,o,i,a;const u=null!==(i=null===(o=(r=this._def).errorMap)||void 0===o?void 0:o.call(r,t,n).message)&&void 0!==i?i:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=Fy.errToObj(e).message)&&void 0!==a?a:u}:{message:u}}}:{}})}strip(){return new fg({...this._def,unknownKeys:"strip"})}passthrough(){return new fg({...this._def,unknownKeys:"passthrough"})}extend(e){return new fg({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new fg({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ig.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new fg({...this._def,catchall:e})}pick(e){const t={};return gy.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new fg({...this._def,shape:()=>t})}omit(e){const t={};return gy.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new fg({...this._def,shape:()=>t})}deepPartial(){return dg(this)}partial(e){const t={};return gy.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new fg({...this._def,shape:()=>t})}required(e){const t={};return gy.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Ng;)e=e._def.innerType;t[n]=e}})),new fg({...this._def,shape:()=>t})}keyof(){return xg(gy.objectKeys(this.shape))}}fg.create=(e,t)=>new fg({shape:()=>e,unknownKeys:"strip",catchall:lg.create(),typeName:Ig.ZodObject,...zy(t)}),fg.strictCreate=(e,t)=>new fg({shape:()=>e,unknownKeys:"strict",catchall:lg.create(),typeName:Ig.ZodObject,...zy(t)}),fg.lazycreate=(e,t)=>new fg({shape:e,unknownKeys:"strip",catchall:lg.create(),typeName:Ig.ZodObject,...zy(t)});class hg extends $y{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const n=e.map((e=>new jy(e.ctx.common.issues)));return Ay(t,{code:Oy.invalid_union,unionErrors:n}),Ey}));{let e;const r=[];for(const i of n){const n={...t,common:{...t.common,issues:[]},parent:null},o=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const o=r.map((e=>new jy(e)));return Ay(t,{code:Oy.invalid_union,unionErrors:o}),Ey}}get options(){return this._def.options}}hg.create=(e,t)=>new hg({options:e,typeName:Ig.ZodUnion,...zy(t)});function vg(e,t){const n=ky(e),r=ky(t);if(e===t)return{valid:!0,data:e};if(n===xy.object&&r===xy.object){const n=gy.objectKeys(t),r=gy.objectKeys(e).filter((e=>-1!==n.indexOf(e))),o={...e,...t};for(const i of r){const n=vg(e[i],t[i]);if(!n.valid)return{valid:!1};o[i]=n.data}return{valid:!0,data:o}}if(n===xy.array&&r===xy.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const o=vg(e[r],t[r]);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}return n===xy.date&&r===xy.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class pg extends $y{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(Py(e)||Py(r))return Ey;const o=vg(e.value,r.value);return o.valid?((Iy(e)||Iy(r))&&t.dirty(),{status:t.value,value:o.data}):(Ay(n,{code:Oy.invalid_intersection_types}),Ey)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}pg.create=(e,t,n)=>new pg({left:e,right:t,typeName:Ig.ZodIntersection,...zy(n)});class mg extends $y{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==xy.array)return Ay(n,{code:Oy.invalid_type,expected:xy.array,received:n.parsedType}),Ey;if(n.data.length<this._def.items.length)return Ay(n,{code:Oy.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ey;!this._def.rest&&n.data.length>this._def.items.length&&(Ay(n,{code:Oy.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new Ry(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>Ty.mergeArray(t,e))):Ty.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new mg({...this._def,rest:e})}}mg.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new mg({items:e,typeName:Ig.ZodTuple,rest:null,...zy(t)})};class bg extends $y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==xy.map)return Ay(n,{code:Oy.invalid_type,expected:xy.map,received:n.parsedType}),Ey;const r=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map((([e,t],i)=>({key:r._parse(new Ry(n,e,n.path,[i,"key"])),value:o._parse(new Ry(n,t,n.path,[i,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of i){const r=await n.key,o=await n.value;if("aborted"===r.status||"aborted"===o.status)return Ey;"dirty"!==r.status&&"dirty"!==o.status||t.dirty(),e.set(r.value,o.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of i){const r=n.key,o=n.value;if("aborted"===r.status||"aborted"===o.status)return Ey;"dirty"!==r.status&&"dirty"!==o.status||t.dirty(),e.set(r.value,o.value)}return{status:t.value,value:e}}}}bg.create=(e,t,n)=>new bg({valueType:t,keyType:e,typeName:Ig.ZodMap,...zy(n)});class yg extends $y{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==xy.set)return Ay(n,{code:Oy.invalid_type,expected:xy.set,received:n.parsedType}),Ey;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(Ay(n,{code:Oy.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(Ay(n,{code:Oy.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const o=this._def.valueType;function i(e){const n=new Set;for(const r of e){if("aborted"===r.status)return Ey;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const a=[...n.data.values()].map(((e,t)=>o._parse(new Ry(n,e,n.path,t))));return n.common.async?Promise.all(a).then((e=>i(e))):i(a)}min(e,t){return new yg({...this._def,minSize:{value:e,message:Fy.toString(t)}})}max(e,t){return new yg({...this._def,maxSize:{value:e,message:Fy.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}yg.create=(e,t)=>new yg({valueType:e,minSize:null,maxSize:null,typeName:Ig.ZodSet,...zy(t)});class gg extends $y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}gg.create=(e,t)=>new gg({getter:e,typeName:Ig.ZodLazy,...zy(t)});class wg extends $y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Ay(t,{received:t.data,code:Oy.invalid_literal,expected:this._def.value}),Ey}return{status:"valid",value:e.data}}get value(){return this._def.value}}function xg(e,t){return new kg({values:e,typeName:Ig.ZodEnum,...zy(t)})}wg.create=(e,t)=>new wg({value:e,typeName:Ig.ZodLiteral,...zy(t)});class kg extends $y{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return Ay(t,{expected:gy.joinValues(n),received:t.parsedType,code:Oy.invalid_type}),Ey}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return Ay(t,{received:t.data,code:Oy.invalid_enum_value,options:n}),Ey}return Dy(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return kg.create(e)}exclude(e){return kg.create(this.options.filter((t=>!e.includes(t))))}}kg.create=xg;class Og extends $y{_parse(e){const t=gy.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==xy.string&&n.parsedType!==xy.number){const e=gy.objectValues(t);return Ay(n,{expected:gy.joinValues(e),received:n.parsedType,code:Oy.invalid_type}),Ey}if(-1===t.indexOf(e.data)){const e=gy.objectValues(t);return Ay(n,{received:n.data,code:Oy.invalid_enum_value,options:e}),Ey}return Dy(e.data)}get enum(){return this._def.values}}Og.create=(e,t)=>new Og({values:e,typeName:Ig.ZodNativeEnum,...zy(t)});class jg extends $y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==xy.promise&&!1===t.common.async)return Ay(t,{code:Oy.invalid_type,expected:xy.promise,received:t.parsedType}),Ey;const n=t.parsedType===xy.promise?t.data:Promise.resolve(t.data);return Dy(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}jg.create=(e,t)=>new jg({type:e,typeName:Ig.ZodPromise,...zy(t)});class Sg extends $y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ig.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,o={addIssue:e=>{Ay(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),"preprocess"===r.type){const e=r.transform(n.data,o);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:n.path,parent:n}))):this._def.schema._parseSync({data:e,path:n.path,parent:n})}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,o);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?Ey:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?Ey:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ly(e))return e;const i=r.transform(e.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>Ly(e)?Promise.resolve(r.transform(e.value,o)).then((e=>({status:t.value,value:e}))):e))}gy.assertNever(r)}}Sg.create=(e,t,n)=>new Sg({schema:e,typeName:Ig.ZodEffects,effect:t,...zy(n)}),Sg.createWithPreprocess=(e,t,n)=>new Sg({schema:t,effect:{type:"preprocess",transform:e},typeName:Ig.ZodEffects,...zy(n)});class Ng extends $y{_parse(e){return this._getType(e)===xy.undefined?Dy(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ng.create=(e,t)=>new Ng({innerType:e,typeName:Ig.ZodOptional,...zy(t)});class Mg extends $y{_parse(e){return this._getType(e)===xy.null?Dy(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Mg.create=(e,t)=>new Mg({innerType:e,typeName:Ig.ZodNullable,...zy(t)});class Cg extends $y{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===xy.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Cg.create=(e,t)=>new Cg({innerType:e,typeName:Ig.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...zy(t)});class Ag extends $y{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return _y(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new jy(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new jy(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Ag.create=(e,t)=>new Ag({innerType:e,typeName:Ig.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...zy(t)});class Tg extends $y{_parse(e){if(this._getType(e)!==xy.nan){const t=this._getOrReturnCtx(e);return Ay(t,{code:Oy.invalid_type,expected:xy.nan,received:t.parsedType}),Ey}return{status:"valid",value:e.data}}}Tg.create=e=>new Tg({typeName:Ig.ZodNaN,...zy(e)});class Eg extends $y{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Dg extends $y{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?Ey:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?Ey:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Dg({in:e,out:t,typeName:Ig.ZodPipeline})}}class Pg extends $y{_parse(e){const t=this._def.innerType._parse(e);return Ly(t)&&(t.value=Object.freeze(t.value)),t}}var Ig;Pg.create=(e,t)=>new Pg({innerType:e,typeName:Ig.ZodReadonly,...zy(t)}),fg.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Ig||(Ig={}));const Lg=Zy.create;Jy.create,Tg.create,eg.create;const _g=tg.create;ng.create,rg.create,og.create,ig.create,ag.create,ug.create,lg.create,sg.create;const Fg=cg.create,Rg=fg.create;fg.strictCreate,hg.create,pg.create,mg.create,bg.create,yg.create,gg.create,wg.create,kg.create;const Bg=Og.create;function zg(t,n,r,o){const i=e.useRef(n);$g((()=>{i.current=n}),[n]),e.useEffect((()=>{var e;const n=null!==(e=null==r?void 0:r.current)&&void 0!==e?e:window;if(!n||!n.addEventListener)return;const a=e=>i.current(e);return n.addEventListener(t,a,o),()=>{n.removeEventListener(t,a,o)}}),[t,r,o])}jg.create,Sg.create,Ng.create,Mg.create,Sg.createWithPreprocess,Dg.create;const $g="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */
|
|
16
|
-
function Wg(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(Dae){i(Dae)}}function u(e){try{l(r.throw(e))}catch(Dae){i(Dae)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}l((r=r.apply(e,t||[])).next())}))}var Vg=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n};const Ug="__googleMapsScriptId";var Hg;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(Hg||(Hg={}));class qg{constructor({apiKey:e,authReferrerPolicy:t,channel:n,client:r,id:o=Ug,language:i,libraries:a=[],mapIds:u,nonce:l,region:s,retries:c=3,url:d="https://maps.googleapis.com/maps/api/js",version:f}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=n,this.client=r,this.id=o||Ug,this.language=i,this.libraries=a,this.mapIds=u,this.nonce=l,this.region=s,this.retries=c,this.url=d,this.version=f,qg.instance){if(!Vg(this.options,qg.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(qg.instance.options)}`);return qg.instance}qg.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Hg.FAILURE:this.done?Hg.SUCCESS:this.loading?Hg.LOADING:Hg.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((n=>{n?t(n.error):e(window.google)}))}))}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id))return void this.callback();const n={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(n).forEach((e=>!n[e]&&delete n[e])),(null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.importLibrary)||(e=>{let t,n,r,o="The Google Maps JavaScript API",i="google",a="importLibrary",u="__ib__",l=document,s=window;s=s[i]||(s[i]={});const c=s.maps||(s.maps={}),d=new Set,f=new URLSearchParams,h=()=>t||(t=new Promise(((a,s)=>Wg(this,void 0,void 0,(function*(){var h;for(r in yield n=l.createElement("script"),n.id=this.id,f.set("libraries",[...d]+""),e)f.set(r.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),e[r]);f.set("callback",i+".maps."+u),n.src=this.url+"?"+f,c[u]=a,n.onerror=()=>t=s(Error(o+" could not load.")),n.nonce=this.nonce||(null===(h=l.querySelector("script[nonce]"))||void 0===h?void 0:h.nonce)||"",l.head.append(n)})))));c[a]?console.warn(o+" only loads once. Ignoring:",e):c[a]=(e,...t)=>d.add(e)&&h().then((()=>c[a](e,...t)))})(n);const r=this.libraries.map((e=>this.importLibrary(e)));r.length||r.push(this.importLibrary("core")),Promise.all(r).then((()=>this.callback()),(e=>{const t=new ErrorEvent("error",{error:e});this.loadErrorCallback(t)}))}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setScript())}}}var Kg=Object.freeze({__proto__:null,DEFAULT_ID:Ug,Loader:qg,get LoaderStatus(){return Hg}}),Gg={},Yg={},Xg="object"==typeof qs&&qs&&qs.Object===Object&&qs,Zg=Xg,Qg="object"==typeof self&&self&&self.Object===Object&&self,Jg=Zg||Qg||Function("return this")(),ew=Jg.Symbol,tw=ew,nw=Object.prototype,rw=nw.hasOwnProperty,ow=nw.toString,iw=tw?tw.toStringTag:void 0;var aw=function(e){var t=rw.call(e,iw),n=e[iw];try{e[iw]=void 0;var r=!0}catch(Dae){}var o=ow.call(e);return r&&(t?e[iw]=n:delete e[iw]),o},uw=Object.prototype.toString;var lw=aw,sw=function(e){return uw.call(e)},cw=ew?ew.toStringTag:void 0;var dw=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":cw&&cw in Object(e)?lw(e):sw(e)},fw=Array.isArray;var hw=function(e){return null!=e&&"object"==typeof e},vw=dw,pw=fw,mw=hw;var bw=function(e){return"string"==typeof e||!pw(e)&&mw(e)&&"[object String]"==vw(e)},yw=Ks(bw);var gw=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),u=a.length;u--;){var l=a[e?u:++o];if(!1===n(i[l],l,i))break}return t}},ww=gw();var xw=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},kw=dw,Ow=hw;var jw=function(e){return Ow(e)&&"[object Arguments]"==kw(e)},Sw=hw,Nw=Object.prototype,Mw=Nw.hasOwnProperty,Cw=Nw.propertyIsEnumerable,Aw=jw(function(){return arguments}())?jw:function(e){return Sw(e)&&Mw.call(e,"callee")&&!Cw.call(e,"callee")},Tw=Aw,Ew={exports:{}};var Dw=function(){return!1};!function(e,t){var n=Jg,r=Dw,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||r;e.exports=u}(Ew,Ew.exports);var Pw=Ew.exports,Iw=/^(?:0|[1-9]\d*)$/;var Lw=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Iw.test(e))&&e>-1&&e%1==0&&e<t};var _w=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Fw=dw,Rw=_w,Bw=hw,zw={};zw["[object Float32Array]"]=zw["[object Float64Array]"]=zw["[object Int8Array]"]=zw["[object Int16Array]"]=zw["[object Int32Array]"]=zw["[object Uint8Array]"]=zw["[object Uint8ClampedArray]"]=zw["[object Uint16Array]"]=zw["[object Uint32Array]"]=!0,zw["[object Arguments]"]=zw["[object Array]"]=zw["[object ArrayBuffer]"]=zw["[object Boolean]"]=zw["[object DataView]"]=zw["[object Date]"]=zw["[object Error]"]=zw["[object Function]"]=zw["[object Map]"]=zw["[object Number]"]=zw["[object Object]"]=zw["[object RegExp]"]=zw["[object Set]"]=zw["[object String]"]=zw["[object WeakMap]"]=!1;var $w=function(e){return Bw(e)&&Rw(e.length)&&!!zw[Fw(e)]};var Ww=function(e){return function(t){return e(t)}},Vw={exports:{}};!function(e,t){var n=Xg,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(Dae){}}();e.exports=a}(Vw,Vw.exports);var Uw=Vw.exports,Hw=$w,qw=Ww,Kw=Uw&&Uw.isTypedArray,Gw=Kw?qw(Kw):Hw,Yw=xw,Xw=Tw,Zw=fw,Qw=Pw,Jw=Lw,ex=Gw,tx=Object.prototype.hasOwnProperty;var nx=function(e,t){var n=Zw(e),r=!n&&Xw(e),o=!n&&!r&&Qw(e),i=!n&&!r&&!o&&ex(e),a=n||r||o||i,u=a?Yw(e.length,String):[],l=u.length;for(var s in e)!t&&!tx.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Jw(s,l))||u.push(s);return u},rx=Object.prototype;var ox=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||rx)};var ix=function(e,t){return function(n){return e(t(n))}},ax=ix(Object.keys,Object),ux=ox,lx=ax,sx=Object.prototype.hasOwnProperty;var cx=function(e){if(!ux(e))return lx(e);var t=[];for(var n in Object(e))sx.call(e,n)&&"constructor"!=n&&t.push(n);return t};var dx=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},fx=Ks(dx),hx=dw,vx=dx;var px=function(e){if(!vx(e))return!1;var t=hx(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},mx=Ks(px),bx=px,yx=_w;var gx=function(e){return null!=e&&yx(e.length)&&!bx(e)},wx=nx,xx=cx,kx=gx;var Ox=function(e){return kx(e)?wx(e):xx(e)},jx=ww,Sx=Ox;var Nx=function(e,t){return e&&jx(e,t,Sx)};var Mx=function(e){return e},Cx=Mx;var Ax=Nx,Tx=function(e){return"function"==typeof e?e:Cx};var Ex=function(e,t){return e&&Ax(e,Tx(t))},Dx=ix(Object.getPrototypeOf,Object),Px=dw,Ix=Dx,Lx=hw,_x=Function.prototype,Fx=Object.prototype,Rx=_x.toString,Bx=Fx.hasOwnProperty,zx=Rx.call(Object);var $x=function(e){if(!Lx(e)||"[object Object]"!=Px(e))return!1;var t=Ix(e);if(null===t)return!0;var n=Bx.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Rx.call(n)==zx},Wx=Ks($x);var Vx=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o};var Ux=function(){this.je=[],this.size=0};var Hx=function(e,t){return e===t||e!=e&&t!=t},qx=Hx;var Kx=function(e,t){for(var n=e.length;n--;)if(qx(e[n][0],t))return n;return-1},Gx=Kx,Yx=Array.prototype.splice;var Xx=function(e){var t=this.je,n=Gx(t,e);return!(n<0)&&(n==t.length-1?t.pop():Yx.call(t,n,1),--this.size,!0)},Zx=Kx;var Qx=function(e){var t=this.je,n=Zx(t,e);return n<0?void 0:t[n][1]},Jx=Kx;var ek=Kx;var tk=function(e,t){var n=this.je,r=ek(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},nk=Ux,rk=Xx,ok=Qx,ik=function(e){return Jx(this.je,e)>-1},ak=tk;function uk(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}uk.prototype.clear=nk,uk.prototype.delete=rk,uk.prototype.get=ok,uk.prototype.has=ik,uk.prototype.set=ak;var lk=uk,sk=lk;var ck=function(){this.je=new sk,this.size=0};var dk=function(e){var t=this.je,n=t.delete(e);return this.size=t.size,n};var fk=function(e){return this.je.get(e)};var hk,vk=function(e){return this.je.has(e)},pk=Jg["Se"],mk=(hk=/[^.]+$/.exec(pk&&pk.keys&&pk.keys.IE_PROTO||""))?"Symbol(src)_1."+hk:"";var bk=function(e){return!!mk&&mk in e},yk=Function.prototype.toString;var gk=function(e){if(null!=e){try{return yk.call(e)}catch(Dae){}try{return e+""}catch(Dae){}}return""},wk=px,xk=bk,kk=dx,Ok=gk,jk=/^\[object .+?Constructor\]$/,Sk=Function.prototype,Nk=Object.prototype,Mk=Sk.toString,Ck=Nk.hasOwnProperty,Ak=RegExp("^"+Mk.call(Ck).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Tk=function(e,t){return null==e?void 0:e[t]},Ek=function(e){return!(!kk(e)||xk(e))&&(wk(e)?Ak:jk).test(Ok(e))},Dk=Tk;var Pk=function(e,t){var n=Dk(e,t);return Ek(n)?n:void 0},Ik=Pk(Jg,"Map"),Lk=Pk(Object,"create"),_k=Lk;var Fk=function(){this.je=_k?_k(null):{},this.size=0};var Rk=function(e){var t=this.has(e)&&delete this.je[e];return this.size-=t?1:0,t},Bk=Lk,zk=Object.prototype.hasOwnProperty;var $k=function(e){var t=this.je;if(Bk){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return zk.call(t,e)?t[e]:void 0},Wk=Lk,Vk=Object.prototype.hasOwnProperty;var Uk=Lk;var Hk=Fk,qk=Rk,Kk=$k,Gk=function(e){var t=this.je;return Wk?void 0!==t[e]:Vk.call(t,e)},Yk=function(e,t){var n=this.je;return this.size+=this.has(e)?0:1,n[e]=Uk&&void 0===t?"__lodash_hash_undefined__":t,this};function Xk(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Xk.prototype.clear=Hk,Xk.prototype.delete=qk,Xk.prototype.get=Kk,Xk.prototype.has=Gk,Xk.prototype.set=Yk;var Zk=Xk,Qk=lk,Jk=Ik;var eO=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var tO=function(e,t){var n=e.je;return eO(t)?n["string"==typeof t?"string":"hash"]:n.map},nO=tO;var rO=tO;var oO=tO;var iO=tO;var aO=function(e,t){var n=iO(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},uO=function(){this.size=0,this.je={hash:new Zk,map:new(Jk||Qk),string:new Zk}},lO=function(e){var t=nO(this,e).delete(e);return this.size-=t?1:0,t},sO=function(e){return rO(this,e).get(e)},cO=function(e){return oO(this,e).has(e)},dO=aO;function fO(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fO.prototype.clear=uO,fO.prototype.delete=lO,fO.prototype.get=sO,fO.prototype.has=cO,fO.prototype.set=dO;var hO=fO,vO=lk,pO=Ik,mO=hO;var bO=lk,yO=ck,gO=dk,wO=fk,xO=vk,kO=function(e,t){var n=this.je;if(n instanceof vO){var r=n.je;if(!pO||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.je=new mO(r)}return n.set(e,t),this.size=n.size,this};function OO(e){var t=this.je=new bO(e);this.size=t.size}OO.prototype.clear=yO,OO.prototype.delete=gO,OO.prototype.get=wO,OO.prototype.has=xO,OO.prototype.set=kO;var jO=OO;var SO=hO,NO=function(e){return this.je.set(e,"__lodash_hash_undefined__"),this},MO=function(e){return this.je.has(e)};function CO(e){var t=-1,n=null==e?0:e.length;for(this.je=new SO;++t<n;)this.add(e[t])}CO.prototype.add=CO.prototype.push=NO,CO.prototype.has=MO;var AO=CO;var TO=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var EO=function(e,t){return e.has(t)},DO=AO,PO=TO,IO=EO;var LO=function(e,t,n,r,o,i){var a=1&n,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var s=i.get(e),c=i.get(t);if(s&&c)return s==t&&c==e;var d=-1,f=!0,h=2&n?new DO:void 0;for(i.set(e,t),i.set(t,e);++d<u;){var v=e[d],p=t[d];if(r)var m=a?r(p,v,d,t,e,i):r(v,p,d,e,t,i);if(void 0!==m){if(m)continue;f=!1;break}if(h){if(!PO(t,(function(e,t){if(!IO(h,t)&&(v===e||o(v,e,n,r,i)))return h.push(t)}))){f=!1;break}}else if(v!==p&&!o(v,p,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f},_O=Jg.Uint8Array;var FO=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var RO=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},BO=_O,zO=Hx,$O=LO,WO=FO,VO=RO,UO=ew?ew.prototype:void 0,HO=UO?UO.valueOf:void 0;var qO=function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new BO(e),new BO(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return zO(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=WO;case"[object Set]":var l=1&r;if(u||(u=VO),e.size!=t.size&&!l)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var c=$O(u(e),u(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(HO)return HO.call(e)==HO.call(t)}return!1};var KO=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},GO=KO,YO=fw;var XO=function(e,t,n){var r=t(e);return YO(e)?r:GO(r,n(e))};var ZO=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i};var QO=function(){return[]},JO=ZO,ej=QO,tj=Object.prototype.propertyIsEnumerable,nj=Object.getOwnPropertySymbols,rj=nj?function(e){return null==e?[]:(e=Object(e),JO(nj(e),(function(t){return tj.call(e,t)})))}:ej,oj=rj,ij=XO,aj=oj,uj=Ox;var lj=function(e){return ij(e,uj,aj)},sj=lj,cj=Object.prototype.hasOwnProperty;var dj=function(e,t,n,r,o,i){var a=1&n,u=sj(e),l=u.length;if(l!=sj(t).length&&!a)return!1;for(var s=l;s--;){var c=u[s];if(!(a?c in t:cj.call(t,c)))return!1}var d=i.get(e),f=i.get(t);if(d&&f)return d==t&&f==e;var h=!0;i.set(e,t),i.set(t,e);for(var v=a;++s<l;){var p=e[c=u[s]],m=t[c];if(r)var b=a?r(m,p,c,t,e,i):r(p,m,c,e,t,i);if(!(void 0===b?p===m||o(p,m,n,r,i):b)){h=!1;break}v||(v="constructor"==c)}if(h&&!v){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(h=!1)}return i.delete(e),i.delete(t),h},fj=Pk(Jg,"DataView"),hj=Pk(Jg,"Promise"),vj=Pk(Jg,"Set"),pj=fj,mj=Ik,bj=hj,yj=vj,gj=Pk(Jg,"WeakMap"),wj=dw,xj=gk,kj="[object Map]",Oj="[object Promise]",jj="[object Set]",Sj="[object WeakMap]",Nj="[object DataView]",Mj=xj(pj),Cj=xj(mj),Aj=xj(bj),Tj=xj(yj),Ej=xj(gj),Dj=wj;(pj&&Dj(new pj(new ArrayBuffer(1)))!=Nj||mj&&Dj(new mj)!=kj||bj&&Dj(bj.resolve())!=Oj||yj&&Dj(new yj)!=jj||gj&&Dj(new gj)!=Sj)&&(Dj=function(e){var t=wj(e),n="[object Object]"==t?e.constructor:void 0,r=n?xj(n):"";if(r)switch(r){case Mj:return Nj;case Cj:return kj;case Aj:return Oj;case Tj:return jj;case Ej:return Sj}return t});var Pj=Dj,Ij=jO,Lj=LO,_j=qO,Fj=dj,Rj=Pj,Bj=fw,zj=Pw,$j=Gw,Wj="[object Arguments]",Vj="[object Array]",Uj="[object Object]",Hj=Object.prototype.hasOwnProperty;var qj=function(e,t,n,r,o,i){var a=Bj(e),u=Bj(t),l=a?Vj:Rj(e),s=u?Vj:Rj(t),c=(l=l==Wj?Uj:l)==Uj,d=(s=s==Wj?Uj:s)==Uj,f=l==s;if(f&&zj(e)){if(!zj(t))return!1;a=!0,c=!1}if(f&&!c)return i||(i=new Ij),a||$j(e)?Lj(e,t,n,r,o,i):_j(e,t,l,n,r,o,i);if(!(1&n)){var h=c&&Hj.call(e,"__wrapped__"),v=d&&Hj.call(t,"__wrapped__");if(h||v){var p=h?e.value():e,m=v?t.value():t;return i||(i=new Ij),o(p,m,n,r,i)}}return!!f&&(i||(i=new Ij),Fj(e,t,n,r,o,i))},Kj=qj,Gj=hw;var Yj=function e(t,n,r,o,i){return t===n||(null==t||null==n||!Gj(t)&&!Gj(n)?t!=t&&n!=n:Kj(t,n,r,o,e,i))},Xj=jO,Zj=Yj;var Qj=function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var u=n[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<i;){var l=(u=n[o])[0],s=e[l],c=u[1];if(a&&u[2]){if(void 0===s&&!(l in e))return!1}else{var d=new Xj;if(r)var f=r(s,c,l,e,t,d);if(!(void 0===f?Zj(c,s,3,r,d):f))return!1}}return!0},Jj=dx;var eS=function(e){return e==e&&!Jj(e)},tS=eS,nS=Ox;var rS=function(e){for(var t=nS(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,tS(o)]}return t};var oS=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},iS=Qj,aS=rS,uS=oS;var lS=function(e){var t=aS(e);return 1==t.length&&t[0][2]?uS(t[0][0],t[0][1]):function(n){return n===e||iS(n,e,t)}},sS=dw,cS=hw;var dS=function(e){return"symbol"==typeof e||cS(e)&&"[object Symbol]"==sS(e)},fS=fw,hS=dS,vS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pS=/^\w*$/;var mS=function(e,t){if(fS(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!hS(e))||(pS.test(e)||!vS.test(e)||null!=t&&e in Object(t))},bS=hO;function yS(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(yS.Cache||bS),n}yS.Cache=bS;var gS=yS,wS=Ks(gS),xS=gS;var kS=function(e){var t=xS(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t},OS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jS=/\\(\\)?/g,SS=kS((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(OS,(function(e,n,r,o){t.push(r?o.replace(jS,"$1"):n||e)})),t})),NS=SS,MS=Vx,CS=fw,AS=dS,TS=ew?ew.prototype:void 0,ES=TS?TS.toString:void 0;var DS=function e(t){if("string"==typeof t)return t;if(CS(t))return MS(t,e)+"";if(AS(t))return ES?ES.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},PS=DS;var IS=function(e){return null==e?"":PS(e)},LS=fw,_S=mS,FS=NS,RS=IS;var BS=function(e,t){return LS(e)?e:_S(e,t)?[e]:FS(RS(e))},zS=dS;var $S=function(e){if("string"==typeof e||zS(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},WS=BS,VS=$S;var US=function(e,t){for(var n=0,r=(t=WS(t,e)).length;null!=e&&n<r;)e=e[VS(t[n++])];return n&&n==r?e:void 0},HS=US;var qS=function(e,t,n){var r=null==e?void 0:HS(e,t);return void 0===r?n:r},KS=Ks(qS);var GS=function(e,t){return null!=e&&t in Object(e)},YS=BS,XS=Tw,ZS=fw,QS=Lw,JS=_w,eN=$S;var tN=function(e,t,n){for(var r=-1,o=(t=YS(t,e)).length,i=!1;++r<o;){var a=eN(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&JS(o)&&QS(a,o)&&(ZS(e)||XS(e))},nN=GS,rN=tN;var oN=function(e,t){return null!=e&&rN(e,t,nN)},iN=Yj,aN=qS,uN=oN,lN=mS,sN=eS,cN=oS,dN=$S;var fN=function(e,t){return lN(e)&&sN(t)?cN(dN(e),t):function(n){var r=aN(n,e);return void 0===r&&r===t?uN(n,e):iN(t,r,3)}};var hN=function(e){return function(t){return null==t?void 0:t[e]}},vN=US;var pN=function(e){return function(t){return vN(t,e)}},mN=hN,bN=pN,yN=mS,gN=$S;var wN=lS,xN=fN,kN=Mx,ON=fw,jN=function(e){return yN(e)?mN(gN(e)):bN(e)};var SN=function(e){return"function"==typeof e?e:null==e?kN:"object"==typeof e?ON(e)?xN(e[0],e[1]):wN(e):jN(e)},NN=gx;var MN=function(e,t){return function(n,r){if(null==n)return n;if(!NN(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}},CN=MN(Nx),AN=CN,TN=gx;var EN=function(e,t){var n=-1,r=TN(e)?Array(e.length):[];return AN(e,(function(e,o,i){r[++n]=t(e,o,i)})),r},DN=Vx,PN=SN,IN=EN,LN=fw;var _N=function(e,t){return(LN(e)?DN:IN)(e,PN(t))};Object.defineProperty(Yg,"ie",{value:!0}),Yg.flattenNames=void 0;var FN=$N(bw),RN=$N(Ex),BN=$N($x),zN=$N(_N);function $N(e){return e&&e.ie?e:{default:e}}var WN=Yg.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,zN.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,BN.default)(t)?(0,RN.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,FN.default)(t)&&n.push(t)})),n};Yg.default=WN;var VN={};var UN=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},HN=Pk,qN=function(){try{var e=HN(Object,"defineProperty");return e({},"",{}),e}catch(Dae){}}(),KN=qN,GN=KN;var YN=function(e,t,n){"__proto__"==t&&GN?GN(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},XN=YN,ZN=Hx,QN=Object.prototype.hasOwnProperty;var JN=function(e,t,n){var r=e[t];QN.call(e,t)&&ZN(r,n)&&(void 0!==n||t in e)||XN(e,t,n)},eM=JN,tM=YN;var nM=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var u=t[i],l=r?r(n[u],e[u],u,n,e):void 0;void 0===l&&(l=e[u]),o?tM(n,u,l):eM(n,u,l)}return n},rM=nM,oM=Ox;var iM=function(e,t){return e&&rM(t,oM(t),e)};var aM=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},uM=dx,lM=ox,sM=aM,cM=Object.prototype.hasOwnProperty;var dM=function(e){if(!uM(e))return sM(e);var t=lM(e),n=[];for(var r in e)("constructor"!=r||!t&&cM.call(e,r))&&n.push(r);return n},fM=nx,hM=dM,vM=gx;var pM=function(e){return vM(e)?fM(e,!0):hM(e)},mM=nM,bM=pM;var yM=function(e,t){return e&&mM(t,bM(t),e)},gM={exports:{}};!function(e,t){var n=Jg,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}}(gM,gM.exports);var wM=gM.exports;var xM=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},kM=nM,OM=oj;var jM=function(e,t){return kM(e,OM(e),t)},SM=KO,NM=Dx,MM=oj,CM=QO,AM=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)SM(t,MM(e)),e=NM(e);return t}:CM,TM=nM,EM=AM;var DM=function(e,t){return TM(e,EM(e),t)},PM=XO,IM=AM,LM=pM;var _M=function(e){return PM(e,LM,IM)},FM=Object.prototype.hasOwnProperty;var RM=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&FM.call(e,"index")&&(n.index=e.index,n.input=e.input),n},BM=_O;var zM=function(e){var t=new e.constructor(e.byteLength);return new BM(t).set(new BM(e)),t},$M=zM;var WM=function(e,t){var n=t?$M(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},VM=/\w*$/;var UM=function(e){var t=new e.constructor(e.source,VM.exec(e));return t.lastIndex=e.lastIndex,t},HM=ew?ew.prototype:void 0,qM=HM?HM.valueOf:void 0;var KM=zM;var GM=zM,YM=WM,XM=UM,ZM=function(e){return qM?Object(qM.call(e)):{}},QM=function(e,t){var n=t?KM(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var JM=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return GM(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return YM(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return QM(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return XM(e);case"[object Symbol]":return ZM(e)}},eC=dx,tC=Object.create,nC=function(){function e(){}return function(t){if(!eC(t))return{};if(tC)return tC(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),rC=nC,oC=Dx,iC=ox;var aC=function(e){return"function"!=typeof e.constructor||iC(e)?{}:rC(oC(e))},uC=Pj,lC=hw;var sC=function(e){return lC(e)&&"[object Map]"==uC(e)},cC=Ww,dC=Uw&&Uw.isMap,fC=dC?cC(dC):sC,hC=Pj,vC=hw;var pC=function(e){return vC(e)&&"[object Set]"==hC(e)},mC=Ww,bC=Uw&&Uw.isSet,yC=bC?mC(bC):pC,gC=jO,wC=UN,xC=JN,kC=iM,OC=yM,jC=wM,SC=xM,NC=jM,MC=DM,CC=lj,AC=_M,TC=Pj,EC=RM,DC=JM,PC=aC,IC=fw,LC=Pw,_C=fC,FC=dx,RC=yC,BC=Ox,zC=pM,$C="[object Arguments]",WC="[object Function]",VC="[object Object]",UC={};UC[$C]=UC["[object Array]"]=UC["[object ArrayBuffer]"]=UC["[object DataView]"]=UC["[object Boolean]"]=UC["[object Date]"]=UC["[object Float32Array]"]=UC["[object Float64Array]"]=UC["[object Int8Array]"]=UC["[object Int16Array]"]=UC["[object Int32Array]"]=UC["[object Map]"]=UC["[object Number]"]=UC[VC]=UC["[object RegExp]"]=UC["[object Set]"]=UC["[object String]"]=UC["[object Symbol]"]=UC["[object Uint8Array]"]=UC["[object Uint8ClampedArray]"]=UC["[object Uint16Array]"]=UC["[object Uint32Array]"]=!0,UC["[object Error]"]=UC[WC]=UC["[object WeakMap]"]=!1;var HC=function e(t,n,r,o,i,a){var u,l=1&n,s=2&n,c=4&n;if(r&&(u=i?r(t,o,i,a):r(t)),void 0!==u)return u;if(!FC(t))return t;var d=IC(t);if(d){if(u=EC(t),!l)return SC(t,u)}else{var f=TC(t),h=f==WC||"[object GeneratorFunction]"==f;if(LC(t))return jC(t,l);if(f==VC||f==$C||h&&!i){if(u=s||h?{}:PC(t),!l)return s?MC(t,OC(u,t)):NC(t,kC(u,t))}else{if(!UC[f])return i?t:{};u=DC(t,f,l)}}a||(a=new gC);var v=a.get(t);if(v)return v;a.set(t,u),RC(t)?t.forEach((function(o){u.add(e(o,n,r,o,t,a))})):_C(t)&&t.forEach((function(o,i){u.set(i,e(o,n,r,i,t,a))}));var p=d?void 0:(c?s?AC:CC:s?zC:BC)(t);return wC(p||t,(function(o,i){p&&(o=t[i=o]),xC(u,i,e(o,n,r,i,t,a))})),u},qC=HC;var KC=function(e){return qC(e,5)};Object.defineProperty(VN,"ie",{value:!0}),VN.mergeClasses=void 0;var GC=ZC(Ex),YC=ZC(KC),XC=Object.assign||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};function ZC(e){return e&&e.ie?e:{default:e}}var QC=VN.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,YC.default)(e.default)||{};return t.map((function(t){var r=e[t];return r&&(0,GC.default)(r,(function(e,t){n[t]||(n[t]={}),n[t]=XC({},n[t],r[t])})),t})),n};VN.default=QC;var JC={};Object.defineProperty(JC,"ie",{value:!0}),JC.autoprefix=void 0;var eA,tA=(eA=Ex)&&eA.ie?eA:{default:eA},nA=Object.assign||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};var rA={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var n=t[e];return n||{extend:e}}},oA=JC.autoprefix=function(e){var t={};return(0,tA.default)(e,(function(e,n){var r={};(0,tA.default)(e,(function(e,t){var n=rA[t];n?r=nA({},r,n(e)):r[t]=e})),t[n]=r})),t};JC.default=oA;var iA={};Object.defineProperty(iA,"ie",{value:!0}),iA.hover=void 0;var aA=Object.assign||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},uA=function(e){return e&&e.ie?e:{default:e}}(e);function lA(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var sA=iA.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var a=arguments.length,u=Array(a),l=0;l<a;l++)u[l]=arguments[l];return o=i=lA(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(u))),i.state={hover:!1},i.handleMouseOver=function(){return i.setState({hover:!0})},i.handleMouseOut=function(){return i.setState({hover:!1})},i.render=function(){return uA.default.createElement(t,{onMouseOver:i.handleMouseOver,onMouseOut:i.handleMouseOut},uA.default.createElement(e,aA({},i.props,i.state)))},lA(i,o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),r}(uA.default.Component)};iA.default=sA;var cA={};Object.defineProperty(cA,"ie",{value:!0}),cA.active=void 0;var dA=Object.assign||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},fA=function(e){return e&&e.ie?e:{default:e}}(e);function hA(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var vA=cA.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var a=arguments.length,u=Array(a),l=0;l<a;l++)u[l]=arguments[l];return o=i=hA(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(u))),i.state={active:!1},i.handleMouseDown=function(){return i.setState({active:!0})},i.handleMouseUp=function(){return i.setState({active:!1})},i.render=function(){return fA.default.createElement(t,{onMouseDown:i.handleMouseDown,onMouseUp:i.handleMouseUp},fA.default.createElement(e,dA({},i.props,i.state)))},hA(i,o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),r}(fA.default.Component)};cA.default=vA;var pA={};Object.defineProperty(pA,"ie",{value:!0});pA.default=function(e,t){var n={},r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n},Object.defineProperty(Gg,"ie",{value:!0}),Gg.ReactCSS=Gg.loop=Gg.handleActive=OA=Gg.handleHover=Gg.hover=void 0;var mA=kA(Yg),bA=kA(VN),yA=kA(JC),gA=kA(iA),wA=kA(cA),xA=kA(pA);function kA(e){return e&&e.ie?e:{default:e}}Gg.hover=gA.default;var OA=Gg.handleHover=gA.default;Gg.handleActive=wA.default,Gg.loop=xA.default;var jA=Gg.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=(0,mA.default)(n),i=(0,bA.default)(e,o);return(0,yA.default)(i)},SA=Gg.default=jA,NA={},MA=function(e,t,n,r){var o=e+"-"+t+"-"+n+(r?"-server":"");if(NA[o])return NA[o];var i=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var i=o.getContext("2d");return i?(i.fillStyle=e,i.fillRect(0,0,o.width,o.height),i.fillStyle=t,i.fillRect(0,0,n,n),i.translate(n,n),i.fillRect(0,0,n,n),o.toDataURL()):null}(e,t,n,r);return NA[o]=i,i},CA=Object.assign||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},AA=function(t){var n=t.white,r=t.grey,o=t.size,i=t.renderers,a=t.borderRadius,u=t.boxShadow,l=t.children,s=SA({default:{grid:{borderRadius:a,boxShadow:u,absolute:"0px 0px 0px 0px",background:"url("+MA(n,r,o,i.canvas)+") center left"}}});return e.isValidElement(l)?e.cloneElement(l,CA({},l.props,{style:CA({},l.props.style,s.grid)})):e.createElement("div",{style:s.grid})};AA.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var TA=Object.assign||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},EA=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function DA(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var PA=function(t){function n(){var e,t,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return t=r=DA(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(i))),r.handleChange=function(e){var t=function(e,t,n,r,o){var i=o.clientWidth,a=o.clientHeight,u="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=u-(o.getBoundingClientRect().left+window.pageXOffset),c=l-(o.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var d=void 0;if(d=c<0?0:c>a?1:Math.round(100*c/a)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var f=void 0;if(r!==(f=s<0?0:s>i?1:Math.round(100*s/i)/100))return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}return null}(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},DA(r,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),EA(n,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var t=this,n=this.props.rgb,r=SA({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+n.r+","+n.g+","+n.b+", 0) 0%,\n rgba("+n.r+","+n.g+","+n.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*n.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+n.r+","+n.g+","+n.b+", 0) 0%,\n rgba("+n.r+","+n.g+","+n.b+", 1) 100%)"},pointer:{left:0,top:100*n.a+"%"}},overwrite:TA({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return e.createElement("div",{style:r.alpha},e.createElement("div",{style:r.checkboard},e.createElement(AA,{renderers:this.props.renderers})),e.createElement("div",{style:r.gradient}),e.createElement("div",{style:r.container,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},e.createElement("div",{style:r.pointer},this.props.pointer?e.createElement(this.props.pointer,this.props):e.createElement("div",{style:r.slider}))))}}]),n}(e.PureComponent||e.Component),IA=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var LA=[38,40],_A=1,FA=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleBlur=function(){t.state.blurValue&&t.setState({value:t.state.blurValue,blurValue:null})},t.handleChange=function(e){t.setUpdatedValue(e.target.value,e)},t.handleKeyDown=function(e){var n,r=function(e){return Number(String(e).replace(/%/g,""))}(e.target.value);if(!isNaN(r)&&(n=e.keyCode,LA.indexOf(n)>-1)){var o=t.getArrowOffset(),i=38===e.keyCode?r+o:r-o;t.setUpdatedValue(i,e)}},t.handleDrag=function(e){if(t.props.dragLabel){var n=Math.round(t.props.value+e.movementX);n>=0&&n<=t.props.dragMax&&t.props.onChange&&t.props.onChange(t.getValueObjectWithLabel(n),e)}},t.handleMouseDown=function(e){t.props.dragLabel&&(e.preventDefault(),t.handleDrag(e),window.addEventListener("mousemove",t.handleDrag),window.addEventListener("mouseup",t.handleMouseUp))},t.handleMouseUp=function(){t.unbindEventListeners()},t.unbindEventListeners=function(){window.removeEventListener("mousemove",t.handleDrag),window.removeEventListener("mouseup",t.handleMouseUp)},t.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},t.inputId="rc-editable-input-"+_A++,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),IA(n,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var t=this,n=SA({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return e.createElement("div",{style:n.wrap},e.createElement("input",{id:this.inputId,style:n.input,ref:function(e){return t.input=e},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?e.createElement("label",{htmlFor:this.inputId,style:n.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),n}(e.PureComponent||e.Component),RA=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function BA(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var zA=function(t){function n(){var e,t,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return t=r=BA(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(i))),r.handleChange=function(e){var t=function(e,t,n,r){var o=r.clientWidth,i=r.clientHeight,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=a-(r.getBoundingClientRect().left+window.pageXOffset),s=u-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var c=void 0;if(c=s<0?359:s>i?0:360*(-100*s/i+100)/100,n.h!==c)return{h:c,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d=void 0;if(d=l<0?0:l>o?359:100*l/o*360/100,n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null}(e,r.props.direction,r.props.hsl,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},BA(r,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),RA(n,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var t=this,n=this.props.direction,r=void 0===n?"horizontal":n,o=SA({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===r});return e.createElement("div",{style:o.hue},e.createElement("div",{className:"hue-"+r,style:o.container,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},e.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),e.createElement("div",{style:o.pointer},this.props.pointer?e.createElement(this.props.pointer,this.props):e.createElement("div",{style:o.slider}))))}}]),n}(e.PureComponent||e.Component),$A={exports:{}};function WA(){}function VA(){}VA.resetWarningCache=WA;$A.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:VA,resetWarningCache:WA};return n.PropTypes=n,n}();var UA=Ks($A.exports);function HA(e,t){return e===t||e!=e&&t!=t}function qA(e,t){for(var n=e.length;n--;)if(HA(e[n][0],t))return n;return-1}var KA=Array.prototype.splice;function GA(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}GA.prototype.clear=function(){this.je=[],this.size=0},GA.prototype.delete=function(e){var t=this.je,n=qA(t,e);return!(n<0)&&(n==t.length-1?t.pop():KA.call(t,n,1),--this.size,!0)},GA.prototype.get=function(e){var t=this.je,n=qA(t,e);return n<0?void 0:t[n][1]},GA.prototype.has=function(e){return qA(this.je,e)>-1},GA.prototype.set=function(e,t){var n=this.je,r=qA(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var YA="object"==typeof global&&global&&global.Object===Object&&global,XA="object"==typeof self&&self&&self.Object===Object&&self,ZA=YA||XA||Function("return this")(),QA=ZA.Symbol,JA=Object.prototype,eT=JA.hasOwnProperty,tT=JA.toString,nT=QA?QA.toStringTag:void 0;var rT=Object.prototype.toString;var oT="[object Null]",iT="[object Undefined]",aT=QA?QA.toStringTag:void 0;function uT(e){return null==e?void 0===e?iT:oT:aT&&aT in Object(e)?function(e){var t=eT.call(e,nT),n=e[nT];try{e[nT]=void 0;var r=!0}catch(Dae){}var o=tT.call(e);return r&&(t?e[nT]=n:delete e[nT]),o}(e):function(e){return rT.call(e)}(e)}function lT(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var sT="[object AsyncFunction]",cT="[object Function]",dT="[object GeneratorFunction]",fT="[object Proxy]";function hT(e){if(!lT(e))return!1;var t=uT(e);return t==cT||t==dT||t==sT||t==fT}var vT=ZA["Se"],pT=function(){var e=/[^.]+$/.exec(vT&&vT.keys&&vT.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var mT=Function.prototype.toString;function bT(e){if(null!=e){try{return mT.call(e)}catch(Dae){}try{return e+""}catch(Dae){}}return""}var yT=/^\[object .+?Constructor\]$/,gT=Function.prototype,wT=Object.prototype,xT=gT.toString,kT=wT.hasOwnProperty,OT=RegExp("^"+xT.call(kT).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jT(e){return!(!lT(e)||(t=e,pT&&pT in t))&&(hT(e)?OT:yT).test(bT(e));var t}function ST(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return jT(n)?n:void 0}var NT=ST(ZA,"Map"),MT=ST(Object,"create");var CT=Object.prototype.hasOwnProperty;var AT=Object.prototype.hasOwnProperty;function TT(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ET(e,t){var n,r,o=e.je;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function DT(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}TT.prototype.clear=function(){this.je=MT?MT(null):{},this.size=0},TT.prototype.delete=function(e){var t=this.has(e)&&delete this.je[e];return this.size-=t?1:0,t},TT.prototype.get=function(e){var t=this.je;if(MT){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return CT.call(t,e)?t[e]:void 0},TT.prototype.has=function(e){var t=this.je;return MT?void 0!==t[e]:AT.call(t,e)},TT.prototype.set=function(e,t){var n=this.je;return this.size+=this.has(e)?0:1,n[e]=MT&&void 0===t?"__lodash_hash_undefined__":t,this},DT.prototype.clear=function(){this.size=0,this.je={hash:new TT,map:new(NT||GA),string:new TT}},DT.prototype.delete=function(e){var t=ET(this,e).delete(e);return this.size-=t?1:0,t},DT.prototype.get=function(e){return ET(this,e).get(e)},DT.prototype.has=function(e){return ET(this,e).has(e)},DT.prototype.set=function(e,t){var n=ET(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function PT(e){var t=this.je=new GA(e);this.size=t.size}PT.prototype.clear=function(){this.je=new GA,this.size=0},PT.prototype.delete=function(e){var t=this.je,n=t.delete(e);return this.size=t.size,n},PT.prototype.get=function(e){return this.je.get(e)},PT.prototype.has=function(e){return this.je.has(e)},PT.prototype.set=function(e,t){var n=this.je;if(n instanceof GA){var r=n.je;if(!NT||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.je=new DT(r)}return n.set(e,t),this.size=n.size,this};var IT=function(){try{var e=ST(Object,"defineProperty");return e({},"",{}),e}catch(Dae){}}(),LT=IT;function _T(e,t,n){"__proto__"==t&<?LT(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function FT(e,t,n){(void 0!==n&&!HA(e[t],n)||void 0===n&&!(t in e))&&_T(e,t,n)}var RT,BT=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var u=i[RT?a:++r];if(!1===t(o[u],u,o))break}return e},zT=BT,$T="object"==typeof exports&&exports&&!exports.nodeType&&exports,WT=$T&&"object"==typeof module&&module&&!module.nodeType&&module,VT=WT&&WT.exports===$T?ZA.Buffer:void 0,UT=VT?VT.allocUnsafe:void 0;var HT=ZA.Uint8Array;function qT(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new HT(r).set(new HT(n)),r):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}var KT=Object.create,GT=function(){function e(){}return function(t){if(!lT(t))return{};if(KT)return KT(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),YT=GT;function XT(e,t){return function(n){return e(t(n))}}var ZT=XT(Object.getPrototypeOf,Object),QT=Object.prototype;function JT(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||QT)}function eE(e){return null!=e&&"object"==typeof e}function tE(e){return eE(e)&&"[object Arguments]"==uT(e)}var nE=Object.prototype,rE=nE.hasOwnProperty,oE=nE.propertyIsEnumerable,iE=tE(function(){return arguments}())?tE:function(e){return eE(e)&&rE.call(e,"callee")&&!oE.call(e,"callee")},aE=iE,uE=Array.isArray,lE=9007199254740991;function sE(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=lE}function cE(e){return null!=e&&sE(e.length)&&!hT(e)}var dE="object"==typeof exports&&exports&&!exports.nodeType&&exports,fE=dE&&"object"==typeof module&&module&&!module.nodeType&&module,hE=fE&&fE.exports===dE?ZA.Buffer:void 0,vE=(hE?hE.isBuffer:void 0)||function(){return!1},pE="[object Object]",mE=Function.prototype,bE=Object.prototype,yE=mE.toString,gE=bE.hasOwnProperty,wE=yE.call(Object);var xE={};xE["[object Float32Array]"]=xE["[object Float64Array]"]=xE["[object Int8Array]"]=xE["[object Int16Array]"]=xE["[object Int32Array]"]=xE["[object Uint8Array]"]=xE["[object Uint8ClampedArray]"]=xE["[object Uint16Array]"]=xE["[object Uint32Array]"]=!0,xE["[object Arguments]"]=xE["[object Array]"]=xE["[object ArrayBuffer]"]=xE["[object Boolean]"]=xE["[object DataView]"]=xE["[object Date]"]=xE["[object Error]"]=xE["[object Function]"]=xE["[object Map]"]=xE["[object Number]"]=xE["[object Object]"]=xE["[object RegExp]"]=xE["[object Set]"]=xE["[object String]"]=xE["[object WeakMap]"]=!1;var kE,OE="object"==typeof exports&&exports&&!exports.nodeType&&exports,jE=OE&&"object"==typeof module&&module&&!module.nodeType&&module,SE=jE&&jE.exports===OE&&YA.process,NE=function(){try{var e=jE&&jE.require&&jE.require("util").types;return e||SE&&SE.binding&&SE.binding("util")}catch(Dae){}}(),ME=NE&&NE.isTypedArray,CE=ME?(kE=ME,function(e){return kE(e)}):function(e){return eE(e)&&sE(e.length)&&!!xE[uT(e)]};function AE(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var TE=Object.prototype.hasOwnProperty;function EE(e,t,n){var r=e[t];TE.call(e,t)&&HA(r,n)&&(void 0!==n||t in e)||_T(e,t,n)}var DE=9007199254740991,PE=/^(?:0|[1-9]\d*)$/;function IE(e,t){var n=typeof e;return!!(t=null==t?DE:t)&&("number"==n||"symbol"!=n&&PE.test(e))&&e>-1&&e%1==0&&e<t}var LE=Object.prototype.hasOwnProperty;function _E(e,t){var n=uE(e),r=!n&&aE(e),o=!n&&!r&&vE(e),i=!n&&!r&&!o&&CE(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=u.length;for(var s in e)!t&&!LE.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||IE(s,l))||u.push(s);return u}var FE=Object.prototype.hasOwnProperty;function RE(e){if(!lT(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=JT(e),n=[];for(var r in e)("constructor"!=r||!t&&FE.call(e,r))&&n.push(r);return n}function BE(e){return cE(e)?_E(e,!0):RE(e)}function zE(e){return function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var u=t[i],l=r?r(n[u],e[u],u,n,e):void 0;void 0===l&&(l=e[u]),o?_T(n,u,l):EE(n,u,l)}return n}(e,BE(e))}function $E(e,t,n,r,o,i,a){var u=AE(e,n),l=AE(t,n),s=a.get(l);if(s)FT(e,n,s);else{var c,d=i?i(u,l,n+"",e,t,a):void 0,f=void 0===d;if(f){var h=uE(l),v=!h&&vE(l),p=!h&&!v&&CE(l);d=l,h||v||p?uE(u)?d=u:eE(c=u)&&cE(c)?d=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(u):v?(f=!1,d=function(e,t){if(t)return e.slice();var n=e.length,r=UT?UT(n):new e.constructor(n);return e.copy(r),r}(l,!0)):p?(f=!1,d=qT(l,!0)):d=[]:function(e){if(!eE(e)||uT(e)!=pE)return!1;var t=ZT(e);if(null===t)return!0;var n=gE.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&yE.call(n)==wE}(l)||aE(l)?(d=u,aE(u)?d=zE(u):lT(u)&&!hT(u)||(d=function(e){return"function"!=typeof e.constructor||JT(e)?{}:YT(ZT(e))}(l))):f=!1}f&&(a.set(l,d),o(d,l,r,i,a),a.delete(l)),FT(e,n,d)}}function WE(e,t,n,r,o){e!==t&&zT(t,(function(i,a){if(o||(o=new PT),lT(i))$E(e,t,a,n,WE,r,o);else{var u=r?r(AE(e,a),i,a+"",e,t,o):void 0;void 0===u&&(u=i),FT(e,a,u)}}),BE)}function VE(e){return e}var UE=Math.max;var HE=LT?function(e,t){return LT(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:VE,qE=HE,KE=Date.now;var GE=function(e){var t=0,n=0;return function(){var r=KE(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(qE),YE=GE;function XE(e,t){return YE(function(e,t,n){return t=UE(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=UE(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var u=Array(t+1);++o<t;)u[o]=r[o];return u[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,u)}}(e,t,VE),e+"")}var ZE,QE=(ZE=function(e,t,n){WE(e,t,n)},XE((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=ZE.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!lT(n))return!1;var r=typeof t;return!!("number"==r?cE(n)&&IE(t,n.length):"string"==r&&t in n)&&HA(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=t[n];a&&ZE(e,a,n,o)}return e}))),JE=QE,eD=function(t){var n=t.zDepth,r=t.radius,o=t.background,i=t.children,a=t.styles,u=SA(JE({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+n+"px "+4*n+"px rgba(0,0,0,.24)",borderRadius:r,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},void 0===a?{}:a),{"zDepth-1":1===n});return e.createElement("div",{style:u.wrap},e.createElement("div",{style:u.bg}),e.createElement("div",{style:u.content},i))};eD.propTypes={background:UA.string,zDepth:UA.oneOf([0,1,2,3,4,5]),radius:UA.number,styles:UA.object},eD.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var tD=function(){return ZA.Date.now()},nD=/\s/;var rD=/^\s+/;function oD(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&nD.test(e.charAt(t)););return t}(e)+1).replace(rD,""):e}var iD="[object Symbol]";function aD(e){return"symbol"==typeof e||eE(e)&&uT(e)==iD}var uD=NaN,lD=/^[-+]0x[0-9a-f]+$/i,sD=/^0b[01]+$/i,cD=/^0o[0-7]+$/i,dD=parseInt;function fD(e){if("number"==typeof e)return e;if(aD(e))return uD;if(lT(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=lT(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=oD(e);var n=sD.test(e);return n||cD.test(e)?dD(e.slice(2),n?2:8):lD.test(e)?uD:+e}var hD="Expected a function",vD=Math.max,pD=Math.min;function mD(e,t,n){var r,o,i,a,u,l,s=0,c=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError(hD);function h(t){var n=r,i=o;return r=o=void 0,s=t,a=e.apply(i,n)}function v(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-s>=i}function p(){var e=tD();if(v(e))return m(e);u=setTimeout(p,function(e){var n=t-(e-l);return d?pD(n,i-(e-s)):n}(e))}function m(e){return u=void 0,f&&r?h(e):(r=o=void 0,a)}function b(){var e=tD(),n=v(e);if(r=arguments,o=this,l=e,n){if(void 0===u)return function(e){return s=e,u=setTimeout(p,t),c?h(e):a}(l);if(d)return clearTimeout(u),u=setTimeout(p,t),h(l)}return void 0===u&&(u=setTimeout(p,t)),a}return t=fD(t)||0,lT(n)&&(c=!!n.leading,i=(d="maxWait"in n)?vD(fD(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f),b.cancel=function(){void 0!==u&&clearTimeout(u),s=0,r=l=o=u=void 0},b.flush=function(){return void 0===u?a:m(tD())},b}var bD=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var yD=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.handleChange=function(e){"function"==typeof t.props.onChange&&t.throttle(t.props.onChange,function(e,t,n){var r=n.getBoundingClientRect(),o=r.width,i=r.height,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=a-(n.getBoundingClientRect().left+window.pageXOffset),s=u-(n.getBoundingClientRect().top+window.pageYOffset);l<0?l=0:l>o&&(l=o),s<0?s=0:s>i&&(s=i);var c=l/o,d=1-s/i;return{h:t.h,s:c,v:d,a:t.a,source:"hsv"}}(e,t.props.hsl,t.container),e)},t.handleMouseDown=function(e){t.handleChange(e);var n=t.getContainerRenderWindow();n.addEventListener("mousemove",t.handleChange),n.addEventListener("mouseup",t.handleMouseUp)},t.handleMouseUp=function(){t.unbindEventListeners()},t.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return lT(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),mD(e,t,{leading:r,maxWait:t,trailing:o})}((function(e,t,n){e(t,n)}),50),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),bD(n,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var t=this,n=this.props.style||{},r=n.color,o=n.white,i=n.black,a=n.pointer,u=n.circle,l=SA({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:r,white:o,black:i,pointer:a,circle:u}},{custom:!!this.props.style});return e.createElement("div",{style:l.color,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},e.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),e.createElement("div",{style:l.white,className:"saturation-white"},e.createElement("div",{style:l.black,className:"saturation-black"}),e.createElement("div",{style:l.pointer},this.props.pointer?e.createElement(this.props.pointer,this.props):e.createElement("div",{style:l.circle}))))}}]),n}(e.PureComponent||e.Component);function gD(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}var wD=XT(Object.keys,Object),xD=Object.prototype.hasOwnProperty;function kD(e){return cE(e)?_E(e):function(e){if(!JT(e))return wD(e);var t=[];for(var n in Object(e))xD.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var OD=function(e,t){return function(n,r){if(null==n)return n;if(!cE(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}((function(e,t){return e&&zT(e,t,kD)})),jD=OD;function SD(e,t){var n;return(uE(e)?gD:jD)(e,"function"==typeof(n=t)?n:VE)}function ND(e){return ND="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ND(e)}var MD=/^\s+/,CD=/\s+$/;function AD(e,t){if(t=t||{},(e=e||"")instanceof AD)return e;if(!(this instanceof AD))return new AD(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,u=!1;"string"==typeof e&&(e=function(e){e=e.replace(MD,"").replace(CD,"").toLowerCase();var t,n=!1;if(qD[e])e=qD[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=iP.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=iP.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=iP.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=iP.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=iP.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=iP.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=iP.hex8.exec(e))return{r:ZD(t[1]),g:ZD(t[2]),b:ZD(t[3]),a:tP(t[4]),format:n?"name":"hex8"};if(t=iP.hex6.exec(e))return{r:ZD(t[1]),g:ZD(t[2]),b:ZD(t[3]),format:n?"name":"hex"};if(t=iP.hex4.exec(e))return{r:ZD(t[1]+""+t[1]),g:ZD(t[2]+""+t[2]),b:ZD(t[3]+""+t[3]),a:tP(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=iP.hex3.exec(e))return{r:ZD(t[1]+""+t[1]),g:ZD(t[2]+""+t[2]),b:ZD(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==ND(e)&&(aP(e.r)&&aP(e.g)&&aP(e.b)?(t=function(e,t,n){return{r:255*YD(e,255),g:255*YD(t,255),b:255*YD(n,255)}}(e.r,e.g,e.b),a=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):aP(e.h)&&aP(e.s)&&aP(e.v)?(r=JD(e.s),o=JD(e.v),t=function(e,t,n){e=6*YD(e,360),t=YD(t,100),n=YD(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),u=n*(1-(1-o)*t),l=r%6,s=[n,a,i,i,u,n][l],c=[u,n,n,a,i,i][l],d=[i,i,u,n,n,a][l];return{r:255*s,g:255*c,b:255*d}}(e.h,r,o),a=!0,u="hsv"):aP(e.h)&&aP(e.s)&&aP(e.l)&&(r=JD(e.s),i=JD(e.l),t=function(e,t,n){var r,o,i;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=YD(e,360),t=YD(t,100),n=YD(n,100),0===t)r=o=i=n;else{var u=n<.5?n*(1+t):n+t-n*t,l=2*n-u;r=a(l,u,e+1/3),o=a(l,u,e),i=a(l,u,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,r,i),a=!0,u="hsl"),e.hasOwnProperty("a")&&(n=e.a));return n=GD(n),{ok:a,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function TD(e,t,n){e=YD(e,255),t=YD(t,255),n=YD(n,255);var r,o,i=Math.max(e,t,n),a=Math.min(e,t,n),u=(i+a)/2;if(i==a)r=o=0;else{var l=i-a;switch(o=u>.5?l/(2-i-a):l/(i+a),i){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:u}}function ED(e,t,n){e=YD(e,255),t=YD(t,255),n=YD(n,255);var r,o,i=Math.max(e,t,n),a=Math.min(e,t,n),u=i,l=i-a;if(o=0===i?0:l/i,i==a)r=0;else{switch(i){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:u}}function DD(e,t,n,r){var o=[QD(Math.round(e).toString(16)),QD(Math.round(t).toString(16)),QD(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function PD(e,t,n,r){return[QD(eP(r)),QD(Math.round(e).toString(16)),QD(Math.round(t).toString(16)),QD(Math.round(n).toString(16))].join("")}function ID(e,t){t=0===t?0:t||10;var n=AD(e).toHsl();return n.s-=t/100,n.s=XD(n.s),AD(n)}function LD(e,t){t=0===t?0:t||10;var n=AD(e).toHsl();return n.s+=t/100,n.s=XD(n.s),AD(n)}function _D(e){return AD(e).desaturate(100)}function FD(e,t){t=0===t?0:t||10;var n=AD(e).toHsl();return n.l+=t/100,n.l=XD(n.l),AD(n)}function RD(e,t){t=0===t?0:t||10;var n=AD(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),AD(n)}function BD(e,t){t=0===t?0:t||10;var n=AD(e).toHsl();return n.l-=t/100,n.l=XD(n.l),AD(n)}function zD(e,t){var n=AD(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,AD(n)}function $D(e){var t=AD(e).toHsl();return t.h=(t.h+180)%360,AD(t)}function WD(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=AD(e).toHsl(),r=[AD(e)],o=360/t,i=1;i<t;i++)r.push(AD({h:(n.h+i*o)%360,s:n.s,l:n.l}));return r}function VD(e){var t=AD(e).toHsl(),n=t.h;return[AD(e),AD({h:(n+72)%360,s:t.s,l:t.l}),AD({h:(n+216)%360,s:t.s,l:t.l})]}function UD(e,t,n){t=t||6,n=n||30;var r=AD(e).toHsl(),o=360/n,i=[AD(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(AD(r));return i}function HD(e,t){t=t||6;for(var n=AD(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],u=1/t;t--;)a.push(AD({h:r,s:o,v:i})),i=(i+u)%1;return a}AD.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=GD(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=ED(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=ED(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=TD(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=TD(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return DD(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[QD(Math.round(e).toString(16)),QD(Math.round(t).toString(16)),QD(Math.round(n).toString(16)),QD(eP(r))];if(o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*YD(this._r,255))+"%",g:Math.round(100*YD(this._g,255))+"%",b:Math.round(100*YD(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*YD(this._r,255))+"%, "+Math.round(100*YD(this._g,255))+"%, "+Math.round(100*YD(this._b,255))+"%)":"rgba("+Math.round(100*YD(this._r,255))+"%, "+Math.round(100*YD(this._g,255))+"%, "+Math.round(100*YD(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(KD[DD(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+PD(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=AD(e);n="#"+PD(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return AD(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(FD,arguments)},brighten:function(){return this._applyModification(RD,arguments)},darken:function(){return this._applyModification(BD,arguments)},desaturate:function(){return this._applyModification(ID,arguments)},saturate:function(){return this._applyModification(LD,arguments)},greyscale:function(){return this._applyModification(_D,arguments)},spin:function(){return this._applyModification(zD,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(UD,arguments)},complement:function(){return this._applyCombination($D,arguments)},monochromatic:function(){return this._applyCombination(HD,arguments)},splitcomplement:function(){return this._applyCombination(VD,arguments)},triad:function(){return this._applyCombination(WD,[3])},tetrad:function(){return this._applyCombination(WD,[4])}},AD.fromRatio=function(e,t){if("object"==ND(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:JD(e[r]));e=n}return AD(e,t)},AD.equals=function(e,t){return!(!e||!t)&&AD(e).toRgbString()==AD(t).toRgbString()},AD.random=function(){return AD.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},AD.mix=function(e,t,n){n=0===n?0:n||50;var r=AD(e).toRgb(),o=AD(t).toRgb(),i=n/100;return AD({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},AD.readability=function(e,t){var n=AD(e),r=AD(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},AD.isReadable=function(e,t,n){var r,o,i=AD.readability(e,t);switch(o=!1,r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n),r.level+r.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},AD.mostReadable=function(e,t,n){var r,o,i,a,u=null,l=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var s=0;s<t.length;s++)(r=AD.readability(e,t[s]))>l&&(l=r,u=AD(t[s]));return AD.isReadable(e,u,{level:i,size:a})||!o?u:(n.includeFallbackColors=!1,AD.mostReadable(e,["#fff","#000"],n))};var qD=AD.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},KD=AD.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(qD);function GD(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function YD(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function XD(e){return Math.min(1,Math.max(0,e))}function ZD(e){return parseInt(e,16)}function QD(e){return 1==e.length?"0"+e:""+e}function JD(e){return e<=1&&(e=100*e+"%"),e}function eP(e){return Math.round(255*parseFloat(e)).toString(16)}function tP(e){return ZD(e)/255}var nP,rP,oP,iP=(rP="[\\s|\\(]+("+(nP="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+nP+")[,|\\s]+("+nP+")\\s*\\)?",oP="[\\s|\\(]+("+nP+")[,|\\s]+("+nP+")[,|\\s]+("+nP+")[,|\\s]+("+nP+")\\s*\\)?",{CSS_UNIT:new RegExp(nP),rgb:new RegExp("rgb"+rP),rgba:new RegExp("rgba"+oP),hsl:new RegExp("hsl"+rP),hsla:new RegExp("hsla"+oP),hsv:new RegExp("hsv"+rP),hsva:new RegExp("hsva"+oP),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function aP(e){return!!iP.CSS_UNIT.exec(e)}var uP=function(e){var t=0,n=0;return SD(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e},lP=function(e,t){var n=e.hex?AD(e.hex):AD(e),r=n.toHsl(),o=n.toHsv(),i=n.toRgb(),a=n.toHex();return 0===r.s&&(r.h=t||0,o.h=t||0),{hsl:r,hex:"000000"===a&&0===i.a?"transparent":"#"+a,rgb:i,hsv:o,oldHue:e.h||t||r.h,source:e.source}},sP=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&AD(e).isValid()},cP=function(e){if(!e)return"#fff";var t=lP(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},dP=function(e,t){return AD(t+" ("+e.replace("°","")+")")._ok},fP=Object.assign||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},hP=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var vP=function(t){var n=function(n){function r(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return t.handleChange=function(e,n){if(uP(e)){var r=lP(e,e.h||t.state.oldHue);t.setState(r),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,r,n),t.props.onChange&&t.props.onChange(r,n)}},t.handleSwatchHover=function(e,n){if(uP(e)){var r=lP(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=fP({},lP(e.color,0)),t.debounce=mD((function(e,t,n){e(t,n)}),100),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),hP(r,[{key:"render",value:function(){var n={};return this.props.onSwatchHover&&(n.onSwatchHover=this.handleSwatchHover),e.createElement(t,fP({},this.props,this.state,{onChange:this.handleChange},n))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return fP({},lP(e.color,t.oldHue))}}]),r}(e.PureComponent||e.Component);return n.propTypes=fP({},t.propTypes),n.defaultProps=fP({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),n},pP=Object.assign||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},mP=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function bP(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var yP=Object.assign||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},gP=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function o(){var e,t,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=n=bP(this,(e=o.__proto__||Object.getPrototypeOf(o)).call.apply(e,[this].concat(i))),n.state={focus:!1},n.handleFocus=function(){return n.setState({focus:!0})},n.handleBlur=function(){return n.setState({focus:!1})},bP(n,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,r),mP(o,[{key:"render",value:function(){return e.createElement(n,{onFocus:this.handleFocus,onBlur:this.handleBlur},e.createElement(t,pP({},this.props,this.state)))}}]),o}(e.Component)}((function(t){var n=t.color,r=t.style,o=t.onClick,i=void 0===o?function(){}:o,a=t.onHover,u=t.title,l=void 0===u?n:u,s=t.children,c=t.focus,d=t.focusStyle,f="transparent"===n,h=SA({default:{swatch:yP({background:n,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,c?void 0===d?{}:d:{})}}),v={};return a&&(v.onMouseOver=function(e){return a(n,e)}),e.createElement("div",yP({style:h.swatch,onClick:function(e){return i(n,e)},title:l,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&i(n,e)}},v),s,f&&e.createElement(AA,{borderRadius:h.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))})),wP=Object.assign||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},xP=function(t){var n=t.rgb,r=t.hsl,o=t.width,i=t.height,a=t.onChange,u=t.direction,l=t.style,s=t.renderers,c=t.pointer,d=t.className,f=void 0===d?"":d,h=SA({default:{picker:{position:"relative",width:o,height:i},alpha:{radius:"2px",style:l}}});return e.createElement("div",{style:h.picker,className:"alpha-picker "+f},e.createElement(PA,wP({},h.alpha,{rgb:n,hsl:r,pointer:c,renderers:s,onChange:a,direction:u})))};function kP(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}xP.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:function(t){var n=t.direction,r=SA({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===n});return e.createElement("div",{style:r.picker})}},vP(xP);function OP(e){var t=-1,n=null==e?0:e.length;for(this.je=new DT;++t<n;)this.add(e[t])}function jP(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}OP.prototype.add=OP.prototype.push=function(e){return this.je.set(e,"__lodash_hash_undefined__"),this},OP.prototype.has=function(e){return this.je.has(e)};var SP=1,NP=2;function MP(e,t,n,r,o,i){var a=n&SP,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var s=i.get(e),c=i.get(t);if(s&&c)return s==t&&c==e;var d=-1,f=!0,h=n&NP?new OP:void 0;for(i.set(e,t),i.set(t,e);++d<u;){var v=e[d],p=t[d];if(r)var m=a?r(p,v,d,t,e,i):r(v,p,d,e,t,i);if(void 0!==m){if(m)continue;f=!1;break}if(h){if(!jP(t,(function(e,t){if(a=t,!h.has(a)&&(v===e||o(v,e,n,r,i)))return h.push(t);var a}))){f=!1;break}}else if(v!==p&&!o(v,p,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f}function CP(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function AP(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var TP=1,EP=2,DP="[object Boolean]",PP="[object Date]",IP="[object Error]",LP="[object Map]",_P="[object Number]",FP="[object RegExp]",RP="[object Set]",BP="[object String]",zP="[object Symbol]",$P="[object ArrayBuffer]",WP="[object DataView]",VP=QA?QA.prototype:void 0,UP=VP?VP.valueOf:void 0;var HP=Object.prototype.propertyIsEnumerable,qP=Object.getOwnPropertySymbols,KP=qP?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(qP(e),(function(t){return HP.call(e,t)})))}:function(){return[]},GP=KP;function YP(e){return function(e,t,n){var r=t(e);return uE(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,kD,GP)}var XP=1,ZP=Object.prototype.hasOwnProperty;var QP=ST(ZA,"DataView"),JP=ST(ZA,"Promise"),eI=ST(ZA,"Set"),tI=ST(ZA,"WeakMap"),nI="[object Map]",rI="[object Promise]",oI="[object Set]",iI="[object WeakMap]",aI="[object DataView]",uI=bT(QP),lI=bT(NT),sI=bT(JP),cI=bT(eI),dI=bT(tI),fI=uT;(QP&&fI(new QP(new ArrayBuffer(1)))!=aI||NT&&fI(new NT)!=nI||JP&&fI(JP.resolve())!=rI||eI&&fI(new eI)!=oI||tI&&fI(new tI)!=iI)&&(fI=function(e){var t=uT(e),n="[object Object]"==t?e.constructor:void 0,r=n?bT(n):"";if(r)switch(r){case uI:return aI;case lI:return nI;case sI:return rI;case cI:return oI;case dI:return iI}return t});var hI=fI,vI=1,pI="[object Arguments]",mI="[object Array]",bI="[object Object]",yI=Object.prototype.hasOwnProperty;function gI(e,t,n,r,o,i){var a=uE(e),u=uE(t),l=a?mI:hI(e),s=u?mI:hI(t),c=(l=l==pI?bI:l)==bI,d=(s=s==pI?bI:s)==bI,f=l==s;if(f&&vE(e)){if(!vE(t))return!1;a=!0,c=!1}if(f&&!c)return i||(i=new PT),a||CE(e)?MP(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case WP:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $P:return!(e.byteLength!=t.byteLength||!i(new HT(e),new HT(t)));case DP:case PP:case _P:return HA(+e,+t);case IP:return e.name==t.name&&e.message==t.message;case FP:case BP:return e==t+"";case LP:var u=CP;case RP:var l=r&TP;if(u||(u=AP),e.size!=t.size&&!l)return!1;var s=a.get(e);if(s)return s==t;r|=EP,a.set(e,t);var c=MP(u(e),u(t),r,o,i,a);return a.delete(e),c;case zP:if(UP)return UP.call(e)==UP.call(t)}return!1}(e,t,l,n,r,o,i);if(!(n&vI)){var h=c&&yI.call(e,"__wrapped__"),v=d&&yI.call(t,"__wrapped__");if(h||v){var p=h?e.value():e,m=v?t.value():t;return i||(i=new PT),o(p,m,n,r,i)}}return!!f&&(i||(i=new PT),function(e,t,n,r,o,i){var a=n&XP,u=YP(e),l=u.length;if(l!=YP(t).length&&!a)return!1;for(var s=l;s--;){var c=u[s];if(!(a?c in t:ZP.call(t,c)))return!1}var d=i.get(e),f=i.get(t);if(d&&f)return d==t&&f==e;var h=!0;i.set(e,t),i.set(t,e);for(var v=a;++s<l;){var p=e[c=u[s]],m=t[c];if(r)var b=a?r(m,p,c,t,e,i):r(p,m,c,e,t,i);if(!(void 0===b?p===m||o(p,m,n,r,i):b)){h=!1;break}v||(v="constructor"==c)}if(h&&!v){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))}function wI(e,t,n,r,o){return e===t||(null==e||null==t||!eE(e)&&!eE(t)?e!=e&&t!=t:gI(e,t,n,r,wI,o))}var xI=1,kI=2;function OI(e){return e==e&&!lT(e)}function jI(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function SI(e){var t=function(e){for(var t=kD(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,OI(o)]}return t}(e);return 1==t.length&&t[0][2]?jI(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var u=n[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<i;){var l=(u=n[o])[0],s=e[l],c=u[1];if(a&&u[2]){if(void 0===s&&!(l in e))return!1}else{var d=new PT;if(r)var f=r(s,c,l,e,t,d);if(!(void 0===f?wI(c,s,xI|kI,r,d):f))return!1}}return!0}(n,e,t)}}var NI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,MI=/^\w*$/;function CI(e,t){if(uE(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!aD(e))||(MI.test(e)||!NI.test(e)||null!=t&&e in Object(t))}var AI="Expected a function";function TI(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(AI);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(TI.Cache||DT),n}TI.Cache=DT;var EI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,DI=/\\(\\)?/g,PI=function(e){var t=TI(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(EI,(function(e,n,r,o){t.push(r?o.replace(DI,"$1"):n||e)})),t})),II=PI,LI=1/0,_I=QA?QA.prototype:void 0,FI=_I?_I.toString:void 0;function RI(e){if("string"==typeof e)return e;if(uE(e))return kP(e,RI)+"";if(aD(e))return FI?FI.call(e):"";var t=e+"";return"0"==t&&1/e==-LI?"-0":t}function BI(e,t){return uE(e)?e:CI(e,t)?[e]:II(function(e){return null==e?"":RI(e)}(e))}var zI=1/0;function $I(e){if("string"==typeof e||aD(e))return e;var t=e+"";return"0"==t&&1/e==-zI?"-0":t}function WI(e,t){for(var n=0,r=(t=BI(t,e)).length;null!=e&&n<r;)e=e[$I(t[n++])];return n&&n==r?e:void 0}function VI(e,t){return null!=e&&t in Object(e)}function UI(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=BI(t,e)).length,i=!1;++r<o;){var a=$I(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&sE(o)&&IE(a,o)&&(uE(e)||aE(e))}(e,t,VI)}var HI=1,qI=2;function KI(e,t){return CI(e)&&OI(t)?jI($I(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:WI(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?UI(n,e):wI(t,r,HI|qI)}}function GI(e){return CI(e)?(t=$I(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return WI(t,e)}}(e);var t}function YI(e,t){var n=-1,r=cE(e)?Array(e.length):[];return jD(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function XI(e,t){var n;return(uE(e)?kP:YI)(e,"function"==typeof(n=t)?n:null==n?VE:"object"==typeof n?uE(n)?KI(n[0],n[1]):SI(n):GI(n))}var ZI=function(t){var n=t.colors,r=t.onClick,o=t.onSwatchHover,i=SA({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return e.createElement("div",{style:i.swatches},XI(n,(function(t){return e.createElement(gP,{key:t,color:t,style:i.swatch,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}})})),e.createElement("div",{style:i.clear}))},QI=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,u=t.triangle,l=t.styles,s=void 0===l?{}:l,c=t.className,d=void 0===c?"":c,f="transparent"===o,h=function(e,t){sP(e)&&n({hex:e,source:"hex"},t)},v=SA(JE({default:{card:{width:a,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:o,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:cP(o),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+o+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},s),{"hide-triangle":"hide"===u});return e.createElement("div",{style:v.card,className:"block-picker "+d},e.createElement("div",{style:v.triangle}),e.createElement("div",{style:v.head},f&&e.createElement(AA,{borderRadius:"6px 6px 0 0"}),e.createElement("div",{style:v.label},o)),e.createElement("div",{style:v.body},e.createElement(ZI,{colors:i,onClick:h,onSwatchHover:r}),e.createElement(FA,{style:{input:v.input},value:o,onChange:h})))};QI.propTypes={width:UA.oneOfType([UA.string,UA.number]),colors:UA.arrayOf(UA.string),triangle:UA.oneOf(["top","hide"]),styles:UA.object},QI.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}},vP(QI);var JI="#ffcdd2",eL="#e57373",tL="#f44336",nL="#d32f2f",rL="#b71c1c",oL="#f8bbd0",iL="#f06292",aL="#e91e63",uL="#c2185b",lL="#880e4f",sL="#e1bee7",cL="#ba68c8",dL="#9c27b0",fL="#7b1fa2",hL="#4a148c",vL="#d1c4e9",pL="#9575cd",mL="#673ab7",bL="#512da8",yL="#311b92",gL="#c5cae9",wL="#7986cb",xL="#3f51b5",kL="#303f9f",OL="#1a237e",jL="#bbdefb",SL="#64b5f6",NL="#2196f3",ML="#1976d2",CL="#0d47a1",AL="#b3e5fc",TL="#4fc3f7",EL="#03a9f4",DL="#0288d1",PL="#01579b",IL="#b2ebf2",LL="#4dd0e1",_L="#00bcd4",FL="#0097a7",RL="#006064",BL="#b2dfdb",zL="#4db6ac",$L="#009688",WL="#00796b",VL="#004d40",UL="#c8e6c9",HL="#81c784",qL="#4caf50",KL="#388e3c",GL="#dcedc8",YL="#aed581",XL="#8bc34a",ZL="#689f38",QL="#33691e",JL="#f0f4c3",e_="#dce775",t_="#cddc39",n_="#afb42b",r_="#827717",o_="#fff9c4",i_="#fff176",a_="#ffeb3b",u_="#fbc02d",l_="#f57f17",s_="#ffecb3",c_="#ffd54f",d_="#ffc107",f_="#ffa000",h_="#ff6f00",v_="#ffe0b2",p_="#ffb74d",m_="#ff9800",b_="#f57c00",y_="#e65100",g_="#ffccbc",w_="#ff8a65",x_="#ff5722",k_="#e64a19",O_="#bf360c",j_="#d7ccc8",S_="#a1887f",N_="#795548",M_="#5d4037",C_="#3e2723",A_="#cfd8dc",T_="#90a4ae",E_="#607d8b",D_="#455a64",P_="#263238",I_=function(t){var n=t.color,r=t.onClick,o=t.onSwatchHover,i=t.hover,a=t.active,u=t.circleSize,l=t.circleSpacing,s=SA({default:{swatch:{width:u,height:u,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(u/2+1)+"px "+n,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+n}}},{hover:i,active:a});return e.createElement("div",{style:s.swatch},e.createElement(gP,{style:s.Swatch,color:n,onClick:r,onHover:o,focusStyle:{boxShadow:s.Swatch.boxShadow+", 0 0 5px "+n}}))};I_.defaultProps={circleSize:28,circleSpacing:14};var L_=OA(I_),__=function(t){var n=t.width,r=t.onChange,o=t.onSwatchHover,i=t.colors,a=t.hex,u=t.circleSize,l=t.styles,s=void 0===l?{}:l,c=t.circleSpacing,d=t.className,f=void 0===d?"":d,h=SA(JE({default:{card:{width:n,display:"flex",flexWrap:"wrap",marginRight:-c,marginBottom:-c}}},s)),v=function(e,t){return r({hex:e,source:"hex"},t)};return e.createElement("div",{style:h.card,className:"circle-picker "+f},XI(i,(function(t){return e.createElement(L_,{key:t,color:t,onClick:v,onSwatchHover:o,active:a===t.toLowerCase(),circleSize:u,circleSpacing:c})})))};function F_(e){return void 0===e}__.propTypes={width:UA.oneOfType([UA.string,UA.number]),circleSize:UA.number,circleSpacing:UA.number,styles:UA.object},__.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[tL,aL,dL,mL,xL,NL,EL,_L,$L,qL,XL,t_,a_,d_,m_,x_,N_,E_],styles:{}},vP(__);var R_={};Object.defineProperty(R_,"ie",{value:!0});var B_=Object.assign||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},z_=function(e){return e&&e.ie?e:{default:e}}(e);var $_=R_.default=function(e){var t=e.fill,n=void 0===t?"currentColor":t,r=e.width,o=void 0===r?24:r,i=e.height,a=void 0===i?24:i,u=e.style,l=void 0===u?{}:u,s=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return z_.default.createElement("svg",B_({viewBox:"0 0 24 24",style:B_({fill:n,width:o,height:a},l)},s),z_.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},W_=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var V_=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.toggleViews=function(){"hex"===t.state.view?t.setState({view:"rgb"}):"rgb"===t.state.view?t.setState({view:"hsl"}):"hsl"===t.state.view&&(1===t.props.hsl.a?t.setState({view:"hex"}):t.setState({view:"rgb"}))},t.handleChange=function(e,n){e.hex?sP(e.hex)&&t.props.onChange({hex:e.hex,source:"hex"},n):e.r||e.g||e.b?t.props.onChange({r:e.r||t.props.rgb.r,g:e.g||t.props.rgb.g,b:e.b||t.props.rgb.b,source:"rgb"},n):e.a?(e.a<0?e.a=0:e.a>1&&(e.a=1),t.props.onChange({h:t.props.hsl.h,s:t.props.hsl.s,l:t.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},n)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),t.props.onChange({h:e.h||t.props.hsl.h,s:Number(F_(e.s)?t.props.hsl.s:e.s),l:Number(F_(e.l)?t.props.hsl.l:e.l),source:"hsl"},n))},t.showHighlight=function(e){e.currentTarget.style.background="#eee"},t.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?t.state={view:"rgb"}:t.state={view:e.view},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),W_(n,[{key:"render",value:function(){var t=this,n=SA({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),r=void 0;return"hex"===this.state.view?r=e.createElement("div",{style:n.fields,className:"flexbox-fix"},e.createElement("div",{style:n.field},e.createElement(FA,{style:{input:n.input,label:n.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?r=e.createElement("div",{style:n.fields,className:"flexbox-fix"},e.createElement("div",{style:n.field},e.createElement(FA,{style:{input:n.input,label:n.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),e.createElement("div",{style:n.field},e.createElement(FA,{style:{input:n.input,label:n.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),e.createElement("div",{style:n.field},e.createElement(FA,{style:{input:n.input,label:n.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),e.createElement("div",{style:n.alpha},e.createElement(FA,{style:{input:n.input,label:n.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(r=e.createElement("div",{style:n.fields,className:"flexbox-fix"},e.createElement("div",{style:n.field},e.createElement(FA,{style:{input:n.input,label:n.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),e.createElement("div",{style:n.field},e.createElement(FA,{style:{input:n.input,label:n.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),e.createElement("div",{style:n.field},e.createElement(FA,{style:{input:n.input,label:n.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),e.createElement("div",{style:n.alpha},e.createElement(FA,{style:{input:n.input,label:n.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),e.createElement("div",{style:n.wrap,className:"flexbox-fix"},r,e.createElement("div",{style:n.toggle},e.createElement("div",{style:n.icon,onClick:this.toggleViews,ref:function(e){return t.icon=e}},e.createElement($_,{style:n.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),n}(e.Component);V_.defaultProps={view:"hex"};var U_=function(){var t=SA({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return e.createElement("div",{style:t.picker})},H_=function(){var t=SA({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return e.createElement("div",{style:t.picker})},q_=function(t){var n=t.width,r=t.onChange,o=t.disableAlpha,i=t.rgb,a=t.hsl,u=t.hsv,l=t.hex,s=t.renderers,c=t.styles,d=void 0===c?{}:c,f=t.className,h=void 0===f?"":f,v=t.defaultView,p=SA(JE({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:o});return e.createElement("div",{style:p.picker,className:"chrome-picker "+h},e.createElement("div",{style:p.saturation},e.createElement(yD,{style:p.Saturation,hsl:a,hsv:u,pointer:H_,onChange:r})),e.createElement("div",{style:p.body},e.createElement("div",{style:p.controls,className:"flexbox-fix"},e.createElement("div",{style:p.color},e.createElement("div",{style:p.swatch},e.createElement("div",{style:p.active}),e.createElement(AA,{renderers:s}))),e.createElement("div",{style:p.toggles},e.createElement("div",{style:p.hue},e.createElement(zA,{style:p.Hue,hsl:a,pointer:U_,onChange:r})),e.createElement("div",{style:p.alpha},e.createElement(PA,{style:p.Alpha,rgb:i,hsl:a,pointer:U_,renderers:s,onChange:r})))),e.createElement(V_,{rgb:i,hsl:a,hex:l,view:v,onChange:r,disableAlpha:o})))};q_.propTypes={width:UA.oneOfType([UA.string,UA.number]),disableAlpha:UA.bool,styles:UA.object,defaultView:UA.oneOf(["hex","rgb","hsl"])},q_.defaultProps={width:225,disableAlpha:!1,styles:{}},vP(q_);var K_=function(t){var n=t.color,r=t.onClick,o=void 0===r?function(){}:r,i=t.onSwatchHover,a=t.active,u=SA({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:cP(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":"#FFFFFF"===n,transparent:"transparent"===n});return e.createElement(gP,{style:u.color,color:n,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},e.createElement("div",{style:u.dot}))},G_=function(t){var n=t.hex,r=t.rgb,o=t.onChange,i=SA({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(e,t){e.r||e.g||e.b?o({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},t):o({hex:e.hex,source:"hex"},t)};return e.createElement("div",{style:i.fields,className:"flexbox-fix"},e.createElement("div",{style:i.active}),e.createElement(FA,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),e.createElement(FA,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:a}),e.createElement(FA,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:a}),e.createElement(FA,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:a}))},Y_=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.colors,i=t.hex,a=t.rgb,u=t.styles,l=void 0===u?{}:u,s=t.className,c=void 0===s?"":s,d=SA(JE({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),f=function(e,t){e.hex?sP(e.hex)&&n({hex:e.hex,source:"hex"},t):n(e,t)};return e.createElement(eD,{style:d.Compact,styles:l},e.createElement("div",{style:d.compact,className:"compact-picker "+c},e.createElement("div",null,XI(o,(function(t){return e.createElement(K_,{key:t,color:t,active:t.toLowerCase()===i,onClick:f,onSwatchHover:r})})),e.createElement("div",{style:d.clear})),e.createElement(G_,{hex:i,rgb:a,onChange:f})))};Y_.propTypes={colors:UA.arrayOf(UA.string),styles:UA.object},Y_.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}},vP(Y_);var X_=OA((function(t){var n=t.hover,r=t.color,o=t.onClick,i=t.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},u=SA({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return e.createElement("div",{style:u.swatch},e.createElement(gP,{color:r,onClick:o,onHover:i,focusStyle:a}))})),Z_=function(t){var n=t.width,r=t.colors,o=t.onChange,i=t.onSwatchHover,a=t.triangle,u=t.styles,l=void 0===u?{}:u,s=t.className,c=void 0===s?"":s,d=SA(JE({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":"hide"===a,"top-left-triangle":"top-left"===a,"top-right-triangle":"top-right"===a,"bottom-left-triangle":"bottom-left"===a,"bottom-right-triangle":"bottom-right"===a}),f=function(e,t){return o({hex:e,source:"hex"},t)};return e.createElement("div",{style:d.card,className:"github-picker "+c},e.createElement("div",{style:d.triangleShadow}),e.createElement("div",{style:d.triangle}),XI(r,(function(t){return e.createElement(X_,{color:t,key:t,onClick:f,onSwatchHover:i})})))};Z_.propTypes={width:UA.oneOfType([UA.string,UA.number]),colors:UA.arrayOf(UA.string),triangle:UA.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:UA.object},Z_.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},vP(Z_);var Q_=Object.assign||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},J_=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.hsl,a=t.direction,u=t.pointer,l=t.styles,s=void 0===l?{}:l,c=t.className,d=void 0===c?"":c,f=SA(JE({default:{picker:{position:"relative",width:n,height:r},hue:{radius:"2px"}}},s));return e.createElement("div",{style:f.picker,className:"hue-picker "+d},e.createElement(zA,Q_({},f.hue,{hsl:i,pointer:u,onChange:function(e){return o({a:1,h:e.h,l:.5,s:1})},direction:a})))};J_.propTypes={styles:UA.object},J_.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:function(t){var n=t.direction,r=SA({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===n});return e.createElement("div",{style:r.picker})},styles:{}},vP(J_);vP((function(t){var n=t.onChange,r=t.hex,o=t.rgb,i=t.styles,a=void 0===i?{}:i,u=t.className,l=void 0===u?"":u,s=SA(JE({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},a)),c=function(e,t){e.hex?sP(e.hex)&&n({hex:e.hex,source:"hex"},t):(e.r||e.g||e.b)&&n({r:e.r||o.r,g:e.g||o.g,b:e.b||o.b,source:"rgb"},t)};return e.createElement(eD,{styles:a},e.createElement("div",{style:s.material,className:"material-picker "+l},e.createElement(FA,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"hex",value:r,onChange:c}),e.createElement("div",{style:s.split,className:"flexbox-fix"},e.createElement("div",{style:s.third},e.createElement(FA,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:o.r,onChange:c})),e.createElement("div",{style:s.third},e.createElement(FA,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:o.g,onChange:c})),e.createElement("div",{style:s.third},e.createElement(FA,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:o.b,onChange:c})))))}));var eF=function(t){var n=t.onChange,r=t.rgb,o=t.hsv,i=t.hex,a=SA({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),u=function(e,t){e["#"]?sP(e["#"])&&n({hex:e["#"],source:"hex"},t):e.r||e.g||e.b?n({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},t):(e.h||e.s||e.v)&&n({h:e.h||o.h,s:e.s||o.s,v:e.v||o.v,source:"hsv"},t)};return e.createElement("div",{style:a.fields},e.createElement(FA,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"h",value:Math.round(o.h),onChange:u}),e.createElement(FA,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"s",value:Math.round(100*o.s),onChange:u}),e.createElement(FA,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"v",value:Math.round(100*o.v),onChange:u}),e.createElement("div",{style:a.divider}),e.createElement(FA,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:u}),e.createElement(FA,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:u}),e.createElement(FA,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:r.b,onChange:u}),e.createElement("div",{style:a.divider}),e.createElement(FA,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"#",value:i.replace("#",""),onChange:u}),e.createElement("div",{style:a.fieldSymbols},e.createElement("div",{style:a.symbol},"°"),e.createElement("div",{style:a.symbol},"%"),e.createElement("div",{style:a.symbol},"%")))},tF=function(t){var n=t.hsl,r=SA({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":n.l>.5});return e.createElement("div",{style:r.picker})},nF=function(){var t=SA({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return e.createElement("div",{style:t.pointer},e.createElement("div",{style:t.left},e.createElement("div",{style:t.leftInside})),e.createElement("div",{style:t.right},e.createElement("div",{style:t.rightInside})))},rF=function(t){var n=t.onClick,r=t.label,o=t.children,i=t.active,a=SA({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return e.createElement("div",{style:a.button,onClick:n},r||o)},oF=function(t){var n=t.rgb,r=t.currentColor,o=SA({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return e.createElement("div",null,e.createElement("div",{style:o.label},"new"),e.createElement("div",{style:o.swatches},e.createElement("div",{style:o.new}),e.createElement("div",{style:o.current})),e.createElement("div",{style:o.label},"current"))},iF=function(){function e(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,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var aF=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.state={currentColor:e.hex},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),iF(n,[{key:"render",value:function(){var t=this.props,n=t.styles,r=void 0===n?{}:n,o=t.className,i=void 0===o?"":o,a=SA(JE({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},r));return e.createElement("div",{style:a.picker,className:"photoshop-picker "+i},e.createElement("div",{style:a.head},this.props.header),e.createElement("div",{style:a.body,className:"flexbox-fix"},e.createElement("div",{style:a.saturation},e.createElement(yD,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:tF,onChange:this.props.onChange})),e.createElement("div",{style:a.hue},e.createElement(zA,{direction:"vertical",hsl:this.props.hsl,pointer:nF,onChange:this.props.onChange})),e.createElement("div",{style:a.controls},e.createElement("div",{style:a.top,className:"flexbox-fix"},e.createElement("div",{style:a.previews},e.createElement(oF,{rgb:this.props.rgb,currentColor:this.state.currentColor})),e.createElement("div",{style:a.actions},e.createElement(rF,{label:"OK",onClick:this.props.onAccept,active:!0}),e.createElement(rF,{label:"Cancel",onClick:this.props.onCancel}),e.createElement(eF,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),n}(e.Component);aF.propTypes={header:UA.string,styles:UA.object},aF.defaultProps={header:"Color Picker",styles:{}},vP(aF);var uF=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.disableAlpha,u=SA({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:a}),l=function(e,t){e.hex?sP(e.hex)&&n({hex:e.hex,source:"hex"},t):e.r||e.g||e.b?n({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,a:r.a,source:"rgb"},t):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,n({h:o.h,s:o.s,l:o.l,a:e.a,source:"rgb"},t))};return e.createElement("div",{style:u.fields,className:"flexbox-fix"},e.createElement("div",{style:u.double},e.createElement(FA,{style:{input:u.input,label:u.label},label:"hex",value:i.replace("#",""),onChange:l})),e.createElement("div",{style:u.single},e.createElement(FA,{style:{input:u.input,label:u.label},label:"r",value:r.r,onChange:l,dragLabel:"true",dragMax:"255"})),e.createElement("div",{style:u.single},e.createElement(FA,{style:{input:u.input,label:u.label},label:"g",value:r.g,onChange:l,dragLabel:"true",dragMax:"255"})),e.createElement("div",{style:u.single},e.createElement(FA,{style:{input:u.input,label:u.label},label:"b",value:r.b,onChange:l,dragLabel:"true",dragMax:"255"})),e.createElement("div",{style:u.alpha},e.createElement(FA,{style:{input:u.input,label:u.label},label:"a",value:Math.round(100*r.a),onChange:l,dragLabel:"true",dragMax:"100"})))},lF=Object.assign||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},sF=function(t){var n=t.colors,r=t.onClick,o=void 0===r?function(){}:r,i=t.onSwatchHover,a=SA({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!n||!n.length}),u=function(e,t){o({hex:e,source:"hex"},t)};return e.createElement("div",{style:a.colors,className:"flexbox-fix"},n.map((function(t){var n="string"==typeof t?{color:t}:t,r=""+n.color+(n.title||"");return e.createElement("div",{key:r,style:a.swatchWrap},e.createElement(gP,lF({},n,{style:a.swatch,onClick:u,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+n.color}})))})))};sF.propTypes={colors:UA.arrayOf(UA.oneOfType([UA.string,UA.shape({color:UA.string,title:UA.string})])).isRequired};var cF=Object.assign||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},dF=function(t){var n=t.width,r=t.rgb,o=t.hex,i=t.hsv,a=t.hsl,u=t.onChange,l=t.onSwatchHover,s=t.disableAlpha,c=t.presetColors,d=t.renderers,f=t.styles,h=void 0===f?{}:f,v=t.className,p=void 0===v?"":v,m=SA(JE({default:cF({picker:{width:n,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},h),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},h),{disableAlpha:s});return e.createElement("div",{style:m.picker,className:"sketch-picker "+p},e.createElement("div",{style:m.saturation},e.createElement(yD,{style:m.Saturation,hsl:a,hsv:i,onChange:u})),e.createElement("div",{style:m.controls,className:"flexbox-fix"},e.createElement("div",{style:m.sliders},e.createElement("div",{style:m.hue},e.createElement(zA,{style:m.Hue,hsl:a,onChange:u})),e.createElement("div",{style:m.alpha},e.createElement(PA,{style:m.Alpha,rgb:r,hsl:a,renderers:d,onChange:u}))),e.createElement("div",{style:m.color},e.createElement(AA,null),e.createElement("div",{style:m.activeColor}))),e.createElement(uF,{rgb:r,hsl:a,hex:o,onChange:u,disableAlpha:s}),e.createElement(sF,{colors:c,onClick:u,onSwatchHover:l}))};dF.propTypes={disableAlpha:UA.bool,width:UA.oneOfType([UA.string,UA.number]),styles:UA.object},dF.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},vP(dF);var fF=function(t){var n=t.hsl,r=t.offset,o=t.onClick,i=void 0===o?function(){}:o,a=t.active,u=t.first,l=t.last,s=SA({default:{swatch:{height:"12px",background:"hsl("+n.h+", 50%, "+100*r+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:a,first:u,last:l});return e.createElement("div",{style:s.swatch,onClick:function(e){return i({h:n.h,s:.5,l:r,source:"hsl"},e)}})},hF=function(t){var n=t.onClick,r=t.hsl,o=SA({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),i=.1;return e.createElement("div",{style:o.swatches},e.createElement("div",{style:o.swatch},e.createElement(fF,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<i&&Math.abs(r.s-.5)<i,onClick:n,first:!0})),e.createElement("div",{style:o.swatch},e.createElement(fF,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<i&&Math.abs(r.s-.5)<i,onClick:n})),e.createElement("div",{style:o.swatch},e.createElement(fF,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<i&&Math.abs(r.s-.5)<i,onClick:n})),e.createElement("div",{style:o.swatch},e.createElement(fF,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<i&&Math.abs(r.s-.5)<i,onClick:n})),e.createElement("div",{style:o.swatch},e.createElement(fF,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<i&&Math.abs(r.s-.5)<i,onClick:n,last:!0})),e.createElement("div",{style:o.clear}))},vF=function(t){var n=t.hsl,r=t.onChange,o=t.pointer,i=t.styles,a=void 0===i?{}:i,u=t.className,l=void 0===u?"":u,s=SA(JE({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},a));return e.createElement("div",{style:s.wrap||{},className:"slider-picker "+l},e.createElement("div",{style:s.hue},e.createElement(zA,{style:s.Hue,hsl:n,pointer:o,onChange:r})),e.createElement("div",{style:s.swatches},e.createElement(hF,{hsl:n,onClick:r})))};vF.propTypes={styles:UA.object},vF.defaultProps={pointer:function(){var t=SA({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return e.createElement("div",{style:t.picker})},styles:{}},vP(vF);var pF={};Object.defineProperty(pF,"ie",{value:!0});var mF=Object.assign||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},bF=function(e){return e&&e.ie?e:{default:e}}(e);var yF=pF.default=function(e){var t=e.fill,n=void 0===t?"currentColor":t,r=e.width,o=void 0===r?24:r,i=e.height,a=void 0===i?24:i,u=e.style,l=void 0===u?{}:u,s=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return bF.default.createElement("svg",mF({viewBox:"0 0 24 24",style:mF({fill:n,width:o,height:a},l)},s),bF.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},gF=function(t){var n=t.color,r=t.onClick,o=void 0===r?function(){}:r,i=t.onSwatchHover,a=t.first,u=t.last,l=t.active,s=SA({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:cP(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:u,active:l,"color-#FFFFFF":"#FFFFFF"===n,transparent:"transparent"===n});return e.createElement(gP,{color:n,style:s.color,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},e.createElement("div",{style:s.check},e.createElement(yF,null)))},wF=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,i=t.active,a=SA({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return e.createElement("div",{style:a.group},XI(o,(function(t,a){return e.createElement(gF,{key:t,color:t,active:t.toLowerCase()===i,first:0===a,last:a===o.length-1,onClick:n,onSwatchHover:r})})))},xF=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.onSwatchHover,a=t.colors,u=t.hex,l=t.styles,s=void 0===l?{}:l,c=t.className,d=void 0===c?"":c,f=SA(JE({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},s)),h=function(e,t){return o({hex:e,source:"hex"},t)};return e.createElement("div",{style:f.picker,className:"swatches-picker "+d},e.createElement(eD,null,e.createElement("div",{style:f.overflow},e.createElement("div",{style:f.body},XI(a,(function(t){return e.createElement(wF,{key:t.toString(),group:t,active:u,onClick:h,onSwatchHover:i})})),e.createElement("div",{style:f.clear})))))};xF.propTypes={width:UA.oneOfType([UA.string,UA.number]),height:UA.oneOfType([UA.string,UA.number]),colors:UA.arrayOf(UA.arrayOf(UA.string)),styles:UA.object},xF.defaultProps={width:320,height:240,colors:[[rL,nL,tL,eL,JI],[lL,uL,aL,iL,oL],[hL,fL,dL,cL,sL],[yL,bL,mL,pL,vL],[OL,kL,xL,wL,gL],[CL,ML,NL,SL,jL],[PL,DL,EL,TL,AL],[RL,FL,_L,LL,IL],[VL,WL,$L,zL,BL],["#194D33",KL,qL,HL,UL],[QL,ZL,XL,YL,GL],[r_,n_,t_,e_,JL],[l_,u_,a_,i_,o_],[h_,f_,d_,c_,s_],[y_,b_,m_,p_,v_],[O_,k_,x_,w_,g_],[C_,M_,N_,S_,j_],[P_,D_,E_,T_,A_],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}},vP(xF);var kF=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,u=t.triangle,l=t.styles,s=void 0===l?{}:l,c=t.className,d=void 0===c?"":c,f=SA(JE({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},s),{"hide-triangle":"hide"===u,"top-left-triangle":"top-left"===u,"top-right-triangle":"top-right"===u}),h=function(e,t){sP(e)&&n({hex:e,source:"hex"},t)};return e.createElement("div",{style:f.card,className:"twitter-picker "+d},e.createElement("div",{style:f.triangleShadow}),e.createElement("div",{style:f.triangle}),e.createElement("div",{style:f.body},XI(i,(function(t,n){return e.createElement(gP,{key:n,color:t,hex:t,style:f.swatch,onClick:h,onHover:r,focusStyle:{boxShadow:"0 0 4px "+t}})})),e.createElement("div",{style:f.hash},"#"),e.createElement(FA,{label:null,style:{input:f.input},value:o.replace("#",""),onChange:h}),e.createElement("div",{style:f.clear})))};kF.propTypes={width:UA.oneOfType([UA.string,UA.number]),triangle:UA.oneOf(["hide","top-left","top-right"]),colors:UA.arrayOf(UA.string),styles:UA.object},kF.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}},vP(kF);var OF=function(t){var n=SA({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(100*t.hsl.s)+"%, "+Math.round(100*t.hsl.l)+"%)"}}});return e.createElement("div",{style:n.picker})};OF.propTypes={hsl:UA.shape({h:UA.number,s:UA.number,l:UA.number,a:UA.number})},OF.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var jF=function(t){var n=SA({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return e.createElement("div",{style:n.picker})};jF.propTypes={hsl:UA.shape({h:UA.number,s:UA.number,l:UA.number,a:UA.number})},jF.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var SF=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.hsv,u=function(e,t){if(e.hex)sP(e.hex)&&n({hex:e.hex,source:"hex"},t);else if(e.rgb){var r=e.rgb.split(",");dP(e.rgb,"rgb")&&n({r:r[0],g:r[1],b:r[2],a:1,source:"rgb"},t)}else if(e.hsv){var o=e.hsv.split(",");dP(e.hsv,"hsv")&&(o[2]=o[2].replace("%",""),o[1]=o[1].replace("%",""),o[0]=o[0].replace("°",""),1==o[1]?o[1]=.01:1==o[2]&&(o[2]=.01),n({h:Number(o[0]),s:Number(o[1]),v:Number(o[2]),source:"hsv"},t))}else if(e.hsl){var i=e.hsl.split(",");dP(e.hsl,"hsl")&&(i[2]=i[2].replace("%",""),i[1]=i[1].replace("%",""),i[0]=i[0].replace("°",""),1==d[1]?d[1]=.01:1==d[2]&&(d[2]=.01),n({h:Number(i[0]),s:Number(i[1]),v:Number(i[2]),source:"hsl"},t))}},l=SA({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),s=r.r+", "+r.g+", "+r.b,c=Math.round(o.h)+"°, "+Math.round(100*o.s)+"%, "+Math.round(100*o.l)+"%",d=Math.round(a.h)+"°, "+Math.round(100*a.s)+"%, "+Math.round(100*a.v)+"%";return e.createElement("div",{style:l.wrap,className:"flexbox-fix"},e.createElement("div",{style:l.fields},e.createElement("div",{style:l.double},e.createElement(FA,{style:{input:l.input,label:l.label},label:"hex",value:i,onChange:u})),e.createElement("div",{style:l.column},e.createElement("div",{style:l.single},e.createElement(FA,{style:{input:l.input2,label:l.label2},label:"rgb",value:s,onChange:u})),e.createElement("div",{style:l.single},e.createElement(FA,{style:{input:l.input2,label:l.label2},label:"hsv",value:d,onChange:u})),e.createElement("div",{style:l.single},e.createElement(FA,{style:{input:l.input2,label:l.label2},label:"hsl",value:c,onChange:u})))))},NF=function(t){var n=t.width,r=t.onChange,o=t.rgb,i=t.hsl,a=t.hsv,u=t.hex,l=t.header,s=t.styles,c=void 0===s?{}:s,d=t.className,f=void 0===d?"":d,h=SA(JE({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+o.r+", "+o.g+", "+o.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return e.createElement("div",{style:h.picker,className:"google-picker "+f},e.createElement("div",{style:h.head},l),e.createElement("div",{style:h.swatch}),e.createElement("div",{style:h.saturation},e.createElement(yD,{hsl:i,hsv:a,pointer:OF,onChange:r})),e.createElement("div",{style:h.body},e.createElement("div",{style:h.controls,className:"flexbox-fix"},e.createElement("div",{style:h.hue},e.createElement(zA,{style:h.Hue,hsl:i,radius:"4px",pointer:jF,onChange:r}))),e.createElement(SF,{rgb:o,hsl:i,hex:u,hsv:a,onChange:r})))};NF.propTypes={width:UA.oneOfType([UA.string,UA.number]),styles:UA.object,header:UA.string},NF.defaultProps={width:652,styles:{},header:"Color picker"},vP(NF);var MF={exports:{}},CF=Gs(Kg);!function(t,n){!function(e,t,n){function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o,i=r(n);e.Status=void 0,(o=e.Status||(e.Status={})).LOADING="LOADING",o.FAILURE="FAILURE",o.SUCCESS="SUCCESS";const a=({children:r,render:o,callback:a,...u})=>{const[l,s]=n.useState(e.Status.LOADING);return n.useEffect((()=>{const n=new t.Loader(u),r=e=>{a&&a(e,n),s(e)};r(e.Status.LOADING),n.load().then((()=>r(e.Status.SUCCESS)),(()=>r(e.Status.FAILURE)))}),[]),l===e.Status.SUCCESS&&r?i.default.createElement(i.default.Fragment,null,r):o?o(l):i.default.createElement(i.default.Fragment,null)};e.Wrapper=a,Object.defineProperty(e,"ie",{value:!0})}(n,CF,e)}(0,MF.exports);var AF={exports:{}};!function(e,t){!function(e){function t(e){return function(t,n,r,o,i,a,u){return e(t,n,u)}}function n(e){return function(t,n,r,o){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r,o);var i=o.get(t),a=o.get(n);if(i&&a)return i===n&&a===t;o.set(t,n),o.set(n,t);var u=e(t,n,r,o);return o.delete(t),o.delete(n),u}}function r(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function o(e){return e.constructor===Object||null==e.constructor}function i(e){return"function"==typeof e.then}function a(e,t){return e===t||e!=e&&t!=t}var u="[object Arguments]",l="[object Boolean]",s="[object Date]",c="[object RegExp]",d="[object Map]",f="[object Number]",h="[object Object]",v="[object Set]",p="[object String]",m=Object.prototype.toString;function b(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,b=e.areObjectsEqual,y=e.areRegExpsEqual,g=e.areSetsEqual,w=(0,e.createIsNestedEqual)(x);function x(e,x,k){if(e===x)return!0;if(!e||!x||"object"!=typeof e||"object"!=typeof x)return e!=e&&x!=x;if(o(e)&&o(x))return b(e,x,w,k);var O=Array.isArray(e),j=Array.isArray(x);if(O||j)return O===j&&t(e,x,w,k);var S=m.call(e);return S===m.call(x)&&(S===s?n(e,x,w,k):S===c?y(e,x,w,k):S===d?r(e,x,w,k):S===v?g(e,x,w,k):S===h||S===u?!i(e)&&!i(x)&&b(e,x,w,k):(S===l||S===f||S===p)&&a(e.valueOf(),x.valueOf()))}return x}function y(e,t,n,r){var o=e.length;if(t.length!==o)return!1;for(;o-- >0;)if(!n(e[o],t[o],o,o,e,t,r))return!1;return!0}var g=n(y);function w(e,t){return a(e.valueOf(),t.valueOf())}function x(e,t,n,r){var o=e.size===t.size;if(!o)return!1;if(!e.size)return!0;var i={},a=0;return e.forEach((function(u,l){if(o){var s=!1,c=0;t.forEach((function(o,d){s||i[c]||!(s=n(l,d,a,c,e,t,r)&&n(u,o,l,d,e,t,r))||(i[c]=!0),c++})),a++,o=s}})),o}var k=n(x),O="_owner",j=Object.prototype.hasOwnProperty;function S(e,t,n,r){var o,i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(;a-- >0;){if((o=i[a])===O){var u=!!e.$$typeof,l=!!t.$$typeof;if((u||l)&&u!==l)return!1}if(!j.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var N=n(S);function M(e,t){return e.source===t.source&&e.flags===t.flags}function C(e,t,n,r){var o=e.size===t.size;if(!o)return!1;if(!e.size)return!0;var i={};return e.forEach((function(a,u){if(o){var l=!1,s=0;t.forEach((function(o,c){l||i[s]||!(l=n(a,o,u,c,e,t,r))||(i[s]=!0),s++})),o=l}})),o}var A=n(C),T=Object.freeze({areArraysEqual:y,areDatesEqual:w,areMapsEqual:x,areObjectsEqual:S,areRegExpsEqual:M,areSetsEqual:C,createIsNestedEqual:t}),E=Object.freeze({areArraysEqual:g,areDatesEqual:w,areMapsEqual:k,areObjectsEqual:N,areRegExpsEqual:M,areSetsEqual:A,createIsNestedEqual:t}),D=b(T);function P(e,t){return D(e,t,void 0)}var I=b(r(T,{createIsNestedEqual:function(){return a}}));function L(e,t){return I(e,t,void 0)}var _=b(E);function F(e,t){return _(e,t,new WeakMap)}var R=b(r(E,{createIsNestedEqual:function(){return a}}));function B(e,t){return R(e,t,new WeakMap)}function z(e){return b(r(T,e(T)))}function $(e){var t=b(r(E,e(E)));return function(e,n,r){return void 0===r&&(r=new WeakMap),t(e,n,r)}}e.circularDeepEqual=F,e.circularShallowEqual=B,e.createCustomCircularEqual=$,e.createCustomEqual=z,e.deepEqual=P,e.sameValueZeroEqual=a,e.shallowEqual=L,Object.defineProperty(e,"ie",{value:!0})}(t)}(0,AF.exports);var TF=AF.exports;function EF(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=EF(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function DF(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=EF(e))&&(r&&(r+=" "),r+=t);return r}var PF=Ks((function(e){return null==e})),IF={exports:{}},LF={},_F="function"==typeof Symbol&&Symbol.for,FF=_F?Symbol.for("react.element"):60103,RF=_F?Symbol.for("react.portal"):60106,BF=_F?Symbol.for("react.fragment"):60107,zF=_F?Symbol.for("react.strict_mode"):60108,$F=_F?Symbol.for("react.profiler"):60114,WF=_F?Symbol.for("react.provider"):60109,VF=_F?Symbol.for("react.context"):60110,UF=_F?Symbol.for("react.async_mode"):60111,HF=_F?Symbol.for("react.concurrent_mode"):60111,qF=_F?Symbol.for("react.forward_ref"):60112,KF=_F?Symbol.for("react.suspense"):60113,GF=_F?Symbol.for("react.suspense_list"):60120,YF=_F?Symbol.for("react.memo"):60115,XF=_F?Symbol.for("react.lazy"):60116,ZF=_F?Symbol.for("react.block"):60121,QF=_F?Symbol.for("react.fundamental"):60117,JF=_F?Symbol.for("react.responder"):60118,eR=_F?Symbol.for("react.scope"):60119;function tR(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case FF:switch(e=e.type){case UF:case HF:case BF:case $F:case zF:case KF:return e;default:switch(e=e&&e.$$typeof){case VF:case qF:case XF:case YF:case WF:return e;default:return t}}case RF:return t}}}function nR(e){return tR(e)===HF}LF.AsyncMode=UF,LF.ConcurrentMode=HF,LF.ContextConsumer=VF,LF.ContextProvider=WF,LF.Element=FF,LF.ForwardRef=qF,LF.Fragment=BF,LF.Lazy=XF,LF.Memo=YF,LF.Portal=RF,LF.Profiler=$F,LF.StrictMode=zF,LF.Suspense=KF,LF.isAsyncMode=function(e){return nR(e)||tR(e)===UF},LF.isConcurrentMode=nR,LF.isContextConsumer=function(e){return tR(e)===VF},LF.isContextProvider=function(e){return tR(e)===WF},LF.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===FF},LF.isForwardRef=function(e){return tR(e)===qF},LF.isFragment=function(e){return tR(e)===BF},LF.isLazy=function(e){return tR(e)===XF},LF.isMemo=function(e){return tR(e)===YF},LF.isPortal=function(e){return tR(e)===RF},LF.isProfiler=function(e){return tR(e)===$F},LF.isStrictMode=function(e){return tR(e)===zF},LF.isSuspense=function(e){return tR(e)===KF},LF.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===BF||e===HF||e===$F||e===zF||e===KF||e===GF||"object"==typeof e&&null!==e&&(e.$$typeof===XF||e.$$typeof===YF||e.$$typeof===WF||e.$$typeof===VF||e.$$typeof===qF||e.$$typeof===QF||e.$$typeof===JF||e.$$typeof===eR||e.$$typeof===ZF)},LF.typeOf=tR,IF.exports=LF;var rR=IF.exports,oR=dw,iR=hw;var aR=function(e){return"number"==typeof e||iR(e)&&"[object Number]"==oR(e)},uR=Ks(aR),lR=aR;var sR=Ks((function(e){return lR(e)&&e!=+e})),cR=function(e){return 0===e?0:e>0?1:-1},dR=function(e){return yw(e)&&e.indexOf("%")===e.length-1},fR=function(e){return uR(e)&&!sR(e)},hR=function(e){return fR(e)||yw(e)},vR=0,pR=function(e){var t=++vR;return"".concat(e||"").concat(t)},mR=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!fR(e)&&!yw(e))return r;if(dR(e)){var i=e.indexOf("%");n=t*parseFloat(e.slice(0,i))/100}else n=+e;return sR(n)&&(n=r),o&&n>t&&(n=t),n},bR=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},yR=function(e,t){return fR(e)&&fR(t)?function(n){return e+n*(t-e)}:function(){return t}};function gR(e,t,n){return e&&e.length?e.find((function(e){return e&&("function"==typeof t?t(e):KS(e,t))===n})):null}function wR(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function xR(e){return xR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xR(e)}var kR=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],OR=["points","pathLength"],jR={svg:["viewBox","children"],polygon:OR,polyline:OR},SR=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],NR=function(t,n){if(!t||"function"==typeof t||"boolean"==typeof t)return null;var r=t;if(e.isValidElement(t)&&(r=t.props),!fx(r))return null;var o={};return Object.keys(r).forEach((function(e){SR.includes(e)&&(o[e]=n||function(t){return r[e](r,t)})})),o},MR=function(e,t,n){if(!fx(e)||"object"!==xR(e))return null;var r=null;return Object.keys(e).forEach((function(o){var i=e[o];SR.includes(o)&&"function"==typeof i&&(r||(r={}),r[o]=function(e,t,n){return function(r){return e(t,n,r),null}}(i,t,n))})),r},CR=["children"],AR=["children"];function TR(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ER(e){return ER="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ER(e)}var DR={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},PR=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},IR=null,LR=null,_R=function t(n){if(n===IR&&Array.isArray(LR))return LR;var r=[];return e.Children.forEach(n,(function(e){PF(e)||(rR.isFragment(e)?r=r.concat(t(e.props.children)):r.push(e))})),LR=r,IR=n,r};function FR(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map((function(e){return PR(e)})):[PR(t)],_R(e).forEach((function(e){var t=KS(e,"type.displayName")||KS(e,"type.name");-1!==r.indexOf(t)&&n.push(e)})),n}function RR(e,t){var n=FR(e,t);return n&&n[0]}var BR=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!fR(n)||n<=0||!fR(r)||r<=0)},zR=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],$R=function(e){return e&&"object"===ER(e)&&"cx"in e&&"cy"in e&&"r"in e},WR=function(t,n,r){if(!t||"function"==typeof t||"boolean"==typeof t)return null;var o=t;if(e.isValidElement(t)&&(o=t.props),!fx(o))return null;var i={};return Object.keys(o).forEach((function(e){var t;(function(e,t,n,r){var o,i=null!==(o=null==jR?void 0:jR[r])&&void 0!==o?o:[];return!mx(e)&&(r&&i.includes(t)||kR.includes(t))||n&&SR.includes(t)})(null===(t=o)||void 0===t?void 0:t[e],e,n,r)&&(i[e]=o[e])})),i},VR=function t(n,r){if(n===r)return!0;var o=e.Children.count(n);if(o!==e.Children.count(r))return!1;if(0===o)return!0;if(1===o)return UR(Array.isArray(n)?n[0]:n,Array.isArray(r)?r[0]:r);for(var i=0;i<o;i++){var a=n[i],u=r[i];if(Array.isArray(a)||Array.isArray(u)){if(!t(a,u))return!1}else if(!UR(a,u))return!1}return!0},UR=function(e,t){if(PF(e)&&PF(t))return!0;if(!PF(e)&&!PF(t)){var n=e.props||{},r=n.children,o=TR(n,CR),i=t.props||{},a=i.children,u=TR(i,AR);return r&&a?wR(o,u)&&VR(r,a):!r&&!a&&wR(o,u)}return!1},HR=function(e,t){var n=[],r={};return _R(e).forEach((function(e,o){if(function(e){return e&&e.type&&yw(e.type)&&zR.indexOf(e.type)>=0}(e))n.push(e);else if(e){var i=PR(e.type),a=t[i]||{},u=a.handler,l=a.once;if(u&&(!l||!r[i])){var s=u(e,i,o);n.push(s),r[i]=!0}}})),n},qR=["children","width","height","viewBox","className","style","title","desc"];function KR(){return KR=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},KR.apply(this,arguments)}function GR(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function YR(t){var n=t.children,r=t.width,o=t.height,i=t.viewBox,a=t.className,u=t.style,l=t.title,s=t.desc,c=GR(t,qR),d=i||{width:r,height:o,x:0,y:0},f=DF("recharts-surface",a);return e.createElement("svg",KR({},WR(c,!0,"svg"),{className:f,width:r,height:o,style:u,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),e.createElement("title",null,l),e.createElement("desc",null,s),n)}var XR=["children","className"];function ZR(){return ZR=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},ZR.apply(this,arguments)}function QR(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var JR=e.forwardRef((function(t,n){var r=t.children,o=t.className,i=QR(t,XR),a=DF("recharts-layer",o);return e.createElement("g",ZR({className:a},WR(i,!0),{ref:n}),r)})),eB=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]};var tB=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i},nB=tB;var rB=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:nB(e,t,n)},oB=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var iB=function(e){return oB.test(e)};var aB=function(e){return e.split("")},uB="\\ud800-\\udfff",lB="["+uB+"]",sB="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",cB="\\ud83c[\\udffb-\\udfff]",dB="[^"+uB+"]",fB="(?:\\ud83c[\\udde6-\\uddff]){2}",hB="[\\ud800-\\udbff][\\udc00-\\udfff]",vB="(?:"+sB+"|"+cB+")"+"?",pB="[\\ufe0e\\ufe0f]?",mB=pB+vB+("(?:\\u200d(?:"+[dB,fB,hB].join("|")+")"+pB+vB+")*"),bB="(?:"+[dB+sB+"?",sB,fB,hB,lB].join("|")+")",yB=RegExp(cB+"(?="+cB+")|"+bB+mB,"g");var gB=function(e){return e.match(yB)||[]},wB=aB,xB=iB,kB=gB;var OB=function(e){return xB(e)?kB(e):wB(e)},jB=rB,SB=iB,NB=OB,MB=IS;var CB=function(e){return function(t){t=MB(t);var n=SB(t)?NB(t):void 0,r=n?n[0]:t.charAt(0),o=n?jB(n,1).join(""):t.slice(1);return r[e]()+o}},AB=Ks(CB("toUpperCase"));function TB(e){return function(){return e}}const EB=Math.cos,DB=Math.sin,PB=Math.sqrt,IB=Math.PI,LB=2*IB,_B=Math.PI,FB=2*_B,RB=1e-6,BB=FB-RB;function zB(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class $B{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?zB:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return zB;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+i}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let i=this._x1,a=this._y1,u=n-e,l=r-t,s=i-e,c=a-t,d=s*s+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>RB)if(Math.abs(c*u-l*s)>RB&&o){let f=n-i,h=r-a,v=u*u+l*l,p=f*f+h*h,m=Math.sqrt(v),b=Math.sqrt(d),y=o*Math.tan((_B-Math.acos((v+d-p)/(2*m*b)))/2),g=y/b,w=y/m;Math.abs(g-1)>RB&&this._append`L${e+g*s},${t+g*c}`,this._append`A${o},${o},0,0,${+(c*f>s*h)},${this._x1=e+w*u},${this._y1=t+w*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,n,r,o,i){if(e=+e,t=+t,i=!!i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),u=n*Math.sin(r),l=e+a,s=t+u,c=1^i,d=i?r-o:o-r;null===this._x1?this._append`M${l},${s}`:(Math.abs(this._x1-l)>RB||Math.abs(this._y1-s)>RB)&&this._append`L${l},${s}`,n&&(d<0&&(d=d%FB+FB),d>BB?this._append`A${n},${n},0,1,${c},${e-a},${t-u}A${n},${n},0,1,${c},${this._x1=l},${this._y1=s}`:d>RB&&this._append`A${n},${n},0,${+(d>=_B)},${c},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function WB(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new $B(t)}function VB(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function UB(e){this._context=e}function HB(e){return new UB(e)}function qB(e){return e[0]}function KB(e){return e[1]}function GB(e,t){var n=TB(!0),r=null,o=HB,i=null,a=WB(u);function u(u){var l,s,c,d=(u=VB(u)).length,f=!1;for(null==r&&(i=o(c=a())),l=0;l<=d;++l)!(l<d&&n(s=u[l],l,u))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(s,l,u),+t(s,l,u));if(c)return i=null,c+""||null}return e="function"==typeof e?e:void 0===e?qB:TB(e),t="function"==typeof t?t:void 0===t?KB:TB(t),u.x=function(t){return arguments.length?(e="function"==typeof t?t:TB(+t),u):e},u.y=function(e){return arguments.length?(t="function"==typeof e?e:TB(+e),u):t},u.defined=function(e){return arguments.length?(n="function"==typeof e?e:TB(!!e),u):n},u.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),u):o},u.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),u):r},u}function YB(e,t,n){var r=null,o=TB(!0),i=null,a=HB,u=null,l=WB(s);function s(s){var c,d,f,h,v,p=(s=VB(s)).length,m=!1,b=new Array(p),y=new Array(p);for(null==i&&(u=a(v=l())),c=0;c<=p;++c){if(!(c<p&&o(h=s[c],c,s))===m)if(m=!m)d=c,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),f=c-1;f>=d;--f)u.point(b[f],y[f]);u.lineEnd(),u.areaEnd()}m&&(b[c]=+e(h,c,s),y[c]=+t(h,c,s),u.point(r?+r(h,c,s):b[c],n?+n(h,c,s):y[c]))}if(v)return u=null,v+""||null}function c(){return GB().defined(o).curve(a).context(i)}return e="function"==typeof e?e:void 0===e?qB:TB(+e),t="function"==typeof t?t:TB(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?KB:TB(+n),s.x=function(t){return arguments.length?(e="function"==typeof t?t:TB(+t),r=null,s):e},s.x0=function(t){return arguments.length?(e="function"==typeof t?t:TB(+t),s):e},s.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:TB(+e),s):r},s.y=function(e){return arguments.length?(t="function"==typeof e?e:TB(+e),n=null,s):t},s.y0=function(e){return arguments.length?(t="function"==typeof e?e:TB(+e),s):t},s.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:TB(+e),s):n},s.lineX0=s.lineY0=function(){return c().x(e).y(t)},s.lineY1=function(){return c().x(e).y(n)},s.lineX1=function(){return c().x(r).y(t)},s.defined=function(e){return arguments.length?(o="function"==typeof e?e:TB(!!e),s):o},s.curve=function(e){return arguments.length?(a=e,null!=i&&(u=a(i)),s):a},s.context=function(e){return arguments.length?(null==e?i=u=null:u=a(i=e),s):i},s}UB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};class XB{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}var ZB={draw(e,t){const n=PB(t/IB);e.moveTo(n,0),e.arc(0,0,n,0,LB)}},QB={draw(e,t){const n=PB(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};const JB=PB(1/3),ez=2*JB;var tz={draw(e,t){const n=PB(t/ez),r=n*JB;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},nz={draw(e,t){const n=PB(t),r=-n/2;e.rect(r,r,n,n)}};const rz=DB(IB/10)/DB(7*IB/10),oz=DB(LB/10)*rz,iz=-EB(LB/10)*rz;var az={draw(e,t){const n=PB(.8908130915292852*t),r=oz*n,o=iz*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const t=LB*i/5,a=EB(t),u=DB(t);e.lineTo(u*n,-a*n),e.lineTo(a*r-u*o,u*r+a*o)}e.closePath()}};const uz=PB(3);var lz={draw(e,t){const n=-PB(t/(3*uz));e.moveTo(0,2*n),e.lineTo(-uz*n,-n),e.lineTo(uz*n,-n),e.closePath()}};const sz=-.5,cz=PB(3)/2,dz=1/PB(12),fz=3*(dz/2+1);var hz={draw(e,t){const n=PB(t/fz),r=n/2,o=n*dz,i=r,a=n*dz+n,u=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(u,l),e.lineTo(sz*r-cz*o,cz*r+sz*o),e.lineTo(sz*i-cz*a,cz*i+sz*a),e.lineTo(sz*u-cz*l,cz*u+sz*l),e.lineTo(sz*r+cz*o,sz*o-cz*r),e.lineTo(sz*i+cz*a,sz*a-cz*i),e.lineTo(sz*u+cz*l,sz*l-cz*u),e.closePath()}};function vz(){}function pz(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function mz(e){this._context=e}function bz(e){this._context=e}function yz(e){this._context=e}function gz(e){this._context=e}function wz(e){return e<0?-1:1}function xz(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),u=(i*o+a*r)/(r+o);return(wz(i)+wz(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(u))||0}function kz(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Oz(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,u=(i-r)/3;e._context.bezierCurveTo(r+u,o+u*t,i-u,a-u*n,i,a)}function jz(e){this._context=e}function Sz(e){this._context=new Nz(e)}function Nz(e){this._context=e}function Mz(e){this._context=e}function Cz(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function Az(e,t){this._context=e,this._t=t}function Tz(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],u=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Ez(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Dz(e,t){return e[t]}function Pz(e){const t=[];return t.key=e,t}function Iz(e){return Iz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Iz(e)}mz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:pz(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:pz(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},bz.prototype={areaStart:vz,areaEnd:vz,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:pz(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},yz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:pz(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},gz.prototype={areaStart:vz,areaEnd:vz,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},jz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Oz(this,this._t0,kz(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Oz(this,kz(this,n=xz(this,e,t)),n);break;default:Oz(this,this._t0,n=xz(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Sz.prototype=Object.create(jz.prototype)).point=function(e,t){jz.prototype.point.call(this,t,e)},Nz.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},Mz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=Cz(e),o=Cz(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Az.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var Lz=["type","size","sizeType"];function _z(){return _z=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},_z.apply(this,arguments)}function Fz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fz(Object(n),!0).forEach((function(t){Bz(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bz(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Iz(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Iz(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Iz(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zz(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var $z={symbolCircle:ZB,symbolCross:QB,symbolDiamond:tz,symbolSquare:nz,symbolStar:az,symbolTriangle:lz,symbolWye:hz},Wz=Math.PI/180,Vz=function(t){var n,r,o=t.type,i=void 0===o?"circle":o,a=t.size,u=void 0===a?64:a,l=t.sizeType,s=void 0===l?"area":l,c=Rz(Rz({},zz(t,Lz)),{},{type:i,size:u,sizeType:s}),d=c.className,f=c.cx,h=c.cy,v=WR(c,!0);return f===+f&&h===+h&&u===+u?e.createElement("path",_z({},v,{className:DF("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(h,")"),d:(n=function(e){var t="symbol".concat(AB(e));return $z[t]||ZB}(i),r=function(e,t){let n=null,r=WB(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:TB(e||ZB),t="function"==typeof t?t:TB(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:TB(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:TB(+e),o):t},o.context=function(e){return arguments.length?(n=null==e?null:e,o):n},o}().type(n).size(function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*Wz;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}}(u,s,i)),r())})):null};function Uz(e){return Uz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uz(e)}function Hz(){return Hz=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},Hz.apply(this,arguments)}function qz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kz(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,Jz(r.key),r)}}function Gz(e,t,n){return t=Xz(t),function(e,t){if(t&&("object"===Uz(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Yz()?Reflect.construct(t,n||[],Xz(e).constructor):t.apply(e,n))}function Yz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Yz=function(){return!!e})()}function Xz(e){return Xz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xz(e)}function Zz(e,t){return Zz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zz(e,t)}function Qz(e,t,n){return(t=Jz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jz(e){var t=function(e,t){if("object"!=Uz(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Uz(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Uz(t)?t:String(t)}Vz.registerSymbol=function(e,t){$z["symbol".concat(AB(e))]=t};var e$=32,t$=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),Gz(this,n,arguments)}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zz(e,t)}(n,t),r=n,o=[{key:"renderIcon",value:function(t){var n=this.props.inactiveColor,r=16,o=e$/6,i=e$/3,a=t.inactive?n:t.color;if("plainline"===t.type)return e.createElement("line",{strokeWidth:4,fill:"none",stroke:a,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:r,x2:e$,y2:r,className:"recharts-legend-icon"});if("line"===t.type)return e.createElement("path",{strokeWidth:4,fill:"none",stroke:a,d:"M0,".concat(r,"h").concat(i,"\n A").concat(o,",").concat(o,",0,1,1,").concat(2*i,",").concat(r,"\n H").concat(e$,"M").concat(2*i,",").concat(r,"\n A").concat(o,",").concat(o,",0,1,1,").concat(i,",").concat(r),className:"recharts-legend-icon"});if("rect"===t.type)return e.createElement("path",{stroke:"none",fill:a,d:"M0,".concat(4,"h").concat(e$,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(e.isValidElement(t.legendIcon)){var u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qz(Object(n),!0).forEach((function(t){Qz(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t);return delete u.legendIcon,e.cloneElement(t.legendIcon,u)}return e.createElement(Vz,{fill:a,cx:r,cy:r,size:e$,sizeType:"diameter",type:t.type})}},{key:"renderItems",value:function(){var t=this,n=this.props,r=n.payload,o=n.iconSize,i=n.layout,a=n.formatter,u=n.inactiveColor,l={x:0,y:0,width:e$,height:e$},s={display:"horizontal"===i?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return r.map((function(n,r){var i=n.formatter||a,d=DF(Qz(Qz({"recharts-legend-item":!0},"legend-item-".concat(r),!0),"inactive",n.inactive));if("none"===n.type)return null;var f=mx(n.value)?null:n.value;eB(!mx(n.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var h=n.inactive?u:n.color;return e.createElement("li",Hz({className:d,style:s,key:"legend-item-".concat(r)},MR(t.props,n,r)),e.createElement(YR,{width:o,height:o,viewBox:l,style:c},t.renderIcon(n)),e.createElement("span",{className:"recharts-legend-item-text",style:{color:h}},i?i(f,n,r):f))}))}},{key:"render",value:function(){var t=this.props,n=t.payload,r=t.layout,o=t.align;if(!n||!n.length)return null;var i={padding:0,margin:0,textAlign:"horizontal"===r?o:"left"};return e.createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}],o&&Kz(r.prototype,o),i&&Kz(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.PureComponent);Qz(t$,"displayName","Legend"),Qz(t$,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var n$=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1};var r$=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1},o$=n$,i$=function(e){return e!=e},a$=r$;var u$=function(e,t,n){return t==t?a$(e,t,n):o$(e,i$,n)},l$=u$;var s$=function(e,t){return!!(null==e?0:e.length)&&l$(e,t,0)>-1};var c$=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1};var d$=vj,f$=function(){},h$=d$&&1/RO(new d$([,-0]))[1]==1/0?function(e){return new d$(e)}:f$,v$=AO,p$=s$,m$=c$,b$=EO,y$=h$,g$=RO;var w$=function(e,t,n){var r=-1,o=p$,i=e.length,a=!0,u=[],l=u;if(n)a=!1,o=m$;else if(i>=200){var s=t?null:y$(e);if(s)return g$(s);a=!1,o=b$,l=new v$}else l=t?[]:u;e:for(;++r<i;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,a&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),u.push(c)}else o(l,d,n)||(l!==u&&l.push(d),u.push(c))}return u},x$=SN,k$=w$;var O$=function(e,t){return e&&e.length?k$(e,x$(t)):[]},j$=Ks(O$);function S$(e,t,n){return!0===t?j$(e,n):mx(t)?j$(e,t):e}function N$(e){return N$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N$(e)}var M$=["ref"];function C$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C$(Object(n),!0).forEach((function(t){_$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T$(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,F$(r.key),r)}}function E$(e,t,n){return t=P$(t),function(e,t){if(t&&("object"===N$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return I$(e)}(e,D$()?Reflect.construct(t,n||[],P$(e).constructor):t.apply(e,n))}function D$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D$=function(){return!!e})()}function P$(e){return P$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P$(e)}function I$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L$(e,t){return L$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L$(e,t)}function _$(e,t,n){return(t=F$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F$(e){var t=function(e,t){if("object"!=N$(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=N$(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==N$(t)?t:String(t)}function R$(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function B$(e){return e.value}var z$=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return _$(I$(e=E$(this,n,[].concat(r))),"lastBoundingBox",{width:-1,height:-1}),e}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L$(e,t)}(n,t),r=n,i=[{key:"getWithHeight",value:function(e,t){var n=e.props.layout;return"vertical"===n&&fR(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}],(o=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){return this.wrapperNode&&this.wrapperNode.getBoundingClientRect?this.wrapperNode.getBoundingClientRect():null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var t=this.wrapperNode.getBoundingClientRect();(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t))}else-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?A$({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,i=r.align,a=r.verticalAlign,u=r.margin,l=r.chartWidth,s=r.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===i&&"vertical"===o?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===i?{right:u&&u.right||0}:{left:u&&u.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(n="middle"===a?{top:((s||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:u&&u.bottom||0}:{top:u&&u.top||0}),A$(A$({},t),n)}},{key:"render",value:function(){var t=this,n=this.props,r=n.content,o=n.width,i=n.height,a=n.wrapperStyle,u=n.payloadUniqBy,l=n.payload,s=A$(A$({position:"absolute",width:o||"auto",height:i||"auto"},this.getDefaultPosition(a)),a);return e.createElement("div",{className:"recharts-legend-wrapper",style:s,ref:function(e){t.wrapperNode=e}},function(t,n){if(e.isValidElement(t))return e.cloneElement(t,n);if("function"==typeof t)return e.createElement(t,n);n.ref;var r=R$(n,M$);return e.createElement(t$,r)}(r,A$(A$({},this.props),{},{payload:S$(l,u,B$)})))}}])&&T$(r.prototype,o),i&&T$(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.PureComponent);_$(z$,"displayName","Legend"),_$(z$,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var $$=Tw,W$=fw,V$=ew?ew.isConcatSpreadable:void 0;var U$=KO,H$=function(e){return W$(e)||$$(e)||!!(V$&&e&&e[V$])};var q$=function e(t,n,r,o,i){var a=-1,u=t.length;for(r||(r=H$),i||(i=[]);++a<u;){var l=t[a];n>0&&r(l)?n>1?e(l,n-1,r,o,i):U$(i,l):o||(i[i.length]=l)}return i};var K$=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e},G$=dS;var Y$=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=G$(e),a=void 0!==t,u=null===t,l=t==t,s=G$(t);if(!u&&!s&&!i&&e>t||i&&a&&l&&!u&&!s||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!s&&e<t||s&&n&&o&&!r&&!i||u&&n&&o||!a&&o||!l)return-1}return 0};var X$=function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var l=Y$(o[r],i[r]);if(l)return r>=u?l:l*("desc"==n[r]?-1:1)}return e.index-t.index},Z$=Vx,Q$=US,J$=SN,eW=EN,tW=K$,nW=Ww,rW=X$,oW=Mx,iW=fw;var aW=function(e,t,n){t=t.length?Z$(t,(function(e){return iW(e)?function(t){return Q$(t,1===e.length?e[0]:e)}:e})):[oW];var r=-1;t=Z$(t,nW(J$));var o=eW(e,(function(e,n,o){return{criteria:Z$(t,(function(t){return t(e)})),index:++r,value:e}}));return tW(o,(function(e,t){return rW(e,t,n)}))};var uW=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},lW=uW,sW=Math.max;var cW=function(e,t,n){return t=sW(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=sW(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var u=Array(t+1);++o<t;)u[o]=r[o];return u[t]=n(a),lW(e,this,u)}};var dW=function(e){return function(){return e}},fW=KN,hW=fW?function(e,t){return fW(e,"toString",{configurable:!0,enumerable:!1,value:dW(t),writable:!0})}:Mx,vW=hW,pW=Date.now;var mW=function(e){var t=0,n=0;return function(){var r=pW(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},bW=mW(vW),yW=Mx,gW=cW,wW=bW;var xW=function(e,t){return wW(gW(e,t,yW),e+"")},kW=Hx,OW=gx,jW=Lw,SW=dx;var NW=function(e,t,n){if(!SW(n))return!1;var r=typeof t;return!!("number"==r?OW(n)&&jW(t,n.length):"string"==r&&t in n)&&kW(n[t],e)},MW=q$,CW=aW,AW=NW,TW=Ks(xW((function(e,t){if(null==e)return[];var n=t.length;return n>1&&AW(e,t[0],t[1])?t=[]:n>2&&AW(t[0],t[1],t[2])&&(t=[t[0]]),CW(e,MW(t,1),[])})));function EW(e){return EW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},EW(e)}function DW(){return DW=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},DW.apply(this,arguments)}function PW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return IW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IW(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function LW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LW(Object(n),!0).forEach((function(t){FW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function FW(e,t,n){return t=function(e){var t=function(e,t){if("object"!=EW(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=EW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==EW(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RW(e){return Array.isArray(e)&&hR(e[0])&&hR(e[1])?e.join(" ~ "):e}var BW=function(t){var n=t.separator,r=void 0===n?" : ":n,o=t.contentStyle,i=void 0===o?{}:o,a=t.itemStyle,u=void 0===a?{}:a,l=t.labelStyle,s=void 0===l?{}:l,c=t.payload,d=t.formatter,f=t.itemSorter,h=t.wrapperClassName,v=t.labelClassName,p=t.label,m=t.labelFormatter,b=t.accessibilityLayer,y=void 0!==b&&b,g=_W({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),w=_W({margin:0},s),x=!PF(p),k=x?p:"",O=DF("recharts-default-tooltip",h),j=DF("recharts-tooltip-label",v);x&&m&&null!=c&&(k=m(p,c));var S=y?{role:"status","aria-live":"assertive"}:{};return e.createElement("div",DW({className:O,style:g},S),e.createElement("p",{className:j,style:w},e.isValidElement(k)?k:"".concat(k)),function(){if(c&&c.length){var t=(f?TW(c,f):c).map((function(t,n){if("none"===t.type)return null;var o=_W({display:"block",paddingTop:4,paddingBottom:4,color:t.color||"#000"},u),i=t.formatter||d||RW,a=t.value,l=t.name,s=a,f=l;if(i&&null!=s&&null!=f){var h=i(a,l,t,n,c);if(Array.isArray(h)){var v=PW(h,2);s=v[0],f=v[1]}else s=h}return e.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(n),style:o},hR(f)?e.createElement("span",{className:"recharts-tooltip-item-name"},f):null,hR(f)?e.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,e.createElement("span",{className:"recharts-tooltip-item-value"},s),e.createElement("span",{className:"recharts-tooltip-item-unit"},t.unit||""))}));return e.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},t)}return null}())};function zW(e){return zW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zW(e)}function $W(e,t,n){return t=function(e){var t=function(e,t){if("object"!=zW(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=zW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==zW(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var WW="recharts-tooltip-wrapper",VW={visibility:"hidden"};function UW(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return DF(WW,$W($W($W($W({},"".concat(WW,"-right"),fR(n)&&t&&fR(t.x)&&n>=t.x),"".concat(WW,"-left"),fR(n)&&t&&fR(t.x)&&n<t.x),"".concat(WW,"-bottom"),fR(r)&&t&&fR(t.y)&&r>=t.y),"".concat(WW,"-top"),fR(r)&&t&&fR(t.y)&&r<t.y))}function HW(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,i=e.position,a=e.reverseDirection,u=e.tooltipDimension,l=e.viewBox,s=e.viewBoxDimension;if(i&&fR(i[r]))return i[r];var c=n[r]-u-o,d=n[r]+o;return t[r]?a[r]?c:d:a[r]?c<l[r]?Math.max(d,l[r]):Math.max(c,l[r]):d+u>l[r]+s?Math.max(c,l[r]):Math.max(d,l[r])}function qW(e){return qW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qW(e)}function KW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function GW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KW(Object(n),!0).forEach((function(t){tV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function YW(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,nV(r.key),r)}}function XW(e,t,n){return t=QW(t),function(e,t){if(t&&("object"===qW(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return JW(e)}(e,ZW()?Reflect.construct(t,n||[],QW(e).constructor):t.apply(e,n))}function ZW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ZW=function(){return!!e})()}function QW(e){return QW=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},QW(e)}function JW(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eV(e,t){return eV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},eV(e,t)}function tV(e,t,n){return(t=nV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nV(e){var t=function(e,t){if("object"!=qW(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=qW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qW(t)?t:String(t)}var rV=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return tV(JW(e=XW(this,n,[].concat(r))),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),tV(JW(e),"lastBoundingBox",{width:-1,height:-1}),tV(JW(e),"handleKeyDown",(function(t){var n,r,o,i;"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(i=e.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==o?o:0}})})),e}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eV(e,t)}(n,t),r=n,o=[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.lastBoundingBox.width)>1||Math.abs(e.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=e.width,this.lastBoundingBox.height=e.height)}else-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1)}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)===this.state.dismissedAtCoordinate.x&&(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}},{key:"render",value:function(){var t=this,n=this.props,r=n.active,o=n.allowEscapeViewBox,i=n.animationDuration,a=n.animationEasing,u=n.children,l=n.coordinate,s=n.hasPayload,c=n.isAnimationActive,d=n.offset,f=n.position,h=n.reverseDirection,v=n.useTranslate3d,p=n.viewBox,m=n.wrapperStyle,b=function(e){var t,n,r=e.allowEscapeViewBox,o=e.coordinate,i=e.offsetTopLeft,a=e.position,u=e.reverseDirection,l=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox;return{cssProperties:l.height>0&&l.width>0&&o?function(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:t=HW({allowEscapeViewBox:r,coordinate:o,key:"x",offsetTopLeft:i,position:a,reverseDirection:u,tooltipDimension:l.width,viewBox:c,viewBoxDimension:c.width}),translateY:n=HW({allowEscapeViewBox:r,coordinate:o,key:"y",offsetTopLeft:i,position:a,reverseDirection:u,tooltipDimension:l.height,viewBox:c,viewBoxDimension:c.height}),useTranslate3d:s}):VW,cssClasses:UW({translateX:t,translateY:n,coordinate:o})}}({allowEscapeViewBox:o,coordinate:l,offsetTopLeft:d,position:f,reverseDirection:h,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:v,viewBox:p}),y=b.cssClasses,g=b.cssProperties,w=GW(GW({transition:c&&r?"transform ".concat(i,"ms ").concat(a):void 0},g),{},{pointerEvents:"none",visibility:!this.state.dismissed&&r&&s?"visible":"hidden",position:"absolute",top:0,left:0},m);return e.createElement("div",{tabIndex:-1,className:y,style:w,ref:function(e){t.wrapperNode=e}},u)}}],o&&YW(r.prototype,o),i&&YW(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.PureComponent),oV={isSsr:!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return oV[e]},set:function(e,t){if("string"==typeof e)oV[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){oV[t]=e[t]}))}}};function iV(e){return iV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iV(e)}function aV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aV(Object(n),!0).forEach((function(t){hV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lV(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,vV(r.key),r)}}function sV(e,t,n){return t=dV(t),function(e,t){if(t&&("object"===iV(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cV()?Reflect.construct(t,n||[],dV(e).constructor):t.apply(e,n))}function cV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cV=function(){return!!e})()}function dV(e){return dV=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dV(e)}function fV(e,t){return fV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fV(e,t)}function hV(e,t,n){return(t=vV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vV(e){var t=function(e,t){if("object"!=iV(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=iV(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==iV(t)?t:String(t)}function pV(e){return e.dataKey}var mV=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),sV(this,n,arguments)}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fV(e,t)}(n,t),r=n,o=[{key:"render",value:function(){var t=this,n=this.props,r=n.active,o=n.allowEscapeViewBox,i=n.animationDuration,a=n.animationEasing,u=n.content,l=n.coordinate,s=n.filterNull,c=n.isAnimationActive,d=n.offset,f=n.payload,h=n.payloadUniqBy,v=n.position,p=n.reverseDirection,m=n.useTranslate3d,b=n.viewBox,y=n.wrapperStyle,g=null!=f?f:[];s&&g.length&&(g=S$(f.filter((function(e){return null!=e.value&&(!0!==e.hide||t.props.includeHidden)})),h,pV));var w=g.length>0;return e.createElement(rV,{allowEscapeViewBox:o,animationDuration:i,animationEasing:a,isAnimationActive:c,active:r,coordinate:l,hasPayload:w,offset:d,position:v,reverseDirection:p,useTranslate3d:m,viewBox:b,wrapperStyle:y},function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):"function"==typeof t?e.createElement(t,n):e.createElement(BW,n)}(u,uV(uV({},this.props),{},{payload:g})))}}],o&&lV(r.prototype,o),i&&lV(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.PureComponent);hV(mV,"displayName","Tooltip"),hV(mV,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!oV.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var bV=Jg,yV=/\s/;var gV=function(e){for(var t=e.length;t--&&yV.test(e.charAt(t)););return t},wV=gV,xV=/^\s+/;var kV=function(e){return e?e.slice(0,wV(e)+1).replace(xV,""):e},OV=kV,jV=dx,SV=dS,NV=/^[-+]0x[0-9a-f]+$/i,MV=/^0b[01]+$/i,CV=/^0o[0-7]+$/i,AV=parseInt;var TV=function(e){if("number"==typeof e)return e;if(SV(e))return NaN;if(jV(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=jV(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=OV(e);var n=MV.test(e);return n||CV.test(e)?AV(e.slice(2),n?2:8):NV.test(e)?NaN:+e},EV=dx,DV=function(){return bV.Date.now()},PV=TV,IV=Math.max,LV=Math.min;var _V=function(e,t,n){var r,o,i,a,u,l,s=0,c=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,i=o;return r=o=void 0,s=t,a=e.apply(i,n)}function v(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-s>=i}function p(){var e=DV();if(v(e))return m(e);u=setTimeout(p,function(e){var n=t-(e-l);return d?LV(n,i-(e-s)):n}(e))}function m(e){return u=void 0,f&&r?h(e):(r=o=void 0,a)}function b(){var e=DV(),n=v(e);if(r=arguments,o=this,l=e,n){if(void 0===u)return function(e){return s=e,u=setTimeout(p,t),c?h(e):a}(l);if(d)return clearTimeout(u),u=setTimeout(p,t),h(l)}return void 0===u&&(u=setTimeout(p,t)),a}return t=PV(t)||0,EV(n)&&(c=!!n.leading,i=(d="maxWait"in n)?IV(PV(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f),b.cancel=function(){void 0!==u&&clearTimeout(u),s=0,r=l=o=u=void 0},b.flush=function(){return void 0===u?a:m(DV())},b},FV=_V,RV=dx;var BV=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return RV(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),FV(e,t,{leading:r,maxWait:t,trailing:o})},zV=Ks(BV);function $V(e){return $V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$V(e)}function WV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function VV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WV(Object(n),!0).forEach((function(t){UV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function UV(e,t,n){return t=function(e){var t=function(e,t){if("object"!=$V(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=$V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$V(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qV(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var KV=e.forwardRef((function(t,n){var r=t.aspect,o=t.initialDimension,i=void 0===o?{width:-1,height:-1}:o,a=t.width,u=void 0===a?"100%":a,l=t.height,s=void 0===l?"100%":l,c=t.minWidth,d=void 0===c?0:c,f=t.minHeight,h=t.maxHeight,v=t.children,p=t.debounce,m=void 0===p?0:p,b=t.id,y=t.className,g=t.onResize,w=t.style,x=void 0===w?{}:w,k=e.useRef(null),O=e.useRef();O.current=g,e.useImperativeHandle(n,(function(){return Object.assign(k.current,{get current(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),k.current}})}));var j=HV(e.useState({containerWidth:i.width,containerHeight:i.height}),2),S=j[0],N=j[1],M=e.useCallback((function(e,t){N((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);e.useEffect((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;M(r,o),null===(t=O.current)||void 0===t||t.call(O,r,o)};m>0&&(e=zV(e,m,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=k.current.getBoundingClientRect(),r=n.width,o=n.height;return M(r,o),t.observe(k.current),function(){t.disconnect()}}),[M,m]);var C=e.useMemo((function(){var t=S.containerWidth,n=S.containerHeight;if(t<0||n<0)return null;eB(dR(u)||dR(s),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",u,s),eB(!r||r>0,"The aspect(%s) must be greater than zero.",r);var o=dR(u)?t:u,i=dR(s)?n:s;r&&r>0&&(o?i=o/r:i&&(o=i*r),h&&i>h&&(i=h)),eB(o>0||i>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",o,i,u,s,d,f,r);var a=!Array.isArray(v)&&rR.isElement(v)&&PR(v.type).endsWith("Chart");return e.Children.map(v,(function(t){return rR.isElement(t)?e.cloneElement(t,VV({width:o,height:i},a?{style:VV({height:"100%",width:"100%",maxHeight:i,maxWidth:o},t.props.style)}:{})):t}))}),[r,v,s,h,f,d,S,u]);return e.createElement("div",{id:b?"".concat(b):void 0,className:DF("recharts-responsive-container",y),style:VV(VV({},x),{},{width:u,height:s,minWidth:d,minHeight:f,maxHeight:h}),ref:k},C)})),GV=function(e){return null};function YV(e){return YV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},YV(e)}function XV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XV(Object(n),!0).forEach((function(t){QV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function QV(e,t,n){return t=function(e){var t=function(e,t){if("object"!=YV(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=YV(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==YV(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}GV.displayName="Cell";var JV={widthCache:{},cacheCount:0},eU={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},tU="recharts_measurement_span";var nU=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||oV.isSsr)return{width:0,height:0};var n=function(e){var t=ZV({},e);return Object.keys(t).forEach((function(e){t[e]||delete t[e]})),t}(t),r=JSON.stringify({text:e,copyStyle:n});if(JV.widthCache[r])return JV.widthCache[r];try{var o=document.getElementById(tU);o||((o=document.createElement("span")).setAttribute("id",tU),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var i=ZV(ZV({},eU),n);Object.assign(o.style,i),o.textContent="".concat(e);var a=o.getBoundingClientRect(),u={width:a.width,height:a.height};return JV.widthCache[r]=u,++JV.cacheCount>2e3&&(JV.cacheCount=0,JV.widthCache={}),u}catch(Dae){return{width:0,height:0}}};function rU(e){return rU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rU(e)}function oU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return iU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iU(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function aU(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,uU(r.key),r)}}function uU(e){var t=function(e,t){if("object"!=rU(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=rU(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rU(t)?t:String(t)}var lU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,sU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,cU=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,dU=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,fU={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},hU=Object.keys(fU),vU="NaN";var pU=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),""===n||cU.test(n)||(this.num=NaN,this.unit=""),hU.includes(n)&&(this.num=function(e,t){return e*fU[t]}(t,n),this.unit="px")}var t,n,r;return t=e,r=[{key:"parse",value:function(t){var n,r=oU(null!==(n=dU.exec(t))&&void 0!==n?n:[],3),o=r[1],i=r[2];return new e(parseFloat(o),null!=i?i:"")}}],(n=[{key:"add",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num+t.num,this.unit)}},{key:"subtract",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num-t.num,this.unit)}},{key:"multiply",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num*t.num,this.unit||t.unit)}},{key:"divide",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num/t.num,this.unit||t.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}])&&aU(t.prototype,n),r&&aU(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function mU(e){if(e.includes(vU))return vU;for(var t=e;t.includes("*")||t.includes("/");){var n,r=oU(null!==(n=lU.exec(t))&&void 0!==n?n:[],4),o=r[1],i=r[2],a=r[3],u=pU.parse(null!=o?o:""),l=pU.parse(null!=a?a:""),s="*"===i?u.multiply(l):u.divide(l);if(s.isNaN())return vU;t=t.replace(lU,s.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,d=oU(null!==(c=sU.exec(t))&&void 0!==c?c:[],4),f=d[1],h=d[2],v=d[3],p=pU.parse(null!=f?f:""),m=pU.parse(null!=v?v:""),b="+"===h?p.add(m):p.subtract(m);if(b.isNaN())return vU;t=t.replace(sU,b.toString())}return t}var bU=/\(([^()]*)\)/;function yU(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t=e;t.includes("(");){var n=oU(bU.exec(t),2)[1];t=t.replace(bU,mU(n))}return t}(t),t=mU(t)}function gU(e){var t=function(e){try{return yU(e)}catch(Dae){return vU}}(e.slice(5,-1));return t===vU?"":t}var wU=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],xU=["dx","dy","angle","className","breakAll"];function kU(){return kU=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},kU.apply(this,arguments)}function OU(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function jU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return SU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SU(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var NU=/[ \f\n\r\t\v\u2028\u2029]+/,MU=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var o=[];return PF(t)||(o=n?t.toString().split(""):t.toString().split(NU)),{wordsWithComputedWidth:o.map((function(e){return{word:e,width:nU(e,r).width}})),spaceWidth:n?0:nU(" ",r).width}}catch(Dae){return null}},CU=function(e){return[{words:PF(e)?[]:e.toString().split(NU)}]},AU=function(e){var t=e.width,n=e.scaleToFit,r=e.children,o=e.style,i=e.breakAll,a=e.maxLines;if((t||n)&&!oV.isSsr){var u=MU({breakAll:i,children:r,style:o});return u?function(e,t,n,r,o){var i=e.maxLines,a=e.children,u=e.style,l=e.breakAll,s=fR(i),c=a,d=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,t){var i=t.word,a=t.width,u=e[e.length-1];if(u&&(null==r||o||u.width+a+n<Number(r)))u.words.push(i),u.width+=a+n;else{var l={words:[i],width:a};e.push(l)}return e}),[])},f=d(t);if(!s)return f;for(var h,v=function(e){var t=c.slice(0,e),n=MU({breakAll:l,style:u,children:t+"…"}).wordsWithComputedWidth,o=d(n),a=o.length>i||function(e){return e.reduce((function(e,t){return e.width>t.width?e:t}))}(o).width>Number(r);return[a,o]},p=0,m=c.length-1,b=0;p<=m&&b<=c.length-1;){var y=Math.floor((p+m)/2),g=jU(v(y-1),2),w=g[0],x=g[1],k=jU(v(y),1)[0];if(w||k||(p=y+1),w&&k&&(m=y-1),!w&&k){h=x;break}b++}return h||f}({breakAll:i,children:r,maxLines:a,style:o},u.wordsWithComputedWidth,u.spaceWidth,t,n):CU(r)}return CU(r)},TU="#808080",EU=function(t){var n=t.x,r=void 0===n?0:n,o=t.y,i=void 0===o?0:o,a=t.lineHeight,u=void 0===a?"1em":a,l=t.capHeight,s=void 0===l?"0.71em":l,c=t.scaleToFit,d=void 0!==c&&c,f=t.textAnchor,h=void 0===f?"start":f,v=t.verticalAnchor,p=void 0===v?"end":v,m=t.fill,b=void 0===m?TU:m,y=OU(t,wU),g=e.useMemo((function(){return AU({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:d,style:y.style,width:y.width})}),[y.breakAll,y.children,y.maxLines,d,y.style,y.width]),w=y.dx,x=y.dy,k=y.angle,O=y.className,j=y.breakAll,S=OU(y,xU);if(!hR(r)||!hR(i))return null;var N,M=r+(fR(w)?w:0),C=i+(fR(x)?x:0);switch(p){case"start":N=gU("calc(".concat(s,")"));break;case"middle":N=gU("calc(".concat((g.length-1)/2," * -").concat(u," + (").concat(s," / 2))"));break;default:N=gU("calc(".concat(g.length-1," * -").concat(u,")"))}var A=[];if(d){var T=g[0].width,E=y.width;A.push("scale(".concat((fR(E)?E/T:1)/T,")"))}return k&&A.push("rotate(".concat(k,", ").concat(M,", ").concat(C,")")),A.length&&(S.transform=A.join(" ")),e.createElement("text",kU({},WR(S,!0),{x:M,y:C,className:DF("recharts-text",O),textAnchor:h,fill:b.includes("url")?TU:b}),g.map((function(t,n){var r=t.words.join(j?"":" ");return e.createElement("tspan",{x:M,dy:0===n?N:u,key:r},r)})))};function DU(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function PU(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function IU(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=DU,n=(t,n)=>DU(e(t),n),r=(t,n)=>e(t)-n):(t=e===DU||e===PU?e:LU,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function LU(){return 0}function _U(e){return null===e?NaN:+e}const FU=IU(DU).right;IU(_U).center;var RU=FU;class BU extends Map{constructor(e,t=$U){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(zU(this,e))}has(e){return super.has(zU(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function zU({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function $U(e){return null!==e&&"object"==typeof e?e.valueOf():e}function WU(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const VU=Math.sqrt(50),UU=Math.sqrt(10),HU=Math.sqrt(2);function qU(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=VU?10:i>=UU?5:i>=HU?2:1;let u,l,s;return o<0?(s=Math.pow(10,-o)/a,u=Math.round(e*s),l=Math.round(t*s),u/s<e&&++u,l/s>t&&--l,s=-s):(s=Math.pow(10,o)*a,u=Math.round(e/s),l=Math.round(t/s),u*s<e&&++u,l*s>t&&--l),l<u&&.5<=n&&n<2?qU(e,t,2*n):[u,l,s]}function KU(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[o,i,a]=r?qU(t,e,n):qU(e,t,n);if(!(i>=o))return[];const u=i-o+1,l=new Array(u);if(r)if(a<0)for(let s=0;s<u;++s)l[s]=(i-s)/-a;else for(let s=0;s<u;++s)l[s]=(i-s)*a;else if(a<0)for(let s=0;s<u;++s)l[s]=(o+s)/-a;else for(let s=0;s<u;++s)l[s]=(o+s)*a;return l}function GU(e,t,n){return qU(e=+e,t=+t,n=+n)[2]}function YU(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?GU(t,e,n):GU(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function XU(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n<o||void 0===n&&o>=o)&&(n=o)}return n}function ZU(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n>o||void 0===n&&o>=o)&&(n=o)}return n}function QU(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=void 0===o?WU:function(e=DU){if(e===DU)return WU;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(o);r>n;){if(r-n>600){const i=r-n+1,a=t-n+1,u=Math.log(i),l=.5*Math.exp(2*u/3),s=.5*Math.sqrt(u*l*(i-l)/i)*(a-i/2<0?-1:1);QU(e,t,Math.max(n,Math.floor(t-a*l/i+s)),Math.min(r,Math.floor(t+(i-a)*l/i+s)),o)}const i=e[t];let a=n,u=r;for(JU(e,n,t),o(e[r],i)>0&&JU(e,n,r);a<u;){for(JU(e,a,u),++a,--u;o(e[a],i)<0;)++a;for(;o(e[u],i)>0;)--u}0===o(e[n],i)?JU(e,n,u):(++u,JU(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function JU(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function eH(e,t,n=_U){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e);return a+(+n(e[i+1],i+1,e)-a)*(o-i)}}function tH(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function nH(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const rH=Symbol("implicit");function oH(){var e=new BU,t=[],n=[],r=rH;function o(o){let i=e.get(o);if(void 0===i){if(r!==rH)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new BU;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return oH(t,n).unknown(r)},tH.apply(o,arguments),o}function iH(){var e,t,n=oH().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,u=!1,l=0,s=0,c=.5;function d(){var n=r().length,d=a<i,f=d?a:i,h=d?i:a;e=(h-f)/Math.max(1,n-l+2*s),u&&(e=Math.floor(e)),f+=(h-f-e*(n-l))*c,t=e*(1-l),u&&(f=Math.round(f),t=Math.round(t));var v=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map((function(t){return f+e*t}));return o(d?v.reverse():v)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,u=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(u=!!e,d()):u},n.padding=function(e){return arguments.length?(l=Math.min(1,s=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(s=+e,d()):s},n.align=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),d()):c},n.copy=function(){return iH(r(),[i,a]).round(u).paddingInner(l).paddingOuter(s).align(c)},tH.apply(d(),arguments)}function aH(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return aH(t())},e}function uH(){return aH(iH.apply(null,arguments).paddingInner(1))}function lH(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function sH(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function cH(){}var dH=.7,fH=1/dH,hH="\\s*([+-]?\\d+)\\s*",vH="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",pH="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",mH=/^#([0-9a-f]{3,8})$/,bH=new RegExp(`^rgb\\(${hH},${hH},${hH}\\)$`),yH=new RegExp(`^rgb\\(${pH},${pH},${pH}\\)$`),gH=new RegExp(`^rgba\\(${hH},${hH},${hH},${vH}\\)$`),wH=new RegExp(`^rgba\\(${pH},${pH},${pH},${vH}\\)$`),xH=new RegExp(`^hsl\\(${vH},${pH},${pH}\\)$`),kH=new RegExp(`^hsla\\(${vH},${pH},${pH},${vH}\\)$`),OH={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function jH(){return this.rgb().formatHex()}function SH(){return this.rgb().formatRgb()}function NH(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=mH.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?MH(t):3===n?new TH(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?CH(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?CH(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=bH.exec(e))?new TH(t[1],t[2],t[3],1):(t=yH.exec(e))?new TH(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=gH.exec(e))?CH(t[1],t[2],t[3],t[4]):(t=wH.exec(e))?CH(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=xH.exec(e))?_H(t[1],t[2]/100,t[3]/100,1):(t=kH.exec(e))?_H(t[1],t[2]/100,t[3]/100,t[4]):OH.hasOwnProperty(e)?MH(OH[e]):"transparent"===e?new TH(NaN,NaN,NaN,0):null}function MH(e){return new TH(e>>16&255,e>>8&255,255&e,1)}function CH(e,t,n,r){return r<=0&&(e=t=n=NaN),new TH(e,t,n,r)}function AH(e,t,n,r){return 1===arguments.length?function(e){return e instanceof cH||(e=NH(e)),e?new TH((e=e.rgb()).r,e.g,e.b,e.opacity):new TH}(e):new TH(e,t,n,null==r?1:r)}function TH(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function EH(){return`#${LH(this.r)}${LH(this.g)}${LH(this.b)}`}function DH(){const e=PH(this.opacity);return`${1===e?"rgb(":"rgba("}${IH(this.r)}, ${IH(this.g)}, ${IH(this.b)}${1===e?")":`, ${e})`}`}function PH(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function IH(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function LH(e){return((e=IH(e))<16?"0":"")+e.toString(16)}function _H(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new RH(e,t,n,r)}function FH(e){if(e instanceof RH)return new RH(e.h,e.s,e.l,e.opacity);if(e instanceof cH||(e=NH(e)),!e)return new RH;if(e instanceof RH)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,u=i-o,l=(i+o)/2;return u?(a=t===i?(n-r)/u+6*(n<r):n===i?(r-t)/u+2:(t-n)/u+4,u/=l<.5?i+o:2-i-o,a*=60):u=l>0&&l<1?0:a,new RH(a,u,l,e.opacity)}function RH(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function BH(e){return(e=(e||0)%360)<0?e+360:e}function zH(e){return Math.max(0,Math.min(1,e||0))}function $H(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}lH(cH,NH,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:jH,formatHex:jH,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return FH(this).formatHsl()},formatRgb:SH,toString:SH}),lH(TH,AH,sH(cH,{brighter(e){return e=null==e?fH:Math.pow(fH,e),new TH(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?dH:Math.pow(dH,e),new TH(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new TH(IH(this.r),IH(this.g),IH(this.b),PH(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:EH,formatHex:EH,formatHex8:function(){return`#${LH(this.r)}${LH(this.g)}${LH(this.b)}${LH(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:DH,toString:DH})),lH(RH,(function(e,t,n,r){return 1===arguments.length?FH(e):new RH(e,t,n,null==r?1:r)}),sH(cH,{brighter(e){return e=null==e?fH:Math.pow(fH,e),new RH(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?dH:Math.pow(dH,e),new RH(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new TH($H(e>=240?e-240:e+120,o,r),$H(e,o,r),$H(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new RH(BH(this.h),zH(this.s),zH(this.l),PH(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=PH(this.opacity);return`${1===e?"hsl(":"hsla("}${BH(this.h)}, ${100*zH(this.s)}%, ${100*zH(this.l)}%${1===e?")":`, ${e})`}`}}));var WH=e=>()=>e;function VH(e){return 1==(e=+e)?UH:function(t,n){return n-t?function(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)}}(t,n,e):WH(isNaN(t)?n:t)}}function UH(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):WH(isNaN(e)?t:e)}var HH=function e(t){var n=VH(t);function r(e,t){var r=n((e=AH(e)).r,(t=AH(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=UH(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function qH(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function KH(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=eq(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function GH(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function YH(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function XH(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=eq(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var ZH=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,QH=new RegExp(ZH.source,"g");function JH(e,t){var n,r,o,i=ZH.lastIndex=QH.lastIndex=0,a=-1,u=[],l=[];for(e+="",t+="";(n=ZH.exec(e))&&(r=QH.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),u[a]?u[a]+=o:u[++a]=o),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,l.push({i:a,x:YH(n,r)})),i=QH.lastIndex;return i<t.length&&(o=t.slice(i),u[a]?u[a]+=o:u[++a]=o),u.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)u[(n=l[r]).i]=n.x(e);return u.join("")})}function eq(e,t){var n,r=typeof t;return null==t||"boolean"===r?WH(t):("number"===r?YH:"string"===r?(n=NH(t))?(t=n,HH):JH:t instanceof NH?HH:t instanceof Date?GH:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?qH:Array.isArray(t)?KH:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?XH:YH)(e,t)}function tq(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function nq(e,t){void 0===t&&(t=e,e=eq);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}function rq(e){return+e}var oq=[0,1];function iq(e){return e}function aq(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function uq(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=aq(o,r),i=n(a,i)):(r=aq(r,o),i=n(i,a)),function(e){return i(r(e))}}function lq(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=aq(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=RU(e,t,1,r)-1;return i[n](o[n](t))}}function sq(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function cq(){var e,t,n,r,o,i,a=oq,u=oq,l=eq,s=iq;function c(){var e=Math.min(a.length,u.length);return s!==iq&&(s=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?lq:uq,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),u,l)))(e(s(t)))}return d.invert=function(n){return s(t((i||(i=r(u,a.map(e),YH)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,rq),c()):a.slice()},d.range=function(e){return arguments.length?(u=Array.from(e),c()):u.slice()},d.rangeRound=function(e){return u=Array.from(e),l=tq,c()},d.clamp=function(e){return arguments.length?(s=!!e||iq,c()):s!==iq},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}function dq(){return cq()(iq,iq)}function fq(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function hq(e){return(e=fq(Math.abs(e)))?e[1]:NaN}var vq,pq=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mq(e){if(!(t=pq.exec(e)))throw new Error("invalid format: "+e);var t;return new bq({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function bq(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function yq(e,t){var n=fq(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}mq.prototype=bq.prototype,bq.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var gq={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>yq(100*e,t),r:yq,s:function(e,t){var n=fq(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(vq=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+fq(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function wq(e){return e}var xq,kq,Oq,jq=Array.prototype.map,Sq=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Nq(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?wq:(t=jq.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,i=[],a=0,u=t[0],l=0;o>0&&u>0&&(l+u+1>r&&(u=Math.max(1,r-l)),i.push(e.substring(o-=u,o+u)),!((l+=u+1)>r));)u=t[a=(a+1)%t.length];return i.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",u=void 0===e.numerals?wq:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(jq.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=mq(e)).fill,n=e.align,d=e.sign,f=e.symbol,h=e.zero,v=e.width,p=e.comma,m=e.precision,b=e.trim,y=e.type;"n"===y?(p=!0,y="g"):gq[y]||(void 0===m&&(m=12),b=!0,y="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var g="$"===f?o:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===f?i:/[%p]/.test(y)?l:"",x=gq[y],k=/[defgprs%]/.test(y);function O(e){var o,i,l,f=g,O=w;if("c"===y)O=x(e)+O,e="";else{var j=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),m),b&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),j&&0==+e&&"+"!==d&&(j=!1),f=(j?"("===d?d:s:"-"===d||"("===d?"":d)+f,O=("s"===y?Sq[8+vq/3]:"")+O+(j&&"("===d?")":""),k)for(o=-1,i=e.length;++o<i;)if(48>(l=e.charCodeAt(o))||l>57){O=(46===l?a+e.slice(o+1):e.slice(o))+O,e=e.slice(0,o);break}}p&&!h&&(e=r(e,1/0));var S=f.length+e.length+O.length,N=S<v?new Array(v-S+1).join(t):"";switch(p&&h&&(e=r(N+e,N.length?v-O.length:1/0),N=""),n){case"<":e=f+e+O+N;break;case"=":e=f+N+e+O;break;case"^":e=N.slice(0,S=N.length>>1)+f+e+O+N.slice(S);break;default:e=N+f+e+O}return u(e)}return m=void 0===m?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),O.toString=function(){return e+""},O}return{format:d,formatPrefix:function(e,t){var n=d(((e=mq(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(hq(t)/3))),o=Math.pow(10,-r),i=Sq[8+r/3];return function(e){return n(o*e)+i}}}}function Mq(e,t,n,r){var o,i=YU(e,t,n);switch((r=mq(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(hq(t)/3)))-hq(Math.abs(e)))}(i,a))||(r.precision=o),Oq(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,hq(t)-hq(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-hq(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return kq(r)}function Cq(e){var t=e.domain;return e.ticks=function(e){var n=t();return KU(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Mq(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,u=i.length-1,l=i[a],s=i[u],c=10;for(s<l&&(o=l,l=s,s=o,o=a,a=u,u=o);c-- >0;){if((o=GU(l,s,n))===r)return i[a]=l,i[u]=s,t(i);if(o>0)l=Math.floor(l/o)*o,s=Math.ceil(s/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,s=Math.floor(s*o)/o}r=o}return e},e}function Aq(){var e=dq();return e.copy=function(){return sq(e,Aq())},tH.apply(e,arguments),Cq(e)}function Tq(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}function Eq(e){return Math.log(e)}function Dq(e){return Math.exp(e)}function Pq(e){return-Math.log(-e)}function Iq(e){return-Math.exp(-e)}function Lq(e){return isFinite(e)?+("1e"+e):e<0?0:e}function _q(e){return(t,n)=>-e(-t,n)}function Fq(e){const t=e(Eq,Dq),n=t.domain;let r,o,i=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),o=function(e){return 10===e?Lq:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=_q(r),o=_q(o),e(Pq,Iq)):e(Eq,Dq),t}return t.base=function(e){return arguments.length?(i=+e,a()):i},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],u=t[t.length-1];const l=u<a;l&&([a,u]=[u,a]);let s,c,d=r(a),f=r(u);const h=null==e?10:+e;let v=[];if(!(i%1)&&f-d<h){if(d=Math.floor(d),f=Math.ceil(f),a>0){for(;d<=f;++d)for(s=1;s<i;++s)if(c=d<0?s/o(-d):s*o(d),!(c<a)){if(c>u)break;v.push(c)}}else for(;d<=f;++d)for(s=i-1;s>=1;--s)if(c=d>0?s/o(-d):s*o(d),!(c<a)){if(c>u)break;v.push(c)}2*v.length<h&&(v=KU(a,u,h))}else v=KU(d,f,Math.min(f-d,h)).map(o);return l?v.reverse():v},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(i%1||null!=(n=mq(n)).precision||(n.trim=!0),n=kq(n)),e===1/0)return n;const a=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/o(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=a?n(e):""}},t.nice=()=>n(Tq(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}function Rq(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Bq(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function zq(e){var t=1,n=e(Rq(t),Bq(t));return n.constant=function(n){return arguments.length?e(Rq(t=+n),Bq(t)):t},Cq(n)}function $q(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Wq(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Vq(e){return e<0?-e*e:e*e}function Uq(e){var t=e(iq,iq),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(iq,iq):.5===n?e(Wq,Vq):e($q(n),$q(1/n)):n},Cq(t)}function Hq(){var e=Uq(cq());return e.copy=function(){return sq(e,Hq()).exponent(e.exponent())},tH.apply(e,arguments),e}function qq(e){return Math.sign(e)*e*e}xq=Nq({thousands:",",grouping:[3],currency:["$",""]}),kq=xq.format,Oq=xq.formatPrefix;const Kq=new Date,Gq=new Date;function Yq(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let u;do{a.push(u=new Date(+n)),t(n,i),e(n)}while(u<n&&n<r);return a},o.filter=n=>Yq((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(o.count=(t,r)=>(Kq.setTime(+t),Gq.setTime(+r),e(Kq),e(Gq),Math.floor(n(Kq,Gq))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}const Xq=Yq((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));Xq.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?Yq((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):Xq:null),Xq.range;const Zq=1e3,Qq=6e4,Jq=36e5,eK=864e5,tK=6048e5,nK=2592e6,rK=31536e6,oK=Yq((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*Zq)}),((e,t)=>(t-e)/Zq),(e=>e.getUTCSeconds()));oK.range;const iK=Yq((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zq)}),((e,t)=>{e.setTime(+e+t*Qq)}),((e,t)=>(t-e)/Qq),(e=>e.getMinutes()));iK.range;const aK=Yq((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*Qq)}),((e,t)=>(t-e)/Qq),(e=>e.getUTCMinutes()));aK.range;const uK=Yq((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zq-e.getMinutes()*Qq)}),((e,t)=>{e.setTime(+e+t*Jq)}),((e,t)=>(t-e)/Jq),(e=>e.getHours()));uK.range;const lK=Yq((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*Jq)}),((e,t)=>(t-e)/Jq),(e=>e.getUTCHours()));lK.range;const sK=Yq((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Qq)/eK),(e=>e.getDate()-1));sK.range;const cK=Yq((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/eK),(e=>e.getUTCDate()-1));cK.range;const dK=Yq((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/eK),(e=>Math.floor(e/eK)));function fK(e){return Yq((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Qq)/tK))}dK.range;const hK=fK(0),vK=fK(1),pK=fK(2),mK=fK(3),bK=fK(4),yK=fK(5),gK=fK(6);function wK(e){return Yq((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/tK))}hK.range,vK.range,pK.range,mK.range,bK.range,yK.range,gK.range;const xK=wK(0),kK=wK(1),OK=wK(2),jK=wK(3),SK=wK(4),NK=wK(5),MK=wK(6);xK.range,kK.range,OK.range,jK.range,SK.range,NK.range,MK.range;const CK=Yq((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));CK.range;const AK=Yq((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth()));AK.range;const TK=Yq((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));TK.every=e=>isFinite(e=Math.floor(e))&&e>0?Yq((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,TK.range;const EK=Yq((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function DK(e,t,n,r,o,i){const a=[[oK,1,Zq],[oK,5,5e3],[oK,15,15e3],[oK,30,3e4],[i,1,Qq],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,Jq],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,eK],[r,2,1728e5],[n,1,tK],[t,1,nK],[t,3,7776e6],[e,1,rK]];function u(t,n,r){const o=Math.abs(n-t)/r,i=IU((([,,e])=>e)).right(a,o);if(i===a.length)return e.every(YU(t/rK,n/rK,r));if(0===i)return Xq.every(Math.max(YU(t,n,r),1));const[u,l]=a[o/a[i-1][2]<a[i][2]/o?i-1:i];return u.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const o=n&&"function"==typeof n.range?n:u(e,t,n),i=o?o.range(e,+t+1):[];return r?i.reverse():i},u]}EK.every=e=>isFinite(e=Math.floor(e))&&e>0?Yq((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,EK.range;const[PK,IK]=DK(EK,AK,xK,dK,lK,aK),[LK,_K]=DK(TK,CK,hK,sK,uK,iK);function FK(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function RK(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function BK(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var zK,$K,WK,VK={"-":"",_:" ",0:"0"},UK=/^\s*\d+/,HK=/^%/,qK=/[\\^$*+?|[\]().{}]/g;function KK(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function GK(e){return e.replace(qK,"\\$&")}function YK(e){return new RegExp("^(?:"+e.map(GK).join("|")+")","i")}function XK(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function ZK(e,t,n){var r=UK.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function QK(e,t,n){var r=UK.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function JK(e,t,n){var r=UK.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function eG(e,t,n){var r=UK.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function tG(e,t,n){var r=UK.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function nG(e,t,n){var r=UK.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function rG(e,t,n){var r=UK.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function oG(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function iG(e,t,n){var r=UK.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function aG(e,t,n){var r=UK.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function uG(e,t,n){var r=UK.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function lG(e,t,n){var r=UK.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function sG(e,t,n){var r=UK.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function cG(e,t,n){var r=UK.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function dG(e,t,n){var r=UK.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function fG(e,t,n){var r=UK.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function hG(e,t,n){var r=UK.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vG(e,t,n){var r=HK.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function pG(e,t,n){var r=UK.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function mG(e,t,n){var r=UK.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function bG(e,t){return KK(e.getDate(),t,2)}function yG(e,t){return KK(e.getHours(),t,2)}function gG(e,t){return KK(e.getHours()%12||12,t,2)}function wG(e,t){return KK(1+sK.count(TK(e),e),t,3)}function xG(e,t){return KK(e.getMilliseconds(),t,3)}function kG(e,t){return xG(e,t)+"000"}function OG(e,t){return KK(e.getMonth()+1,t,2)}function jG(e,t){return KK(e.getMinutes(),t,2)}function SG(e,t){return KK(e.getSeconds(),t,2)}function NG(e){var t=e.getDay();return 0===t?7:t}function MG(e,t){return KK(hK.count(TK(e)-1,e),t,2)}function CG(e){var t=e.getDay();return t>=4||0===t?bK(e):bK.ceil(e)}function AG(e,t){return e=CG(e),KK(bK.count(TK(e),e)+(4===TK(e).getDay()),t,2)}function TG(e){return e.getDay()}function EG(e,t){return KK(vK.count(TK(e)-1,e),t,2)}function DG(e,t){return KK(e.getFullYear()%100,t,2)}function PG(e,t){return KK((e=CG(e)).getFullYear()%100,t,2)}function IG(e,t){return KK(e.getFullYear()%1e4,t,4)}function LG(e,t){var n=e.getDay();return KK((e=n>=4||0===n?bK(e):bK.ceil(e)).getFullYear()%1e4,t,4)}function _G(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+KK(t/60|0,"0",2)+KK(t%60,"0",2)}function FG(e,t){return KK(e.getUTCDate(),t,2)}function RG(e,t){return KK(e.getUTCHours(),t,2)}function BG(e,t){return KK(e.getUTCHours()%12||12,t,2)}function zG(e,t){return KK(1+cK.count(EK(e),e),t,3)}function $G(e,t){return KK(e.getUTCMilliseconds(),t,3)}function WG(e,t){return $G(e,t)+"000"}function VG(e,t){return KK(e.getUTCMonth()+1,t,2)}function UG(e,t){return KK(e.getUTCMinutes(),t,2)}function HG(e,t){return KK(e.getUTCSeconds(),t,2)}function qG(e){var t=e.getUTCDay();return 0===t?7:t}function KG(e,t){return KK(xK.count(EK(e)-1,e),t,2)}function GG(e){var t=e.getUTCDay();return t>=4||0===t?SK(e):SK.ceil(e)}function YG(e,t){return e=GG(e),KK(SK.count(EK(e),e)+(4===EK(e).getUTCDay()),t,2)}function XG(e){return e.getUTCDay()}function ZG(e,t){return KK(kK.count(EK(e)-1,e),t,2)}function QG(e,t){return KK(e.getUTCFullYear()%100,t,2)}function JG(e,t){return KK((e=GG(e)).getUTCFullYear()%100,t,2)}function eY(e,t){return KK(e.getUTCFullYear()%1e4,t,4)}function tY(e,t){var n=e.getUTCDay();return KK((e=n>=4||0===n?SK(e):SK.ceil(e)).getUTCFullYear()%1e4,t,4)}function nY(){return"+0000"}function rY(){return"%"}function oY(e){return+e}function iY(e){return Math.floor(+e/1e3)}function aY(e){return new Date(e)}function uY(e){return e instanceof Date?+e:+new Date(+e)}function lY(e,t,n,r,o,i,a,u,l,s){var c=dq(),d=c.invert,f=c.domain,h=s(".%L"),v=s(":%S"),p=s("%I:%M"),m=s("%I %p"),b=s("%a %d"),y=s("%b %d"),g=s("%B"),w=s("%Y");function x(e){return(l(e)<e?h:u(e)<e?v:a(e)<e?p:i(e)<e?m:r(e)<e?o(e)<e?b:y:n(e)<e?g:w)(e)}return c.invert=function(e){return new Date(d(e))},c.domain=function(e){return arguments.length?f(Array.from(e,uY)):f().map(aY)},c.ticks=function(t){var n=f();return e(n[0],n[n.length-1],null==t?10:t)},c.tickFormat=function(e,t){return null==t?x:s(t)},c.nice=function(e){var n=f();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?f(Tq(n,e)):c},c.copy=function(){return sq(c,lY(e,t,n,r,o,i,a,u,l,s))},c}function sY(){var e,t,n,r,o,i=0,a=1,u=iq,l=!1;function s(t){return null==t||isNaN(t=+t)?o:u(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function c(e){return function(t){var n,r;return arguments.length?([n,r]=t,u=e(n,r),s):[u(0),u(1)]}}return s.domain=function(o){return arguments.length?([i,a]=o,e=r(i=+i),t=r(a=+a),n=e===t?0:1/(t-e),s):[i,a]},s.clamp=function(e){return arguments.length?(l=!!e,s):l},s.interpolator=function(e){return arguments.length?(u=e,s):u},s.range=c(eq),s.rangeRound=c(tq),s.unknown=function(e){return arguments.length?(o=e,s):o},function(o){return r=o,e=o(i),t=o(a),n=e===t?0:1/(t-e),s}}function cY(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function dY(){var e=Uq(sY());return e.copy=function(){return cY(e,dY()).exponent(e.exponent())},nH.apply(e,arguments)}function fY(){var e,t,n,r,o,i,a,u=0,l=.5,s=1,c=1,d=iq,f=!1;function h(e){return isNaN(e=+e)?a:(e=.5+((e=+i(e))-t)*(c*e<c*t?r:o),d(f?Math.max(0,Math.min(1,e)):e))}function v(e){return function(t){var n,r,o;return arguments.length?([n,r,o]=t,d=nq(e,[n,r,o]),h):[d(0),d(.5),d(1)]}}return h.domain=function(a){return arguments.length?([u,l,s]=a,e=i(u=+u),t=i(l=+l),n=i(s=+s),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),c=t<e?-1:1,h):[u,l,s]},h.clamp=function(e){return arguments.length?(f=!!e,h):f},h.interpolator=function(e){return arguments.length?(d=e,h):d},h.range=v(eq),h.rangeRound=v(tq),h.unknown=function(e){return arguments.length?(a=e,h):a},function(a){return i=a,e=a(u),t=a(l),n=a(s),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),c=t<e?-1:1,h}}function hY(){var e=Uq(fY());return e.copy=function(){return cY(e,hY()).exponent(e.exponent())},nH.apply(e,arguments)}!function(e){zK=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,u=e.months,l=e.shortMonths,s=YK(o),c=XK(o),d=YK(i),f=XK(i),h=YK(a),v=XK(a),p=YK(u),m=XK(u),b=YK(l),y=XK(l),g={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return u[e.getMonth()]},c:null,d:bG,e:bG,f:kG,g:PG,G:LG,H:yG,I:gG,j:wG,L:xG,m:OG,M:jG,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:oY,s:iY,S:SG,u:NG,U:MG,V:AG,w:TG,W:EG,x:null,X:null,y:DG,Y:IG,Z:_G,"%":rY},w={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return u[e.getUTCMonth()]},c:null,d:FG,e:FG,f:WG,g:JG,G:tY,H:RG,I:BG,j:zG,L:$G,m:VG,M:UG,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:oY,s:iY,S:HG,u:qG,U:KG,V:YG,w:XG,W:ZG,x:null,X:null,y:QG,Y:eY,Z:nY,"%":rY},x={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=v.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=b.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return j(e,t,n,r)},d:uG,e:uG,f:hG,g:rG,G:nG,H:sG,I:sG,j:lG,L:fG,m:aG,M:cG,p:function(e,t,n){var r=s.exec(t.slice(n));return r?(e.p=c.get(r[0].toLowerCase()),n+r[0].length):-1},q:iG,Q:pG,s:mG,S:dG,u:QK,U:JK,V:eG,w:ZK,W:tG,x:function(e,t,r){return j(e,n,t,r)},X:function(e,t,n){return j(e,r,t,n)},y:rG,Y:nG,Z:oG,"%":vG};function k(e,t){return function(n){var r,o,i,a=[],u=-1,l=0,s=e.length;for(n instanceof Date||(n=new Date(+n));++u<s;)37===e.charCodeAt(u)&&(a.push(e.slice(l,u)),null!=(o=VK[r=e.charAt(++u)])?r=e.charAt(++u):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=u+1);return a.push(e.slice(l,u)),a.join("")}}function O(e,t){return function(n){var r,o,i=BK(1900,void 0,1);if(j(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=RK(BK(i.y,0,1))).getUTCDay(),r=o>4||0===o?kK.ceil(r):kK(r),r=cK.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=FK(BK(i.y,0,1))).getDay(),r=o>4||0===o?vK.ceil(r):vK(r),r=sK.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?RK(BK(i.y,0,1)).getUTCDay():FK(BK(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,RK(i)):FK(i)}}function j(e,t,n,r){for(var o,i,a=0,u=t.length,l=n.length;a<u;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=x[o in VK?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return g.x=k(n,g),g.X=k(r,g),g.c=k(t,g),w.x=k(n,w),w.X=k(r,w),w.c=k(t,w),{format:function(e){var t=k(e+="",g);return t.toString=function(){return e},t},parse:function(e){var t=O(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=k(e+="",w);return t.toString=function(){return e},t},utcParse:function(e){var t=O(e+="",!0);return t.toString=function(){return e},t}}}(e),$K=zK.format,zK.parse,WK=zK.utcFormat,zK.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var vY=Object.freeze({__proto__:null,scaleBand:iH,scaleDiverging:function e(){var t=Cq(fY()(iq));return t.copy=function(){return cY(t,e())},nH.apply(t,arguments)},scaleDivergingLog:function e(){var t=Fq(fY()).domain([.1,1,10]);return t.copy=function(){return cY(t,e()).base(t.base())},nH.apply(t,arguments)},scaleDivergingPow:hY,scaleDivergingSqrt:function(){return hY.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=zq(fY());return t.copy=function(){return cY(t,e()).constant(t.constant())},nH.apply(t,arguments)},scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,rq),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,rq):[0,1],Cq(r)},scaleImplicit:rH,scaleLinear:Aq,scaleLog:function e(){const t=Fq(cq()).domain([1,10]);return t.copy=()=>sq(t,e()).base(t.base()),tH.apply(t,arguments),t},scaleOrdinal:oH,scalePoint:uH,scalePow:Hq,scaleQuantile:function e(){var t,n=[],r=[],o=[];function i(){var e=0,t=Math.max(1,r.length);for(o=new Array(t-1);++e<t;)o[e-1]=eH(n,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:r[RU(o,e)]}return a.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?o[t-1]:n[0],t<o.length?o[t]:n[n.length-1]]},a.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null==t||isNaN(t=+t)||n.push(t);return n.sort(DU),i()},a.range=function(e){return arguments.length?(r=Array.from(e),i()):r.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return o.slice()},a.copy=function(){return e().domain(n).range(r).unknown(t)},tH.apply(a,arguments)},scaleQuantize:function e(){var t,n=0,r=1,o=1,i=[.5],a=[0,1];function u(e){return null!=e&&e<=e?a[RU(i,e,0,o)]:t}function l(){var e=-1;for(i=new Array(o);++e<o;)i[e]=((e+1)*r-(e-o)*n)/(o+1);return u}return u.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,l()):[n,r]},u.range=function(e){return arguments.length?(o=(a=Array.from(e)).length-1,l()):a.slice()},u.invertExtent=function(e){var t=a.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,i[0]]:t>=o?[i[o-1],r]:[i[t-1],i[t]]},u.unknown=function(e){return arguments.length?(t=e,u):u},u.thresholds=function(){return i.slice()},u.copy=function(){return e().domain([n,r]).range(a).unknown(t)},tH.apply(Cq(u),arguments)},scaleRadial:function e(){var t,n=dq(),r=[0,1],o=!1;function i(e){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(n(e));return isNaN(r)?t:o?Math.round(r):r}return i.invert=function(e){return n.invert(qq(e))},i.domain=function(e){return arguments.length?(n.domain(e),i):n.domain()},i.range=function(e){return arguments.length?(n.range((r=Array.from(e,rq)).map(qq)),i):r.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(o=!!e,i):o},i.clamp=function(e){return arguments.length?(n.clamp(e),i):n.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e(n.domain(),r).round(o).clamp(n.clamp()).unknown(t)},tH.apply(i,arguments),Cq(i)},scaleSequential:function e(){var t=Cq(sY()(iq));return t.copy=function(){return cY(t,e())},nH.apply(t,arguments)},scaleSequentialLog:function e(){var t=Fq(sY()).domain([1,10]);return t.copy=function(){return cY(t,e()).base(t.base())},nH.apply(t,arguments)},scaleSequentialPow:dY,scaleSequentialQuantile:function e(){var t=[],n=iq;function r(e){if(null!=e&&!isNaN(e=+e))return n((RU(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(DU),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map(((e,r)=>n(r/(t.length-1))))},r.quantiles=function(e){return Array.from({length:e+1},((n,r)=>function(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let n of e)null!=n&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return ZU(e);if(t>=1)return XU(e);var r,o=(r-1)*t,i=Math.floor(o),a=XU(QU(e,i).subarray(0,i+1));return a+(ZU(e.subarray(i+1))-a)*(o-i)}}(t,r/e)))},r.copy=function(){return e(n).domain(t)},nH.apply(r,arguments)},scaleSequentialSqrt:function(){return dY.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=zq(sY());return t.copy=function(){return cY(t,e()).constant(t.constant())},nH.apply(t,arguments)},scaleSqrt:function(){return Hq.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=zq(cq());return t.copy=function(){return sq(t,e()).constant(t.constant())},tH.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],o=1;function i(e){return null!=e&&e<=e?r[RU(n,e,0,o)]:t}return i.domain=function(e){return arguments.length?(n=Array.from(e),o=Math.min(n.length,r.length-1),i):n.slice()},i.range=function(e){return arguments.length?(r=Array.from(e),o=Math.min(n.length,r.length-1),i):r.slice()},i.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e().domain(n).range(r).unknown(t)},tH.apply(i,arguments)},scaleTime:function(){return tH.apply(lY(LK,_K,TK,CK,hK,sK,uK,iK,oK,$K).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return tH.apply(lY(PK,IK,EK,AK,xK,cK,lK,aK,oK,WK).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:Mq}),pY=dS;var mY=function(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(void 0===u?a==a&&!pY(a):n(a,u)))var u=a,l=i}return l};var bY=function(e,t){return e>t},yY=mY,gY=bY,wY=Mx;var xY=function(e){return e&&e.length?yY(e,wY,gY):void 0},kY=Ks(xY);var OY=function(e,t){return e<t},jY=mY,SY=OY,NY=Mx;var MY=function(e){return e&&e.length?jY(e,NY,SY):void 0},CY=Ks(MY),AY=q$,TY=_N;var EY=Ks((function(e,t){return AY(TY(e,t),1)})),DY=Yj;var PY=Ks((function(e,t){return DY(e,t)})),IY={exports:{}};
|
|
17
|
-
/*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */
|
|
18
|
-
!function(e){!function(t){var n,r=1e9,o={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},i=!0,a="[DecimalError] ",u=a+"Invalid argument: ",l=a+"Exponent out of range: ",s=Math.floor,c=Math.pow,d=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,f=1e7,h=7,v=9007199254740991,p=s(v/h),m={};function b(e,t){var n,r,o,a,u,l,s,c,d=e.constructor,v=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?M(t,v):t;if(s=e.d,c=t.d,u=e.e,o=t.e,s=s.slice(),a=u-o){for(a<0?(r=s,a=-a,l=c.length):(r=c,o=u,l=s.length),a>(l=(u=Math.ceil(v/h))>l?u+1:l+1)&&(a=l,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for((l=s.length)-(a=c.length)<0&&(a=l,r=c,c=s,s=r),n=0;a;)n=(s[--a]=s[a]+c[a]+n)/f|0,s[a]%=f;for(n&&(s.unshift(n),++o),l=s.length;0==s[--l];)s.pop();return t.d=s,t.e=o,i?M(t,v):t}function y(e,t,n){if(e!==~~e||e<t||e>n)throw Error(u+e)}function g(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)r=e[t]+"",(n=h-r.length)&&(i+=j(n)),i+=r;a=e[t],(n=h-(r=a+"").length)&&(i+=j(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a}m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},m.comparedTo=m.cmp=function(e){var t,n,r,o,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(t=0,n=(r=i.d.length)<(o=e.d.length)?r:o;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1},m.decimalPlaces=m.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*h;if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},m.dividedBy=m.div=function(e){return w(this,new this.constructor(e))},m.dividedToIntegerBy=m.idiv=function(e){var t=this.constructor;return M(w(this,new t(e),0,1),t.precision)},m.equals=m.eq=function(e){return!this.cmp(e)},m.exponent=function(){return k(this)},m.greaterThan=m.gt=function(e){return this.cmp(e)>0},m.greaterThanOrEqualTo=m.gte=function(e){return this.cmp(e)>=0},m.isInteger=m.isint=function(){return this.e>this.d.length-2},m.isNegative=m.isneg=function(){return this.s<0},m.isPositive=m.ispos=function(){return this.s>0},m.isZero=function(){return 0===this.s},m.lessThan=m.lt=function(e){return this.cmp(e)<0},m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1},m.logarithm=m.log=function(e){var t,r=this,o=r.constructor,u=o.precision,l=u+5;if(void 0===e)e=new o(10);else if((e=new o(e)).s<1||e.eq(n))throw Error(a+"NaN");if(r.s<1)throw Error(a+(r.s?"NaN":"-Infinity"));return r.eq(n)?new o(0):(i=!1,t=w(S(r,l),S(e,l),l),i=!0,M(t,u))},m.minus=m.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?C(t,e):b(t,(e.s=-e.s,e))},m.modulo=m.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(!(e=new r(e)).s)throw Error(a+"NaN");return n.s?(i=!1,t=w(n,e,0,1).times(e),i=!0,n.minus(t)):M(new r(n),o)},m.naturalExponential=m.exp=function(){return x(this)},m.naturalLogarithm=m.ln=function(){return S(this)},m.negated=m.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},m.plus=m.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?b(t,e):C(t,(e.s=-e.s,e))},m.precision=m.sd=function(e){var t,n,r,o=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(u+e);if(t=k(o)+1,n=(r=o.d.length-1)*h+1,r=o.d[r]){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},m.squareRoot=m.sqrt=function(){var e,t,n,r,o,u,l,c=this,d=c.constructor;if(c.s<1){if(!c.s)return new d(0);throw Error(a+"NaN")}for(e=k(c),i=!1,0==(o=Math.sqrt(+c))||o==1/0?(((t=g(c.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=s((e+1)/2)-(e<0||e%2),r=new d(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new d(o.toString()),o=l=(n=d.precision)+3;;)if(r=(u=r).plus(w(c,u,l+2)).times(.5),g(u.d).slice(0,l)===(t=g(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&"4999"==t){if(M(u,n+1,0),u.times(u).eq(c)){r=u;break}}else if("9999"!=t)break;l+=4}return i=!0,M(r,n)},m.times=m.mul=function(e){var t,n,r,o,a,u,l,s,c,d=this,h=d.constructor,v=d.d,p=(e=new h(e)).d;if(!d.s||!e.s)return new h(0);for(e.s*=d.s,n=d.e+e.e,(s=v.length)<(c=p.length)&&(a=v,v=p,p=a,u=s,s=c,c=u),a=[],r=u=s+c;r--;)a.push(0);for(r=c;--r>=0;){for(t=0,o=s+r;o>r;)l=a[o]+p[r]*v[o-r-1]+t,a[o--]=l%f|0,t=l/f|0;a[o]=(a[o]+t)%f|0}for(;!a[--u];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,i?M(e,h.precision):e},m.toDecimalPlaces=m.todp=function(e,t){var n=this,o=n.constructor;return n=new o(n),void 0===e?n:(y(e,0,r),void 0===t?t=o.rounding:y(t,0,8),M(n,e+k(n)+1,t))},m.toExponential=function(e,t){var n,o=this,i=o.constructor;return void 0===e?n=A(o,!0):(y(e,0,r),void 0===t?t=i.rounding:y(t,0,8),n=A(o=M(new i(o),e+1,t),!0,e+1)),n},m.toFixed=function(e,t){var n,o,i=this,a=i.constructor;return void 0===e?A(i):(y(e,0,r),void 0===t?t=a.rounding:y(t,0,8),n=A((o=M(new a(i),e+k(i)+1,t)).abs(),!1,e+k(o)+1),i.isneg()&&!i.isZero()?"-"+n:n)},m.toInteger=m.toint=function(){var e=this,t=e.constructor;return M(new t(e),k(e)+1,t.rounding)},m.toNumber=function(){return+this},m.toPower=m.pow=function(e){var t,r,o,u,l,c,d=this,f=d.constructor,p=+(e=new f(e));if(!e.s)return new f(n);if(!(d=new f(d)).s){if(e.s<1)throw Error(a+"Infinity");return d}if(d.eq(n))return d;if(o=f.precision,e.eq(n))return M(d,o);if(c=(t=e.e)>=(r=e.d.length-1),l=d.s,c){if((r=p<0?-p:p)<=v){for(u=new f(n),t=Math.ceil(o/h+4),i=!1;r%2&&T((u=u.times(d)).d,t),0!==(r=s(r/2));)T((d=d.times(d)).d,t);return i=!0,e.s<0?new f(n).div(u):M(u,o)}}else if(l<0)throw Error(a+"NaN");return l=l<0&&1&e.d[Math.max(t,r)]?-1:1,d.s=1,i=!1,u=e.times(S(d,o+12)),i=!0,(u=x(u)).s=l,u},m.toPrecision=function(e,t){var n,o,i=this,a=i.constructor;return void 0===e?o=A(i,(n=k(i))<=a.toExpNeg||n>=a.toExpPos):(y(e,1,r),void 0===t?t=a.rounding:y(t,0,8),o=A(i=M(new a(i),e,t),e<=(n=k(i))||n<=a.toExpNeg,e)),o},m.toSignificantDigits=m.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(y(e,1,r),void 0===t?t=n.rounding:y(t,0,8)),M(new n(this),e,t)},m.toString=m.valueOf=m.val=m.toJSON=function(){var e=this,t=k(e),n=e.constructor;return A(e,t<=n.toExpNeg||t>=n.toExpPos)};var w=function(){function e(e,t){var n,r=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+r,e[o]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,o,i,u){var l,s,c,d,v,p,m,b,y,g,w,x,O,j,S,N,C,A,T=r.constructor,E=r.s==o.s?1:-1,D=r.d,P=o.d;if(!r.s)return new T(r);if(!o.s)throw Error(a+"Division by zero");for(s=r.e-o.e,C=P.length,S=D.length,b=(m=new T(E)).d=[],c=0;P[c]==(D[c]||0);)++c;if(P[c]>(D[c]||0)&&--s,(x=null==i?i=T.precision:u?i+(k(r)-k(o))+1:i)<0)return new T(0);if(x=x/h+2|0,c=0,1==C)for(d=0,P=P[0],x++;(c<S||d)&&x--;c++)O=d*f+(D[c]||0),b[c]=O/P|0,d=O%P|0;else{for((d=f/(P[0]+1)|0)>1&&(P=e(P,d),D=e(D,d),C=P.length,S=D.length),j=C,g=(y=D.slice(0,C)).length;g<C;)y[g++]=0;(A=P.slice()).unshift(0),N=P[0],P[1]>=f/2&&++N;do{d=0,(l=t(P,y,C,g))<0?(w=y[0],C!=g&&(w=w*f+(y[1]||0)),(d=w/N|0)>1?(d>=f&&(d=f-1),1==(l=t(v=e(P,d),y,p=v.length,g=y.length))&&(d--,n(v,C<p?A:P,p))):(0==d&&(l=d=1),v=P.slice()),(p=v.length)<g&&v.unshift(0),n(y,v,g),-1==l&&(l=t(P,y,C,g=y.length))<1&&(d++,n(y,C<g?A:P,g)),g=y.length):0===l&&(d++,y=[0]),b[c++]=d,l&&y[0]?y[g++]=D[j]||0:(y=[D[j]],g=1)}while((j++<S||void 0!==y[0])&&x--)}return b[0]||b.shift(),m.e=s,M(m,u?i+k(m)+1:i)}}();function x(e,t){var r,o,a,u,s,d=0,f=0,h=e.constructor,v=h.precision;if(k(e)>16)throw Error(l+k(e));if(!e.s)return new h(n);for(null==t?(i=!1,s=v):s=t,u=new h(.03125);e.abs().gte(.1);)e=e.times(u),f+=5;for(s+=Math.log(c(2,f))/Math.LN10*2+5|0,r=o=a=new h(n),h.precision=s;;){if(o=M(o.times(e),s),r=r.times(++d),g((u=a.plus(w(o,r,s))).d).slice(0,s)===g(a.d).slice(0,s)){for(;f--;)a=M(a.times(a),s);return h.precision=v,null==t?(i=!0,M(a,v)):a}a=u}}function k(e){for(var t=e.e*h,n=e.d[0];n>=10;n/=10)t++;return t}function O(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+"LN10 precision limit exceeded");return M(new e(e.LN10),t)}function j(e){for(var t="";e--;)t+="0";return t}function S(e,t){var r,o,u,l,s,c,d,f,h,v=1,p=e,m=p.d,b=p.constructor,y=b.precision;if(p.s<1)throw Error(a+(p.s?"NaN":"-Infinity"));if(p.eq(n))return new b(0);if(null==t?(i=!1,f=y):f=t,p.eq(10))return null==t&&(i=!0),O(b,f);if(f+=10,b.precision=f,o=(r=g(m)).charAt(0),l=k(p),!(Math.abs(l)<15e14))return d=O(b,f+2,y).times(l+""),p=S(new b(o+"."+r.slice(1)),f-10).plus(d),b.precision=y,null==t?(i=!0,M(p,y)):p;for(;o<7&&1!=o||1==o&&r.charAt(1)>3;)o=(r=g((p=p.times(e)).d)).charAt(0),v++;for(l=k(p),o>1?(p=new b("0."+r),l++):p=new b(o+"."+r.slice(1)),c=s=p=w(p.minus(n),p.plus(n),f),h=M(p.times(p),f),u=3;;){if(s=M(s.times(h),f),g((d=c.plus(w(s,new b(u),f))).d).slice(0,f)===g(c.d).slice(0,f))return c=c.times(2),0!==l&&(c=c.plus(O(b,f+2,y).times(l+""))),c=w(c,new b(v),f),b.precision=y,null==t?(i=!0,M(c,y)):c;c=d,u+=2}}function N(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(o=t.length;48===t.charCodeAt(o-1);)--o;if(t=t.slice(r,o)){if(o-=r,n=n-r-1,e.e=s(n/h),e.d=[],r=(n+1)%h,n<0&&(r+=h),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=h;r<o;)e.d.push(+t.slice(r,r+=h));t=t.slice(r),r=h-t.length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),i&&(e.e>p||e.e<-p))throw Error(l+n)}else e.s=0,e.e=0,e.d=[0];return e}function M(e,t,n){var r,o,a,u,d,v,m,b,y=e.d;for(u=1,a=y[0];a>=10;a/=10)u++;if((r=t-u)<0)r+=h,o=t,m=y[b=0];else{if((b=Math.ceil((r+1)/h))>=(a=y.length))return e;for(m=a=y[b],u=1;a>=10;a/=10)u++;o=(r%=h)-h+u}if(void 0!==n&&(d=m/(a=c(10,u-o-1))%10|0,v=t<0||void 0!==y[b+1]||m%a,v=n<4?(d||v)&&(0==n||n==(e.s<0?3:2)):d>5||5==d&&(4==n||v||6==n&&(r>0?o>0?m/c(10,u-o):0:y[b-1])%10&1||n==(e.s<0?8:7))),t<1||!y[0])return v?(a=k(e),y.length=1,t=t-a-1,y[0]=c(10,(h-t%h)%h),e.e=s(-t/h)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(0==r?(y.length=b,a=1,b--):(y.length=b+1,a=c(10,h-r),y[b]=o>0?(m/c(10,u-o)%c(10,o)|0)*a:0),v)for(;;){if(0==b){(y[0]+=a)==f&&(y[0]=1,++e.e);break}if(y[b]+=a,y[b]!=f)break;y[b--]=0,a=1}for(r=y.length;0===y[--r];)y.pop();if(i&&(e.e>p||e.e<-p))throw Error(l+k(e));return e}function C(e,t){var n,r,o,a,u,l,s,c,d,v,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),i?M(t,m):t;if(s=e.d,v=t.d,r=t.e,c=e.e,s=s.slice(),u=c-r){for((d=u<0)?(n=s,u=-u,l=v.length):(n=v,r=c,l=s.length),u>(o=Math.max(Math.ceil(m/h),l)+2)&&(u=o,n.length=1),n.reverse(),o=u;o--;)n.push(0);n.reverse()}else{for((d=(o=s.length)<(l=v.length))&&(l=o),o=0;o<l;o++)if(s[o]!=v[o]){d=s[o]<v[o];break}u=0}for(d&&(n=s,s=v,v=n,t.s=-t.s),l=s.length,o=v.length-l;o>0;--o)s[l++]=0;for(o=v.length;o>u;){if(s[--o]<v[o]){for(a=o;a&&0===s[--a];)s[a]=f-1;--s[a],s[o]+=f}s[o]-=v[o]}for(;0===s[--l];)s.pop();for(;0===s[0];s.shift())--r;return s[0]?(t.d=s,t.e=r,i?M(t,m):t):new p(0)}function A(e,t,n){var r,o=k(e),i=g(e.d),a=i.length;return t?(n&&(r=n-a)>0?i=i.charAt(0)+"."+i.slice(1)+j(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+j(-o-1)+i,n&&(r=n-a)>0&&(i+=j(r))):o>=a?(i+=j(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+j(r))):((r=o+1)<a&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-a)>0&&(o+1===a&&(i+="."),i+=j(r))),e.s<0?"-"+i:i}function T(e,t){if(e.length>t)return e.length=t,!0}function E(e){if(!e||"object"!=typeof e)throw Error(a+"Object expected");var t,n,o,i=["precision",1,r,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if(void 0!==(o=e[n=i[t]])){if(!(s(o)===o&&o>=i[t+1]&&o<=i[t+2]))throw Error(u+n+": "+o);this[n]=o}if(void 0!==(o=e[n="LN10"])){if(o!=Math.LN10)throw Error(u+n+": "+o);this[n]=new this(o)}return this}o=function e(t){var n,r,o;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(u+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):N(t,e.toString())}if("string"!=typeof e)throw Error(u+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!d.test(e))throw Error(u+e);N(t,e)}if(i.prototype=m,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=e,i.config=i.set=E,void 0===t&&(t={}),t)for(o=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return i.config(t),i}(o),o.default=o.Decimal=o,n=new o(1),e.exports?e.exports=o:(t||(t="undefined"!=typeof self&&self&&self.self==self?self:Function("return this")()),t.Decimal=o)}(qs)}(IY);var LY=Ks(IY.exports);function _Y(e){return function(e){if(Array.isArray(e))return FY(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return FY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FY(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function FY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var RY=function(e){return e},BY={"@@functional/placeholder":!0},zY=function(e){return e===BY},$Y=function(e){return function t(){return 0===arguments.length||1===arguments.length&&zY(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},WY=function e(t,n){return 1===t?n:$Y((function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o.filter((function(e){return e!==BY})).length;return a>=t?n.apply(void 0,o):e(t-a,$Y((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=o.map((function(e){return zY(e)?t.shift():e}));return n.apply(void 0,_Y(i).concat(t))})))}))},VY=function(e){return WY(e.length,e)},UY=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},HY=VY((function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map((function(e){return t[e]})).map(e)})),qY=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return RY;var r=t.reverse(),o=r[0],i=r.slice(1);return function(){return i.reduce((function(e,t){return t(e)}),o.apply(void 0,arguments))}},KY=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},GY=function(e){var t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return t&&o.every((function(e,n){return e===t[n]}))?n:(t=o,n=e.apply(void 0,o))}};var YY=VY((function(e,t,n){var r=+e;return r+n*(+t-r)})),XY=VY((function(e,t,n){var r=t-+e;return(n-e)/(r=r||1/0)})),ZY=VY((function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))})),QY={rangeStep:function(e,t,n){for(var r=new LY(e),o=0,i=[];r.lt(t)&&o<1e5;)i.push(r.toNumber()),r=r.add(n),o++;return i},getDigitCount:function(e){return 0===e?1:Math.floor(new LY(e).abs().log(10).toNumber())+1},interpolateNumber:YY,uninterpolateNumber:XY,uninterpolateTruncation:ZY};function JY(e){return function(e){if(Array.isArray(e))return nX(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||tX(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eX(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(jde){o=!0,i=jde}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||tX(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tX(e,t){if(e){if("string"==typeof e)return nX(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nX(e,t):void 0}}function nX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rX(e){var t=eX(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function oX(e,t,n){if(e.lte(0))return new LY(0);var r=QY.getDigitCount(e.toNumber()),o=new LY(10).pow(r),i=e.div(o),a=1!==r?.05:.1,u=new LY(Math.ceil(i.div(a).toNumber())).add(n).mul(a).mul(o);return t?u:new LY(Math.ceil(u))}function iX(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new LY(0),tickMin:new LY(0),tickMax:new LY(0)};var i,a=oX(new LY(t).sub(e).div(n-1),r,o);i=e<=0&&t>=0?new LY(0):(i=new LY(e).add(t).div(2)).sub(new LY(i).mod(a));var u=Math.ceil(i.sub(e).div(a).toNumber()),l=Math.ceil(new LY(t).sub(i).div(a).toNumber()),s=u+l+1;return s>n?iX(e,t,n,r,o+1):(s<n&&(l=t>0?l+(n-s):l,u=t>0?u:u+(n-s)),{step:a,tickMin:i.sub(new LY(u).mul(a)),tickMax:i.add(new LY(l).mul(a))})}var aX=GY((function(e){var t=eX(e,2),n=t[0],r=t[1],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Math.max(o,2),u=eX(rX([n,r]),2),l=u[0],s=u[1];if(l===-1/0||s===1/0){var c=s===1/0?[l].concat(JY(UY(0,o-1).map((function(){return 1/0})))):[].concat(JY(UY(0,o-1).map((function(){return-1/0}))),[s]);return n>r?KY(c):c}if(l===s)return function(e,t,n){var r=1,o=new LY(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new LY(10).pow(QY.getDigitCount(e)-1),o=new LY(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new LY(Math.floor(e)))}else 0===e?o=new LY(Math.floor((t-1)/2)):n||(o=new LY(Math.floor(e)));var a=Math.floor((t-1)/2),u=qY(HY((function(e){return o.add(new LY(e-a).mul(r)).toNumber()})),UY);return u(0,t)}(l,o,i);var d=iX(l,s,a,i),f=d.step,h=d.tickMin,v=d.tickMax,p=QY.rangeStep(h,v.add(new LY(.1).mul(f)),f);return n>r?KY(p):p})),uX=GY((function(e,t){var n=eX(e,2),r=n[0],o=n[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=eX(rX([r,o]),2),u=a[0],l=a[1];if(u===-1/0||l===1/0)return[r,o];if(u===l)return[u];var s=Math.max(t,2),c=oX(new LY(l).sub(u).div(s-1),i,0),d=[].concat(JY(QY.rangeStep(new LY(u),new LY(l).sub(new LY(.99).mul(c)),c)),[l]);return r>o?KY(d):d})),lX=!0,sX="Invariant failed";function cX(e,t){if(!e){if(lX)throw new Error(sX);var n="function"==typeof t?t():t,r=n?"".concat(sX,": ").concat(n):sX;throw new Error(r)}}var dX=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function fX(){return fX=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},fX.apply(this,arguments)}function hX(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vX(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vX(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pX(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function mX(t){var n=t.offset,r=t.layout,o=t.width,i=t.dataKey,a=t.data,u=t.dataPointFormatter,l=t.xAxis,s=t.yAxis,c=pX(t,dX),d=WR(c,!1);"x"===t.direction&&"number"!==l.type&&cX(!1);var f=a.map((function(t){var a=u(t,i),c=a.x,f=a.y,h=a.value,v=a.errorVal;if(!v)return null;var p,m,b=[];if(Array.isArray(v)){var y=hX(v,2);p=y[0],m=y[1]}else p=m=v;if("vertical"===r){var g=l.scale,w=f+n,x=w+o,k=w-o,O=g(h-p),j=g(h+m);b.push({x1:j,y1:x,x2:j,y2:k}),b.push({x1:O,y1:w,x2:j,y2:w}),b.push({x1:O,y1:x,x2:O,y2:k})}else if("horizontal"===r){var S=s.scale,N=c+n,M=N-o,C=N+o,A=S(h-p),T=S(h+m);b.push({x1:M,y1:T,x2:C,y2:T}),b.push({x1:N,y1:A,x2:N,y2:T}),b.push({x1:M,y1:A,x2:C,y2:A})}return e.createElement(JR,fX({className:"recharts-errorBar",key:"bar-".concat(b.map((function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)})))},d),b.map((function(t){return e.createElement("line",fX({},t,{key:"line-".concat(t.x1,"-").concat(t.x2,"-").concat(t.y1,"-").concat(t.y2)}))})))}));return e.createElement(JR,{className:"recharts-errorBars"},f)}function bX(e){return bX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bX(e)}function yX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yX(Object(n),!0).forEach((function(t){wX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wX(e,t,n){return t=function(e){var t=function(e,t){if("object"!=bX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=bX(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==bX(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}mX.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},mX.displayName="ErrorBar";var xX=function(e){var t,n=e.children,r=e.formattedGraphicalItems,o=e.legendWidth,i=e.legendContent,a=RR(n,z$);return a?(t=a.props&&a.props.payload?a.props&&a.props.payload:"children"===i?(r||[]).reduce((function(e,t){var n=t.item,r=t.props,o=r.sectors||r.data||[];return e.concat(o.map((function(e){return{type:a.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}})))}),[]):(r||[]).map((function(e){var t=e.item,n=t.props,r=n.dataKey,o=n.name,i=n.legendType;return{inactive:n.hide,dataKey:r,type:a.props.iconType||i||"square",color:TX(t),value:o||r,payload:t.props}})),gX(gX(gX({},a.props),z$.getWithHeight(a,o)),{},{payload:t,item:a})):null};function kX(e){return kX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kX(e)}function OX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OX(Object(n),!0).forEach((function(t){SX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function SX(e,t,n){return t=function(e){var t=function(e,t){if("object"!=kX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=kX(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==kX(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NX(e){return function(e){if(Array.isArray(e))return MX(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return MX(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MX(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function CX(e,t,n){return PF(e)||PF(t)?n:hR(t)?KS(e,t,n):mx(t)?t(e):n}function AX(e,t,n,r){var o=EY(e,(function(e){return CX(e,t)}));if("number"===n){var i=o.filter((function(e){return fR(e)||parseFloat(e)}));return i.length?[CY(i),kY(i)]:[1/0,-1/0]}return(r?o.filter((function(e){return!PF(e)})):o).map((function(e){return hR(e)||e instanceof Date?e:""}))}var TX=function(e){var t,n=e.type.displayName,r=e.props,o=r.stroke,i=r.fill;switch(n){case"Line":t=o;break;case"Area":case"Radar":t=o&&"none"!==o?o:i;break;default:t=i}return t},EX=function(e,t,n,r,o){var i=FR(t.props.children,mX).filter((function(e){return function(e,t,n){return!!PF(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===n?"xAxis"===t:"y"!==n||"yAxis"===t)}(r,o,e.props.direction)}));if(i&&i.length){var a=i.map((function(e){return e.props.dataKey}));return e.reduce((function(e,t){var r=CX(t,n,0),o=Array.isArray(r)?[CY(r),kY(r)]:[r,r],i=a.reduce((function(e,n){var r=CX(t,n,0),i=o[0]-Math.abs(Array.isArray(r)?r[0]:r),a=o[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(i,e[0]),Math.max(a,e[1])]}),[1/0,-1/0]);return[Math.min(i[0],e[0]),Math.max(i[1],e[1])]}),[1/0,-1/0])}return null},DX=function(e,t,n,r,o){var i=t.map((function(t){var i=t.props.dataKey;return"number"===n&&i&&EX(e,t,i,r)||AX(e,i,n,o)}));if("number"===n)return i.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]);var a={};return i.reduce((function(e,t){for(var n=0,r=t.length;n<r;n++)a[t[n]]||(a[t[n]]=!0,e.push(t[n]));return e}),[])},PX=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},IX=function(e,t,n,r){if(r)return e.map((function(e){return e.coordinate}));var o,i,a=e.map((function(e){return e.coordinate===t&&(o=!0),e.coordinate===n&&(i=!0),e.coordinate}));return o||a.push(t),i||a.push(n),a},LX=function(e,t,n){if(!e)return null;var r=e.scale,o=e.duplicateDomain,i=e.type,a=e.range,u="scaleBand"===e.realScaleType?r.bandwidth()/2:2,l=(t||n)&&"category"===i&&r.bandwidth?r.bandwidth()/u:0;return l="angleAxis"===e.axisType&&(null==a?void 0:a.length)>=2?2*cR(a[0]-a[1])*l:l,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map((function(e){var t=o?o.indexOf(e):e;return{coordinate:r(t)+l,value:e,offset:l}})).filter((function(e){return!sR(e.coordinate)})):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map((function(e,t){return{coordinate:r(e)+l,value:e,index:t,offset:l}})):r.ticks&&!n?r.ticks(e.tickCount).map((function(e){return{coordinate:r(e)+l,value:e,offset:l}})):r.domain().map((function(e,t){return{coordinate:r(e)+l,value:o?o[e]:e,index:t,offset:l}}))},_X=new WeakMap,FX=function(e,t){if("function"!=typeof t)return e;_X.has(e)||_X.set(e,new WeakMap);var n=_X.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},RX=function(e,t,n){var r=e.scale,o=e.type,i=e.layout,a=e.axisType;if("auto"===r)return"radial"===i&&"radiusAxis"===a?{scale:iH(),realScaleType:"band"}:"radial"===i&&"angleAxis"===a?{scale:Aq(),realScaleType:"linear"}:"category"===o&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!n)?{scale:uH(),realScaleType:"point"}:"category"===o?{scale:iH(),realScaleType:"band"}:{scale:Aq(),realScaleType:"linear"};if(yw(r)){var u="scale".concat(AB(r));return{scale:(vY[u]||uH)(),realScaleType:vY[u]?u:"point"}}return mx(r)?{scale:r}:{scale:uH(),realScaleType:"point"}},BX=1e-4,zX=function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),o=Math.min(r[0],r[1])-BX,i=Math.max(r[0],r[1])+BX,a=e(t[0]),u=e(t[n-1]);(a<o||a>i||u<o||u>i)&&e.domain([t[0],t[n-1]])}},$X={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,i=0,a=0;a<t;++a){var u=sR(e[a][n][1])?e[a][n][0]:e[a][n][1];u>=0?(e[a][n][0]=o,e[a][n][1]=o+u,o=e[a][n][1]):(e[a][n][0]=i,e[a][n][1]=i+u,i=e[a][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Tz(e,t)}},none:Tz,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,u=0;a<n;++a)u+=e[a][r][1]||0;o[r][1]+=o[r][0]=-u/2}Tz(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var u=0,l=0,s=0;u<o;++u){for(var c=e[t[u]],d=c[a][1]||0,f=(d-(c[a-1][1]||0))/2,h=0;h<u;++h){var v=e[t[h]];f+=(v[a][1]||0)-(v[a-1][1]||0)}l+=d,s+=f*d}n[a-1][1]+=n[a-1][0]=i,l&&(i-=s/l)}n[a-1][1]+=n[a-1][0]=i,Tz(e,t)}},positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,i=0;i<t;++i){var a=sR(e[i][n][1])?e[i][n][0]:e[i][n][1];a>=0?(e[i][n][0]=o,e[i][n][1]=o+a,o=e[i][n][1]):(e[i][n][0]=0,e[i][n][1]=0)}}},WX=function(e,t,n){var r=t.map((function(e){return e.props.dataKey})),o=$X[n],i=function(){var e=TB([]),t=Ez,n=Tz,r=Dz;function o(o){var i,a,u=Array.from(e.apply(this,arguments),Pz),l=u.length,s=-1;for(const e of o)for(i=0,++s;i<l;++i)(u[i][s]=[0,+r(e,u[i].key,s,o)]).data=e;for(i=0,a=VB(t(u));i<l;++i)u[a[i]].index=i;return n(u,a),u}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:TB(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:TB(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?Ez:"function"==typeof e?e:TB(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?Tz:e,o):n},o}().keys(r).value((function(e,t){return+CX(e,t,0)})).order(Ez).offset(o);return i(e)},VX=function(e,t){var n=t.realScaleType,r=t.type,o=t.tickCount,i=t.originalDomain,a=t.allowDecimals,u=n||t.scale;if("auto"!==u&&"linear"!==u)return null;if(o&&"number"===r&&i&&("auto"===i[0]||"auto"===i[1])){var l=e.domain();if(!l.length)return null;var s=aX(l,o,a);return e.domain([CY(s),kY(s)]),{niceTicks:s}}if(o&&"number"===r){var c=e.domain();return{niceTicks:uX(c,o,a)}}return null};function UX(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!PF(o[t.dataKey])){var u=gR(n,"value",o[t.dataKey]);if(u)return u.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=CX(o,PF(a)?t.dataKey:a);return PF(l)?null:t.scale(l)}var HX=function(e){var t=e.axis,n=e.ticks,r=e.offset,o=e.bandSize,i=e.entry,a=e.index;if("category"===t.type)return n[a]?n[a].coordinate+r:null;var u=CX(i,t.dataKey,t.domain[a]);return PF(u)?null:t.scale(u)-o/2+r},qX=function(e,t,n){return Object.keys(e).reduce((function(r,o){var i=e[o].stackedData.reduce((function(e,r){var o=r.slice(t,n+1).reduce((function(e,t){return[CY(t.concat([e[0]]).filter(fR)),kY(t.concat([e[1]]).filter(fR))]}),[1/0,-1/0]);return[Math.min(e[0],o[0]),Math.max(e[1],o[1])]}),[1/0,-1/0]);return[Math.min(i[0],r[0]),Math.max(i[1],r[1])]}),[1/0,-1/0]).map((function(e){return e===1/0||e===-1/0?0:e}))},KX=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,GX=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,YX=function(e,t,n){if(mx(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(fR(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(KX.test(e[0])){var o=+KX.exec(e[0])[1];r[0]=t[0]-o}else mx(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(fR(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(GX.test(e[1])){var i=+GX.exec(e[1])[1];r[1]=t[1]+i}else mx(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},XX=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var o=TW(t,(function(e){return e.coordinate})),i=1/0,a=1,u=o.length;a<u;a++){var l=o[a],s=o[a-1];i=Math.min((l.coordinate||0)-(s.coordinate||0),i)}return i===1/0?0:i}return n?void 0:0},ZX=function(e,t,n){return e&&e.length?PY(e,KS(n,"type.defaultProps.domain"))?t:e:t},QX=function(e,t){var n=e.props,r=n.dataKey,o=n.name,i=n.unit,a=n.formatter,u=n.tooltipType,l=n.chartType,s=n.hide;return jX(jX({},WR(e,!1)),{},{dataKey:r,unit:i,formatter:a,name:o||r,color:TX(e),value:CX(t,r),type:u,payload:t,chartType:l,hide:s})};function JX(e){return JX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},JX(e)}function eZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eZ(Object(n),!0).forEach((function(t){nZ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nZ(e,t,n){return t=function(e){var t=function(e,t){if("object"!=JX(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=JX(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==JX(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rZ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return oZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oZ(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var iZ=Math.PI/180,aZ=function(e){return 180*e/Math.PI},uZ=function(e,t,n,r){return{x:e+Math.cos(-iZ*r)*n,y:t+Math.sin(-iZ*r)*n}},lZ=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},sZ=function(e,t){var n=e.x,r=e.y,o=t.cx,i=t.cy,a=function(e,t){var n=e.x,r=e.y,o=t.x,i=t.y;return Math.sqrt(Math.pow(n-o,2)+Math.pow(r-i,2))}({x:n,y:r},{x:o,y:i});if(a<=0)return{radius:a};var u=(n-o)/a,l=Math.acos(u);return r>i&&(l=2*Math.PI-l),{radius:a,angle:aZ(l),angleInRadian:l}},cZ=function(e,t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360);return e+360*Math.min(o,i)},dZ=function(e,t){var n=e.x,r=e.y,o=sZ({x:n,y:r},t),i=o.radius,a=o.angle,u=t.innerRadius,l=t.outerRadius;if(i<u||i>l)return!1;if(0===i)return!0;var s,c=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),o=Math.floor(n/360),i=Math.min(r,o);return{startAngle:t-360*i,endAngle:n-360*i}}(t),d=c.startAngle,f=c.endAngle,h=a;if(d<=f){for(;h>f;)h-=360;for(;h<d;)h+=360;s=h>=d&&h<=f}else{for(;h>d;)h-=360;for(;h<f;)h+=360;s=h>=f&&h<=d}return s?tZ(tZ({},t),{},{radius:i,angle:cZ(h,t)}):null};function fZ(e){return fZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fZ(e)}var hZ=["offset"];function vZ(e){return function(e){if(Array.isArray(e))return pZ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return pZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pZ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mZ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function bZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bZ(Object(n),!0).forEach((function(t){gZ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gZ(e,t,n){return t=function(e){var t=function(e,t){if("object"!=fZ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=fZ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fZ(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wZ(){return wZ=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},wZ.apply(this,arguments)}var xZ=function(e){var t=e.value,n=e.formatter,r=PF(e.children)?t:e.children;return mx(n)?n(r):r},kZ=function(t,n,r){var o,i,a=t.position,u=t.viewBox,l=t.offset,s=t.className,c=u,d=c.cx,f=c.cy,h=c.innerRadius,v=c.outerRadius,p=c.startAngle,m=c.endAngle,b=c.clockWise,y=(h+v)/2,g=function(e,t){return cR(t-e)*Math.min(Math.abs(t-e),360)}(p,m),w=g>=0?1:-1;"insideStart"===a?(o=p+w*l,i=b):"insideEnd"===a?(o=m-w*l,i=!b):"end"===a&&(o=m+w*l,i=b),i=g<=0?i:!i;var x=uZ(d,f,y,o),k=uZ(d,f,y,o+359*(i?1:-1)),O="M".concat(x.x,",").concat(x.y,"\n A").concat(y,",").concat(y,",0,1,").concat(i?0:1,",\n ").concat(k.x,",").concat(k.y),j=PF(t.id)?pR("recharts-radial-line-"):t.id;return e.createElement("text",wZ({},r,{dominantBaseline:"central",className:DF("recharts-radial-bar-label",s)}),e.createElement("defs",null,e.createElement("path",{id:j,d:O})),e.createElement("textPath",{xlinkHref:"#".concat(j)},n))},OZ=function(e){var t=e.viewBox,n=e.offset,r=e.position,o=t,i=o.cx,a=o.cy,u=o.innerRadius,l=o.outerRadius,s=(o.startAngle+o.endAngle)/2;if("outside"===r){var c=uZ(i,a,l+n,s),d=c.x;return{x:d,y:c.y,textAnchor:d>=i?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"end"};var f=uZ(i,a,(u+l)/2,s);return{x:f.x,y:f.y,textAnchor:"middle",verticalAnchor:"middle"}},jZ=function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,o=e.position,i=t,a=i.x,u=i.y,l=i.width,s=i.height,c=s>=0?1:-1,d=c*r,f=c>0?"end":"start",h=c>0?"start":"end",v=l>=0?1:-1,p=v*r,m=v>0?"end":"start",b=v>0?"start":"end";if("top"===o)return yZ(yZ({},{x:a+l/2,y:u-c*r,textAnchor:"middle",verticalAnchor:f}),n?{height:Math.max(u-n.y,0),width:l}:{});if("bottom"===o)return yZ(yZ({},{x:a+l/2,y:u+s+d,textAnchor:"middle",verticalAnchor:h}),n?{height:Math.max(n.y+n.height-(u+s),0),width:l}:{});if("left"===o){var y={x:a-p,y:u+s/2,textAnchor:m,verticalAnchor:"middle"};return yZ(yZ({},y),n?{width:Math.max(y.x-n.x,0),height:s}:{})}if("right"===o){var g={x:a+l+p,y:u+s/2,textAnchor:b,verticalAnchor:"middle"};return yZ(yZ({},g),n?{width:Math.max(n.x+n.width-g.x,0),height:s}:{})}var w=n?{width:l,height:s}:{};return"insideLeft"===o?yZ({x:a+p,y:u+s/2,textAnchor:b,verticalAnchor:"middle"},w):"insideRight"===o?yZ({x:a+l-p,y:u+s/2,textAnchor:m,verticalAnchor:"middle"},w):"insideTop"===o?yZ({x:a+l/2,y:u+d,textAnchor:"middle",verticalAnchor:h},w):"insideBottom"===o?yZ({x:a+l/2,y:u+s-d,textAnchor:"middle",verticalAnchor:f},w):"insideTopLeft"===o?yZ({x:a+p,y:u+d,textAnchor:b,verticalAnchor:h},w):"insideTopRight"===o?yZ({x:a+l-p,y:u+d,textAnchor:m,verticalAnchor:h},w):"insideBottomLeft"===o?yZ({x:a+p,y:u+s-d,textAnchor:b,verticalAnchor:f},w):"insideBottomRight"===o?yZ({x:a+l-p,y:u+s-d,textAnchor:m,verticalAnchor:f},w):fx(o)&&(fR(o.x)||dR(o.x))&&(fR(o.y)||dR(o.y))?yZ({x:a+mR(o.x,l),y:u+mR(o.y,s),textAnchor:"end",verticalAnchor:"end"},w):yZ({x:a+l/2,y:u+s/2,textAnchor:"middle",verticalAnchor:"middle"},w)},SZ=function(e){return"cx"in e&&fR(e.cx)};function NZ(t){var n,r=t.offset,o=yZ({offset:void 0===r?5:r},mZ(t,hZ)),i=o.viewBox,a=o.position,u=o.value,l=o.children,s=o.content,c=o.className,d=void 0===c?"":c,f=o.textBreakAll;if(!i||PF(u)&&PF(l)&&!e.isValidElement(s)&&!mx(s))return null;if(e.isValidElement(s))return e.cloneElement(s,o);if(mx(s)){if(n=e.createElement(s,o),e.isValidElement(n))return n}else n=xZ(o);var h=SZ(i),v=WR(o,!0);if(h&&("insideStart"===a||"insideEnd"===a||"end"===a))return kZ(o,n,v);var p=h?OZ(o):jZ(o);return e.createElement(EU,wZ({className:DF("recharts-label",d)},v,p,{breakAll:f}),n)}NZ.displayName="Label";var MZ=function(e){var t=e.cx,n=e.cy,r=e.angle,o=e.startAngle,i=e.endAngle,a=e.r,u=e.radius,l=e.innerRadius,s=e.outerRadius,c=e.x,d=e.y,f=e.top,h=e.left,v=e.width,p=e.height,m=e.clockWise,b=e.labelViewBox;if(b)return b;if(fR(v)&&fR(p)){if(fR(c)&&fR(d))return{x:c,y:d,width:v,height:p};if(fR(f)&&fR(h))return{x:f,y:h,width:v,height:p}}return fR(c)&&fR(d)?{x:c,y:d,width:0,height:0}:fR(t)&&fR(n)?{cx:t,cy:n,startAngle:o||r||0,endAngle:i||r||0,innerRadius:l||0,outerRadius:s||u||a||0,clockWise:m}:e.viewBox?e.viewBox:{}};NZ.parseViewBox=MZ,NZ.renderCallByParent=function(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||!t.children&&r&&!t.label)return null;var o=t.children,i=MZ(t),a=FR(o,NZ).map((function(t,r){return e.cloneElement(t,{viewBox:n||i,key:"label-".concat(r)})}));if(!r)return a;var u=function(t,n){return t?!0===t?e.createElement(NZ,{key:"label-implicit",viewBox:n}):hR(t)?e.createElement(NZ,{key:"label-implicit",viewBox:n,value:t}):e.isValidElement(t)?t.type===NZ?e.cloneElement(t,{key:"label-implicit",viewBox:n}):e.createElement(NZ,{key:"label-implicit",content:t,viewBox:n}):mx(t)?e.createElement(NZ,{key:"label-implicit",content:t,viewBox:n}):fx(t)?e.createElement(NZ,wZ({viewBox:n},t,{key:"label-implicit"})):null:null}(t.label,n||i);return[u].concat(vZ(a))};var CZ=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},AZ=Ks(CZ);function TZ(e){return TZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},TZ(e)}var EZ=["valueAccessor"],DZ=["data","dataKey","clockWise","id","textBreakAll"];function PZ(e){return function(e){if(Array.isArray(e))return IZ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return IZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IZ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function LZ(){return LZ=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},LZ.apply(this,arguments)}function _Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function FZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_Z(Object(n),!0).forEach((function(t){RZ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function RZ(e,t,n){return t=function(e){var t=function(e,t){if("object"!=TZ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=TZ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==TZ(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BZ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zZ=function(e){return Array.isArray(e.value)?AZ(e.value):e.value};function $Z(t){var n=t.valueAccessor,r=void 0===n?zZ:n,o=BZ(t,EZ),i=o.data,a=o.dataKey,u=o.clockWise,l=o.id,s=o.textBreakAll,c=BZ(o,DZ);return i&&i.length?e.createElement(JR,{className:"recharts-label-list"},i.map((function(t,n){var o=PF(a)?r(t,n):CX(t&&t.payload,a),i=PF(l)?{}:{id:"".concat(l,"-").concat(n)};return e.createElement(NZ,LZ({},WR(t,!0),c,i,{parentViewBox:t.parentViewBox,value:o,textBreakAll:s,viewBox:NZ.parseViewBox(PF(u)?t:FZ(FZ({},t),{},{clockWise:u})),key:"label-".concat(n),index:n}))}))):null}function WZ(e){return WZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},WZ(e)}function VZ(){return VZ=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},VZ.apply(this,arguments)}function UZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UZ(Object(n),!0).forEach((function(t){qZ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qZ(e,t,n){return t=function(e){var t=function(e,t){if("object"!=WZ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=WZ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==WZ(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}$Z.displayName="LabelList",$Z.renderCallByParent=function(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||!t.children&&r&&!t.label)return null;var o=FR(t.children,$Z).map((function(t,r){return e.cloneElement(t,{data:n,key:"labelList-".concat(r)})}));return r?[function(t,n){return t?!0===t?e.createElement($Z,{key:"labelList-implicit",data:n}):e.isValidElement(t)||mx(t)?e.createElement($Z,{key:"labelList-implicit",data:n,content:t}):fx(t)?e.createElement($Z,LZ({data:n},t,{key:"labelList-implicit"})):null:null}(t.label,n)].concat(PZ(o)):o};var KZ=function(e){var t=e.cx,n=e.cy,r=e.radius,o=e.angle,i=e.sign,a=e.isExternal,u=e.cornerRadius,l=e.cornerIsExternal,s=u*(a?1:-1)+r,c=Math.asin(u/s)/iZ,d=l?o:o+i*c,f=l?o-i*c:o;return{center:uZ(t,n,s,d),circleTangency:uZ(t,n,r,d),lineTangency:uZ(t,n,s*Math.cos(c*iZ),f),theta:c}},GZ=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.startAngle,a=function(e,t){return cR(t-e)*Math.min(Math.abs(t-e),359.999)}(i,e.endAngle),u=i+a,l=uZ(t,n,o,i),s=uZ(t,n,o,u),c="M ".concat(l.x,",").concat(l.y,"\n A ").concat(o,",").concat(o,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(i>u),",\n ").concat(s.x,",").concat(s.y,"\n ");if(r>0){var d=uZ(t,n,r,i),f=uZ(t,n,r,u);c+="L ".concat(f.x,",").concat(f.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(i<=u),",\n ").concat(d.x,",").concat(d.y," Z")}else c+="L ".concat(t,",").concat(n," Z");return c},YZ={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},XZ=function(t){var n=HZ(HZ({},YZ),t),r=n.cx,o=n.cy,i=n.innerRadius,a=n.outerRadius,u=n.cornerRadius,l=n.forceCornerRadius,s=n.cornerIsExternal,c=n.startAngle,d=n.endAngle,f=n.className;if(a<i||c===d)return null;var h,v=DF("recharts-sector",f),p=a-i,m=mR(u,p,0,!0);return h=m>0&&Math.abs(c-d)<360?function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.cornerRadius,a=e.forceCornerRadius,u=e.cornerIsExternal,l=e.startAngle,s=e.endAngle,c=cR(s-l),d=KZ({cx:t,cy:n,radius:o,angle:l,sign:c,cornerRadius:i,cornerIsExternal:u}),f=d.circleTangency,h=d.lineTangency,v=d.theta,p=KZ({cx:t,cy:n,radius:o,angle:s,sign:-c,cornerRadius:i,cornerIsExternal:u}),m=p.circleTangency,b=p.lineTangency,y=p.theta,g=u?Math.abs(l-s):Math.abs(l-s)-v-y;if(g<0)return a?"M ".concat(h.x,",").concat(h.y,"\n a").concat(i,",").concat(i,",0,0,1,").concat(2*i,",0\n a").concat(i,",").concat(i,",0,0,1,").concat(2*-i,",0\n "):GZ({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:l,endAngle:s});var w="M ".concat(h.x,",").concat(h.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(c<0),",").concat(f.x,",").concat(f.y,"\n A").concat(o,",").concat(o,",0,").concat(+(g>180),",").concat(+(c<0),",").concat(m.x,",").concat(m.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(c<0),",").concat(b.x,",").concat(b.y,"\n ");if(r>0){var x=KZ({cx:t,cy:n,radius:r,angle:l,sign:c,isExternal:!0,cornerRadius:i,cornerIsExternal:u}),k=x.circleTangency,O=x.lineTangency,j=x.theta,S=KZ({cx:t,cy:n,radius:r,angle:s,sign:-c,isExternal:!0,cornerRadius:i,cornerIsExternal:u}),N=S.circleTangency,M=S.lineTangency,C=S.theta,A=u?Math.abs(l-s):Math.abs(l-s)-j-C;if(A<0&&0===i)return"".concat(w,"L").concat(t,",").concat(n,"Z");w+="L".concat(M.x,",").concat(M.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(c<0),",").concat(N.x,",").concat(N.y,"\n A").concat(r,",").concat(r,",0,").concat(+(A>180),",").concat(+(c>0),",").concat(k.x,",").concat(k.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(c<0),",").concat(O.x,",").concat(O.y,"Z")}else w+="L".concat(t,",").concat(n,"Z");return w}({cx:r,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,p/2),forceCornerRadius:l,cornerIsExternal:s,startAngle:c,endAngle:d}):GZ({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:c,endAngle:d}),e.createElement("path",VZ({},WR(n,!0),{className:v,d:h,role:"img"}))};function ZZ(e){return ZZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ZZ(e)}function QZ(){return QZ=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},QZ.apply(this,arguments)}function JZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JZ(Object(n),!0).forEach((function(t){tQ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tQ(e,t,n){return t=function(e){var t=function(e,t){if("object"!=ZZ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ZZ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ZZ(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nQ={curveBasisClosed:function(e){return new bz(e)},curveBasisOpen:function(e){return new yz(e)},curveBasis:function(e){return new mz(e)},curveBumpX:function(e){return new XB(e,!0)},curveBumpY:function(e){return new XB(e,!1)},curveLinearClosed:function(e){return new gz(e)},curveLinear:HB,curveMonotoneX:function(e){return new jz(e)},curveMonotoneY:function(e){return new Sz(e)},curveNatural:function(e){return new Mz(e)},curveStep:function(e){return new Az(e,.5)},curveStepAfter:function(e){return new Az(e,1)},curveStepBefore:function(e){return new Az(e,0)}},rQ=function(e){return e.x===+e.x&&e.y===+e.y},oQ=function(e){return e.x},iQ=function(e){return e.y},aQ=function(e){var t,n=e.type,r=void 0===n?"linear":n,o=e.points,i=void 0===o?[]:o,a=e.baseLine,u=e.layout,l=e.connectNulls,s=void 0!==l&&l,c=function(e,t){if(mx(e))return e;var n="curve".concat(AB(e));return"curveMonotone"!==n&&"curveBump"!==n||!t?nQ[n]||HB:nQ["".concat(n).concat("vertical"===t?"Y":"X")]}(r,u),d=s?i.filter((function(e){return rQ(e)})):i;if(Array.isArray(a)){var f=s?a.filter((function(e){return rQ(e)})):a,h=d.map((function(e,t){return eQ(eQ({},e),{},{base:f[t]})}));return t="vertical"===u?YB().y(iQ).x1(oQ).x0((function(e){return e.base.x})):YB().x(oQ).y1(iQ).y0((function(e){return e.base.y})),t.defined(rQ).curve(c),t(h)}return(t="vertical"===u&&fR(a)?YB().y(iQ).x1(oQ).x0(a):fR(a)?YB().x(oQ).y1(iQ).y0(a):GB().x(oQ).y(iQ)).defined(rQ).curve(c),t(d)},uQ=function(t){var n=t.className,r=t.points,o=t.path,i=t.pathRef;if(!(r&&r.length||o))return null;var a=r&&r.length?aQ(t):o;return e.createElement("path",QZ({},WR(t,!1),NR(t),{className:DF("recharts-curve",n),d:a,ref:i}))},lQ=Object.getOwnPropertyNames,sQ=Object.getOwnPropertySymbols,cQ=Object.prototype.hasOwnProperty;function dQ(e,t){return function(n,r,o){return e(n,r,o)&&t(n,r,o)}}function fQ(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);var o=r.cache,i=o.get(t),a=o.get(n);if(i&&a)return i===n&&a===t;o.set(t,n),o.set(n,t);var u=e(t,n,r);return o.delete(t),o.delete(n),u}}function hQ(e){return lQ(e).concat(sQ(e))}var vQ=Object.hasOwn||function(e,t){return cQ.call(e,t)};function pQ(e,t){return e||t?e===t:e===t||e!=e&&t!=t}var mQ="_owner",bQ=Object.getOwnPropertyDescriptor,yQ=Object.keys;function gQ(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function wQ(e,t){return pQ(e.getTime(),t.getTime())}function xQ(e,t,n){if(e.size!==t.size)return!1;for(var r,o,i={},a=e.entries(),u=0;(r=a.next())&&!r.done;){for(var l=t.entries(),s=!1,c=0;(o=l.next())&&!o.done;){var d=r.value,f=d[0],h=d[1],v=o.value,p=v[0],m=v[1];s||i[c]||!(s=n.equals(f,p,u,c,e,t,n)&&n.equals(h,m,f,p,e,t,n))||(i[c]=!0),c++}if(!s)return!1;u++}return!0}function kQ(e,t,n){var r,o=yQ(e),i=o.length;if(yQ(t).length!==i)return!1;for(;i-- >0;){if((r=o[i])===mQ&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof)return!1;if(!vQ(t,r)||!n.equals(e[r],t[r],r,r,e,t,n))return!1}return!0}function OQ(e,t,n){var r,o,i,a=hQ(e),u=a.length;if(hQ(t).length!==u)return!1;for(;u-- >0;){if((r=a[u])===mQ&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof)return!1;if(!vQ(t,r))return!1;if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;if(o=bQ(e,r),i=bQ(t,r),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable))return!1}return!0}function jQ(e,t){return pQ(e.valueOf(),t.valueOf())}function SQ(e,t){return e.source===t.source&&e.flags===t.flags}function NQ(e,t,n){if(e.size!==t.size)return!1;for(var r,o,i={},a=e.values();(r=a.next())&&!r.done;){for(var u=t.values(),l=!1,s=0;(o=u.next())&&!o.done;)l||i[s]||!(l=n.equals(r.value,o.value,r.value,o.value,e,t,n))||(i[s]=!0),s++;if(!l)return!1}return!0}function MQ(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var CQ="[object Arguments]",AQ="[object Boolean]",TQ="[object Date]",EQ="[object Map]",DQ="[object Number]",PQ="[object Object]",IQ="[object RegExp]",LQ="[object Set]",_Q="[object String]",FQ=Array.isArray,RQ="function"==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,BQ=Object.assign,zQ=Object.prototype.toString.call.bind(Object.prototype.toString);var $Q=WQ();function WQ(e){void 0===e&&(e={});var t,n=e.circular,r=void 0!==n&&n,o=e.createInternalComparator,i=e.createState,a=e.strict,u=void 0!==a&&a,l=function(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?OQ:gQ,areDatesEqual:wQ,areMapsEqual:r?dQ(xQ,OQ):xQ,areObjectsEqual:r?OQ:kQ,arePrimitiveWrappersEqual:jQ,areRegExpsEqual:SQ,areSetsEqual:r?dQ(NQ,OQ):NQ,areTypedArraysEqual:r?OQ:MQ};if(n&&(o=BQ({},o,n(o))),t){var i=fQ(o.areArraysEqual),a=fQ(o.areMapsEqual),u=fQ(o.areObjectsEqual),l=fQ(o.areSetsEqual);o=BQ({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:u,areSetsEqual:l})}return o}(e),s=function(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,u=e.areSetsEqual,l=e.areTypedArraysEqual;return function(e,s,c){if(e===s)return!0;if(null==e||null==s||"object"!=typeof e||"object"!=typeof s)return e!=e&&s!=s;var d=e.constructor;if(d!==s.constructor)return!1;if(d===Object)return o(e,s,c);if(FQ(e))return t(e,s,c);if(null!=RQ&&RQ(e))return l(e,s,c);if(d===Date)return n(e,s,c);if(d===RegExp)return a(e,s,c);if(d===Map)return r(e,s,c);if(d===Set)return u(e,s,c);var f=zQ(e);return f===TQ?n(e,s,c):f===IQ?a(e,s,c):f===EQ?r(e,s,c):f===LQ?u(e,s,c):f===PQ?"function"!=typeof e.then&&"function"!=typeof s.then&&o(e,s,c):f===CQ?o(e,s,c):(f===AQ||f===DQ||f===_Q)&&i(e,s,c)}}(l),c=o?o(s):(t=s,function(e,n,r,o,i,a,u){return t(e,n,u)});return function(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(e,a){var u=r(),l=u.cache,s=void 0===l?t?new WeakMap:void 0:l,c=u.meta;return n(e,a,{cache:s,equals:o,meta:c,strict:i})};if(t)return function(e,t){return n(e,t,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(e,t){return n(e,t,a)}}({circular:r,comparator:s,createState:i,equals:c,strict:u})}function VQ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1;requestAnimationFrame((function r(o){n<0&&(n=o),o-n>t?(e(o),n=-1):function(e){"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(e)}(r)}))}function UQ(e){return UQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UQ(e)}function HQ(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return qQ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qQ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function KQ(){var e=function(){return null},t=!1,n=function n(r){if(!t){if(Array.isArray(r)){if(!r.length)return;var o=HQ(r),i=o[0],a=o.slice(1);return"number"==typeof i?void VQ(n.bind(null,a),i):(n(i),void VQ(n.bind(null,a)))}"object"===UQ(r)&&e(r),"function"==typeof r&&r()}};return{stop:function(){t=!0},start:function(e){t=!1,n(e)},subscribe:function(t){return e=t,function(){e=function(){return null}}}}}function GQ(e){return GQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},GQ(e)}function YQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YQ(Object(n),!0).forEach((function(t){ZQ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YQ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ZQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==GQ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==GQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===GQ(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}WQ({strict:!0}),WQ({circular:!0}),WQ({circular:!0,strict:!0}),WQ({createInternalComparator:function(){return pQ}}),WQ({strict:!0,createInternalComparator:function(){return pQ}}),WQ({circular:!0,createInternalComparator:function(){return pQ}}),WQ({circular:!0,createInternalComparator:function(){return pQ},strict:!0});var QQ=function(e){return e},JQ=function(e,t){return Object.keys(t).reduce((function(n,r){return XQ(XQ({},n),{},ZQ({},r,e(r,t[r])))}),{})},eJ=function(e,t,n){return e.map((function(e){return"".concat((r=e,r.replace(/([A-Z])/g,(function(e){return"-".concat(e.toLowerCase())})))," ").concat(t,"ms ").concat(n);var r})).join(",")};function tJ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||rJ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nJ(e){return function(e){if(Array.isArray(e))return oJ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||rJ(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rJ(e,t){if(e){if("string"==typeof e)return oJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oJ(e,t):void 0}}function oJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var iJ=1e-4,aJ=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},uJ=function(e,t){return e.map((function(e,n){return e*Math.pow(t,n)})).reduce((function(e,t){return e+t}))},lJ=function(e,t){return function(n){var r=aJ(e,t);return uJ(r,n)}},sJ=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];if(1===t.length)switch(t[0]){case"linear":r=0,o=0,i=1,a=1;break;case"ease":r=.25,o=.1,i=.25,a=1;break;case"ease-in":r=.42,o=0,i=1,a=1;break;case"ease-out":r=.42,o=0,i=.58,a=1;break;case"ease-in-out":r=0,o=0,i=.58,a=1;break;default:var u=t[0].split("(");if("cubic-bezier"===u[0]&&4===u[1].split(")")[0].split(",").length){var l=u[1].split(")")[0].split(",").map((function(e){return parseFloat(e)})),s=tJ(l,4);r=s[0],o=s[1],i=s[2],a=s[3]}}var c,d,f=lJ(r,i),h=lJ(o,a),v=(c=r,d=i,function(e){var t=aJ(c,d),n=[].concat(nJ(t.map((function(e,t){return e*t})).slice(1)),[0]);return uJ(n,e)}),p=function(e){for(var t,n=e>1?1:e,r=n,o=0;o<8;++o){var i=f(r)-n,a=v(r);if(Math.abs(i-n)<iJ||a<iJ)return h(r);r=(t=r-i/a)>1?1:t<0?0:t}return h(r)};return p.isStepper=!1,p},cJ=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if("string"==typeof r)switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return sJ(r);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,o=void 0===r?8:r,i=e.dt,a=void 0===i?17:i,u=function(e,t,r){var i=r+(-(e-t)*n-r*o)*a/1e3,u=r*a/1e3+e;return Math.abs(u-t)<iJ&&Math.abs(i)<iJ?[t,0]:[u,i]};return u.isStepper=!0,u.dt=a,u}();default:if("cubic-bezier"===r.split("(")[0])return sJ(r)}return"function"==typeof r?r:null};function dJ(e){return dJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dJ(e)}function fJ(e){return function(e){if(Array.isArray(e))return yJ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||bJ(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hJ(Object(n),!0).forEach((function(t){pJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==dJ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==dJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===dJ(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mJ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||bJ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bJ(e,t){if(e){if("string"==typeof e)return yJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yJ(e,t):void 0}}function yJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gJ=function(e,t,n){return e+(t-e)*n},wJ=function(e){return e.from!==e.to},xJ=function e(t,n,r){var o=JQ((function(e,n){if(wJ(n)){var r=mJ(t(n.from,n.to,n.velocity),2),o=r[0],i=r[1];return vJ(vJ({},n),{},{from:o,velocity:i})}return n}),n);return r<1?JQ((function(e,t){return wJ(t)?vJ(vJ({},t),{},{velocity:gJ(t.velocity,o[e].velocity,r),from:gJ(t.from,o[e].from,r)}):t}),n):e(t,o,r-1)},kJ=function(e,t,n,r,o){var i,a,u,l,s=(i=e,a=t,[Object.keys(i),Object.keys(a)].reduce((function(e,t){return e.filter((function(e){return t.includes(e)}))}))),c=s.reduce((function(n,r){return vJ(vJ({},n),{},pJ({},r,[e[r],t[r]]))}),{}),d=s.reduce((function(n,r){return vJ(vJ({},n),{},pJ({},r,{from:e[r],velocity:0,to:t[r]}))}),{}),f=-1,h=function(){return null};return h=n.isStepper?function(r){u||(u=r);var i=(r-u)/n.dt;d=xJ(n,d,i),o(vJ(vJ(vJ({},e),t),JQ((function(e,t){return t.from}),d))),u=r,Object.values(d).filter(wJ).length&&(f=requestAnimationFrame(h))}:function(i){l||(l=i);var a=(i-l)/r,u=JQ((function(e,t){return gJ.apply(void 0,fJ(t).concat([n(a)]))}),c);if(o(vJ(vJ(vJ({},e),t),u)),a<1)f=requestAnimationFrame(h);else{var s=JQ((function(e,t){return gJ.apply(void 0,fJ(t).concat([n(1)]))}),c);o(vJ(vJ(vJ({},e),t),s))}},function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(f)}}};function OJ(e){return OJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},OJ(e)}var jJ=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function SJ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function NJ(e){return function(e){if(Array.isArray(e))return MJ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return MJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MJ(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function CJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function AJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CJ(Object(n),!0).forEach((function(t){TJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TJ(e,t,n){return(t=DJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EJ(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,DJ(r.key),r)}}function DJ(e){var t=function(e,t){if("object"!==OJ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==OJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===OJ(t)?t:String(t)}function PJ(e,t){return PJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},PJ(e,t)}function IJ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(Dae){return!1}}();return function(){var n,r=FJ(e);if(t){var o=FJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return LJ(this,n)}}function LJ(e,t){if(t&&("object"===OJ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _J(e)}function _J(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FJ(e){return FJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},FJ(e)}var RJ=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PJ(e,t)}(a,t);var n,r,o,i=IJ(a);function a(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var r=(n=i.call(this,e,t)).props,o=r.isActive,u=r.attributeName,l=r.from,s=r.to,c=r.steps,d=r.children,f=r.duration;if(n.handleStyleChange=n.handleStyleChange.bind(_J(n)),n.changeStyle=n.changeStyle.bind(_J(n)),!o||f<=0)return n.state={style:{}},"function"==typeof d&&(n.state={style:s}),LJ(n);if(c&&c.length)n.state={style:c[0].style};else if(l){if("function"==typeof d)return n.state={style:l},LJ(n);n.state={style:u?TJ({},u,l):l}}else n.state={style:{}};return n}return n=a,r=[{key:"componentDidMount",value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,o=t.attributeName,i=t.shouldReAnimate,a=t.to,u=t.from,l=this.state.style;if(r)if(n){if(!($Q(e.to,a)&&e.canBegin&&e.isActive)){var s=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var c=s||i?u:e.to;if(this.state&&l){var d={style:o?TJ({},o,c):c};(o&&[o]!==c||!o&&l!==c)&&this.setState(d)}this.runAnimation(AJ(AJ({},this.props),{},{from:c,begin:0}))}}else{var f={style:o?TJ({},o,a):a};this.state&&l&&(o&&l[o]!==a||!o&&l!==a)&&this.setState(f)}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"runJSAnimation",value:function(e){var t=this,n=e.from,r=e.to,o=e.duration,i=e.easing,a=e.begin,u=e.onAnimationEnd,l=e.onAnimationStart,s=kJ(n,r,cJ(i),o,this.changeStyle);this.manager.start([l,a,function(){t.stopJSAnimation=s()},o,u])}},{key:"runStepAnimation",value:function(e){var t=this,n=e.steps,r=e.begin,o=e.onAnimationStart,i=n[0],a=i.style,u=i.duration,l=void 0===u?0:u;return this.manager.start([o].concat(NJ(n.reduce((function(e,r,o){if(0===o)return e;var i=r.duration,a=r.easing,u=void 0===a?"ease":a,l=r.style,s=r.properties,c=r.onAnimationEnd,d=o>0?n[o-1]:r,f=s||Object.keys(l);if("function"==typeof u||"spring"===u)return[].concat(NJ(e),[t.runJSAnimation.bind(t,{from:d.style,to:l,duration:i,easing:u}),i]);var h=eJ(f,i,u),v=AJ(AJ(AJ({},d.style),l),{},{transition:h});return[].concat(NJ(e),[v,i,c]).filter(QQ)}),[a,Math.max(l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=KQ());var t=e.begin,n=e.duration,r=e.attributeName,o=e.to,i=e.easing,a=e.onAnimationStart,u=e.onAnimationEnd,l=e.steps,s=e.children,c=this.manager;if(this.unSubscribe=c.subscribe(this.handleStyleChange),"function"!=typeof i&&"function"!=typeof s&&"spring"!==i)if(l.length>1)this.runStepAnimation(e);else{var d=r?TJ({},r,o):o,f=eJ(Object.keys(d),n,i);c.start([a,t,AJ(AJ({},d),{},{transition:f}),n,u])}else this.runJSAnimation(e)}},{key:"render",value:function(){var t=this.props,n=t.children;t.begin;var r=t.duration;t.attributeName,t.easing;var o=t.isActive;t.steps,t.from,t.to,t.canBegin,t.onAnimationEnd,t.shouldReAnimate,t.onAnimationReStart;var i=SJ(t,jJ),a=e.Children.count(n),u=this.state.style;if("function"==typeof n)return n(u);if(!o||0===a||r<=0)return n;var l=function(t){var n=t.props,r=n.style,o=void 0===r?{}:r,a=n.className;return e.cloneElement(t,AJ(AJ({},i),{},{style:AJ(AJ({},o),u),className:a}))};return 1===a?l(e.Children.only(n)):e.createElement("div",null,e.Children.map(n,(function(e){return l(e)})))}}],r&&EJ(n.prototype,r),o&&EJ(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);function BJ(e){return BJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},BJ(e)}function zJ(){return zJ=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},zJ.apply(this,arguments)}function $J(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return WJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WJ(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function WJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VJ(Object(n),!0).forEach((function(t){HJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function HJ(e,t,n){return t=function(e){var t=function(e,t){if("object"!=BJ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=BJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==BJ(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}RJ.displayName="Animate",RJ.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},RJ.propTypes={from:UA.oneOfType([UA.object,UA.string]),to:UA.oneOfType([UA.object,UA.string]),attributeName:UA.string,duration:UA.number,begin:UA.number,easing:UA.oneOfType([UA.string,UA.func]),steps:UA.arrayOf(UA.shape({duration:UA.number.isRequired,style:UA.object.isRequired,easing:UA.oneOfType([UA.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),UA.func]),properties:UA.arrayOf("string"),onAnimationEnd:UA.func})),children:UA.oneOfType([UA.node,UA.func]),isActive:UA.bool,canBegin:UA.bool,onAnimationEnd:UA.func,shouldReAnimate:UA.bool,onAnimationStart:UA.func,onAnimationReStart:UA.func},UA.object,UA.object,UA.object,UA.element,UA.object,UA.object,UA.object,UA.oneOfType([UA.array,UA.element]),UA.any;var qJ=function(e,t,n,r,o){var i,a=Math.min(Math.abs(n)/2,Math.abs(r)/2),u=r>=0?1:-1,l=n>=0?1:-1,s=r>=0&&n>=0||r<0&&n<0?1:0;if(a>0&&o instanceof Array){for(var c=[0,0,0,0],d=0;d<4;d++)c[d]=o[d]>a?a:o[d];i="M".concat(e,",").concat(t+u*c[0]),c[0]>0&&(i+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(s,",").concat(e+l*c[0],",").concat(t)),i+="L ".concat(e+n-l*c[1],",").concat(t),c[1]>0&&(i+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(s,",\n ").concat(e+n,",").concat(t+u*c[1])),i+="L ".concat(e+n,",").concat(t+r-u*c[2]),c[2]>0&&(i+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(s,",\n ").concat(e+n-l*c[2],",").concat(t+r)),i+="L ".concat(e+l*c[3],",").concat(t+r),c[3]>0&&(i+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(s,",\n ").concat(e,",").concat(t+r-u*c[3])),i+="Z"}else if(a>0&&o===+o&&o>0){var f=Math.min(a,o);i="M ".concat(e,",").concat(t+u*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+l*f,",").concat(t,"\n L ").concat(e+n-l*f,",").concat(t,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+n,",").concat(t+u*f,"\n L ").concat(e+n,",").concat(t+r-u*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e+n-l*f,",").concat(t+r,"\n L ").concat(e+l*f,",").concat(t+r,"\n A ").concat(f,",").concat(f,",0,0,").concat(s,",").concat(e,",").concat(t+r-u*f," Z")}else i="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return i},KJ=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,o=t.x,i=t.y,a=t.width,u=t.height;if(Math.abs(a)>0&&Math.abs(u)>0){var l=Math.min(o,o+a),s=Math.max(o,o+a),c=Math.min(i,i+u),d=Math.max(i,i+u);return n>=l&&n<=s&&r>=c&&r<=d}return!1},GJ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},YJ=function(t){var n=UJ(UJ({},GJ),t),r=e.useRef(),o=$J(e.useState(-1),2),i=o[0],a=o[1];e.useEffect((function(){if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&a(e)}catch(jde){}}),[]);var u=n.x,l=n.y,s=n.width,c=n.height,d=n.radius,f=n.className,h=n.animationEasing,v=n.animationDuration,p=n.animationBegin,m=n.isAnimationActive,b=n.isUpdateAnimationActive;if(u!==+u||l!==+l||s!==+s||c!==+c||0===s||0===c)return null;var y=DF("recharts-rectangle",f);return b?e.createElement(RJ,{canBegin:i>0,from:{width:s,height:c,x:u,y:l},to:{width:s,height:c,x:u,y:l},duration:v,animationEasing:h,isActive:b},(function(t){var o=t.width,a=t.height,u=t.x,l=t.y;return e.createElement(RJ,{canBegin:i>0,from:"0px ".concat(-1===i?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,isActive:m,easing:h},e.createElement("path",zJ({},WR(n,!0),{className:y,d:qJ(u,l,o,a,d),ref:r})))})):e.createElement("path",zJ({},WR(n,!0),{className:y,d:qJ(u,l,s,c,d)}))},XJ=["points","className","baseLinePoints","connectNulls"];function ZJ(){return ZJ=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},ZJ.apply(this,arguments)}function QJ(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function JJ(e){return function(e){if(Array.isArray(e))return e0(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return e0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e0(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var t0=function(e){return e&&e.x===+e.x&&e.y===+e.y},n0=function(e,t){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach((function(e){t0(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])})),t0(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t}(e);t&&(n=[n.reduce((function(e,t){return[].concat(JJ(e),JJ(t))}),[])]);var r=n.map((function(e){return e.reduce((function(e,t,n){return"".concat(e).concat(0===n?"M":"L").concat(t.x,",").concat(t.y)}),"")})).join("");return 1===n.length?"".concat(r,"Z"):r},r0=function(t){var n=t.points,r=t.className,o=t.baseLinePoints,i=t.connectNulls,a=QJ(t,XJ);if(!n||!n.length)return null;var u=DF("recharts-polygon",r);if(o&&o.length){var l=a.stroke&&"none"!==a.stroke,s=function(e,t,n){var r=n0(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(n0(t.reverse(),n).slice(1))}(n,o,i);return e.createElement("g",{className:u},e.createElement("path",ZJ({},WR(a,!0),{fill:"Z"===s.slice(-1)?a.fill:"none",stroke:"none",d:s})),l?e.createElement("path",ZJ({},WR(a,!0),{fill:"none",d:n0(n,i)})):null,l?e.createElement("path",ZJ({},WR(a,!0),{fill:"none",d:n0(o,i)})):null)}var c=n0(n,i);return e.createElement("path",ZJ({},WR(a,!0),{fill:"Z"===c.slice(-1)?a.fill:"none",className:u,d:c}))};function o0(){return o0=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},o0.apply(this,arguments)}var i0=function(t){var n=t.cx,r=t.cy,o=t.r,i=DF("recharts-dot",t.className);return n===+n&&r===+r&&o===+o?e.createElement("circle",o0({},WR(t,!1),NR(t),{className:i,cx:n,cy:r,r:o})):null};function a0(e){return a0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a0(e)}var u0=["x","y","top","left","width","height","className"];function l0(){return l0=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},l0.apply(this,arguments)}function s0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c0(e,t,n){return t=function(e){var t=function(e,t){if("object"!=a0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a0(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d0(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var f0=function(e,t,n,r,o,i){return"M".concat(e,",").concat(o,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n)},h0=function(t){var n=t.x,r=void 0===n?0:n,o=t.y,i=void 0===o?0:o,a=t.top,u=void 0===a?0:a,l=t.left,s=void 0===l?0:l,c=t.width,d=void 0===c?0:c,f=t.height,h=void 0===f?0:f,v=t.className,p=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s0(Object(n),!0).forEach((function(t){c0(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({x:r,y:i,top:u,left:s,width:d,height:h},d0(t,u0));return fR(r)&&fR(i)&&fR(d)&&fR(h)&&fR(u)&&fR(s)?e.createElement("path",l0({},WR(p,!0),{className:DF("recharts-cross",v),d:f0(r,i,d,h,u,s)})):null},v0=mY,p0=bY,m0=SN;var b0=function(e,t){return e&&e.length?v0(e,m0(t),p0):void 0},y0=Ks(b0),g0=mY,w0=SN,x0=OY;var k0=function(e,t){return e&&e.length?g0(e,w0(t),x0):void 0},O0=Ks(k0),j0=["cx","cy","angle","ticks","axisLine"],S0=["ticks","tick","angle","tickFormatter","stroke"];function N0(e){return N0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N0(e)}function M0(){return M0=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},M0.apply(this,arguments)}function C0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C0(Object(n),!0).forEach((function(t){_0(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T0(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function E0(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,F0(r.key),r)}}function D0(e,t,n){return t=I0(t),function(e,t){if(t&&("object"===N0(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,P0()?Reflect.construct(t,n||[],I0(e).constructor):t.apply(e,n))}function P0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(P0=function(){return!!e})()}function I0(e){return I0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I0(e)}function L0(e,t){return L0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L0(e,t)}function _0(e,t,n){return(t=F0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F0(e){var t=function(e,t){if("object"!=N0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=N0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==N0(t)?t:String(t)}var R0=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),D0(this,n,arguments)}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L0(e,t)}(n,t),r=n,o=[{key:"getTickValueCoord",value:function(e){var t=e.coordinate,n=this.props,r=n.angle,o=n.cx,i=n.cy;return uZ(o,i,t,r)}},{key:"getTickTextAnchor",value:function(){var e;switch(this.props.orientation){case"left":e="end";break;case"right":e="start";break;default:e="middle"}return e}},{key:"getViewBox",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,o=e.ticks,i=y0(o,(function(e){return e.coordinate||0}));return{cx:t,cy:n,startAngle:r,endAngle:r,innerRadius:O0(o,(function(e){return e.coordinate||0})).coordinate||0,outerRadius:i.coordinate||0}}},{key:"renderAxisLine",value:function(){var t=this.props,n=t.cx,r=t.cy,o=t.angle,i=t.ticks,a=t.axisLine,u=T0(t,j0),l=i.reduce((function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]}),[1/0,-1/0]),s=uZ(n,r,l[0],o),c=uZ(n,r,l[1],o),d=A0(A0(A0({},WR(u,!1)),{},{fill:"none"},WR(a,!1)),{},{x1:s.x,y1:s.y,x2:c.x,y2:c.y});return e.createElement("line",M0({className:"recharts-polar-radius-axis-line"},d))}},{key:"renderTicks",value:function(){var t=this,r=this.props,o=r.ticks,i=r.tick,a=r.angle,u=r.tickFormatter,l=r.stroke,s=T0(r,S0),c=this.getTickTextAnchor(),d=WR(s,!1),f=WR(i,!1),h=o.map((function(r,o){var s=t.getTickValueCoord(r),h=A0(A0(A0(A0({textAnchor:c,transform:"rotate(".concat(90-a,", ").concat(s.x,", ").concat(s.y,")")},d),{},{stroke:"none",fill:l},f),{},{index:o},s),{},{payload:r});return e.createElement(JR,M0({className:"recharts-polar-radius-axis-tick",key:"tick-".concat(r.coordinate)},MR(t.props,r,o)),n.renderTickItem(i,h,u?u(r.value,o):r.value))}));return e.createElement(JR,{className:"recharts-polar-radius-axis-ticks"},h)}},{key:"render",value:function(){var t=this.props,n=t.ticks,r=t.axisLine,o=t.tick;return n&&n.length?e.createElement(JR,{className:"recharts-polar-radius-axis"},r&&this.renderAxisLine(),o&&this.renderTicks(),NZ.renderCallByParent(this.props,this.getViewBox())):null}}],i=[{key:"renderTickItem",value:function(t,n,r){return e.isValidElement(t)?e.cloneElement(t,n):mx(t)?t(n):e.createElement(EU,M0({},n,{className:"recharts-polar-radius-axis-tick-value"}),r)}}],o&&E0(r.prototype,o),i&&E0(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.PureComponent);function B0(e){return B0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B0(e)}function z0(){return z0=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},z0.apply(this,arguments)}function $0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$0(Object(n),!0).forEach((function(t){G0(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V0(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,Y0(r.key),r)}}function U0(e,t,n){return t=q0(t),function(e,t){if(t&&("object"===B0(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,H0()?Reflect.construct(t,n||[],q0(e).constructor):t.apply(e,n))}function H0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(H0=function(){return!!e})()}function q0(e){return q0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},q0(e)}function K0(e,t){return K0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K0(e,t)}function G0(e,t,n){return(t=Y0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y0(e){var t=function(e,t){if("object"!=B0(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=B0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==B0(t)?t:String(t)}_0(R0,"displayName","PolarRadiusAxis"),_0(R0,"axisType","radiusAxis"),_0(R0,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});var X0=Math.PI/180,Z0=1e-5,Q0=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),U0(this,n,arguments)}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K0(e,t)}(n,t),r=n,o=[{key:"getTickLineCoord",value:function(e){var t=this.props,n=t.cx,r=t.cy,o=t.radius,i=t.orientation,a=t.tickSize||8,u=uZ(n,r,o,e.coordinate),l=uZ(n,r,o+("inner"===i?-1:1)*a,e.coordinate);return{x1:u.x,y1:u.y,x2:l.x,y2:l.y}}},{key:"getTickTextAnchor",value:function(e){var t=this.props.orientation,n=Math.cos(-e.coordinate*X0);return n>Z0?"outer"===t?"start":"end":n<-Z0?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var t=this.props,n=t.cx,r=t.cy,o=t.radius,i=t.axisLine,a=t.axisLineType,u=W0(W0({},WR(this.props,!1)),{},{fill:"none"},WR(i,!1));if("circle"===a)return e.createElement(i0,z0({className:"recharts-polar-angle-axis-line"},u,{cx:n,cy:r,r:o}));var l=this.props.ticks.map((function(e){return uZ(n,r,o,e.coordinate)}));return e.createElement(r0,z0({className:"recharts-polar-angle-axis-line"},u,{points:l}))}},{key:"renderTicks",value:function(){var t=this,r=this.props,o=r.ticks,i=r.tick,a=r.tickLine,u=r.tickFormatter,l=r.stroke,s=WR(this.props,!1),c=WR(i,!1),d=W0(W0({},s),{},{fill:"none"},WR(a,!1)),f=o.map((function(r,o){var f=t.getTickLineCoord(r),h=W0(W0(W0({textAnchor:t.getTickTextAnchor(r)},s),{},{stroke:"none",fill:l},c),{},{index:o,payload:r,x:f.x2,y:f.y2});return e.createElement(JR,z0({className:"recharts-polar-angle-axis-tick",key:"tick-".concat(r.coordinate)},MR(t.props,r,o)),a&&e.createElement("line",z0({className:"recharts-polar-angle-axis-tick-line"},d,f)),i&&n.renderTickItem(i,h,u?u(r.value,o):r.value))}));return e.createElement(JR,{className:"recharts-polar-angle-axis-ticks"},f)}},{key:"render",value:function(){var t=this.props,n=t.ticks,r=t.radius,o=t.axisLine;return r<=0||!n||!n.length?null:e.createElement(JR,{className:"recharts-polar-angle-axis"},o&&this.renderAxisLine(),this.renderTicks())}}],i=[{key:"renderTickItem",value:function(t,n,r){return e.isValidElement(t)?e.cloneElement(t,n):mx(t)?t(n):e.createElement(EU,z0({},n,{className:"recharts-polar-angle-axis-tick-value"}),r)}}],o&&V0(r.prototype,o),i&&V0(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.PureComponent);G0(Q0,"displayName","PolarAngleAxis"),G0(Q0,"axisType","angleAxis"),G0(Q0,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var J0=dw,e1=hw;var t1=Ks((function(e){return!0===e||!1===e||e1(e)&&"[object Boolean]"==J0(e)}));function n1(e){return n1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n1(e)}function r1(){return r1=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},r1.apply(this,arguments)}function o1(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i1(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a1(Object(n),!0).forEach((function(t){l1(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a1(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l1(e,t,n){return t=function(e){var t=function(e,t){if("object"!=n1(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=n1(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n1(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s1,c1=function(e,t,n,r,o){var i,a=n-r;return i="M ".concat(e,",").concat(t),i+="L ".concat(e+n,",").concat(t),i+="L ".concat(e+n-a/2,",").concat(t+o),i+="L ".concat(e+n-a/2-r,",").concat(t+o),i+="L ".concat(e,",").concat(t," Z")},d1={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},f1=function(t){var n=u1(u1({},d1),t),r=e.useRef(),o=o1(e.useState(-1),2),i=o[0],a=o[1];e.useEffect((function(){if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&a(e)}catch(jde){}}),[]);var u=n.x,l=n.y,s=n.upperWidth,c=n.lowerWidth,d=n.height,f=n.className,h=n.animationEasing,v=n.animationDuration,p=n.animationBegin,m=n.isUpdateAnimationActive;if(u!==+u||l!==+l||s!==+s||c!==+c||d!==+d||0===s&&0===c||0===d)return null;var b=DF("recharts-trapezoid",f);return m?e.createElement(RJ,{canBegin:i>0,from:{upperWidth:0,lowerWidth:0,height:d,x:u,y:l},to:{upperWidth:s,lowerWidth:c,height:d,x:u,y:l},duration:v,animationEasing:h,isActive:m},(function(t){var o=t.upperWidth,a=t.lowerWidth,u=t.height,l=t.x,s=t.y;return e.createElement(RJ,{canBegin:i>0,from:"0px ".concat(-1===i?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,easing:h},e.createElement("path",r1({},WR(n,!0),{className:b,d:c1(l,s,o,a,u),ref:r})))})):e.createElement("g",null,e.createElement("path",r1({},WR(n,!0),{className:b,d:c1(u,l,s,c,d)})))},h1=["option","shapeType","propTransformer","activeClassName","isActive"];function v1(e){return v1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v1(e)}function p1(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m1(Object(n),!0).forEach((function(t){y1(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m1(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y1(e,t,n){return t=function(e){var t=function(e,t){if("object"!=v1(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=v1(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==v1(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g1(e,t){return b1(b1({},t),e)}function w1(t){var n=t.shapeType,r=t.elementProps;switch(n){case"rectangle":return e.createElement(YJ,r);case"trapezoid":return e.createElement(f1,r);case"sector":return e.createElement(XZ,r);case"symbols":if(function(e,t){return"symbols"===e}(n))return e.createElement(Vz,r);break;default:return null}}function x1(t){var n,r=t.option,o=t.shapeType,i=t.propTransformer,a=void 0===i?g1:i,u=t.activeClassName,l=void 0===u?"recharts-active-shape":u,s=t.isActive,c=p1(t,h1);if(e.isValidElement(r))n=e.cloneElement(r,b1(b1({},c),function(t){return e.isValidElement(t)?t.props:t}(r)));else if(mx(r))n=r(c);else if(Wx(r)&&!t1(r)){var d=a(r,c);n=e.createElement(w1,{shapeType:o,elementProps:d})}else{var f=c;n=e.createElement(w1,{shapeType:o,elementProps:f})}return s?e.createElement(JR,{className:l},n):n}function k1(e,t){return null!=t&&"trapezoids"in e.props}function O1(e,t){return null!=t&&"sectors"in e.props}function j1(e,t){return null!=t&&"points"in e.props}function S1(e,t){var n,r,o=e.x===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.x)||e.x===t.x,i=e.y===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.y)||e.y===t.y;return o&&i}function N1(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function M1(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function C1(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,o=function(e,t){var n;return k1(e,t)?n="trapezoids":O1(e,t)?n="sectors":j1(e,t)&&(n="points"),n}(n,t),i=function(e,t){var n,r;return k1(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:O1(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:j1(e,t)?t.payload:{}}(n,t),a=r.filter((function(e,r){var a=PY(i,e),u=n.props[o].filter((function(e){var r=function(e,t){var n;return k1(e,t)?n=S1:O1(e,t)?n=N1:j1(e,t)&&(n=M1),n}(n,t);return r(e,t)})),l=n.props[o].indexOf(u[u.length-1]);return a&&r===l}));return r.indexOf(a[a.length-1])}function A1(e){return A1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A1(e)}function T1(){return T1=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},T1.apply(this,arguments)}function E1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E1(Object(n),!0).forEach((function(t){B1(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E1(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P1(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,z1(r.key),r)}}function I1(e,t,n){return t=_1(t),function(e,t){if(t&&("object"===A1(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return F1(e)}(e,L1()?Reflect.construct(t,n||[],_1(e).constructor):t.apply(e,n))}function L1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L1=function(){return!!e})()}function _1(e){return _1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_1(e)}function F1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R1(e,t){return R1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R1(e,t)}function B1(e,t,n){return(t=z1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z1(e){var t=function(e,t){if("object"!=A1(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=A1(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==A1(t)?t:String(t)}var $1=function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),B1(F1(t=I1(this,n,[e])),"pieRef",null),B1(F1(t),"sectorRefs",[]),B1(F1(t),"id",pR("recharts-pie-")),B1(F1(t),"handleAnimationEnd",(function(){var e=t.props.onAnimationEnd;t.setState({isAnimationFinished:!0}),mx(e)&&e()})),B1(F1(t),"handleAnimationStart",(function(){var e=t.props.onAnimationStart;t.setState({isAnimationFinished:!1}),mx(e)&&e()})),t.state={isAnimationFinished:!e.isAnimationActive,prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,sectorToFocus:0},t}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R1(e,t)}(n,t),r=n,o=[{key:"isActiveIndex",value:function(e){var t=this.props.activeIndex;return Array.isArray(t)?-1!==t.indexOf(e):e===t}},{key:"hasActiveIndex",value:function(){var e=this.props.activeIndex;return Array.isArray(e)?0!==e.length:e||0===e}},{key:"renderLabels",value:function(t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.label,i=r.labelLine,a=r.dataKey,u=r.valueKey,l=WR(this.props,!1),s=WR(o,!1),c=WR(i,!1),d=o&&o.offsetRadius||20,f=t.map((function(t,r){var f=(t.startAngle+t.endAngle)/2,h=uZ(t.cx,t.cy,t.outerRadius+d,f),v=D1(D1(D1(D1({},l),t),{},{stroke:"none"},s),{},{index:r,textAnchor:n.getTextAnchor(h.x,t.cx)},h),p=D1(D1(D1(D1({},l),t),{},{fill:"none",stroke:t.fill},c),{},{index:r,points:[uZ(t.cx,t.cy,t.outerRadius,f),h],key:"line"}),m=a;return PF(a)&&PF(u)?m="value":PF(a)&&(m=u),e.createElement(JR,{key:"label-".concat(t.startAngle,"-").concat(t.endAngle)},i&&n.renderLabelLineItem(i,p),n.renderLabelItem(o,v,CX(t,m)))}));return e.createElement(JR,{className:"recharts-pie-labels"},f)}},{key:"renderSectorsStatically",value:function(t){var n=this,r=this.props,o=r.activeShape,i=r.blendStroke,a=r.inactiveShape;return t.map((function(r,u){if(0===(null==r?void 0:r.startAngle)&&0===(null==r?void 0:r.endAngle)&&1!==t.length)return null;var l=n.isActiveIndex(u),s=a&&n.hasActiveIndex()?a:null,c=l?o:s,d=D1(D1({},r),{},{stroke:i?r.fill:r.stroke,tabIndex:-1});return e.createElement(JR,T1({ref:function(e){e&&!n.sectorRefs.includes(e)&&n.sectorRefs.push(e)},tabIndex:-1,className:"recharts-pie-sector"},MR(n.props,r,u),{key:"sector-".concat(null==r?void 0:r.startAngle,"-").concat(null==r?void 0:r.endAngle,"-").concat(r.midAngle,"-").concat(u)}),e.createElement(x1,T1({option:c,isActive:l,shapeType:"sector"},d)))}))}},{key:"renderSectorsWithAnimation",value:function(){var t=this,n=this.props,r=n.sectors,o=n.isAnimationActive,i=n.animationBegin,a=n.animationDuration,u=n.animationEasing,l=n.animationId,s=this.state,c=s.prevSectors,d=s.prevIsAnimationActive;return e.createElement(RJ,{begin:i,duration:a,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(l,"-").concat(d),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},(function(n){var o=n.t,i=[],a=(r&&r[0]).startAngle;return r.forEach((function(e,t){var n=c&&c[t],r=t>0?KS(e,"paddingAngle",0):0;if(n){var u=yR(n.endAngle-n.startAngle,e.endAngle-e.startAngle),l=D1(D1({},e),{},{startAngle:a+r,endAngle:a+u(o)+r});i.push(l),a=l.endAngle}else{var s=e.endAngle,d=e.startAngle,f=yR(0,s-d)(o),h=D1(D1({},e),{},{startAngle:a+r,endAngle:a+f+r});i.push(h),a=h.endAngle}})),e.createElement(JR,null,t.renderSectorsStatically(i))}))}},{key:"attachKeyboardHandlers",value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case"ArrowLeft":var n=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case"ArrowRight":var r=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case"Escape":t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0})}}}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return!(n&&t&&t.length)||r&&PY(r,t)?this.renderSectorsStatically(t):this.renderSectorsWithAnimation()}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var t=this,n=this.props,r=n.hide,o=n.sectors,i=n.className,a=n.label,u=n.cx,l=n.cy,s=n.innerRadius,c=n.outerRadius,d=n.isAnimationActive,f=this.state.isAnimationFinished;if(r||!o||!o.length||!fR(u)||!fR(l)||!fR(s)||!fR(c))return null;var h=DF("recharts-pie",i);return e.createElement(JR,{tabIndex:this.props.rootTabIndex,className:h,ref:function(e){t.pieRef=e}},this.renderSectors(),a&&this.renderLabels(o),NZ.renderCallByParent(this.props,null,!1),(!d||f)&&$Z.renderCallByParent(this.props,o,!1))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return t.prevIsAnimationActive!==e.isAnimationActive?{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}:e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors!==t.curSectors?{curSectors:e.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e<t?"end":"middle"}},{key:"renderLabelLineItem",value:function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):mx(t)?t(n):e.createElement(uQ,T1({},n,{type:"linear",className:"recharts-pie-label-line"}))}},{key:"renderLabelItem",value:function(t,n,r){if(e.isValidElement(t))return e.cloneElement(t,n);var o=r;return mx(t)&&(o=t(n),e.isValidElement(o))?o:e.createElement(EU,T1({},n,{alignmentBaseline:"middle",className:"recharts-pie-label-text"}),o)}}],o&&P1(r.prototype,o),i&&P1(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.PureComponent);s1=$1,B1($1,"displayName","Pie"),B1($1,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!oV.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),B1($1,"parseDeltaAngle",(function(e,t){return cR(t-e)*Math.min(Math.abs(t-e),360)})),B1($1,"getRealPieData",(function(e){var t=e.props,n=t.data,r=t.children,o=WR(e.props,!1),i=FR(r,GV);return n&&n.length?n.map((function(e,t){return D1(D1(D1({payload:e},o),e),i&&i[t]&&i[t].props)})):i&&i.length?i.map((function(e){return D1(D1({},o),e.props)})):[]})),B1($1,"parseCoordinateOfPie",(function(e,t){var n=t.top,r=t.left,o=t.width,i=t.height,a=lZ(o,i);return{cx:r+mR(e.props.cx,o,o/2),cy:n+mR(e.props.cy,i,i/2),innerRadius:mR(e.props.innerRadius,a,0),outerRadius:mR(e.props.outerRadius,a,.8*a),maxRadius:e.props.maxRadius||Math.sqrt(o*o+i*i)/2}})),B1($1,"getComposedData",(function(e){var t=e.item,n=e.offset,r=s1.getRealPieData(t);if(!r||!r.length)return null;var o=t.props,i=o.cornerRadius,a=o.startAngle,u=o.endAngle,l=o.paddingAngle,s=o.dataKey,c=o.nameKey,d=o.valueKey,f=o.tooltipType,h=Math.abs(t.props.minAngle),v=s1.parseCoordinateOfPie(t,n),p=s1.parseDeltaAngle(a,u),m=Math.abs(p),b=s;PF(s)&&PF(d)?(eB(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),b="value"):PF(s)&&(eB(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),b=d);var y,g,w=r.filter((function(e){return 0!==CX(e,b,0)})).length,x=m-w*h-(m>=360?w:w-1)*l,k=r.reduce((function(e,t){var n=CX(t,b,0);return e+(fR(n)?n:0)}),0);k>0&&(y=r.map((function(e,t){var n,r=CX(e,b,0),o=CX(e,c,t),u=(fR(r)?r:0)/k,s=(n=t?g.endAngle+cR(p)*l*(0!==r?1:0):a)+cR(p)*((0!==r?h:0)+u*x),d=(n+s)/2,m=(v.innerRadius+v.outerRadius)/2,y=[{name:o,value:r,payload:e,dataKey:b,type:f}],w=uZ(v.cx,v.cy,m,d);return g=D1(D1(D1({percent:u,cornerRadius:i,name:o,tooltipPayload:y,midAngle:d,middleRadius:m,tooltipPosition:w},e),v),{},{value:CX(e,b),startAngle:n,endAngle:s,payload:e,paddingAngle:cR(p)*l})})));return D1(D1({},v),{},{sectors:y,data:r})}));var W1=Math.ceil,V1=Math.max;var U1=function(e,t,n,r){for(var o=-1,i=V1(W1((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a},H1=TV,q1=1/0;var K1=function(e){return e?(e=H1(e))===q1||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},G1=U1,Y1=NW,X1=K1;var Z1=function(e){return function(t,n,r){return r&&"number"!=typeof r&&Y1(t,n,r)&&(n=r=void 0),t=X1(t),void 0===n?(n=t,t=0):n=X1(n),r=void 0===r?t<n?1:-1:X1(r),G1(t,n,r,e)}},Q1=Ks(Z1());function J1(e){return J1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J1(e)}function e2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?e2(Object(n),!0).forEach((function(t){n2(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e2(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function n2(e,t,n){return t=function(e){var t=function(e,t){if("object"!=J1(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=J1(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==J1(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r2=["Webkit","Moz","O","ms"];function o2(e){return o2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o2(e)}function i2(){return i2=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},i2.apply(this,arguments)}function a2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a2(Object(n),!0).forEach((function(t){v2(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a2(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l2(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,p2(r.key),r)}}function s2(e,t,n){return t=d2(t),function(e,t){if(t&&("object"===o2(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f2(e)}(e,c2()?Reflect.construct(t,n||[],d2(e).constructor):t.apply(e,n))}function c2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c2=function(){return!!e})()}function d2(e){return d2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d2(e)}function f2(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h2(e,t){return h2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h2(e,t)}function v2(e,t,n){return(t=p2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p2(e){var t=function(e,t){if("object"!=o2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o2(t)?t:String(t)}var m2=function(e){return e.changedTouches&&!!e.changedTouches.length},b2=function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),v2(f2(t=s2(this,n,[e])),"handleDrag",(function(e){t.leaveTimer&&(clearTimeout(t.leaveTimer),t.leaveTimer=null),t.state.isTravellerMoving?t.handleTravellerMove(e):t.state.isSlideMoving&&t.handleSlideDrag(e)})),v2(f2(t),"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleDrag(e.changedTouches[0])})),v2(f2(t),"handleDragEnd",(function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1},(function(){var e=t.props,n=e.endIndex,r=e.onDragEnd,o=e.startIndex;null==r||r({endIndex:n,startIndex:o})})),t.detachDragEndListener()})),v2(f2(t),"handleLeaveWrapper",(function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.setTimeout(t.handleDragEnd,t.props.leaveTimeOut))})),v2(f2(t),"handleEnterSlideOrTraveller",(function(){t.setState({isTextActive:!0})})),v2(f2(t),"handleLeaveSlideOrTraveller",(function(){t.setState({isTextActive:!1})})),v2(f2(t),"handleSlideDragStart",(function(e){var n=m2(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:n.pageX}),t.attachDragEndListener()})),t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(f2(t),"startX"),endX:t.handleTravellerDragStart.bind(f2(t),"endX")},t.state={},t}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h2(e,t)}(n,t),r=n,o=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,r=e.endX,o=this.state.scaleValues,i=this.props,a=i.gap,u=i.data.length-1,l=Math.min(t,r),s=Math.max(t,r),c=n.getIndexInRange(o,l),d=n.getIndexInRange(o,s);return{startIndex:c-c%a,endIndex:d===u?u:d-d%a}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,o=t.dataKey,i=CX(n[e],o,e);return mx(r)?r(i,e):i}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,o=t.endX,i=this.props,a=i.x,u=i.width,l=i.travellerWidth,s=i.startIndex,c=i.endIndex,d=i.onChange,f=e.pageX-n;f>0?f=Math.min(f,a+u-l-o,a+u-l-r):f<0&&(f=Math.max(f,a-r,a-o));var h=this.getIndex({startX:r+f,endX:o+f});h.startIndex===s&&h.endIndex===c||!d||d(h),this.setState({startX:r+f,endX:o+f,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=m2(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,o=t.endX,i=t.startX,a=this.state[r],u=this.props,l=u.x,s=u.width,c=u.travellerWidth,d=u.onChange,f=u.gap,h=u.data,v={startX:this.state.startX,endX:this.state.endX},p=e.pageX-n;p>0?p=Math.min(p,l+s-c-a):p<0&&(p=Math.max(p,l-a)),v[r]=a+p;var m=this.getIndex(v),b=m.startIndex,y=m.endIndex;this.setState(v2(v2({},r,a+p),"brushMoveStartX",e.pageX),(function(){var e;d&&(e=h.length-1,("startX"===r&&(o>i?b%f==0:y%f==0)||o<i&&y===e||"endX"===r&&(o>i?y%f==0:b%f==0)||o>i&&y===e)&&d(m))}))}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var n=this,r=this.state,o=r.scaleValues,i=r.startX,a=r.endX,u=this.state[t],l=o.indexOf(u);if(-1!==l){var s=l+e;if(!(-1===s||s>=o.length)){var c=o[s];"startX"===t&&c>=a||"endX"===t&&c<=i||this.setState(v2({},t,c),(function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))}))}}}},{key:"renderBackground",value:function(){var t=this.props,n=t.x,r=t.y,o=t.width,i=t.height,a=t.fill,u=t.stroke;return e.createElement("rect",{stroke:u,fill:a,x:n,y:r,width:o,height:i})}},{key:"renderPanorama",value:function(){var t=this.props,n=t.x,r=t.y,o=t.width,i=t.height,a=t.data,u=t.children,l=t.padding,s=e.Children.only(u);return s?e.cloneElement(s,{x:n,y:r,width:o,height:i,margin:l,compact:!0,data:a}):null}},{key:"renderTravellerLayer",value:function(t,r){var o=this,i=this.props,a=i.y,u=i.travellerWidth,l=i.height,s=i.traveller,c=i.ariaLabel,d=i.data,f=i.startIndex,h=i.endIndex,v=Math.max(t,this.props.x),p=u2(u2({},WR(this.props,!1)),{},{x:v,y:a,width:u,height:l}),m=c||"Min value: ".concat(d[f].name,", Max value: ").concat(d[h].name);return e.createElement(JR,{tabIndex:0,role:"slider","aria-label":m,"aria-valuenow":t,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),o.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,r))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(s,p))}},{key:"renderSlide",value:function(t,n){var r=this.props,o=r.y,i=r.height,a=r.stroke,u=r.travellerWidth,l=Math.min(t,n)+u,s=Math.max(Math.abs(n-t)-u,0);return e.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:a,fillOpacity:.2,x:l,y:o,width:s,height:i})}},{key:"renderText",value:function(){var t=this.props,n=t.startIndex,r=t.endIndex,o=t.y,i=t.height,a=t.travellerWidth,u=t.stroke,l=this.state,s=l.startX,c=l.endX,d={pointerEvents:"none",fill:u};return e.createElement(JR,{className:"recharts-brush-texts"},e.createElement(EU,i2({textAnchor:"end",verticalAnchor:"middle",x:Math.min(s,c)-5,y:o+i/2},d),this.getTextOfTick(n)),e.createElement(EU,i2({textAnchor:"start",verticalAnchor:"middle",x:Math.max(s,c)+a+5,y:o+i/2},d),this.getTextOfTick(r)))}},{key:"render",value:function(){var t=this.props,n=t.data,r=t.className,o=t.children,i=t.x,a=t.y,u=t.width,l=t.height,s=t.alwaysShowText,c=this.state,d=c.startX,f=c.endX,h=c.isTextActive,v=c.isSlideMoving,p=c.isTravellerMoving,m=c.isTravellerFocused;if(!n||!n.length||!fR(i)||!fR(a)||!fR(u)||!fR(l)||u<=0||l<=0)return null;var b=DF("recharts-brush",r),y=1===e.Children.count(o),g=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,(function(e){return e.toUpperCase()})),r=r2.reduce((function(e,r){return t2(t2({},e),{},n2({},r+n,t))}),{});return r[e]=t,r}("userSelect","none");return e.createElement(JR,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:g},this.renderBackground(),y&&this.renderPanorama(),this.renderSlide(d,f),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(f,"endX"),(h||v||p||m||s)&&this.renderText())}}],i=[{key:"renderDefaultTraveller",value:function(t){var n=t.x,r=t.y,o=t.width,i=t.height,a=t.stroke,u=Math.floor(r+i/2)-1;return e.createElement(e.Fragment,null,e.createElement("rect",{x:n,y:r,width:o,height:i,fill:a,stroke:"none"}),e.createElement("line",{x1:n+1,y1:u,x2:n+o-1,y2:u,fill:"none",stroke:"#fff"}),e.createElement("line",{x1:n+1,y1:u+2,x2:n+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(t,r){return e.isValidElement(t)?e.cloneElement(t,r):mx(t)?t(r):n.renderDefaultTraveller(r)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,o=e.x,i=e.travellerWidth,a=e.updateId,u=e.startIndex,l=e.endIndex;if(n!==t.prevData||a!==t.prevUpdateId)return u2({prevData:n,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:r},n&&n.length?function(e){var t=e.data,n=e.startIndex,r=e.endIndex,o=e.x,i=e.width,a=e.travellerWidth;if(!t||!t.length)return{};var u=t.length,l=uH().domain(Q1(0,u)).range([o,o+i-a]),s=l.domain().map((function(e){return l(e)}));return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(n),endX:l(r),scale:l,scaleValues:s}}({data:n,width:r,x:o,travellerWidth:i,startIndex:u,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||o!==t.prevX||i!==t.prevTravellerWidth)){t.scale.range([o,o+r-i]);var s=t.scale.domain().map((function(e){return t.scale(e)}));return{prevData:n,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:s}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=0,r=e.length-1;r-n>1;){var o=Math.floor((n+r)/2);e[o]>t?r=o:n=o}return t>=e[r]?r:n}}],o&&l2(r.prototype,o),i&&l2(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.PureComponent);v2(b2,"displayName","Brush"),v2(b2,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var y2=CN;var g2=function(e,t){var n;return y2(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n},w2=TO,x2=SN,k2=g2,O2=fw,j2=NW;var S2=function(e,t,n){var r=O2(e)?w2:k2;return n&&j2(e,t,n)&&(t=void 0),r(e,x2(t))},N2=Ks(S2),M2=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},C2=YN,A2=Nx,T2=SN;var E2=function(e,t){var n={};return t=T2(t),A2(e,(function(e,r,o){C2(n,r,t(e,r,o))})),n},D2=Ks(E2);var P2=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},I2=CN;var L2=function(e,t){var n=!0;return I2(e,(function(e,r,o){return n=!!t(e,r,o)})),n},_2=P2,F2=L2,R2=SN,B2=fw,z2=NW;var $2=function(e,t,n){var r=B2(e)?_2:F2;return n&&z2(e,t,n)&&(t=void 0),r(e,R2(t))},W2=Ks($2),V2=["x","y"];function U2(e){return U2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U2(e)}function H2(){return H2=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},H2.apply(this,arguments)}function q2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q2(Object(n),!0).forEach((function(t){G2(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q2(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function G2(e,t,n){return t=function(e){var t=function(e,t){if("object"!=U2(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=U2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==U2(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y2(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function X2(e,t){var n=e.x,r=e.y,o=Y2(e,V2),i="".concat(n),a=parseInt(i,10),u="".concat(r),l=parseInt(u,10),s="".concat(t.height||o.height),c=parseInt(s,10),d="".concat(t.width||o.width),f=parseInt(d,10);return K2(K2(K2(K2(K2({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:c,width:f,name:t.name,radius:t.radius})}function Z2(t){return e.createElement(x1,H2({shapeType:"rectangle",propTransformer:X2,activeClassName:"recharts-active-bar"},t))}var Q2,J2=["value","background"];function e5(e){return e5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e5(e)}function t5(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function n5(){return n5=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},n5.apply(this,arguments)}function r5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r5(Object(n),!0).forEach((function(t){d5(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i5(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,f5(r.key),r)}}function a5(e,t,n){return t=l5(t),function(e,t){if(t&&("object"===e5(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s5(e)}(e,u5()?Reflect.construct(t,n||[],l5(e).constructor):t.apply(e,n))}function u5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u5=function(){return!!e})()}function l5(e){return l5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l5(e)}function s5(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c5(e,t){return c5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c5(e,t)}function d5(e,t,n){return(t=f5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f5(e){var t=function(e,t){if("object"!=e5(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=e5(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==e5(t)?t:String(t)}var h5=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return d5(s5(e=a5(this,n,[].concat(r))),"state",{isAnimationFinished:!1}),d5(s5(e),"id",pR("recharts-bar-")),d5(s5(e),"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()})),d5(s5(e),"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()})),e}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c5(e,t)}(n,t),r=n,o=[{key:"renderRectanglesStatically",value:function(t){var n=this,r=this.props,o=r.shape,i=r.dataKey,a=r.activeIndex,u=r.activeBar,l=WR(this.props,!1);return t&&t.map((function(t,r){var s=r===a,c=s?u:o,d=o5(o5(o5({},l),t),{},{isActive:s,option:c,index:r,dataKey:i,onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd});return e.createElement(JR,n5({className:"recharts-bar-rectangle"},MR(n.props,t,r),{key:"rectangle-".concat(null==t?void 0:t.x,"-").concat(null==t?void 0:t.y,"-").concat(null==t?void 0:t.value)}),e.createElement(Z2,d))}))}},{key:"renderRectanglesWithAnimation",value:function(){var t=this,n=this.props,r=n.data,o=n.layout,i=n.isAnimationActive,a=n.animationBegin,u=n.animationDuration,l=n.animationEasing,s=n.animationId,c=this.state.prevData;return e.createElement(RJ,{begin:a,duration:u,isActive:i,easing:l,from:{t:0},to:{t:1},key:"bar-".concat(s),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(n){var i=n.t,a=r.map((function(e,t){var n=c&&c[t];if(n){var r=yR(n.x,e.x),a=yR(n.y,e.y),u=yR(n.width,e.width),l=yR(n.height,e.height);return o5(o5({},e),{},{x:r(i),y:a(i),width:u(i),height:l(i)})}if("horizontal"===o){var s=yR(0,e.height)(i);return o5(o5({},e),{},{y:e.y+e.height-s,height:s})}var d=yR(0,e.width)(i);return o5(o5({},e),{},{width:d})}));return e.createElement(JR,null,t.renderRectanglesStatically(a))}))}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return!(n&&t&&t.length)||r&&PY(r,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var t=this,n=this.props,r=n.data,o=n.dataKey,i=n.activeIndex,a=WR(this.props.background,!1);return r.map((function(n,r){n.value;var u=n.background,l=t5(n,J2);if(!u)return null;var s=o5(o5(o5(o5(o5({},l),{},{fill:"#eee"},u),a),MR(t.props,n,r)),{},{onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd,dataKey:o,index:r,key:"background-bar-".concat(r),className:"recharts-bar-background-rectangle"});return e.createElement(Z2,n5({option:t.props.background,isActive:r===i},s))}))}},{key:"renderErrorBar",value:function(t,n){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.data,i=r.xAxis,a=r.yAxis,u=r.layout,l=FR(r.children,mX);if(!l)return null;var s="vertical"===u?o[0].height/2:o[0].width/2,c=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:CX(e,t)}},d={clipPath:t?"url(#clipPath-".concat(n,")"):null};return e.createElement(JR,d,l.map((function(t){return e.cloneElement(t,{key:"error-bar-".concat(n,"-").concat(t.props.dataKey),data:o,xAxis:i,yAxis:a,layout:u,offset:s,dataPointFormatter:c})})))}},{key:"render",value:function(){var t=this.props,n=t.hide,r=t.data,o=t.className,i=t.xAxis,a=t.yAxis,u=t.left,l=t.top,s=t.width,c=t.height,d=t.isAnimationActive,f=t.background,h=t.id;if(n||!r||!r.length)return null;var v=this.state.isAnimationFinished,p=DF("recharts-bar",o),m=i&&i.allowDataOverflow,b=a&&a.allowDataOverflow,y=m||b,g=PF(h)?this.id:h;return e.createElement(JR,{className:p},m||b?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(g)},e.createElement("rect",{x:m?u:u-s/2,y:b?l:l-c/2,width:m?s:2*s,height:b?c:2*c}))):null,e.createElement(JR,{className:"recharts-bar-rectangles",clipPath:y?"url(#clipPath-".concat(g,")"):null},f?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(y,g),(!d||v)&&$Z.renderCallByParent(this.props,r))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],o&&i5(r.prototype,o),i&&i5(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.PureComponent);function v5(e){return v5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v5(e)}function p5(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,g5(r.key),r)}}function m5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m5(Object(n),!0).forEach((function(t){y5(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y5(e,t,n){return(t=g5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g5(e){var t=function(e,t){if("object"!=v5(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=v5(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==v5(t)?t:String(t)}Q2=h5,d5(h5,"displayName","Bar"),d5(h5,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!oV.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),d5(h5,"getComposedData",(function(e){var t=e.props,n=e.item,r=e.barPosition,o=e.bandSize,i=e.xAxis,a=e.yAxis,u=e.xAxisTicks,l=e.yAxisTicks,s=e.stackedData,c=e.dataStartIndex,d=e.displayedData,f=e.offset,h=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null}(r,n);if(!h)return null;var v=t.layout,p=n.props,m=p.dataKey,b=p.children,y=p.minPointSize,g="horizontal"===v?a:i,w=s?g.scale.domain():null,x=function(e){var t=e.numericAxis,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return r<=0&&o>=0?0:o<0?o:r}return n[0]}({numericAxis:g}),k=FR(b,GV),O=d.map((function(e,t){var r,d,f,p,b,g;s?r=function(e,t){if(!t||2!==t.length||!fR(t[0])||!fR(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!fR(e[0])||e[0]<n)&&(o[0]=n),(!fR(e[1])||e[1]>r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]<n&&(o[1]=n),o}(s[c+t],w):(r=CX(e,m),Array.isArray(r)||(r=[x,r]));var O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(n,r){if("number"==typeof e)return e;var o="number"==typeof n;return o?e(n,r):(o||cX(!1),t)}}(y,Q2.defaultProps.minPointSize)(r[1],t);if("horizontal"===v){var j,S=[a.scale(r[0]),a.scale(r[1])],N=S[0],M=S[1];d=HX({axis:i,ticks:u,bandSize:o,offset:h.offset,entry:e,index:t}),f=null!==(j=null!=M?M:N)&&void 0!==j?j:void 0,p=h.size;var C=N-M;if(b=Number.isNaN(C)?0:C,g={x:d,y:a.y,width:p,height:a.height},Math.abs(O)>0&&Math.abs(b)<Math.abs(O)){var A=cR(b||O)*(Math.abs(O)-Math.abs(b));f-=A,b+=A}}else{var T=[i.scale(r[0]),i.scale(r[1])],E=T[0],D=T[1];if(d=E,f=HX({axis:a,ticks:l,bandSize:o,offset:h.offset,entry:e,index:t}),p=D-E,b=h.size,g={x:i.x,y:f,width:i.width,height:b},Math.abs(O)>0&&Math.abs(p)<Math.abs(O))p+=cR(p||O)*(Math.abs(O)-Math.abs(p))}return o5(o5(o5({},e),{},{x:d,y:f,width:p,height:b,value:s?r:r[1],payload:e,background:g},k&&k[t]&&k[t].props),{},{tooltipPayload:[QX(n,e)],tooltipPosition:{x:d+p/2,y:f+b/2}})}));return o5({data:O,layout:v},f)}));var w5=function(e,t,n,r,o){var i=e.width,a=e.height,u=e.layout,l=e.children,s=Object.keys(t),c={left:n.left,leftMirror:n.left,right:i-n.right,rightMirror:i-n.right,top:n.top,topMirror:n.top,bottom:a-n.bottom,bottomMirror:a-n.bottom},d=!!RR(l,h5);return s.reduce((function(i,a){var l,s,f,h,v,p=t[a],m=p.orientation,b=p.domain,y=p.padding,g=void 0===y?{}:y,w=p.mirror,x=p.reversed,k="".concat(m).concat(w?"Mirror":"");if("number"===p.type&&("gap"===p.padding||"no-gap"===p.padding)){var O=b[1]-b[0],j=1/0,S=p.categoricalDomain.sort();S.forEach((function(e,t){t>0&&(j=Math.min((e||0)-(S[t-1]||0),j))}));var N=j/O,M="vertical"===p.layout?n.height:n.width;if("gap"===p.padding&&(l=N*M/2),"no-gap"===p.padding){var C=mR(e.barCategoryGap,N*M),A=N*M/2;l=A-C-(A-C)/M*C}}s="xAxis"===r?[n.left+(g.left||0)+(l||0),n.left+n.width-(g.right||0)-(l||0)]:"yAxis"===r?"horizontal"===u?[n.top+n.height-(g.bottom||0),n.top+(g.top||0)]:[n.top+(g.top||0)+(l||0),n.top+n.height-(g.bottom||0)-(l||0)]:p.range,x&&(s=[s[1],s[0]]);var T=RX(p,o,d),E=T.scale,D=T.realScaleType;E.domain(b).range(s),zX(E);var P=VX(E,b5(b5({},p),{},{realScaleType:D}));"xAxis"===r?(v="top"===m&&!w||"bottom"===m&&w,f=n.left,h=c[k]-v*p.height):"yAxis"===r&&(v="left"===m&&!w||"right"===m&&w,f=c[k]-v*p.width,h=n.top);var I=b5(b5(b5({},p),P),{},{realScaleType:D,x:f,y:h,scale:E,width:"xAxis"===r?n.width:p.width,height:"yAxis"===r?n.height:p.height});return I.bandSize=XX(I,P),p.hide||"xAxis"!==r?p.hide||(c[k]+=(v?-1:1)*I.width):c[k]+=(v?-1:1)*I.height,b5(b5({},i),{},y5({},a,I))}),{})},x5=function(e,t){var n=e.x,r=e.y,o=t.x,i=t.y;return{x:Math.min(n,o),y:Math.min(r,i),width:Math.abs(o-n),height:Math.abs(i-r)}},k5=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scale=t}var t,n,r;return t=e,n=[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o;case"end":var i=this.bandwidth?this.bandwidth():0;return this.scale(e)+i}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],r=[{key:"create",value:function(t){return new e(t)}}],n&&p5(t.prototype,n),r&&p5(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();y5(k5,"EPS",1e-4);var O5=function(e){var t=Object.keys(e).reduce((function(t,n){return b5(b5({},t),{},y5({},n,k5.create(e[n])))}),{});return b5(b5({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,o=n.position;return D2(e,(function(e,n){return t[n].apply(e,{bandAware:r,position:o})}))},isInRange:function(e){return W2(e,(function(e,n){return t[n].isInRange(e)}))}})};var j5=function(e){var t=e.width,n=e.height,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),o=r*Math.PI/180,i=Math.atan(n/t),a=o>i&&o<Math.PI-i?n/Math.sin(o):t/Math.cos(o);return Math.abs(a)},S5=SN,N5=gx,M5=Ox;var C5=function(e){return function(t,n,r){var o=Object(t);if(!N5(t)){var i=S5(n);t=M5(t),n=function(e){return i(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[i?t[a]:a]:void 0}},A5=K1;var T5=n$,E5=SN,D5=function(e){var t=A5(e),n=t%1;return t==t?n?t-n:t:0},P5=Math.max;var I5=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:D5(n);return o<0&&(o=P5(r+o,0)),T5(e,E5(t),o)},L5=Ks(C5(I5)),_5=wS((function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}}),(function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")})),F5=e.createContext(void 0),R5=e.createContext(void 0),B5=e.createContext(void 0),z5=e.createContext({}),$5=e.createContext(void 0),W5=e.createContext(0),V5=e.createContext(0),U5=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,i=n.offset,a=t.clipPathId,u=t.children,l=t.width,s=t.height,c=_5(i);return e.createElement(F5.Provider,{value:r},e.createElement(R5.Provider,{value:o},e.createElement(z5.Provider,{value:i},e.createElement(B5.Provider,{value:c},e.createElement($5.Provider,{value:a},e.createElement(W5.Provider,{value:s},e.createElement(V5.Provider,{value:l},u)))))))},H5=function(t){var n=e.useContext(F5);null==n&&cX(!1);var r=n[t];return null==r&&cX(!1),r},q5=function(t){var n=e.useContext(R5);null==n&&cX(!1);var r=n[t];return null==r&&cX(!1),r},K5=function(){return e.useContext(V5)},G5=function(){return e.useContext(W5)};function Y5(e){return Y5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y5(e)}function X5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X5(Object(n),!0).forEach((function(t){Q5(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q5(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Y5(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Y5(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Y5(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J5(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return e3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e3(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e3(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t3(){return t3=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},t3.apply(this,arguments)}function n3(t){var n=t.x,r=t.y,o=t.segment,i=t.xAxisId,a=t.yAxisId,u=t.shape,l=t.className,s=t.alwaysShow,c=e.useContext($5),d=H5(i),f=q5(a),h=e.useContext(B5);if(!c||!h)return null;eB(void 0===s,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var v=function(e,t,n,r,o,i,a,u,l){var s=o.x,c=o.y,d=o.width,f=o.height;if(n){var h=l.y,v=e.y.apply(h,{position:i});if(M2(l,"discard")&&!e.y.isInRange(v))return null;var p=[{x:s+d,y:v},{x:s,y:v}];return"left"===u?p.reverse():p}if(t){var m=l.x,b=e.x.apply(m,{position:i});if(M2(l,"discard")&&!e.x.isInRange(b))return null;var y=[{x:b,y:c+f},{x:b,y:c}];return"top"===a?y.reverse():y}if(r){var g=l.segment.map((function(t){return e.apply(t,{position:i})}));return M2(l,"discard")&&N2(g,(function(t){return!e.isInRange(t)}))?null:g}return null}(O5({x:d.scale,y:f.scale}),hR(n),hR(r),o&&2===o.length,h,t.position,d.orientation,f.orientation,t);if(!v)return null;var p=J5(v,2),m=p[0],b=m.x,y=m.y,g=p[1],w=g.x,x=g.y,k=Z5(Z5({clipPath:M2(t,"hidden")?"url(#".concat(c,")"):void 0},WR(t,!0)),{},{x1:b,y1:y,x2:w,y2:x});return e.createElement(JR,{className:DF("recharts-reference-line",l)},function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):mx(t)?t(n):e.createElement("line",t3({},n,{className:"recharts-reference-line-line"}))}(u,k),NZ.renderCallByParent(t,function(e){var t=e.x1,n=e.y1,r=e.x2,o=e.y2;return x5({x:t,y:n},{x:r,y:o})}({x1:b,y1:y,x2:w,y2:x})))}function r3(e){return r3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r3(e)}function o3(){return o3=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},o3.apply(this,arguments)}function i3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i3(Object(n),!0).forEach((function(t){u3(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u3(e,t,n){return t=function(e){var t=function(e,t){if("object"!=r3(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=r3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r3(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n3.displayName="ReferenceLine",n3.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"};function l3(t){var n=t.x,r=t.y,o=t.r,i=t.alwaysShow,a=t.clipPathId,u=hR(n),l=hR(r);if(eB(void 0===i,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!l)return null;var s=function(e){var t=e.x,n=e.y,r=e.xAxis,o=e.yAxis,i=O5({x:r.scale,y:o.scale}),a=i.apply({x:t,y:n},{bandAware:!0});return M2(e,"discard")&&!i.isInRange(a)?null:a}(t);if(!s)return null;var c=s.x,d=s.y,f=t.shape,h=t.className,v=a3(a3({clipPath:M2(t,"hidden")?"url(#".concat(a,")"):void 0},WR(t,!0)),{},{cx:c,cy:d});return e.createElement(JR,{className:DF("recharts-reference-dot",h)},l3.renderDot(f,v),NZ.renderCallByParent(t,{x:c-o,y:d-o,width:2*o,height:2*o}))}function s3(e){return s3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s3(e)}function c3(){return c3=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},c3.apply(this,arguments)}function d3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d3(Object(n),!0).forEach((function(t){h3(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h3(e,t,n){return t=function(e){var t=function(e,t){if("object"!=s3(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s3(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}l3.displayName="ReferenceDot",l3.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1},l3.renderDot=function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):mx(t)?t(n):e.createElement(i0,o3({},n,{cx:n.cx,cy:n.cy,className:"recharts-reference-dot-dot"}))};function v3(t){var n=t.x1,r=t.x2,o=t.y1,i=t.y2,a=t.className,u=t.alwaysShow,l=t.clipPathId;eB(void 0===u,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var s=hR(n),c=hR(r),d=hR(o),f=hR(i),h=t.shape;if(!(s||c||d||f||h))return null;var v=function(e,t,n,r,o){var i=o.x1,a=o.x2,u=o.y1,l=o.y2,s=o.xAxis,c=o.yAxis;if(!s||!c)return null;var d=O5({x:s.scale,y:c.scale}),f={x:e?d.x.apply(i,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(u,{position:"start"}):d.y.rangeMin},h={x:t?d.x.apply(a,{position:"end"}):d.x.rangeMax,y:r?d.y.apply(l,{position:"end"}):d.y.rangeMax};return!M2(o,"discard")||d.isInRange(f)&&d.isInRange(h)?x5(f,h):null}(s,c,d,f,t);if(!v&&!h)return null;var p=M2(t,"hidden")?"url(#".concat(l,")"):void 0;return e.createElement(JR,{className:DF("recharts-reference-area",a)},v3.renderRect(h,f3(f3({clipPath:p},WR(t,!0)),v)),NZ.renderCallByParent(t,v))}function p3(e,t,n){if(t<1)return[];if(1===t&&void 0===n)return e;for(var r=[],o=0;o<e.length;o+=t){if(void 0!==n&&!0!==n(e[o]))return;r.push(e[o])}return r}function m3(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function b3(e){return b3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b3(e)}function y3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y3(Object(n),!0).forEach((function(t){w3(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w3(e,t,n){return t=function(e){var t=function(e,t){if("object"!=b3(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=b3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==b3(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x3(e,t,n){var r=e.tick,o=e.ticks,i=e.viewBox,a=e.minTickGap,u=e.orientation,l=e.interval,s=e.tickFormatter,c=e.unit,d=e.angle;if(!o||!o.length||!r)return[];if(fR(l)||oV.isSsr)return function(e,t){return p3(e,t+1)}(o,"number"==typeof l&&fR(l)?l:0);var f=[],h="top"===u||"bottom"===u?"width":"height",v=c&&"width"===h?nU(c,{fontSize:t,letterSpacing:n}):{width:0,height:0},p=function(e,r){var o=mx(s)?s(e.value,r):e.value;return"width"===h?function(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return j5(r,n)}(nU(o,{fontSize:t,letterSpacing:n}),v,d):nU(o,{fontSize:t,letterSpacing:n})[h]},m=o.length>=2?cR(o[1].coordinate-o[0].coordinate):1,b=function(e,t,n){var r="width"===n,o=e.x,i=e.y,a=e.width,u=e.height;return 1===t?{start:r?o:i,end:r?o+a:i+u}:{start:r?o+a:i+u,end:r?o:i}}(i,m,h);return"equidistantPreserveStart"===l?function(e,t,n,r,o){for(var i,a=(r||[]).slice(),u=t.start,l=t.end,s=0,c=1,d=u,f=function(){var t=null==r?void 0:r[s];if(void 0===t)return{v:p3(r,c)};var i,a=s,f=function(){return void 0===i&&(i=n(t,a)),i},h=t.coordinate,v=0===s||m3(e,h,f,d,l);v||(s=0,d=u,c+=1),v&&(d=h+e*(f()/2+o),s+=c)};c<=a.length;)if(i=f())return i.v;return[]}(m,b,p,o,a):(f="preserveStart"===l||"preserveStartEnd"===l?function(e,t,n,r,o,i){var a=(r||[]).slice(),u=a.length,l=t.start,s=t.end;if(i){var c=r[u-1],d=n(c,u-1),f=e*(c.coordinate+e*d/2-s);a[u-1]=c=g3(g3({},c),{},{tickCoord:f>0?c.coordinate-f*e:c.coordinate}),m3(e,c.tickCoord,(function(){return d}),l,s)&&(s=c.tickCoord-e*(d/2+o),a[u-1]=g3(g3({},c),{},{isShow:!0}))}for(var h=i?u-1:u,v=function(t){var r,i=a[t],u=function(){return void 0===r&&(r=n(i,t)),r};if(0===t){var c=e*(i.coordinate-e*u()/2-l);a[t]=i=g3(g3({},i),{},{tickCoord:c<0?i.coordinate-c*e:i.coordinate})}else a[t]=i=g3(g3({},i),{},{tickCoord:i.coordinate});m3(e,i.tickCoord,u,l,s)&&(l=i.tickCoord+e*(u()/2+o),a[t]=g3(g3({},i),{},{isShow:!0}))},p=0;p<h;p++)v(p);return a}(m,b,p,o,a,"preserveStartEnd"===l):function(e,t,n,r,o){for(var i=(r||[]).slice(),a=i.length,u=t.start,l=t.end,s=function(t){var r,s=i[t],c=function(){return void 0===r&&(r=n(s,t)),r};if(t===a-1){var d=e*(s.coordinate+e*c()/2-l);i[t]=s=g3(g3({},s),{},{tickCoord:d>0?s.coordinate-d*e:s.coordinate})}else i[t]=s=g3(g3({},s),{},{tickCoord:s.coordinate});m3(e,s.tickCoord,c,u,l)&&(l=s.tickCoord-e*(c()/2+o),i[t]=g3(g3({},s),{},{isShow:!0}))},c=a-1;c>=0;c--)s(c);return i}(m,b,p,o,a),f.filter((function(e){return e.isShow})))}v3.displayName="ReferenceArea",v3.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1},v3.renderRect=function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):mx(t)?t(n):e.createElement(YJ,c3({},n,{className:"recharts-reference-area-rect"}))};var k3=["viewBox"],O3=["viewBox"],j3=["ticks"];function S3(e){return S3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S3(e)}function N3(){return N3=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},N3.apply(this,arguments)}function M3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M3(Object(n),!0).forEach((function(t){L3(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A3(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function T3(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,_3(r.key),r)}}function E3(e,t,n){return t=P3(t),function(e,t){if(t&&("object"===S3(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,D3()?Reflect.construct(t,n||[],P3(e).constructor):t.apply(e,n))}function D3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D3=function(){return!!e})()}function P3(e){return P3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P3(e)}function I3(e,t){return I3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I3(e,t)}function L3(e,t,n){return(t=_3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _3(e){var t=function(e,t){if("object"!=S3(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=S3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==S3(t)?t:String(t)}var F3=function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=E3(this,n,[e])).state={fontSize:"",letterSpacing:""},t}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I3(e,t)}(n,t),r=n,o=[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=A3(e,k3),o=this.props,i=o.viewBox,a=A3(o,O3);return!wR(n,i)||!wR(r,a)||!wR(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,n,r,o,i,a,u=this.props,l=u.x,s=u.y,c=u.width,d=u.height,f=u.orientation,h=u.tickSize,v=u.mirror,p=u.tickMargin,m=v?-1:1,b=e.tickSize||h,y=fR(e.tickCoord)?e.tickCoord:e.coordinate;switch(f){case"top":t=n=e.coordinate,a=(r=(o=s+ +!v*d)-m*b)-m*p,i=y;break;case"left":r=o=e.coordinate,i=(t=(n=l+ +!v*c)-m*b)-m*p,a=y;break;case"right":r=o=e.coordinate,i=(t=(n=l+ +v*c)+m*b)+m*p,a=y;break;default:t=n=e.coordinate,a=(r=(o=s+ +v*d)+m*b)+m*p,i=y}return{line:{x1:t,y1:r,x2:n,y2:o},tick:{x:i,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){case"left":e=r?"start":"end";break;case"right":e=r?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var t=this.props,n=t.x,r=t.y,o=t.width,i=t.height,a=t.orientation,u=t.mirror,l=t.axisLine,s=C3(C3(C3({},WR(this.props,!1)),WR(l,!1)),{},{fill:"none"});if("top"===a||"bottom"===a){var c=+("top"===a&&!u||"bottom"===a&&u);s=C3(C3({},s),{},{x1:n,y1:r+c*i,x2:n+o,y2:r+c*i})}else{var d=+("left"===a&&!u||"right"===a&&u);s=C3(C3({},s),{},{x1:n+d*o,y1:r,x2:n+d*o,y2:r+i})}return e.createElement("line",N3({},s,{className:DF("recharts-cartesian-axis-line",KS(l,"className"))}))}},{key:"renderTicks",value:function(t,r,o){var i=this,a=this.props,u=a.tickLine,l=a.stroke,s=a.tick,c=a.tickFormatter,d=a.unit,f=x3(C3(C3({},this.props),{},{ticks:t}),r,o),h=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),p=WR(this.props,!1),m=WR(s,!1),b=C3(C3({},p),{},{fill:"none"},WR(u,!1)),y=f.map((function(t,r){var o=i.getTickLineCoord(t),a=o.line,y=o.tick,g=C3(C3(C3(C3({textAnchor:h,verticalAnchor:v},p),{},{stroke:"none",fill:l},m),y),{},{index:r,payload:t,visibleTicksCount:f.length,tickFormatter:c});return e.createElement(JR,N3({className:"recharts-cartesian-axis-tick",key:"tick-".concat(t.value,"-").concat(t.coordinate,"-").concat(t.tickCoord)},MR(i.props,t,r)),u&&e.createElement("line",N3({},b,a,{className:DF("recharts-cartesian-axis-tick-line",KS(u,"className"))})),s&&n.renderTickItem(s,g,"".concat(mx(c)?c(t.value,r):t.value).concat(d||"")))}));return e.createElement("g",{className:"recharts-cartesian-axis-ticks"},y)}},{key:"render",value:function(){var t=this,n=this.props,r=n.axisLine,o=n.width,i=n.height,a=n.ticksGenerator,u=n.className;if(n.hide)return null;var l=this.props,s=l.ticks,c=A3(l,j3),d=s;return mx(a)&&(d=s&&s.length>0?a(this.props):a(c)),o<=0||i<=0||!d||!d.length?null:e.createElement(JR,{className:DF("recharts-cartesian-axis",u),ref:function(e){t.layerReference=e}},r&&this.renderAxisLine(),this.renderTicks(d,this.state.fontSize,this.state.letterSpacing),NZ.renderCallByParent(this.props))}}],i=[{key:"renderTickItem",value:function(t,n,r){return e.isValidElement(t)?e.cloneElement(t,n):mx(t)?t(n):e.createElement(EU,N3({},n,{className:"recharts-cartesian-axis-tick-value"}),r)}}],o&&T3(r.prototype,o),i&&T3(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.Component);L3(F3,"displayName","CartesianAxis"),L3(F3,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var R3=["x1","y1","x2","y2","key"],B3=["offset"];function z3(e){return z3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z3(e)}function $3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$3(Object(n),!0).forEach((function(t){V3(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V3(e,t,n){return t=function(e){var t=function(e,t){if("object"!=z3(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=z3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==z3(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U3(){return U3=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},U3.apply(this,arguments)}function H3(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var q3=function(t){var n=t.fill;if(!n||"none"===n)return null;var r=t.fillOpacity,o=t.x,i=t.y,a=t.width,u=t.height;return e.createElement("rect",{x:o,y:i,width:a,height:u,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function K3(t,n){var r;if(e.isValidElement(t))r=e.cloneElement(t,n);else if(mx(t))r=t(n);else{var o=n.x1,i=n.y1,a=n.x2,u=n.y2,l=n.key,s=H3(n,R3),c=WR(s,!1);c.offset;var d=H3(c,B3);r=e.createElement("line",U3({},d,{x1:o,y1:i,x2:a,y2:u,fill:"none",key:l}))}return r}function G3(t){var n=t.x,r=t.width,o=t.horizontal,i=void 0===o||o,a=t.horizontalPoints;if(!i||!a||!a.length)return null;var u=a.map((function(e,o){var a=W3(W3({},t),{},{x1:n,y1:e,x2:n+r,y2:e,key:"line-".concat(o),index:o});return K3(i,a)}));return e.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function Y3(t){var n=t.y,r=t.height,o=t.vertical,i=void 0===o||o,a=t.verticalPoints;if(!i||!a||!a.length)return null;var u=a.map((function(e,o){var a=W3(W3({},t),{},{x1:e,y1:n,x2:e,y2:n+r,key:"line-".concat(o),index:o});return K3(i,a)}));return e.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function X3(t){var n=t.horizontalFill,r=t.fillOpacity,o=t.x,i=t.y,a=t.width,u=t.height,l=t.horizontalPoints,s=t.horizontal;if(!(void 0===s||s)||!n||!n.length)return null;var c=l.map((function(e){return Math.round(e+i-i)})).sort((function(e,t){return e-t}));i!==c[0]&&c.unshift(0);var d=c.map((function(t,l){var s=!c[l+1]?i+u-t:c[l+1]-t;if(s<=0)return null;var d=l%n.length;return e.createElement("rect",{key:"react-".concat(l),y:t,x:o,height:s,width:a,stroke:"none",fill:n[d],fillOpacity:r,className:"recharts-cartesian-grid-bg"})}));return e.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function Z3(t){var n=t.vertical,r=void 0===n||n,o=t.verticalFill,i=t.fillOpacity,a=t.x,u=t.y,l=t.width,s=t.height,c=t.verticalPoints;if(!r||!o||!o.length)return null;var d=c.map((function(e){return Math.round(e+a-a)})).sort((function(e,t){return e-t}));a!==d[0]&&d.unshift(0);var f=d.map((function(t,n){var r=!d[n+1]?a+l-t:d[n+1]-t;if(r<=0)return null;var c=n%o.length;return e.createElement("rect",{key:"react-".concat(n),x:t,y:u,width:r,height:s,stroke:"none",fill:o[c],fillOpacity:i,className:"recharts-cartesian-grid-bg"})}));return e.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var Q3=function(e,t){var n=e.xAxis,r=e.width,o=e.height,i=e.offset;return IX(x3(W3(W3(W3({},F3.defaultProps),n),{},{ticks:LX(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),i.left,i.left+i.width,t)},J3=function(e,t){var n=e.yAxis,r=e.width,o=e.height,i=e.offset;return IX(x3(W3(W3(W3({},F3.defaultProps),n),{},{ticks:LX(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),i.top,i.top+i.height,t)},e4={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function t4(t){var n,r,o,i,a,u,l,s,c=K5(),d=G5(),f=e.useContext(z5),h=W3(W3({},t),{},{stroke:null!==(n=t.stroke)&&void 0!==n?n:e4.stroke,fill:null!==(r=t.fill)&&void 0!==r?r:e4.fill,horizontal:null!==(o=t.horizontal)&&void 0!==o?o:e4.horizontal,horizontalFill:null!==(i=t.horizontalFill)&&void 0!==i?i:e4.horizontalFill,vertical:null!==(a=t.vertical)&&void 0!==a?a:e4.vertical,verticalFill:null!==(u=t.verticalFill)&&void 0!==u?u:e4.verticalFill,x:fR(t.x)?t.x:f.left,y:fR(t.y)?t.y:f.top,width:fR(t.width)?t.width:f.width,height:fR(t.height)?t.height:f.height}),v=h.x,p=h.y,m=h.width,b=h.height,y=h.syncWithTicks,g=h.horizontalValues,w=h.verticalValues,x=(l=e.useContext(F5),bR(l)),k=(s=e.useContext(R5),L5(s,(function(e){return W2(e.domain,Number.isFinite)}))||bR(s));if(!fR(m)||m<=0||!fR(b)||b<=0||!fR(v)||v!==+v||!fR(p)||p!==+p)return null;var O=h.verticalCoordinatesGenerator||Q3,j=h.horizontalCoordinatesGenerator||J3,S=h.horizontalPoints,N=h.verticalPoints;if((!S||!S.length)&&mx(j)){var M=g&&g.length,C=j({yAxis:k?W3(W3({},k),{},{ticks:M?g:k.ticks}):void 0,width:c,height:d,offset:f},!!M||y);eB(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(z3(C),"]")),Array.isArray(C)&&(S=C)}if((!N||!N.length)&&mx(O)){var A=w&&w.length,T=O({xAxis:x?W3(W3({},x),{},{ticks:A?w:x.ticks}):void 0,width:c,height:d,offset:f},!!A||y);eB(Array.isArray(T),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(z3(T),"]")),Array.isArray(T)&&(N=T)}return e.createElement("g",{className:"recharts-cartesian-grid"},e.createElement(q3,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height}),e.createElement(G3,U3({},h,{offset:f,horizontalPoints:S,xAxis:x,yAxis:k})),e.createElement(Y3,U3({},h,{offset:f,verticalPoints:N,xAxis:x,yAxis:k})),e.createElement(X3,U3({},h,{horizontalPoints:S})),e.createElement(Z3,U3({},h,{verticalPoints:N})))}t4.displayName="CartesianGrid";var n4=["type","layout","connectNulls","ref"];function r4(e){return r4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r4(e)}function o4(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function i4(){return i4=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},i4.apply(this,arguments)}function a4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a4(Object(n),!0).forEach((function(t){m4(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l4(e){return function(e){if(Array.isArray(e))return s4(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s4(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s4(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c4(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,b4(r.key),r)}}function d4(e,t,n){return t=h4(t),function(e,t){if(t&&("object"===r4(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v4(e)}(e,f4()?Reflect.construct(t,n||[],h4(e).constructor):t.apply(e,n))}function f4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f4=function(){return!!e})()}function h4(e){return h4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h4(e)}function v4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p4(e,t){return p4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p4(e,t)}function m4(e,t,n){return(t=b4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b4(e){var t=function(e,t){if("object"!=r4(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=r4(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r4(t)?t:String(t)}var y4=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return m4(v4(e=d4(this,n,[].concat(r))),"state",{isAnimationFinished:!0,totalLength:0}),m4(v4(e),"generateSimpleStrokeDasharray",(function(e,t){return"".concat(t,"px ").concat(e-t,"px")})),m4(v4(e),"getStrokeDasharray",(function(t,r,o){var i=o.reduce((function(e,t){return e+t}));if(!i)return e.generateSimpleStrokeDasharray(r,t);for(var a=Math.floor(t/i),u=t%i,l=r-t,s=[],c=0,d=0;c<o.length;d+=o[c],++c)if(d+o[c]>u){s=[].concat(l4(o.slice(0,c)),[u-d]);break}var f=s.length%2==0?[0,l]:[l];return[].concat(l4(n.repeat(o,a)),l4(s),f).map((function(e){return"".concat(e,"px")})).join(", ")})),m4(v4(e),"id",pR("recharts-line-")),m4(v4(e),"pathRef",(function(t){e.mainCurve=t})),m4(v4(e),"handleAnimationEnd",(function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()})),m4(v4(e),"handleAnimationStart",(function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()})),e}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p4(e,t)}(n,t),r=n,o=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(jde){return 0}}},{key:"renderErrorBar",value:function(t,n){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.points,i=r.xAxis,a=r.yAxis,u=r.layout,l=FR(r.children,mX);if(!l)return null;var s=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:CX(e.payload,t)}},c={clipPath:t?"url(#clipPath-".concat(n,")"):null};return e.createElement(JR,c,l.map((function(t){return e.cloneElement(t,{key:"bar-".concat(t.props.dataKey),data:o,xAxis:i,yAxis:a,layout:u,dataPointFormatter:s})})))}},{key:"renderDots",value:function(t,r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.dot,u=i.points,l=i.dataKey,s=WR(this.props,!1),c=WR(a,!0),d=u.map((function(e,t){var r=u4(u4(u4({key:"dot-".concat(t),r:3},s),c),{},{value:e.value,dataKey:l,cx:e.x,cy:e.y,index:t,payload:e.payload});return n.renderDotItem(a,r)})),f={clipPath:t?"url(#clipPath-".concat(r?"":"dots-").concat(o,")"):null};return e.createElement(JR,i4({className:"recharts-line-dots",key:"dots"},f),d)}},{key:"renderCurveStatically",value:function(t,n,r,o){var i=this.props,a=i.type,u=i.layout,l=i.connectNulls;i.ref;var s=o4(i,n4),c=u4(u4(u4({},WR(s,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:n?"url(#clipPath-".concat(r,")"):null,points:t},o),{},{type:a,layout:u,connectNulls:l});return e.createElement(uQ,i4({},c,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(t,n){var r=this,o=this.props,i=o.points,a=o.strokeDasharray,u=o.isAnimationActive,l=o.animationBegin,s=o.animationDuration,c=o.animationEasing,d=o.animationId,f=o.animateNewValues,h=o.width,v=o.height,p=this.state,m=p.prevPoints,b=p.totalLength;return e.createElement(RJ,{begin:l,duration:s,isActive:u,easing:c,from:{t:0},to:{t:1},key:"line-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(e){var o=e.t;if(m){var u=m.length/i.length,l=i.map((function(e,t){var n=Math.floor(t*u);if(m[n]){var r=m[n],i=yR(r.x,e.x),a=yR(r.y,e.y);return u4(u4({},e),{},{x:i(o),y:a(o)})}if(f){var l=yR(2*h,e.x),s=yR(v/2,e.y);return u4(u4({},e),{},{x:l(o),y:s(o)})}return u4(u4({},e),{},{x:e.x,y:e.y})}));return r.renderCurveStatically(l,t,n)}var s,c=yR(0,b)(o);if(a){var d="".concat(a).split(/[,\s]+/gim).map((function(e){return parseFloat(e)}));s=r.getStrokeDasharray(c,b,d)}else s=r.generateSimpleStrokeDasharray(b,c);return r.renderCurveStatically(i,t,n,{strokeDasharray:s})}))}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,o=n.isAnimationActive,i=this.state,a=i.prevPoints,u=i.totalLength;return o&&r&&r.length&&(!a&&u>0||!PY(a,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var t,n=this.props,r=n.hide,o=n.dot,i=n.points,a=n.className,u=n.xAxis,l=n.yAxis,s=n.top,c=n.left,d=n.width,f=n.height,h=n.isAnimationActive,v=n.id;if(r||!i||!i.length)return null;var p=this.state.isAnimationFinished,m=1===i.length,b=DF("recharts-line",a),y=u&&u.allowDataOverflow,g=l&&l.allowDataOverflow,w=y||g,x=PF(v)?this.id:v,k=null!==(t=WR(o,!1))&&void 0!==t?t:{r:3,strokeWidth:2},O=k.r,j=void 0===O?3:O,S=k.strokeWidth,N=void 0===S?2:S,M=($R(o)?o:{}).clipDot,C=void 0===M||M,A=2*j+N;return e.createElement(JR,{className:b},y||g?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(x)},e.createElement("rect",{x:y?c:c-d/2,y:g?s:s-f/2,width:y?d:2*d,height:g?f:2*f})),!C&&e.createElement("clipPath",{id:"clipPath-dots-".concat(x)},e.createElement("rect",{x:c-A/2,y:s-A/2,width:d+A,height:f+A}))):null,!m&&this.renderCurve(w,x),this.renderErrorBar(w,x),(m||o)&&this.renderDots(w,C,x),(!h||p)&&$Z.renderCallByParent(this.props,i))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!=0?[].concat(l4(e),[0]):e,r=[],o=0;o<t;++o)r=[].concat(l4(r),l4(n));return r}},{key:"renderDotItem",value:function(t,n){var r;if(e.isValidElement(t))r=e.cloneElement(t,n);else if(mx(t))r=t(n);else{var o=DF("recharts-line-dot",t?t.className:"");r=e.createElement(i0,i4({},n,{className:o}))}return r}}],o&&c4(r.prototype,o),i&&c4(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.PureComponent);m4(y4,"displayName","Line"),m4(y4,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!oV.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),m4(y4,"getComposedData",(function(e){var t=e.props,n=e.xAxis,r=e.yAxis,o=e.xAxisTicks,i=e.yAxisTicks,a=e.dataKey,u=e.bandSize,l=e.displayedData,s=e.offset,c=t.layout,d=l.map((function(e,t){var l=CX(e,a);return"horizontal"===c?{x:UX({axis:n,ticks:o,bandSize:u,entry:e,index:t}),y:PF(l)?null:r.scale(l),value:l,payload:e}:{x:PF(l)?null:n.scale(l),y:UX({axis:r,ticks:i,bandSize:u,entry:e,index:t}),value:l,payload:e}}));return u4({points:d,layout:c},s)}));var g4,w4=["layout","type","stroke","connectNulls","isRange","ref"];function x4(e){return x4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x4(e)}function k4(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function O4(){return O4=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},O4.apply(this,arguments)}function j4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j4(Object(n),!0).forEach((function(t){D4(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N4(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,P4(r.key),r)}}function M4(e,t,n){return t=A4(t),function(e,t){if(t&&("object"===x4(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return T4(e)}(e,C4()?Reflect.construct(t,n||[],A4(e).constructor):t.apply(e,n))}function C4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C4=function(){return!!e})()}function A4(e){return A4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A4(e)}function T4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E4(e,t){return E4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E4(e,t)}function D4(e,t,n){return(t=P4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P4(e){var t=function(e,t){if("object"!=x4(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=x4(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==x4(t)?t:String(t)}var I4=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return D4(T4(e=M4(this,n,[].concat(r))),"state",{isAnimationFinished:!0}),D4(T4(e),"id",pR("recharts-area-")),D4(T4(e),"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),mx(t)&&t()})),D4(T4(e),"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),mx(t)&&t()})),e}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E4(e,t)}(n,t),r=n,o=[{key:"renderDots",value:function(t,r,o){var i=this.props.isAnimationActive,a=this.state.isAnimationFinished;if(i&&!a)return null;var u=this.props,l=u.dot,s=u.points,c=u.dataKey,d=WR(this.props,!1),f=WR(l,!0),h=s.map((function(e,t){var r=S4(S4(S4({key:"dot-".concat(t),r:3},d),f),{},{dataKey:c,cx:e.x,cy:e.y,index:t,value:e.value,payload:e.payload});return n.renderDotItem(l,r)})),v={clipPath:t?"url(#clipPath-".concat(r?"":"dots-").concat(o,")"):null};return e.createElement(JR,O4({className:"recharts-area-dots"},v),h)}},{key:"renderHorizontalRect",value:function(t){var n=this.props,r=n.baseLine,o=n.points,i=n.strokeWidth,a=o[0].x,u=o[o.length-1].x,l=t*Math.abs(a-u),s=kY(o.map((function(e){return e.y||0})));return fR(r)&&"number"==typeof r?s=Math.max(r,s):r&&Array.isArray(r)&&r.length&&(s=Math.max(kY(r.map((function(e){return e.y||0}))),s)),fR(s)?e.createElement("rect",{x:a<u?a:a-l,y:0,width:l,height:Math.floor(s+(i?parseInt("".concat(i),10):1))}):null}},{key:"renderVerticalRect",value:function(t){var n=this.props,r=n.baseLine,o=n.points,i=n.strokeWidth,a=o[0].y,u=o[o.length-1].y,l=t*Math.abs(a-u),s=kY(o.map((function(e){return e.x||0})));return fR(r)&&"number"==typeof r?s=Math.max(r,s):r&&Array.isArray(r)&&r.length&&(s=Math.max(kY(r.map((function(e){return e.x||0}))),s)),fR(s)?e.createElement("rect",{x:0,y:a<u?a:a-l,width:s+(i?parseInt("".concat(i),10):1),height:Math.floor(l)}):null}},{key:"renderClipRect",value:function(e){return"vertical"===this.props.layout?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(t,n,r,o){var i=this.props,a=i.layout,u=i.type,l=i.stroke,s=i.connectNulls,c=i.isRange;i.ref;var d=k4(i,w4);return e.createElement(JR,{clipPath:r?"url(#clipPath-".concat(o,")"):null},e.createElement(uQ,O4({},WR(d,!0),{points:t,connectNulls:s,type:u,baseLine:n,layout:a,stroke:"none",className:"recharts-area-area"})),"none"!==l&&e.createElement(uQ,O4({},WR(this.props,!1),{className:"recharts-area-curve",layout:a,type:u,connectNulls:s,fill:"none",points:t})),"none"!==l&&c&&e.createElement(uQ,O4({},WR(this.props,!1),{className:"recharts-area-curve",layout:a,type:u,connectNulls:s,fill:"none",points:n})))}},{key:"renderAreaWithAnimation",value:function(t,n){var r=this,o=this.props,i=o.points,a=o.baseLine,u=o.isAnimationActive,l=o.animationBegin,s=o.animationDuration,c=o.animationEasing,d=o.animationId,f=this.state,h=f.prevPoints,v=f.prevBaseLine;return e.createElement(RJ,{begin:l,duration:s,isActive:u,easing:c,from:{t:0},to:{t:1},key:"area-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(o){var u=o.t;if(h){var l,s=h.length/i.length,c=i.map((function(e,t){var n=Math.floor(t*s);if(h[n]){var r=h[n],o=yR(r.x,e.x),i=yR(r.y,e.y);return S4(S4({},e),{},{x:o(u),y:i(u)})}return e}));return l=fR(a)&&"number"==typeof a?yR(v,a)(u):PF(a)||sR(a)?yR(v,0)(u):a.map((function(e,t){var n=Math.floor(t*s);if(v[n]){var r=v[n],o=yR(r.x,e.x),i=yR(r.y,e.y);return S4(S4({},e),{},{x:o(u),y:i(u)})}return e})),r.renderAreaStatically(c,l,t,n)}return e.createElement(JR,null,e.createElement("defs",null,e.createElement("clipPath",{id:"animationClipPath-".concat(n)},r.renderClipRect(u))),e.createElement(JR,{clipPath:"url(#animationClipPath-".concat(n,")")},r.renderAreaStatically(i,a,t,n)))}))}},{key:"renderArea",value:function(e,t){var n=this.props,r=n.points,o=n.baseLine,i=n.isAnimationActive,a=this.state,u=a.prevPoints,l=a.prevBaseLine,s=a.totalLength;return i&&r&&r.length&&(!u&&s>0||!PY(u,r)||!PY(l,o))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,o,e,t)}},{key:"render",value:function(){var t,n=this.props,r=n.hide,o=n.dot,i=n.points,a=n.className,u=n.top,l=n.left,s=n.xAxis,c=n.yAxis,d=n.width,f=n.height,h=n.isAnimationActive,v=n.id;if(r||!i||!i.length)return null;var p=this.state.isAnimationFinished,m=1===i.length,b=DF("recharts-area",a),y=s&&s.allowDataOverflow,g=c&&c.allowDataOverflow,w=y||g,x=PF(v)?this.id:v,k=null!==(t=WR(o,!1))&&void 0!==t?t:{r:3,strokeWidth:2},O=k.r,j=void 0===O?3:O,S=k.strokeWidth,N=void 0===S?2:S,M=($R(o)?o:{}).clipDot,C=void 0===M||M,A=2*j+N;return e.createElement(JR,{className:b},y||g?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(x)},e.createElement("rect",{x:y?l:l-d/2,y:g?u:u-f/2,width:y?d:2*d,height:g?f:2*f})),!C&&e.createElement("clipPath",{id:"clipPath-dots-".concat(x)},e.createElement("rect",{x:l-A/2,y:u-A/2,width:d+A,height:f+A}))):null,m?null:this.renderArea(w,x),(o||m)&&this.renderDots(w,C,x),(!h||p)&&$Z.renderCallByParent(this.props,i))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}],o&&N4(r.prototype,o),i&&N4(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.PureComponent);g4=I4,D4(I4,"displayName","Area"),D4(I4,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!oV.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),D4(I4,"getBaseValue",(function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,u=null!=a?a:i;if(fR(u)&&"number"==typeof u)return u;var l="horizontal"===o?r:n,s=l.scale.domain();if("number"===l.type){var c=Math.max(s[0],s[1]),d=Math.min(s[0],s[1]);return"dataMin"===u?d:"dataMax"===u||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return"dataMin"===u?s[0]:"dataMax"===u?s[1]:s[0]})),D4(I4,"getComposedData",(function(e){var t,n=e.props,r=e.item,o=e.xAxis,i=e.yAxis,a=e.xAxisTicks,u=e.yAxisTicks,l=e.bandSize,s=e.dataKey,c=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,v=n.layout,p=c&&c.length,m=g4.getBaseValue(n,r,o,i),b="horizontal"===v,y=!1,g=f.map((function(e,t){var n;p?n=c[d+t]:(n=CX(e,s),Array.isArray(n)?y=!0:n=[m,n]);var r=null==n[1]||p&&null==CX(e,s);return b?{x:UX({axis:o,ticks:a,bandSize:l,entry:e,index:t}),y:r?null:i.scale(n[1]),value:n,payload:e}:{x:r?null:o.scale(n[1]),y:UX({axis:i,ticks:u,bandSize:l,entry:e,index:t}),value:n,payload:e}}));return t=p||y?g.map((function(e){var t=Array.isArray(e.value)?e.value[0]:null;return b?{x:e.x,y:null!=t&&null!=e.y?i.scale(t):null}:{x:null!=t?o.scale(t):null,y:e.y}})):b?i.scale(m):o.scale(m),S4({points:g,baseLine:t,layout:v,isRange:y},h)})),D4(I4,"renderDotItem",(function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):mx(t)?t(n):e.createElement(i0,O4({},n,{className:"recharts-area-dot"}))}));var L4=function(){return null};L4.displayName="ZAxis",L4.defaultProps={zAxisId:0,range:[64,64],scale:"auto",type:"number"};var _4=["option","isActive"];function F4(){return F4=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},F4.apply(this,arguments)}function R4(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function B4(t){var n=t.option,r=t.isActive,o=R4(t,_4);return"string"==typeof n?e.createElement(x1,F4({option:e.createElement(Vz,F4({type:n},o)),isActive:r,shapeType:"symbols"},o)):e.createElement(x1,F4({option:n,isActive:r,shapeType:"symbols"},o))}function z4(e){return z4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z4(e)}function $4(){return $4=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},$4.apply(this,arguments)}function W4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W4(Object(n),!0).forEach((function(t){X4(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U4(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,Z4(r.key),r)}}function H4(e,t,n){return t=K4(t),function(e,t){if(t&&("object"===z4(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return G4(e)}(e,q4()?Reflect.construct(t,n||[],K4(e).constructor):t.apply(e,n))}function q4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(q4=function(){return!!e})()}function K4(e){return K4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K4(e)}function G4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Y4(e,t){return Y4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y4(e,t)}function X4(e,t,n){return(t=Z4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z4(e){var t=function(e,t){if("object"!=z4(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=z4(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==z4(t)?t:String(t)}var Q4=function(t){function n(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return X4(G4(e=H4(this,n,[].concat(r))),"state",{isAnimationFinished:!1}),X4(G4(e),"handleAnimationEnd",(function(){e.setState({isAnimationFinished:!0})})),X4(G4(e),"handleAnimationStart",(function(){e.setState({isAnimationFinished:!1})})),X4(G4(e),"id",pR("recharts-scatter-")),e}var r,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Y4(e,t)}(n,t),r=n,o=[{key:"renderSymbolsStatically",value:function(t){var n=this,r=this.props,o=r.shape,i=r.activeShape,a=r.activeIndex,u=WR(this.props,!1);return t.map((function(t,r){var l=a===r,s=l?i:o,c=V4(V4({key:"symbol-".concat(r)},u),t);return e.createElement(JR,$4({className:"recharts-scatter-symbol"},MR(n.props,t,r),{key:"symbol-".concat(null==t?void 0:t.cx,"-").concat(null==t?void 0:t.cy,"-").concat(null==t?void 0:t.size,"-").concat(r),role:"img"}),e.createElement(B4,$4({option:s,isActive:l},c)))}))}},{key:"renderSymbolsWithAnimation",value:function(){var t=this,n=this.props,r=n.points,o=n.isAnimationActive,i=n.animationBegin,a=n.animationDuration,u=n.animationEasing,l=n.animationId,s=this.state.prevPoints;return e.createElement(RJ,{begin:i,duration:a,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(n){var o=n.t,i=r.map((function(e,t){var n=s&&s[t];if(n){var r=yR(n.cx,e.cx),i=yR(n.cy,e.cy),a=yR(n.size,e.size);return V4(V4({},e),{},{cx:r(o),cy:i(o),size:a(o)})}var u=yR(0,e.size);return V4(V4({},e),{},{size:u(o)})}));return e.createElement(JR,null,t.renderSymbolsStatically(i))}))}},{key:"renderSymbols",value:function(){var e=this.props,t=e.points,n=e.isAnimationActive,r=this.state.prevPoints;return!(n&&t&&t.length)||r&&PY(r,t)?this.renderSymbolsStatically(t):this.renderSymbolsWithAnimation()}},{key:"renderErrorBar",value:function(){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var t=this.props,n=t.points,r=t.xAxis,o=t.yAxis,i=FR(t.children,mX);return i?i.map((function(t,i){var a=t.props,u=a.direction,l=a.dataKey;return e.cloneElement(t,{key:"".concat(u,"-").concat(l,"-").concat(n[i]),data:n,xAxis:r,yAxis:o,layout:"x"===u?"vertical":"horizontal",dataPointFormatter:function(e,t){return{x:e.cx,y:e.cy,value:"x"===u?+e.node.x:+e.node.y,errorVal:CX(e,t)}}})})):null}},{key:"renderLine",value:function(){var t,n,r=this.props,o=r.points,i=r.line,a=r.lineType,u=r.lineJointType,l=WR(this.props,!1),s=WR(i,!1);if("joint"===a)t=o.map((function(e){return{x:e.cx,y:e.cy}}));else if("fitting"===a){var c=function(e){if(!e||!e.length)return null;for(var t=e.length,n=0,r=0,o=0,i=0,a=1/0,u=-1/0,l=0,s=0,c=0;c<t;c++)n+=l=e[c].cx||0,r+=s=e[c].cy||0,o+=l*s,i+=l*l,a=Math.min(a,l),u=Math.max(u,l);var d=t*i!=n*n?(t*o-n*r)/(t*i-n*n):0;return{xmin:a,xmax:u,a:d,b:(r-d*n)/t}}(o),d=c.xmin,f=c.xmax,h=c.a,v=c.b,p=function(e){return h*e+v};t=[{x:d,y:p(d)},{x:f,y:p(f)}]}var m=V4(V4(V4({},l),{},{fill:"none",stroke:l&&l.fill},s),{},{points:t});return n=e.isValidElement(i)?e.cloneElement(i,m):mx(i)?i(m):e.createElement(uQ,$4({},m,{type:u})),e.createElement(JR,{className:"recharts-scatter-line",key:"recharts-scatter-line"},n)}},{key:"render",value:function(){var t=this.props,n=t.hide,r=t.points,o=t.line,i=t.className,a=t.xAxis,u=t.yAxis,l=t.left,s=t.top,c=t.width,d=t.height,f=t.id,h=t.isAnimationActive;if(n||!r||!r.length)return null;var v=this.state.isAnimationFinished,p=DF("recharts-scatter",i),m=a&&a.allowDataOverflow,b=u&&u.allowDataOverflow,y=m||b,g=PF(f)?this.id:f;return e.createElement(JR,{className:p,clipPath:y?"url(#clipPath-".concat(g,")"):null},m||b?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(g)},e.createElement("rect",{x:m?l:l-c/2,y:b?s:s-d/2,width:m?c:2*c,height:b?d:2*d}))):null,o&&this.renderLine(),this.renderErrorBar(),e.createElement(JR,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!h||v)&&$Z.renderCallByParent(this.props,r))}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}}],o&&U4(r.prototype,o),i&&U4(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}(e.PureComponent);function J4(){return J4=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},J4.apply(this,arguments)}X4(Q4,"displayName","Scatter"),X4(Q4,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!oV.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"}),X4(Q4,"getComposedData",(function(e){var t=e.xAxis,n=e.yAxis,r=e.zAxis,o=e.item,i=e.displayedData,a=e.xAxisTicks,u=e.yAxisTicks,l=e.offset,s=o.props.tooltipType,c=FR(o.props.children,GV),d=PF(t.dataKey)?o.props.dataKey:t.dataKey,f=PF(n.dataKey)?o.props.dataKey:n.dataKey,h=r&&r.dataKey,v=r?r.range:L4.defaultProps.range,p=v&&v[0],m=t.scale.bandwidth?t.scale.bandwidth():0,b=n.scale.bandwidth?n.scale.bandwidth():0,y=i.map((function(e,i){var l=CX(e,d),v=CX(e,f),y=!PF(h)&&CX(e,h)||"-",g=[{name:PF(t.dataKey)?o.props.name:t.name||t.dataKey,unit:t.unit||"",value:l,payload:e,dataKey:d,type:s},{name:PF(n.dataKey)?o.props.name:n.name||n.dataKey,unit:n.unit||"",value:v,payload:e,dataKey:f,type:s}];"-"!==y&&g.push({name:r.name||r.dataKey,unit:r.unit||"",value:y,payload:e,dataKey:h,type:s});var w=UX({axis:t,ticks:a,bandSize:m,entry:e,index:i,dataKey:d}),x=UX({axis:n,ticks:u,bandSize:b,entry:e,index:i,dataKey:f}),k="-"!==y?r.scale(y):p,O=Math.sqrt(Math.max(k,0)/Math.PI);return V4(V4({},e),{},{cx:w,cy:x,x:w-O,y:x-O,xAxis:t,yAxis:n,zAxis:r,width:2*O,height:2*O,size:k,node:{x:l,y:v,z:y},tooltipPayload:g,tooltipPosition:{x:w,y:x},payload:e},c&&c[i]&&c[i].props)}));return V4({points:y},l)}));var e6=function(t){var n=t.xAxisId,r=K5(),o=G5(),i=H5(n);return null==i?null:e.createElement(F3,J4({},i,{className:DF("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:o},ticksGenerator:function(e){return LX(e,!0)}}))};function t6(){return t6=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},t6.apply(this,arguments)}e6.displayName="XAxis",e6.defaultProps={allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0};var n6=function(t){var n=t.yAxisId,r=K5(),o=G5(),i=q5(n);return null==i?null:e.createElement(F3,t6({},i,{className:DF("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:o},ticksGenerator:function(e){return LX(e,!0)}}))};function r6(e){return function(e){if(Array.isArray(e))return o6(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o6(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n6.displayName="YAxis",n6.defaultProps={allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1};var i6=function(e,t,n,r,o){var i=FR(e,n3),a=FR(e,l3),u=[].concat(r6(i),r6(a)),l=FR(e,v3),s="".concat(r,"Id"),c=r[0],d=t;if(u.length&&(d=u.reduce((function(e,t){if(t.props[s]===n&&M2(t.props,"extendDomain")&&fR(t.props[c])){var r=t.props[c];return[Math.min(e[0],r),Math.max(e[1],r)]}return e}),d)),l.length){var f="".concat(c,"1"),h="".concat(c,"2");d=l.reduce((function(e,t){if(t.props[s]===n&&M2(t.props,"extendDomain")&&fR(t.props[f])&&fR(t.props[h])){var r=t.props[f],o=t.props[h];return[Math.min(e[0],r,o),Math.max(e[1],r,o)]}return e}),d)}return o&&o.length&&(d=o.reduce((function(e,t){return fR(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e}),d)),d},a6={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var u=new o(r,i||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],u]:e._events[l].push(u):(e._events[l]=u,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function u(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),u.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},u.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},u.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},u.prototype.emit=function(e,t,r,o,i,a){var u=n?n+e:e;if(!this._events[u])return!1;var l,s,c=this._events[u],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,o),!0;case 5:return c.fn.call(c.context,t,r,o,i),!0;case 6:return c.fn.call(c.context,t,r,o,i,a),!0}for(s=1,l=new Array(d-1);s<d;s++)l[s-1]=arguments[s];c.fn.apply(c.context,l)}else{var f,h=c.length;for(s=0;s<h;s++)switch(c[s].once&&this.removeListener(e,c[s].fn,void 0,!0),d){case 1:c[s].fn.call(c[s].context);break;case 2:c[s].fn.call(c[s].context,t);break;case 3:c[s].fn.call(c[s].context,t,r);break;case 4:c[s].fn.call(c[s].context,t,r,o);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];c[s].fn.apply(c[s].context,l)}}return!0},u.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},u.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},u.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var u=this._events[i];if(u.fn)u.fn!==t||o&&!u.once||r&&u.context!==r||a(this,i);else{for(var l=0,s=[],c=u.length;l<c;l++)(u[l].fn!==t||o&&!u[l].once||r&&u[l].context!==r)&&s.push(u[l]);s.length?this._events[i]=1===s.length?s[0]:s:a(this,i)}return this},u.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,e.exports=u}(a6);var u6=new(Ks(a6.exports)),l6="recharts.syncMouseEvents";function s6(e){return s6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s6(e)}function c6(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,f6(r.key),r)}}function d6(e,t,n){return(t=f6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f6(e){var t=function(e,t){if("object"!=s6(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s6(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s6(t)?t:String(t)}var h6=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),d6(this,"activeIndex",0),d6(this,"coordinateList",[]),d6(this,"layout","horizontal")}var t,n,r;return t=e,n=[{key:"setDetails",value:function(e){var t,n=e.coordinateList,r=void 0===n?null:n,o=e.container,i=void 0===o?null:o,a=e.layout,u=void 0===a?null:a,l=e.offset,s=void 0===l?null:l,c=e.mouseHandlerCallback,d=void 0===c?null:c;this.coordinateList=null!==(t=null!=r?r:this.coordinateList)&&void 0!==t?t:[],this.container=null!=i?i:this.container,this.layout=null!=u?u:this.layout,this.offset=null!=s?s:this.offset,this.mouseHandlerCallback=null!=d?d:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"setIndex",value:function(e){this.activeIndex=e}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var n=this.container.getBoundingClientRect(),r=n.x,o=n.y,i=n.height,a=this.coordinateList[this.activeIndex].coordinate,u=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,s=r+a+u,c=o+this.offset.top+i/2+l;this.mouseHandlerCallback({pageX:s,pageY:c})}}}],n&&c6(t.prototype,n),r&&c6(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function v6(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,i=e.endAngle;return{points:[uZ(t,n,r,o),uZ(t,n,r,i)],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}function p6(e,t,n){var r,o,i,a;if("horizontal"===e)i=r=t.x,o=n.top,a=n.top+n.height;else if("vertical"===e)a=o=t.y,r=n.left,i=n.left+n.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return v6(t);var u=t.cx,l=t.cy,s=t.innerRadius,c=t.outerRadius,d=t.angle,f=uZ(u,l,s,d),h=uZ(u,l,c,d);r=f.x,o=f.y,i=h.x,a=h.y}return[{x:r,y:o},{x:i,y:a}]}function m6(e){return m6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m6(e)}function b6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b6(Object(n),!0).forEach((function(t){g6(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b6(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g6(e,t,n){return t=function(e){var t=function(e,t){if("object"!=m6(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=m6(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==m6(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w6(t){var n,r=t.element,o=t.tooltipEventType,i=t.isActive,a=t.activeCoordinate,u=t.activePayload,l=t.offset,s=t.activeTooltipIndex,c=t.tooltipAxisBandSize,d=t.layout,f=t.chartName;if(!r||!r.props.cursor||!i||!a||"ScatterChart"!==f&&"axis"!==o)return null;var h=uQ;if("ScatterChart"===f)n=a,h=h0;else if("BarChart"===f)n=function(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-o:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-o,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(d,a,l,c),h=YJ;else if("radial"===d){var v=v6(a),p=v.cx,m=v.cy,b=v.radius;n={cx:p,cy:m,startAngle:v.startAngle,endAngle:v.endAngle,innerRadius:b,outerRadius:b},h=XZ}else n={points:p6(d,a,l)},h=uQ;var y=y6(y6(y6(y6({stroke:"#ccc",pointerEvents:"none"},l),n),WR(r.props.cursor,!1)),{},{payload:u,payloadIndex:s,className:"recharts-tooltip-cursor"});return e.isValidElement(r.props.cursor)?e.cloneElement(r.props.cursor,y):e.createElement(h,y)}var x6=["item"],k6=["children","className","width","height","style","compact","title","desc"];function O6(e){return O6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O6(e)}function j6(){return j6=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},j6.apply(this,arguments)}function S6(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||I6(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N6(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function M6(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,B6(r.key),r)}}function C6(e,t,n){return t=T6(t),function(e,t){if(t&&("object"===O6(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E6(e)}(e,A6()?Reflect.construct(t,n||[],T6(e).constructor):t.apply(e,n))}function A6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(A6=function(){return!!e})()}function T6(e){return T6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T6(e)}function E6(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D6(e,t){return D6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D6(e,t)}function P6(e){return function(e){if(Array.isArray(e))return L6(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||I6(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I6(e,t){if(e){if("string"==typeof e)return L6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L6(e,t):void 0}}function L6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F6(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_6(Object(n),!0).forEach((function(t){R6(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_6(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R6(e,t,n){return(t=B6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B6(e){var t=function(e,t){if("object"!=O6(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=O6(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==O6(t)?t:String(t)}var z6={xAxis:["bottom","top"],yAxis:["left","right"]},$6={width:"100%",height:"100%"},W6={x:0,y:0};function V6(e){return e}var U6=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,o=t.dataEndIndex,i=(null!=n?n:[]).reduce((function(e,t){var n=t.props.data;return n&&n.length?[].concat(P6(e),P6(n)):e}),[]);return i.length>0?i:e&&e.length&&fR(r)&&fR(o)?e.slice(r,o+1):[]};function H6(e){return"number"===e?[0,"auto"]:void 0}var q6=function(e,t,n,r){var o=e.graphicalItems,i=e.tooltipAxis,a=U6(t,e);return n<0||!o||!o.length||n>=a.length?null:o.reduce((function(o,u){var l,s,c=null!==(l=u.props.data)&&void 0!==l?l:t;(c&&e.dataStartIndex+e.dataEndIndex!==0&&(c=c.slice(e.dataStartIndex,e.dataEndIndex+1)),i.dataKey&&!i.allowDuplicatedCategory)?s=gR(void 0===c?a:c,i.dataKey,r):s=c&&c[n]||a[n];return s?[].concat(P6(o),[QX(u,s)]):o}),[])},K6=function(e,t,n,r){var o=r||{x:e.chartX,y:e.chartY},i=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(o,n),a=e.orderedTooltipTicks,u=e.tooltipAxis,l=e.tooltipTicks,s=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=-1,a=null!==(t=null==n?void 0:n.length)&&void 0!==t?t:0;if(a<=1)return 0;if(o&&"angleAxis"===o.axisType&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var u=o.range,l=0;l<a;l++){var s=l>0?r[l-1].coordinate:r[a-1].coordinate,c=r[l].coordinate,d=l>=a-1?r[0].coordinate:r[l+1].coordinate,f=void 0;if(cR(c-s)!==cR(d-c)){var h=[];if(cR(d-c)===cR(u[1]-u[0])){f=d;var v=c+u[1]-u[0];h[0]=Math.min(v,(v+s)/2),h[1]=Math.max(v,(v+s)/2)}else{f=s;var p=d+u[1]-u[0];h[0]=Math.min(c,(p+c)/2),h[1]=Math.max(c,(p+c)/2)}var m=[Math.min(c,(f+c)/2),Math.max(c,(f+c)/2)];if(e>m[0]&&e<=m[1]||e>=h[0]&&e<=h[1]){i=r[l].index;break}}else{var b=Math.min(s,d),y=Math.max(s,d);if(e>(b+c)/2&&e<=(y+c)/2){i=r[l].index;break}}}else for(var g=0;g<a;g++)if(0===g&&e<=(n[g].coordinate+n[g+1].coordinate)/2||g>0&&g<a-1&&e>(n[g].coordinate+n[g-1].coordinate)/2&&e<=(n[g].coordinate+n[g+1].coordinate)/2||g===a-1&&e>(n[g].coordinate+n[g-1].coordinate)/2){i=n[g].index;break}return i}(i,a,l,u);if(s>=0&&l){var c=l[s]&&l[s].value,d=q6(e,t,s,c),f=function(e,t,n,r){var o=t.find((function(e){return e&&e.index===n}));if(o){if("horizontal"===e)return{x:o.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:o.coordinate};if("centric"===e){var i=o.coordinate,a=r.radius;return F6(F6(F6({},r),uZ(r.cx,r.cy,a,i)),{},{angle:i,radius:a})}var u=o.coordinate,l=r.angle;return F6(F6(F6({},r),uZ(r.cx,r.cy,u,l)),{},{angle:l,radius:u})}return W6}(n,a,s,o);return{activeTooltipIndex:s,activeLabel:c,activePayload:d,activeCoordinate:f}}return null},G6=function(e,t){var n=t.axes,r=t.graphicalItems,o=t.axisType,i=t.axisIdKey,a=t.stackGroups,u=t.dataStartIndex,l=t.dataEndIndex,s=e.layout,c=e.children,d=e.stackOffset,f=PX(s,o);return n.reduce((function(t,n){var h,v=n.props,p=v.type,m=v.dataKey,b=v.allowDataOverflow,y=v.allowDuplicatedCategory,g=v.scale,w=v.ticks,x=v.includeHidden,k=n.props[i];if(t[k])return t;var O,j,S,N=U6(e.data,{graphicalItems:r.filter((function(e){return e.props[i]===k})),dataStartIndex:u,dataEndIndex:l}),M=N.length;(function(e,t,n){if("number"===n&&!0===t&&Array.isArray(e)){var r=null==e?void 0:e[0],o=null==e?void 0:e[1];if(r&&o&&fR(r)&&fR(o))return!0}return!1})(n.props.domain,b,p)&&(O=YX(n.props.domain,null,b),!f||"number"!==p&&"auto"===g||(S=AX(N,m,"category")));var C=H6(p);if(!O||0===O.length){var A,T=null!==(A=n.props.domain)&&void 0!==A?A:C;if(m){if(O=AX(N,m,p),"category"===p&&f){var E=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1}(O);y&&E?(j=O,O=Q1(0,M)):y||(O=ZX(T,O,n).reduce((function(e,t){return e.indexOf(t)>=0?e:[].concat(P6(e),[t])}),[]))}else if("category"===p)O=y?O.filter((function(e){return""!==e&&!PF(e)})):ZX(T,O,n).reduce((function(e,t){return e.indexOf(t)>=0||""===t||PF(t)?e:[].concat(P6(e),[t])}),[]);else if("number"===p){var D=function(e,t,n,r,o){var i=t.map((function(t){return EX(e,t,n,o,r)})).filter((function(e){return!PF(e)}));return i&&i.length?i.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]):null}(N,r.filter((function(e){return e.props[i]===k&&(x||!e.props.hide)})),m,o,s);D&&(O=D)}!f||"number"!==p&&"auto"===g||(S=AX(N,m,"category"))}else O=f?Q1(0,M):a&&a[k]&&a[k].hasStack&&"number"===p?"expand"===d?[0,1]:qX(a[k].stackGroups,u,l):DX(N,r.filter((function(e){return e.props[i]===k&&(x||!e.props.hide)})),p,s,!0);if("number"===p)O=i6(c,O,k,o,w),T&&(O=YX(T,O,b));else if("category"===p&&T){var P=T;O.every((function(e){return P.indexOf(e)>=0}))&&(O=P)}}return F6(F6({},t),{},R6({},k,F6(F6({},n.props),{},{axisType:o,domain:O,categoricalDomain:S,duplicateDomain:j,originalDomain:null!==(h=n.props.domain)&&void 0!==h?h:C,isCategorical:f,layout:s})))}),{})},Y6=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,o=t.AxisComp,i=t.graphicalItems,a=t.stackGroups,u=t.dataStartIndex,l=t.dataEndIndex,s=e.children,c="".concat(r,"Id"),d=FR(s,o),f={};return d&&d.length?f=G6(e,{axes:d,graphicalItems:i,axisType:r,axisIdKey:c,stackGroups:a,dataStartIndex:u,dataEndIndex:l}):i&&i.length&&(f=function(e,t){var n=t.graphicalItems,r=t.Axis,o=t.axisType,i=t.axisIdKey,a=t.stackGroups,u=t.dataStartIndex,l=t.dataEndIndex,s=e.layout,c=e.children,d=U6(e.data,{graphicalItems:n,dataStartIndex:u,dataEndIndex:l}),f=d.length,h=PX(s,o),v=-1;return n.reduce((function(e,t){var p,m=t.props[i],b=H6("number");return e[m]?e:(v++,h?p=Q1(0,f):a&&a[m]&&a[m].hasStack?(p=qX(a[m].stackGroups,u,l),p=i6(c,p,m,o)):(p=YX(b,DX(d,n.filter((function(e){return e.props[i]===m&&!e.props.hide})),"number",s),r.defaultProps.allowDataOverflow),p=i6(c,p,m,o)),F6(F6({},e),{},R6({},m,F6(F6({axisType:o},r.defaultProps),{},{hide:!0,orientation:KS(z6,"".concat(o,".").concat(v%2),null),domain:p,originalDomain:b,isCategorical:h,layout:s}))))}),{})}(e,{Axis:o,graphicalItems:i,axisType:r,axisIdKey:c,stackGroups:a,dataStartIndex:u,dataEndIndex:l})),f},X6=function(e){var t=e.children,n=e.defaultShowTooltip,r=RR(t,b2),o=0,i=0;return e.data&&0!==e.data.length&&(i=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(o=r.props.startIndex),r.props.endIndex>=0&&(i=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:Boolean(n)}},Z6=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Q6=function(e,t){var n=e.props,r=(e.graphicalItems,e.xAxisMap),o=void 0===r?{}:r,i=e.yAxisMap,a=void 0===i?{}:i,u=n.width,l=n.height,s=n.children,c=n.margin||{},d=RR(s,b2),f=RR(s,z$),h=Object.keys(a).reduce((function(e,t){var n=a[t],r=n.orientation;return n.mirror||n.hide?e:F6(F6({},e),{},R6({},r,e[r]+n.width))}),{left:c.left||0,right:c.right||0}),v=Object.keys(o).reduce((function(e,t){var n=o[t],r=n.orientation;return n.mirror||n.hide?e:F6(F6({},e),{},R6({},r,KS(e,"".concat(r))+n.height))}),{top:c.top||0,bottom:c.bottom||0}),p=F6(F6({},v),h),m=p.bottom;d&&(p.bottom+=d.props.height||b2.defaultProps.height),f&&t&&(p=function(e,t,n,r){var o=n.children,i=n.width,a=n.margin,u=i-(a.left||0)-(a.right||0),l=xX({children:o,legendWidth:u});if(l){var s=r||{},c=s.width,d=s.height,f=l.align,h=l.verticalAlign,v=l.layout;if(("vertical"===v||"horizontal"===v&&"middle"===h)&&"center"!==f&&fR(e[f]))return jX(jX({},e),{},SX({},f,e[f]+(c||0)));if(("horizontal"===v||"vertical"===v&&"center"===f)&&"middle"!==h&&fR(e[h]))return jX(jX({},e),{},SX({},h,e[h]+(d||0)))}return e}(p,0,n,t));var b=u-p.left-p.right,y=l-p.top-p.bottom;return F6(F6({brushBottom:m},p),{},{width:Math.max(b,0),height:Math.max(y,0)})},J6=function(t){var n,r=t.chartName,o=t.GraphicalChild,i=t.defaultTooltipEventType,a=void 0===i?"axis":i,u=t.validateTooltipEventTypes,l=void 0===u?["axis"]:u,s=t.axisComponents,c=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(e,t){var n=t.graphicalItems,r=t.stackGroups,o=t.offset,i=t.updateId,a=t.dataStartIndex,u=t.dataEndIndex,l=e.barSize,c=e.layout,d=e.barGap,f=e.barCategoryGap,h=e.maxBarSize,v=Z6(c),p=v.numericAxisName,m=v.cateAxisName,b=function(e){return!(!e||!e.length)&&e.some((function(e){var t=PR(e&&e.type);return t&&t.indexOf("Bar")>=0}))}(n),y=b&&function(e){var t=e.barSize,n=e.stackGroups,r=void 0===n?{}:n;if(!r)return{};for(var o={},i=Object.keys(r),a=0,u=i.length;a<u;a++)for(var l=r[i[a]].stackGroups,s=Object.keys(l),c=0,d=s.length;c<d;c++){var f=l[s[c]],h=f.items,v=f.cateAxisId,p=h.filter((function(e){return PR(e.type).indexOf("Bar")>=0}));if(p&&p.length){var m=p[0].props.barSize,b=p[0].props[v];o[b]||(o[b]=[]),o[b].push({item:p[0],stackList:p.slice(1),barSize:PF(m)?t:m})}}return o}({barSize:l,stackGroups:r}),g=[];return n.forEach((function(n,l){var v=U6(e.data,{graphicalItems:[n],dataStartIndex:a,dataEndIndex:u}),b=n.props,w=b.dataKey,x=b.maxBarSize,k=n.props["".concat(p,"Id")],O=n.props["".concat(m,"Id")],j=s.reduce((function(e,r){var o=t["".concat(r.axisType,"Map")],i=n.props["".concat(r.axisType,"Id")];o&&o[i]||"zAxis"===r.axisType||cX(!1);var a=o[i];return F6(F6({},e),{},R6(R6({},r.axisType,a),"".concat(r.axisType,"Ticks"),LX(a)))}),{}),S=j[m],N=j["".concat(m,"Ticks")],M=r&&r[k]&&r[k].hasStack&&function(e,t){var n=e.props.stackId;if(hR(n)){var r=t[n];if(r){var o=r.items.indexOf(e);return o>=0?r.stackedData[o]:null}}return null}(n,r[k].stackGroups),C=PR(n.type).indexOf("Bar")>=0,A=XX(S,N),T=[];if(C){var E,D,P=PF(x)?h:x,I=null!==(E=null!==(D=XX(S,N,!0))&&void 0!==D?D:P)&&void 0!==E?E:0;T=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,o=e.sizeList,i=void 0===o?[]:o,a=e.maxBarSize,u=i.length;if(u<1)return null;var l,s=mR(t,r,0,!0),c=[];if(i[0].barSize===+i[0].barSize){var d=!1,f=r/u,h=i.reduce((function(e,t){return e+t.barSize||0}),0);(h+=(u-1)*s)>=r&&(h-=(u-1)*s,s=0),h>=r&&f>0&&(d=!0,h=u*(f*=.9));var v={offset:((r-h)/2>>0)-s,size:0};l=i.reduce((function(e,t){var n={item:t.item,position:{offset:v.offset+v.size+s,size:d?f:t.barSize}},r=[].concat(NX(e),[n]);return v=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){r.push({item:e,position:v})})),r}),c)}else{var p=mR(n,r,0,!0);r-2*p-(u-1)*s<=0&&(s=0);var m=(r-2*p-(u-1)*s)/u;m>1&&(m>>=0);var b=a===+a?Math.min(m,a):m;l=i.reduce((function(e,t,n){var r=[].concat(NX(e),[{item:t.item,position:{offset:p+(m+s)*n+(m-b)/2,size:b}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){r.push({item:e,position:r[r.length-1].position})})),r}),c)}return l}({barGap:d,barCategoryGap:f,bandSize:I!==A?I:A,sizeList:y[O],maxBarSize:P}),I!==A&&(T=T.map((function(e){return F6(F6({},e),{},{position:F6(F6({},e.position),{},{offset:e.position.offset-I/2})})})))}var L,_,F=n&&n.type&&n.type.getComposedData;F&&g.push({props:F6(F6({},F(F6(F6({},j),{},{displayedData:v,props:e,dataKey:w,item:n,bandSize:A,barPosition:T,offset:o,stackedData:M,layout:c,dataStartIndex:a,dataEndIndex:u}))),{},R6(R6(R6({key:n.key||"item-".concat(l)},p,j[p]),m,j[m]),"animationId",i)),childIndex:(L=n,_=e.children,_R(_).indexOf(L)),item:n})})),g},v=function(e,t){var n=e.props,i=e.dataStartIndex,a=e.dataEndIndex,u=e.updateId;if(!BR({props:n}))return null;var l=n.children,c=n.layout,f=n.stackOffset,v=n.data,p=n.reverseStackOrder,m=Z6(c),b=m.numericAxisName,y=m.cateAxisName,g=FR(l,o),w=function(e,t,n,r,o,i){if(!e)return null;var a=(i?t.reverse():t).reduce((function(e,t){var o=t.props,i=o.stackId;if(o.hide)return e;var a=t.props[n],u=e[a]||{hasStack:!1,stackGroups:{}};if(hR(i)){var l=u.stackGroups[i]||{numericAxisId:n,cateAxisId:r,items:[]};l.items.push(t),u.hasStack=!0,u.stackGroups[i]=l}else u.stackGroups[pR("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return jX(jX({},e),{},SX({},a,u))}),{});return Object.keys(a).reduce((function(t,i){var u=a[i];return u.hasStack&&(u.stackGroups=Object.keys(u.stackGroups).reduce((function(t,i){var a=u.stackGroups[i];return jX(jX({},t),{},SX({},i,{numericAxisId:n,cateAxisId:r,items:a.items,stackedData:WX(e,a.items,o)}))}),{})),jX(jX({},t),{},SX({},i,u))}),{})}(v,g,"".concat(b,"Id"),"".concat(y,"Id"),f,p),x=s.reduce((function(e,t){var r="".concat(t.axisType,"Map");return F6(F6({},e),{},R6({},r,Y6(n,F6(F6({},t),{},{graphicalItems:g,stackGroups:t.axisType===b&&w,dataStartIndex:i,dataEndIndex:a}))))}),{}),k=Q6(F6(F6({},x),{},{props:n,graphicalItems:g}),null==t?void 0:t.legendBBox);Object.keys(x).forEach((function(e){x[e]=d(n,x[e],k,e.replace("Map",""),r)}));var O,j,S=x["".concat(y,"Map")],N=(O=bR(S),{tooltipTicks:j=LX(O,!1,!0),orderedTooltipTicks:TW(j,(function(e){return e.coordinate})),tooltipAxis:O,tooltipAxisBandSize:XX(O,j)}),M=h(n,F6(F6({},x),{},{dataStartIndex:i,dataEndIndex:a,updateId:u,graphicalItems:g,stackGroups:w,offset:k}));return F6(F6({formattedGraphicalItems:M,graphicalItems:g,offset:k,stackGroups:w},N),x)};return n=function(t){function n(t){var o,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),R6(E6(a=C6(this,n,[t])),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),R6(E6(a),"accessibilityManager",new h6),R6(E6(a),"handleLegendBBoxUpdate",(function(e){if(e){var t=a.state,n=t.dataStartIndex,r=t.dataEndIndex,o=t.updateId;a.setState(F6({legendBBox:e},v({props:a.props,dataStartIndex:n,dataEndIndex:r,updateId:o},F6(F6({},a.state),{},{legendBBox:e}))))}})),R6(E6(a),"handleReceiveSyncEvent",(function(e,t,n){if(a.props.syncId===e){if(n===a.eventEmitterSymbol&&"function"!=typeof a.props.syncMethod)return;a.applySyncEvent(t)}})),R6(E6(a),"handleBrushChange",(function(e){var t=e.startIndex,n=e.endIndex;if(t!==a.state.dataStartIndex||n!==a.state.dataEndIndex){var r=a.state.updateId;a.setState((function(){return F6({dataStartIndex:t,dataEndIndex:n},v({props:a.props,dataStartIndex:t,dataEndIndex:n,updateId:r},a.state))})),a.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}})),R6(E6(a),"handleMouseEnter",(function(e){var t=a.getMouseInfo(e);if(t){var n=F6(F6({},t),{},{isTooltipActive:!0});a.setState(n),a.triggerSyncEvent(n);var r=a.props.onMouseEnter;mx(r)&&r(n,e)}})),R6(E6(a),"triggeredAfterMouseMove",(function(e){var t=a.getMouseInfo(e),n=t?F6(F6({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};a.setState(n),a.triggerSyncEvent(n);var r=a.props.onMouseMove;mx(r)&&r(n,e)})),R6(E6(a),"handleItemMouseEnter",(function(e){a.setState((function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}}))})),R6(E6(a),"handleItemMouseLeave",(function(){a.setState((function(){return{isTooltipActive:!1}}))})),R6(E6(a),"handleMouseMove",(function(e){e.persist(),a.throttleTriggeredAfterMouseMove(e)})),R6(E6(a),"handleMouseLeave",(function(e){a.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};a.setState(t),a.triggerSyncEvent(t);var n=a.props.onMouseLeave;mx(n)&&n(t,e)})),R6(E6(a),"handleOuterEvent",(function(e){var t,n=function(e){var t=e&&e.type;return t&&DR[t]?DR[t]:null}(e),r=KS(a.props,"".concat(n));n&&mx(r)&&r(null!==(t=/.*touch.*/i.test(n)?a.getMouseInfo(e.changedTouches[0]):a.getMouseInfo(e))&&void 0!==t?t:{},e)})),R6(E6(a),"handleClick",(function(e){var t=a.getMouseInfo(e);if(t){var n=F6(F6({},t),{},{isTooltipActive:!0});a.setState(n),a.triggerSyncEvent(n);var r=a.props.onClick;mx(r)&&r(n,e)}})),R6(E6(a),"handleMouseDown",(function(e){var t=a.props.onMouseDown;mx(t)&&t(a.getMouseInfo(e),e)})),R6(E6(a),"handleMouseUp",(function(e){var t=a.props.onMouseUp;mx(t)&&t(a.getMouseInfo(e),e)})),R6(E6(a),"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&a.throttleTriggeredAfterMouseMove(e.changedTouches[0])})),R6(E6(a),"handleTouchStart",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&a.handleMouseDown(e.changedTouches[0])})),R6(E6(a),"handleTouchEnd",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&a.handleMouseUp(e.changedTouches[0])})),R6(E6(a),"triggerSyncEvent",(function(e){void 0!==a.props.syncId&&u6.emit(l6,a.props.syncId,e,a.eventEmitterSymbol)})),R6(E6(a),"applySyncEvent",(function(e){var t=a.props,n=t.layout,r=t.syncMethod,o=a.state.updateId,i=e.dataStartIndex,u=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)a.setState(F6({dataStartIndex:i,dataEndIndex:u},v({props:a.props,dataStartIndex:i,dataEndIndex:u,updateId:o},a.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,s=e.chartY,c=e.activeTooltipIndex,d=a.state,f=d.offset,h=d.tooltipTicks;if(!f)return;if("function"==typeof r)c=r(h,e);else if("value"===r){c=-1;for(var p=0;p<h.length;p++)if(h[p].value===e.activeLabel){c=p;break}}var m=F6(F6({},f),{},{x:f.left,y:f.top}),b=Math.min(l,m.x+m.width),y=Math.min(s,m.y+m.height),g=h[c]&&h[c].value,w=q6(a.state,a.props.data,c),x=h[c]?{x:"horizontal"===n?h[c].coordinate:b,y:"horizontal"===n?y:h[c].coordinate}:W6;a.setState(F6(F6({},e),{},{activeLabel:g,activeCoordinate:x,activePayload:w,activeTooltipIndex:c}))}else a.setState(e)})),R6(E6(a),"renderCursor",(function(t){var n,o=a.state,i=o.isTooltipActive,u=o.activeCoordinate,l=o.activePayload,s=o.offset,c=o.activeTooltipIndex,d=o.tooltipAxisBandSize,f=a.getTooltipEventType(),h=null!==(n=t.props.active)&&void 0!==n?n:i,v=a.props.layout,p=t.key||"_recharts-cursor";return e.createElement(w6,{key:p,activeCoordinate:u,activePayload:l,activeTooltipIndex:c,chartName:r,element:t,isActive:h,layout:v,offset:s,tooltipAxisBandSize:d,tooltipEventType:f})})),R6(E6(a),"renderPolarAxis",(function(t,n,r){var o=KS(t,"type.axisType"),i=KS(a.state,"".concat(o,"Map")),u=i&&i[t.props["".concat(o,"Id")]];return e.cloneElement(t,F6(F6({},u),{},{className:o,key:t.key||"".concat(n,"-").concat(r),ticks:LX(u,!0)}))})),R6(E6(a),"renderPolarGrid",(function(t){var n=t.props,r=n.radialLines,o=n.polarAngles,i=n.polarRadius,u=a.state,l=u.radiusAxisMap,s=u.angleAxisMap,c=bR(l),d=bR(s),f=d.cx,h=d.cy,v=d.innerRadius,p=d.outerRadius;return e.cloneElement(t,{polarAngles:Array.isArray(o)?o:LX(d,!0).map((function(e){return e.coordinate})),polarRadius:Array.isArray(i)?i:LX(c,!0).map((function(e){return e.coordinate})),cx:f,cy:h,innerRadius:v,outerRadius:p,key:t.key||"polar-grid",radialLines:r})})),R6(E6(a),"renderLegend",(function(){var t=a.state.formattedGraphicalItems,n=a.props,r=n.children,o=n.width,i=n.height,u=a.props.margin||{},l=o-(u.left||0)-(u.right||0),s=xX({children:r,formattedGraphicalItems:t,legendWidth:l,legendContent:c});if(!s)return null;var d=s.item,f=N6(s,x6);return e.cloneElement(d,F6(F6({},f),{},{chartWidth:o,chartHeight:i,margin:u,onBBoxUpdate:a.handleLegendBBoxUpdate}))})),R6(E6(a),"renderTooltip",(function(){var t,n=a.props,r=n.children,o=n.accessibilityLayer,i=RR(r,mV);if(!i)return null;var u=a.state,l=u.isTooltipActive,s=u.activeCoordinate,c=u.activePayload,d=u.activeLabel,f=u.offset,h=null!==(t=i.props.active)&&void 0!==t?t:l;return e.cloneElement(i,{viewBox:F6(F6({},f),{},{x:f.left,y:f.top}),active:h,label:d,payload:h?c:[],coordinate:s,accessibilityLayer:o})})),R6(E6(a),"renderBrush",(function(t){var n=a.props,r=n.margin,o=n.data,i=a.state,u=i.offset,l=i.dataStartIndex,s=i.dataEndIndex,c=i.updateId;return e.cloneElement(t,{key:t.key||"_recharts-brush",onChange:FX(a.handleBrushChange,t.props.onChange),data:o,x:fR(t.props.x)?t.props.x:u.left,y:fR(t.props.y)?t.props.y:u.top+u.height+u.brushBottom-(r.bottom||0),width:fR(t.props.width)?t.props.width:u.width,startIndex:l,endIndex:s,updateId:"brush-".concat(c)})})),R6(E6(a),"renderReferenceElement",(function(t,n,r){if(!t)return null;var o=E6(a).clipPathId,i=a.state,u=i.xAxisMap,l=i.yAxisMap,s=i.offset,c=t.props,d=c.xAxisId,f=c.yAxisId;return e.cloneElement(t,{key:t.key||"".concat(n,"-").concat(r),xAxis:u[d],yAxis:l[f],viewBox:{x:s.left,y:s.top,width:s.width,height:s.height},clipPathId:o})})),R6(E6(a),"renderActivePoints",(function(e){var t=e.item,r=e.activePoint,o=e.basePoint,i=e.childIndex,a=e.isRange,u=[],l=t.props.key,s=t.item.props,c=s.activeDot,d=F6(F6({index:i,dataKey:s.dataKey,cx:r.x,cy:r.y,r:4,fill:TX(t.item),strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value,key:"".concat(l,"-activePoint-").concat(i)},WR(c,!1)),NR(c));return u.push(n.renderActiveDot(c,d)),o?u.push(n.renderActiveDot(c,F6(F6({},d),{},{cx:o.x,cy:o.y,key:"".concat(l,"-basePoint-").concat(i)}))):a&&u.push(null),u})),R6(E6(a),"renderGraphicChild",(function(t,n,r){var o=a.filterFormatItem(t,n,r);if(!o)return null;var i=a.getTooltipEventType(),u=a.state,l=u.isTooltipActive,s=u.tooltipAxis,c=u.activeTooltipIndex,d=u.activeLabel,f=RR(a.props.children,mV),h=o.props,v=h.points,p=h.isRange,m=h.baseLine,b=o.item.props,y=b.activeDot,g=b.hide,w=b.activeBar,x=b.activeShape,k=Boolean(!g&&l&&f&&(y||w||x)),O={};"axis"!==i&&f&&"click"===f.props.trigger?O={onClick:FX(a.handleItemMouseEnter,t.props.onClick)}:"axis"!==i&&(O={onMouseLeave:FX(a.handleItemMouseLeave,t.props.onMouseLeave),onMouseEnter:FX(a.handleItemMouseEnter,t.props.onMouseEnter)});var j=e.cloneElement(t,F6(F6({},o.props),O));if(k){if(!(c>=0)){var S,N=(null!==(S=a.getItemByXY(a.state.activeCoordinate))&&void 0!==S?S:{graphicalItem:j}).graphicalItem,M=N.item,C=void 0===M?t:M,A=N.childIndex,T=F6(F6(F6({},o.props),O),{},{activeIndex:A});return[e.cloneElement(C,T),null,null]}var E,D;if(s.dataKey&&!s.allowDuplicatedCategory){var P="function"==typeof s.dataKey?function(e){return"function"==typeof s.dataKey?s.dataKey(e.payload):null}:"payload.".concat(s.dataKey.toString());E=gR(v,P,d),D=p&&m&&gR(m,P,d)}else E=null==v?void 0:v[c],D=p&&m&&m[c];if(x||w){var I=void 0!==t.props.activeIndex?t.props.activeIndex:c;return[e.cloneElement(t,F6(F6(F6({},o.props),O),{},{activeIndex:I})),null,null]}if(!PF(E))return[j].concat(P6(a.renderActivePoints({item:o,activePoint:E,basePoint:D,childIndex:c,isRange:p})))}return p?[j,null,null]:[j,null]})),R6(E6(a),"renderCustomized",(function(t,n,r){return e.cloneElement(t,F6(F6({key:"recharts-customized-".concat(r)},a.props),a.state))})),R6(E6(a),"renderMap",{CartesianGrid:{handler:V6,once:!0},ReferenceArea:{handler:a.renderReferenceElement},ReferenceLine:{handler:V6},ReferenceDot:{handler:a.renderReferenceElement},XAxis:{handler:V6},YAxis:{handler:V6},Brush:{handler:a.renderBrush,once:!0},Bar:{handler:a.renderGraphicChild},Line:{handler:a.renderGraphicChild},Area:{handler:a.renderGraphicChild},Radar:{handler:a.renderGraphicChild},RadialBar:{handler:a.renderGraphicChild},Scatter:{handler:a.renderGraphicChild},Pie:{handler:a.renderGraphicChild},Funnel:{handler:a.renderGraphicChild},Tooltip:{handler:a.renderCursor,once:!0},PolarGrid:{handler:a.renderPolarGrid,once:!0},PolarAngleAxis:{handler:a.renderPolarAxis},PolarRadiusAxis:{handler:a.renderPolarAxis},Customized:{handler:a.renderCustomized}}),a.clipPathId="".concat(null!==(o=t.id)&&void 0!==o?o:pR("recharts"),"-clip"),a.throttleTriggeredAfterMouseMove=zV(a.triggeredAfterMouseMove,null!==(i=t.throttleDelay)&&void 0!==i?i:1e3/60),a.state={},a}var o,i,u;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D6(e,t)}(n,t),o=n,i=[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,o=e.layout,i=RR(t,mV);if(i){var a=i.props.defaultIndex;if(!("number"!=typeof a||a<0||a>this.state.tooltipTicks.length)){var u=this.state.tooltipTicks[a]&&this.state.tooltipTicks[a].value,l=q6(this.state,n,a,u),s=this.state.tooltipTicks[a].coordinate,c=(this.state.offset.top+r)/2,d="horizontal"===o?{x:s,y:c}:{y:s,x:c},f=this.state.formattedGraphicalItems.find((function(e){return"Scatter"===e.item.type.name}));f&&(d=F6(F6({},d),f.props.points[a].tooltipPosition),l=f.props.points[a].tooltipPayload);var h={activeTooltipIndex:a,isTooltipActive:!0,activeLabel:u,activePayload:l,activeCoordinate:d};this.setState(h),this.renderCursor(i),this.accessibilityManager.setIndex(a)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:null!==(n=this.props.margin.left)&&void 0!==n?n:0,top:null!==(r=this.props.margin.top)&&void 0!==r?r:0}}),null):null;var n,r}},{key:"componentDidUpdate",value:function(e){VR([RR(e.children,mV)],[RR(this.props.children,mV)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=RR(this.props.children,mV);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return l.indexOf(t)>=0?t:a}return a}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t,n=this.container,r=n.getBoundingClientRect(),o={top:(t=r).top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft},i={chartX:Math.round(e.pageX-o.left),chartY:Math.round(e.pageY-o.top)},a=r.width/n.offsetWidth||1,u=this.inRange(i.chartX,i.chartY,a);if(!u)return null;var l=this.state,s=l.xAxisMap,c=l.yAxisMap;if("axis"!==this.getTooltipEventType()&&s&&c){var d=bR(s).scale,f=bR(c).scale,h=d&&d.invert?d.invert(i.chartX):null,v=f&&f.invert?f.invert(i.chartY):null;return F6(F6({},i),{},{xValue:h,yValue:v})}var p=K6(this.state,this.props.data,this.props.layout,u);return p?F6(F6({},i),p):null}},{key:"inRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.props.layout,o=e/n,i=t/n;if("horizontal"===r||"vertical"===r){var a=this.state.offset;return o>=a.left&&o<=a.left+a.width&&i>=a.top&&i<=a.top+a.height?{x:o,y:i}:null}var u=this.state,l=u.angleAxisMap,s=u.radiusAxisMap;if(l&&s){var c=bR(l);return dZ({x:o,y:i},c)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=RR(e,mV),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),F6(F6({},NR(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){u6.on(l6,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){u6.removeListener(l6,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,o=0,i=r.length;o<i;o++){var a=r[o];if(a.item===e||a.props.key===e.key||t===PR(a.item.type)&&n===a.childIndex)return a}return null}},{key:"renderClipPath",value:function(){var t=this.clipPathId,n=this.state.offset,r=n.left,o=n.top,i=n.height,a=n.width;return e.createElement("defs",null,e.createElement("clipPath",{id:t},e.createElement("rect",{x:r,y:o,height:i,width:a})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce((function(e,t){var n=S6(t,2),r=n[0],o=n[1];return F6(F6({},e),{},R6({},r,o.scale))}),{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce((function(e,t){var n=S6(t,2),r=n[0],o=n[1];return F6(F6({},e),{},R6({},r,o.scale))}),{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var o=0,i=n.length;o<i;o++){var a=n[o],u=a.props,l=a.item,s=PR(l.type);if("Bar"===s){var c=(u.data||[]).find((function(t){return KJ(e,t)}));if(c)return{graphicalItem:a,payload:c}}else if("RadialBar"===s){var d=(u.data||[]).find((function(t){return dZ(e,t)}));if(d)return{graphicalItem:a,payload:d}}else if(k1(a,r)||O1(a,r)||j1(a,r)){var f=C1({graphicalItem:a,activeTooltipItem:r,itemData:l.props.data}),h=void 0===l.props.activeIndex?f:l.props.activeIndex;return{graphicalItem:F6(F6({},a),{},{childIndex:h}),payload:j1(a,r)?l.props.data[f]:a.props.data[f]}}}return null}},{key:"render",value:function(){var t,n=this;if(!BR(this))return null;var r,o,i=this.props,a=i.children,u=i.className,l=i.width,s=i.height,c=i.style,d=i.compact,f=i.title,h=i.desc,v=N6(i,k6),p=WR(v,!1);if(d)return e.createElement(U5,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},e.createElement(YR,j6({},p,{width:l,height:s,title:f,desc:h}),this.renderClipPath(),HR(a,this.renderMap)));this.props.accessibilityLayer&&(p.tabIndex=null!==(r=this.props.tabIndex)&&void 0!==r?r:0,p.role=null!==(o=this.props.role)&&void 0!==o?o:"application",p.onKeyDown=function(e){n.accessibilityManager.keyboardEvent(e)},p.onFocus=function(){n.accessibilityManager.focus()});var m=this.parseEventsOfWrapper();return e.createElement(U5,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},e.createElement("div",j6({className:DF("recharts-wrapper",u),style:F6({position:"relative",cursor:"default",width:l,height:s},c)},m,{ref:function(e){n.container=e},role:null!==(t=p.role)&&void 0!==t?t:"region"}),e.createElement(YR,j6({},p,{width:l,height:s,title:f,desc:h,style:$6}),this.renderClipPath(),HR(a,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}],i&&M6(o.prototype,i),u&&M6(o,u),Object.defineProperty(o,"prototype",{writable:!1}),n}(e.Component),R6(n,"displayName",r),R6(n,"defaultProps",F6({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),R6(n,"getDerivedStateFromProps",(function(e,t){var n=e.dataKey,r=e.data,o=e.children,i=e.width,a=e.height,u=e.layout,l=e.stackOffset,s=e.margin,c=t.dataStartIndex,d=t.dataEndIndex;if(void 0===t.updateId){var f=X6(e);return F6(F6(F6({},f),{},{updateId:0},v(F6(F6({props:e},f),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:i,prevHeight:a,prevLayout:u,prevStackOffset:l,prevMargin:s,prevChildren:o})}if(n!==t.prevDataKey||r!==t.prevData||i!==t.prevWidth||a!==t.prevHeight||u!==t.prevLayout||l!==t.prevStackOffset||!wR(s,t.prevMargin)){var h=X6(e),p={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},m=F6(F6({},K6(t,r,u)),{},{updateId:t.updateId+1}),b=F6(F6(F6({},h),p),m);return F6(F6(F6({},b),v(F6({props:e},b),t)),{},{prevDataKey:n,prevData:r,prevWidth:i,prevHeight:a,prevLayout:u,prevStackOffset:l,prevMargin:s,prevChildren:o})}if(!VR(o,t.prevChildren)){var y,g,w,x,k=RR(o,b2),O=k&&null!==(y=null===(g=k.props)||void 0===g?void 0:g.startIndex)&&void 0!==y?y:c,j=k&&null!==(w=null===(x=k.props)||void 0===x?void 0:x.endIndex)&&void 0!==w?w:d,S=O!==c||j!==d,N=!PF(r)&&!S?t.updateId:t.updateId+1;return F6(F6({updateId:N},v(F6(F6({props:e},t),{},{updateId:N,dataStartIndex:O,dataEndIndex:j}),t)),{},{prevChildren:o,dataStartIndex:O,dataEndIndex:j})}return null})),R6(n,"renderActiveDot",(function(t,n){var r;return r=e.isValidElement(t)?e.cloneElement(t,n):mx(t)?t(n):e.createElement(i0,n),e.createElement(JR,{className:"recharts-active-dot",key:n.key},r)})),n},e8=J6({chartName:"LineChart",GraphicalChild:y4,axisComponents:[{axisType:"xAxis",AxisComp:e6},{axisType:"yAxis",AxisComp:n6}],formatAxisMap:w5}),t8=J6({chartName:"BarChart",GraphicalChild:h5,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:e6},{axisType:"yAxis",AxisComp:n6}],formatAxisMap:w5}),n8=J6({chartName:"PieChart",GraphicalChild:$1,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Q0},{axisType:"radiusAxis",AxisComp:R0}],formatAxisMap:function(e,t,n,r,o){var i=e.width,a=e.height,u=e.startAngle,l=e.endAngle,s=mR(e.cx,i,i/2),c=mR(e.cy,a,a/2),d=lZ(i,a,n),f=mR(e.innerRadius,d,0),h=mR(e.outerRadius,d,.8*d);return Object.keys(t).reduce((function(e,n){var i,a=t[n],d=a.domain,v=a.reversed;if(PF(a.range))"angleAxis"===r?i=[u,l]:"radiusAxis"===r&&(i=[f,h]),v&&(i=[i[1],i[0]]);else{var p=rZ(i=a.range,2);u=p[0],l=p[1]}var m=RX(a,o),b=m.realScaleType,y=m.scale;y.domain(d).range(i),zX(y);var g=VX(y,tZ(tZ({},a),{},{realScaleType:b})),w=tZ(tZ(tZ({},a),g),{},{range:i,radius:h,realScaleType:b,scale:y,cx:s,cy:c,innerRadius:f,outerRadius:h,startAngle:u,endAngle:l});return tZ(tZ({},e),{},nZ({},n,w))}),{})},defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),r8=J6({chartName:"ScatterChart",GraphicalChild:Q4,defaultTooltipEventType:"item",validateTooltipEventTypes:["item"],axisComponents:[{axisType:"xAxis",AxisComp:e6},{axisType:"yAxis",AxisComp:n6},{axisType:"zAxis",AxisComp:L4}],formatAxisMap:w5}),o8=J6({chartName:"AreaChart",GraphicalChild:I4,axisComponents:[{axisType:"xAxis",AxisComp:e6},{axisType:"yAxis",AxisComp:n6}],formatAxisMap:w5});const i8={Increase:"increase",ModerateIncrease:"moderateIncrease",Decrease:"decrease",ModerateDecrease:"moderateDecrease",Unchanged:"unchanged"},a8="gray",u8="red",l8="orange",s8="emerald",c8="blue",d8="rose",f8={XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl"},h8={Left:"left",Right:"right"},v8="top",p8="bottom",m8=500,b8=600,y8=500,g8=700,w8=300,x8=500,k8=400,O8=500,j8=600,S8=700,N8=[c8,"cyan","sky","indigo","violet","purple","fuchsia","slate",a8,"zinc","neutral","stone",u8,l8,"amber","yellow","lime","green",s8,"teal","pink",d8],M8=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?q.apply(void 0,[ge,e].concat(n)):q.apply(void 0,[function(){return function(e,t){for(var n in t)ke(e,n,t[n]);return e}(ge(),e)}].concat(n))}({classGroups:{boxShadow:[{shadow:[{tremor:["input","card","dropdown"],"dark-tremor":["input","card","dropdown"]}]}],borderRadius:[{rounded:[{tremor:["small","default","full"],"dark-tremor":["small","default","full"]}]}],fontSize:[{text:[{tremor:["default","title","metric"],"dark-tremor":["default","title","metric"]}]}]}}),C8=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],A8=e=>C8.includes(e),T8=(e,t)=>{if(t||e===i8.Unchanged)return e;switch(e){case i8.Increase:return i8.Decrease;case i8.ModerateIncrease:return i8.ModerateDecrease;case i8.Decrease:return i8.Increase;case i8.ModerateDecrease:return i8.ModerateIncrease}return""},E8=e=>e.toString(),D8=e=>e.reduce(((e,t)=>e+t),0);function P8(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function I8(e){return t=>`tremor-${e}-${t}`}function L8(e,t){const n=A8(e);if("white"===e||"black"===e||"transparent"===e||!t||!n){const t=(e=>e.includes("#")||e.includes("--")||e.includes("rgb"))(e)?`[${e}]`:e;return{bgColor:`bg-${t}`,hoverBgColor:`hover:bg-${t}`,selectBgColor:`ui-selected:bg-${t}`,textColor:`text-${t}`,selectTextColor:`ui-selected:text-${t}`,hoverTextColor:`hover:text-${t}`,borderColor:`border-${t}`,selectBorderColor:`ui-selected:border-${t}`,hoverBorderColor:`hover:border-${t}`,ringColor:`ring-${t}`,strokeColor:`stroke-${t}`,fillColor:`fill-${t}`}}return{bgColor:`bg-${e}-${t}`,selectBgColor:`ui-selected:bg-${e}-${t}`,hoverBgColor:`hover:bg-${e}-${t}`,textColor:`text-${e}-${t}`,selectTextColor:`ui-selected:text-${e}-${t}`,hoverTextColor:`hover:text-${e}-${t}`,borderColor:`border-${e}-${t}`,selectBorderColor:`ui-selected:border-${e}-${t}`,hoverBorderColor:`hover:border-${e}-${t}`,ringColor:`ring-${e}-${t}`,strokeColor:`stroke-${e}-${t}`,fillColor:`fill-${e}-${t}`}}const _8=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),e.createElement("path",{d:"M8 12L14 6V18L8 12Z"}))},F8=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),e.createElement("path",{d:"M16 12L10 18V6L16 12Z"}))},R8=I8("Legend"),B8=({name:t,color:n,onClick:r,activeLegend:o})=>{const i=!!r;return e.createElement("li",{className:M8(R8("legendItem"),"group inline-flex items-center px-2 py-0.5 rounded-tremor-small transition whitespace-nowrap",i?"cursor-pointer":"cursor-default","text-tremor-content",i?"hover:bg-tremor-background-subtle":"","dark:text-dark-tremor-content",i?"dark:hover:bg-dark-tremor-background-subtle":""),onClick:e=>{e.stopPropagation(),null==r||r(t,n)}},e.createElement("svg",{className:M8("flex-none h-2 w-2 mr-1.5",L8(n,O8).textColor,o&&o!==t?"opacity-40":"opacity-100"),fill:"currentColor",viewBox:"0 0 8 8"},e.createElement("circle",{cx:4,cy:4,r:4})),e.createElement("p",{className:M8("whitespace-nowrap truncate text-tremor-default","text-tremor-content",i?"group-hover:text-tremor-content-emphasis":"","dark:text-dark-tremor-content",o&&o!==t?"opacity-40":"opacity-100",i?"dark:group-hover:text-dark-tremor-content-emphasis":"")},t))},z8=({icon:t,onClick:n,disabled:r})=>{const o=t,[i,a]=e.useState(!1),u=e.useRef(null);return e.useEffect((()=>(i?u.current=setInterval((()=>{null==n||n()}),300):clearInterval(u.current),()=>clearInterval(u.current))),[i,n]),e.useEffect((()=>{r&&(clearInterval(u.current),a(!1))}),[r]),e.createElement("button",{type:"button",className:M8(R8("legendSliderButton"),"w-5 group inline-flex items-center truncate rounded-tremor-small transition",r?"cursor-not-allowed":"cursor-pointer",r?"text-tremor-content-subtle":"text-tremor-content hover:text-tremor-content-emphasis hover:bg-tremor-background-subtle",r?"dark:text-dark-tremor-subtle":"dark:text-dark-tremor dark:hover:text-tremor-content-emphasis dark:hover:bg-dark-tremor-background-subtle"),disabled:r,onClick:e=>{e.stopPropagation(),null==n||n()},onMouseDown:e=>{e.stopPropagation(),a(!0)},onMouseUp:e=>{e.stopPropagation(),a(!1)}},e.createElement(o,{className:"w-full"}))},$8=e.forwardRef(((t,n)=>{var r,o;const{categories:i,colors:a=N8,className:u,onClickLegendItem:l,activeLegend:s,enableLegendSlider:c=!1}=t,d=Ar(t,["categories","colors","className","onClickLegendItem","activeLegend","enableLegendSlider"]),f=e.useRef(null),[h,v]=e.useState(null),[p,m]=e.useState(null),b=e.useRef(null),y=e.useCallback((()=>{const e=null==f?void 0:f.current;if(!e)return;const t=e.scrollLeft>0,n=e.scrollWidth-e.clientWidth>e.scrollLeft;v({left:t,right:n})}),[v]),g=e.useCallback((e=>{var t;const n=null==f?void 0:f.current,r=null!==(t=null==n?void 0:n.clientWidth)&&void 0!==t?t:0;n&&c&&(n.scrollTo({left:"left"===e?n.scrollLeft-r:n.scrollLeft+r,behavior:"smooth"}),setTimeout((()=>{y()}),400))}),[c,y]);e.useEffect((()=>{const e=e=>{"ArrowLeft"===e?g("left"):"ArrowRight"===e&&g("right")};return p?(e(p),b.current=setInterval((()=>{e(p)}),300)):clearInterval(b.current),()=>clearInterval(b.current)}),[p,g]);const w=e=>{e.stopPropagation(),"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||(e.preventDefault(),m(e.key))},x=e=>{e.stopPropagation(),m(null)};return e.useEffect((()=>{const e=null==f?void 0:f.current;return c&&(y(),null==e||e.addEventListener("keydown",w),null==e||e.addEventListener("keyup",x)),()=>{null==e||e.removeEventListener("keydown",w),null==e||e.removeEventListener("keyup",x)}}),[y,c]),e.createElement("ol",Object.assign({ref:n,className:M8(R8("root"),"relative overflow-hidden",u)},d),e.createElement("div",{ref:f,tabIndex:0,className:M8("h-full flex",c?(null==h?void 0:h.right)||(null==h?void 0:h.left)?"pl-4 pr-12 items-center overflow-auto snap-mandatory [&::-webkit-scrollbar]:hidden [scrollbar-width:none]":"":"flex-wrap")},i.map(((t,n)=>e.createElement(B8,{key:`item-${n}`,name:t,color:a[n],onClick:l,activeLegend:s})))),c&&((null==h?void 0:h.right)||(null==h?void 0:h.left))?e.createElement(e.Fragment,null,e.createElement("div",{className:M8("from-tremor-background","dark:from-dark-tremor-background","absolute top-0 bottom-0 left-0 w-4 bg-gradient-to-r to-transparent pointer-events-none")}),e.createElement("div",{className:M8("to-tremor-background","dark:to-dark-tremor-background","absolute top-0 bottom-0 right-10 w-4 bg-gradient-to-r from-transparent pointer-events-none")}),e.createElement("div",{className:M8("bg-tremor-background","dark:bg-dark-tremor-background","absolute flex top-0 pr-1 bottom-0 right-0 items-center justify-center h-full")},e.createElement(z8,{icon:_8,onClick:()=>{m(null),g("left")},disabled:null===(r=!(null==h?void 0:h.left))||void 0===r||r}),e.createElement(z8,{icon:F8,onClick:()=>{m(null),g("right")},disabled:null===(o=!(null==h?void 0:h.right))||void 0===o||o}))):null)}));$8.displayName="Legend";const W8=({payload:t},n,r,o,i,a)=>{const u=e.useRef(null);((t,n)=>{const[r,o]=e.useState(n);e.useEffect((()=>{const e=()=>{o(window.innerWidth),t()};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[t,r])})((()=>{var e,t;r((t=null===(e=u.current)||void 0===e?void 0:e.clientHeight)?Number(t)+20:60)}));const l=t.filter((e=>"none"!==e.type));return e.createElement("div",{ref:u,className:"flex items-center justify-end"},e.createElement($8,{categories:l.map((e=>e.value)),colors:l.map((e=>n.get(e.value))),onClickLegendItem:i,activeLegend:o,enableLegendSlider:a}))},V8=({children:t})=>e.createElement("div",{className:M8("rounded-tremor-default text-tremor-default border","bg-tremor-background shadow-tremor-dropdown border-tremor-border","dark:bg-dark-tremor-background dark:shadow-dark-tremor-dropdown dark:border-dark-tremor-border")},t),U8=({value:t,name:n,color:r})=>e.createElement("div",{className:"flex items-center justify-between space-x-8"},e.createElement("div",{className:"flex items-center space-x-2"},e.createElement("span",{className:M8("shrink-0 rounded-tremor-full border-2 h-3 w-3","border-tremor-background shadow-tremor-card","dark:border-dark-tremor-background dark:shadow-dark-tremor-card",L8(r,m8).bgColor)}),e.createElement("p",{className:M8("text-right whitespace-nowrap","text-tremor-content","dark:text-dark-tremor-content")},n)),e.createElement("p",{className:M8("font-medium tabular-nums text-right whitespace-nowrap","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},t)),H8=({active:t,payload:n,label:r,categoryColors:o,valueFormatter:i})=>{if(t&&n){const t=n.filter((e=>"none"!==e.type));return e.createElement(V8,null,e.createElement("div",{className:M8("border-tremor-border border-b px-4 py-2","dark:border-dark-tremor-border")},e.createElement("p",{className:M8("font-medium","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},r)),e.createElement("div",{className:M8("px-4 py-2 space-y-1")},t.map((({value:t,name:n},r)=>{var a;return e.createElement(U8,{key:`id-${r}`,value:i(t),name:n,color:null!==(a=o.get(n))&&void 0!==a?a:c8})}))))}return null},q8=I8("Flex"),K8={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},G8={start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},Y8={row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},X8=e.forwardRef(((t,n)=>{const{flexDirection:r="row",justifyContent:o="between",alignItems:i="center",children:a,className:u}=t,l=Ar(t,["flexDirection","justifyContent","alignItems","children","className"]);return e.createElement("div",Object.assign({ref:n,className:M8(q8("root"),"flex w-full",Y8[r],K8[o],G8[i],u)},l),a)}));X8.displayName="Flex";const Z8=e.forwardRef(((t,n)=>{const{color:r,className:o,children:i}=t;return e.createElement("p",{ref:n,className:M8("text-tremor-default",r?L8(r,O8).textColor:M8("text-tremor-content","dark:text-dark-tremor-content"),o)},i)}));Z8.displayName="Text";const Q8=({noDataText:t="No data"})=>e.createElement(X8,{alignItems:"center",justifyContent:"center",className:M8("w-full h-full border border-dashed rounded-tremor-default","border-tremor-border","dark:border-dark-tremor-border")},e.createElement(Z8,{className:M8("text-tremor-content","dark:text-dark-tremor-content")},t)),J8=(e,t)=>{const n=new Map;return e.forEach(((e,r)=>{n.set(e,t[r])})),n},e9=(e,t,n)=>[e?"auto":null!=t?t:0,null!=n?n:"auto"];function t9(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!r.includes(o)||!t9(e[o],t[o]))return!1;return!0}function n9(e,t){const n=[];for(const r of e)if(Object.prototype.hasOwnProperty.call(r,t)&&(n.push(r[t]),n.length>1))return!1;return!0}const r9=e.forwardRef(((t,n)=>{const{data:r=[],categories:o=[],index:i,stack:a=!1,colors:u=N8,valueFormatter:l=E8,startEndOnly:s=!1,showXAxis:c=!0,showYAxis:d=!0,yAxisWidth:f=56,intervalType:h="equidistantPreserveStart",showAnimation:v=!1,animationDuration:p=900,showTooltip:m=!0,showLegend:b=!0,showGridLines:y=!0,showGradient:g=!0,autoMinValue:w=!1,curveType:x="linear",minValue:k,maxValue:O,connectNulls:j=!1,allowDecimals:S=!0,noDataText:N,className:M,onValueChange:C,enableLegendSlider:A=!1,customTooltip:T,rotateLabelX:E,tickGap:D=5}=t,P=Ar(t,["data","categories","index","stack","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","showAnimation","animationDuration","showTooltip","showLegend","showGridLines","showGradient","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap"]),I=T,L=!c&&!d||s&&!d?0:20,[_,F]=e.useState(60),[R,B]=e.useState(void 0),[z,$]=e.useState(void 0),W=J8(o,u),V=e9(w,k,O),U=!!C;function H(e){U&&(e===z&&!R||n9(r,e)&&R&&R.dataKey===e?($(void 0),null==C||C(null)):($(e),null==C||C({eventType:"category",categoryClicked:e})),B(void 0))}return e.createElement("div",Object.assign({ref:n,className:M8("w-full h-80",M)},P),e.createElement(KV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(o8,{data:r,onClick:U&&(z||R)?()=>{B(void 0),$(void 0),null==C||C(null)}:void 0},y?e.createElement(t4,{className:M8("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,e.createElement(e6,{padding:{left:L,right:L},hide:!c,dataKey:i,tick:{transform:"translate(0, 6)"},ticks:s?[r[0][i],r[r.length-1][i]]:void 0,fill:"",stroke:"",className:M8("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),interval:s?"preserveStartEnd":h,tickLine:!1,axisLine:!1,minTickGap:D,angle:null==E?void 0:E.angle,dy:null==E?void 0:E.verticalShift,height:null==E?void 0:E.xAxisHeight}),e.createElement(n6,{width:f,hide:!d,axisLine:!1,tickLine:!1,type:"number",domain:V,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:M8("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:l,allowDecimals:S}),e.createElement(mV,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:m?({active:t,payload:n,label:r})=>I?e.createElement(I,{payload:null==n?void 0:n.map((e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=W.get(e.dataKey))&&void 0!==t?t:a8})})),active:t,label:r}):e.createElement(H8,{active:t,payload:n,label:r,valueFormatter:l,categoryColors:W}):e.createElement(e.Fragment,null),position:{y:0}}),b?e.createElement(z$,{verticalAlign:"top",height:_,content:({payload:e})=>W8({payload:e},W,F,z,U?e=>H(e):void 0,A)}):null,o.map((t=>{var n,r;return e.createElement("defs",{key:t},g?e.createElement("linearGradient",{className:L8(null!==(n=W.get(t))&&void 0!==n?n:a8,O8).textColor,id:W.get(t),x1:"0",y1:"0",x2:"0",y2:"1"},e.createElement("stop",{offset:"5%",stopColor:"currentColor",stopOpacity:R||z&&z!==t?.15:.4}),e.createElement("stop",{offset:"95%",stopColor:"currentColor",stopOpacity:0})):e.createElement("linearGradient",{className:L8(null!==(r=W.get(t))&&void 0!==r?r:a8,O8).textColor,id:W.get(t),x1:"0",y1:"0",x2:"0",y2:"1"},e.createElement("stop",{stopColor:"currentColor",stopOpacity:R||z&&z!==t?.1:.3})))})),o.map((t=>{var n;return e.createElement(I4,{className:L8(null!==(n=W.get(t))&&void 0!==n?n:a8,O8).strokeColor,strokeOpacity:R||z&&z!==t?.3:1,activeDot:t=>{var n;const{cx:o,cy:i,stroke:a,strokeLinecap:u,strokeLinejoin:l,strokeWidth:s,dataKey:c}=t;return e.createElement(i0,{className:M8("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",L8(null!==(n=W.get(c))&&void 0!==n?n:a8,O8).fillColor),cx:o,cy:i,r:5,fill:"",stroke:a,strokeLinecap:u,strokeLinejoin:l,strokeWidth:s,onClick:(e,n)=>function(e,t){t.stopPropagation(),U&&(e.index===(null==R?void 0:R.index)&&e.dataKey===(null==R?void 0:R.dataKey)||n9(r,e.dataKey)&&z&&z===e.dataKey?($(void 0),B(void 0),null==C||C(null)):($(e.dataKey),B({index:e.index,dataKey:e.dataKey}),null==C||C(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}(t,n)})},dot:n=>{var o;const{stroke:i,strokeLinecap:a,strokeLinejoin:u,strokeWidth:l,cx:s,cy:c,dataKey:d,index:f}=n;return n9(r,t)&&!(R||z&&z!==t)||(null==R?void 0:R.index)===f&&(null==R?void 0:R.dataKey)===t?e.createElement(i0,{key:f,cx:s,cy:c,r:5,stroke:i,fill:"",strokeLinecap:a,strokeLinejoin:u,strokeWidth:l,className:M8("stroke-tremor-background dark:stroke-dark-tremor-background",C?"cursor-pointer":"",L8(null!==(o=W.get(d))&&void 0!==o?o:a8,O8).fillColor)}):e.createElement(e.Fragment,{key:f})},key:t,name:t,type:x,dataKey:t,stroke:"",fill:`url(#${W.get(t)})`,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:v,animationDuration:p,stackId:a?"a":void 0,connectNulls:j})})),C?o.map((t=>e.createElement(y4,{className:M8("cursor-pointer"),strokeOpacity:0,key:t,name:t,type:x,dataKey:t,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:j,onClick:(e,t)=>{t.stopPropagation();const{name:n}=e;H(n)}}))):null):e.createElement(Q8,{noDataText:N})))}));r9.displayName="AreaChart";const o9=e.forwardRef(((t,n)=>{const{data:r=[],categories:o=[],index:i,colors:a=N8,valueFormatter:u=E8,layout:l="horizontal",stack:s=!1,relative:c=!1,startEndOnly:d=!1,animationDuration:f=900,showAnimation:h=!1,showXAxis:v=!0,showYAxis:p=!0,yAxisWidth:m=56,intervalType:b="equidistantPreserveStart",showTooltip:y=!0,showLegend:g=!0,showGridLines:w=!0,autoMinValue:x=!1,minValue:k,maxValue:O,allowDecimals:j=!0,noDataText:S,onValueChange:N,enableLegendSlider:M=!1,customTooltip:C,rotateLabelX:A,tickGap:T=5,className:E}=t,D=Ar(t,["data","categories","index","colors","valueFormatter","layout","stack","relative","startEndOnly","animationDuration","showAnimation","showXAxis","showYAxis","yAxisWidth","intervalType","showTooltip","showLegend","showGridLines","autoMinValue","minValue","maxValue","allowDecimals","noDataText","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap","className"]),P=C,I=v||p?20:0,[L,_]=e.useState(60),F=J8(o,a),[R,B]=e.useState(void 0),[z,$]=e.useState(void 0),W=!!N;function V(e,t,n){var r,o,i,a;n.stopPropagation(),N&&(t9(R,Object.assign(Object.assign({},e.payload),{value:e.value}))?($(void 0),B(void 0),null==N||N(null)):($(null===(o=null===(r=e.tooltipPayload)||void 0===r?void 0:r[0])||void 0===o?void 0:o.dataKey),B(Object.assign(Object.assign({},e.payload),{value:e.value})),null==N||N(Object.assign({eventType:"bar",categoryClicked:null===(a=null===(i=e.tooltipPayload)||void 0===i?void 0:i[0])||void 0===a?void 0:a.dataKey},e.payload))))}const U=e9(x,k,O);return e.createElement("div",Object.assign({ref:n,className:M8("w-full h-80",E)},D),e.createElement(KV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(t8,{data:r,stackOffset:s?"sign":c?"expand":"none",layout:"vertical"===l?"vertical":"horizontal",onClick:W&&(z||R)?()=>{B(void 0),$(void 0),null==N||N(null)}:void 0},w?e.createElement(t4,{className:M8("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:"vertical"!==l,vertical:"vertical"===l}):null,"vertical"!==l?e.createElement(e6,{padding:{left:I,right:I},hide:!v,dataKey:i,interval:d?"preserveStartEnd":b,tick:{transform:"translate(0, 6)"},ticks:d?[r[0][i],r[r.length-1][i]]:void 0,fill:"",stroke:"",className:M8("mt-4 text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,angle:null==A?void 0:A.angle,dy:null==A?void 0:A.verticalShift,height:null==A?void 0:A.xAxisHeight,minTickGap:T}):e.createElement(e6,{hide:!v,type:"number",tick:{transform:"translate(-3, 0)"},domain:U,fill:"",stroke:"",className:M8("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,tickFormatter:u,minTickGap:T,allowDecimals:j,angle:null==A?void 0:A.angle,dy:null==A?void 0:A.verticalShift,height:null==A?void 0:A.xAxisHeight}),"vertical"!==l?e.createElement(n6,{width:m,hide:!p,axisLine:!1,tickLine:!1,type:"number",domain:U,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:M8("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:c?e=>`${(100*e).toString()} %`:u,allowDecimals:j}):e.createElement(n6,{width:m,hide:!p,dataKey:i,axisLine:!1,tickLine:!1,ticks:d?[r[0][i],r[r.length-1][i]]:void 0,type:"category",interval:"preserveStartEnd",tick:{transform:"translate(0, 6)"},fill:"",stroke:"",className:M8("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content")}),e.createElement(mV,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{fill:"#d1d5db",opacity:"0.15"},content:y?({active:t,payload:n,label:r})=>P?e.createElement(P,{payload:null==n?void 0:n.map((e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=F.get(e.dataKey))&&void 0!==t?t:a8})})),active:t,label:r}):e.createElement(H8,{active:t,payload:n,label:r,valueFormatter:u,categoryColors:F}):e.createElement(e.Fragment,null),position:{y:0}}),g?e.createElement(z$,{verticalAlign:"top",height:L,content:({payload:e})=>W8({payload:e},F,_,z,W?e=>{return t=e,void(W&&(t!==z||R?($(t),null==N||N({eventType:"category",categoryClicked:t})):($(void 0),null==N||N(null)),B(void 0)));var t}:void 0,M)}):null,o.map((t=>{var n;return e.createElement(h5,{className:M8(L8(null!==(n=F.get(t))&&void 0!==n?n:a8,m8).fillColor,N?"cursor-pointer":""),key:t,name:t,type:"linear",stackId:s||c?"a":void 0,dataKey:t,fill:"",isAnimationActive:h,animationDuration:f,shape:t=>((t,n,r,o)=>{const{fillOpacity:i,name:a,payload:u,value:l}=t;let{x:s,width:c,y:d,height:f}=t;return"horizontal"===o&&f<0?(d+=f,f=Math.abs(f)):"vertical"===o&&c<0&&(s+=c,c=Math.abs(c)),e.createElement("rect",{x:s,y:d,width:c,height:f,opacity:n||r&&r!==a?t9(n,Object.assign(Object.assign({},u),{value:l}))?i:.3:i})})(t,R,z,l),onClick:V})}))):e.createElement(Q8,{noDataText:S})))}));o9.displayName="BarChart";const i9=({active:t,payload:n,valueFormatter:r})=>{if(t&&(null==n?void 0:n[0])){const t=null==n?void 0:n[0];return e.createElement(V8,null,e.createElement("div",{className:M8("px-4 py-2")},e.createElement(U8,{value:r(t.value),name:t.name,color:t.payload.color})))}return null},a9=(e,t)=>e.map(((e,n)=>{const r=n<t.length?t[n]:a8;return Object.assign(Object.assign({},e),{color:r,className:L8(null!=r?r:a8,m8).fillColor,fill:""})})),u9=t=>{const{cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:a,endAngle:u,className:l}=t;return e.createElement("g",null,e.createElement(XZ,{cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:a,endAngle:u,className:l,fill:"",opacity:.3,style:{outline:"none"}}))},l9=e.forwardRef(((t,n)=>{const{data:r=[],category:o="value",index:i="name",colors:a=N8,variant:u="donut",valueFormatter:l=E8,label:s,showLabel:c=!0,animationDuration:d=900,showAnimation:f=!1,showTooltip:h=!0,noDataText:v,onValueChange:p,customTooltip:m,className:b}=t,y=Ar(t,["data","category","index","colors","variant","valueFormatter","label","showLabel","animationDuration","showAnimation","showTooltip","noDataText","onValueChange","customTooltip","className"]),g=m,w="donut"==u,x=((e,t,n,r)=>e||t(((e,t)=>D8(e.map((e=>e[t]))))(n,r)))(s,l,r,o),[k,O]=e.useState(void 0),j=!!p;return e.useEffect((()=>{const e=document.querySelectorAll(".recharts-pie-sector");e&&e.forEach((e=>{e.setAttribute("style","outline: none")}))}),[k]),e.createElement("div",Object.assign({ref:n,className:M8("w-full h-40",b)},y),e.createElement(KV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(n8,{onClick:j&&k?()=>{O(void 0),null==p||p(null)}:void 0,margin:{top:0,left:0,right:0,bottom:0}},c&&w?e.createElement("text",{className:M8("fill-tremor-content-emphasis","dark:fill-dark-tremor-content-emphasis"),x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle"},x):null,e.createElement($1,{className:M8("stroke-tremor-background dark:stroke-dark-tremor-background",p?"cursor-pointer":"cursor-default"),data:a9(r,a),cx:"50%",cy:"50%",startAngle:90,endAngle:-270,innerRadius:w?"75%":"0%",outerRadius:"100%",stroke:"",strokeLinejoin:"round",dataKey:o,nameKey:i,isAnimationActive:f,animationDuration:d,onClick:function(e,t,n){n.stopPropagation(),j&&(k===t?(O(void 0),null==p||p(null)):(O(t),null==p||p(Object.assign({eventType:"slice"},e.payload.payload))))},activeIndex:k,inactiveShape:u9,style:{outline:"none"}}),e.createElement(mV,{wrapperStyle:{outline:"none"},isAnimationActive:!1,content:h?({active:t,payload:n})=>{var r;return g?e.createElement(g,{payload:null==n?void 0:n.map((e=>{var t,r,o;return Object.assign(Object.assign({},e),{color:null!==(o=null===(r=null===(t=null==n?void 0:n[0])||void 0===t?void 0:t.payload)||void 0===r?void 0:r.color)&&void 0!==o?o:a8})})),active:t,label:null===(r=null==n?void 0:n[0])||void 0===r?void 0:r.name}):e.createElement(i9,{active:t,payload:n,valueFormatter:l})}:e.createElement(e.Fragment,null)})):e.createElement(Q8,{noDataText:v})))}));l9.displayName="DonutChart";const s9=e.forwardRef(((t,n)=>{const{data:r=[],categories:o=[],index:i,colors:a=N8,valueFormatter:u=E8,startEndOnly:l=!1,showXAxis:s=!0,showYAxis:c=!0,yAxisWidth:d=56,intervalType:f="equidistantPreserveStart",animationDuration:h=900,showAnimation:v=!1,showTooltip:p=!0,showLegend:m=!0,showGridLines:b=!0,autoMinValue:y=!1,curveType:g="linear",minValue:w,maxValue:x,connectNulls:k=!1,allowDecimals:O=!0,noDataText:j,className:S,onValueChange:N,enableLegendSlider:M=!1,customTooltip:C,rotateLabelX:A,tickGap:T=5}=t,E=Ar(t,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","tickGap"]),D=C,P=s||c?20:0,[I,L]=e.useState(60),[_,F]=e.useState(void 0),[R,B]=e.useState(void 0),z=J8(o,a),$=e9(y,w,x),W=!!N;function V(e){W&&(e===R&&!_||n9(r,e)&&_&&_.dataKey===e?(B(void 0),null==N||N(null)):(B(e),null==N||N({eventType:"category",categoryClicked:e})),F(void 0))}return e.createElement("div",Object.assign({ref:n,className:M8("w-full h-80",S)},E),e.createElement(KV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(e8,{data:r,onClick:W&&(R||_)?()=>{F(void 0),B(void 0),null==N||N(null)}:void 0},b?e.createElement(t4,{className:M8("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,e.createElement(e6,{padding:{left:P,right:P},hide:!s,dataKey:i,interval:l?"preserveStartEnd":f,tick:{transform:"translate(0, 6)"},ticks:l?[r[0][i],r[r.length-1][i]]:void 0,fill:"",stroke:"",className:M8("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:T,angle:null==A?void 0:A.angle,dy:null==A?void 0:A.verticalShift,height:null==A?void 0:A.xAxisHeight}),e.createElement(n6,{width:d,hide:!c,axisLine:!1,tickLine:!1,type:"number",domain:$,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:M8("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:u,allowDecimals:O}),e.createElement(mV,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:p?({active:t,payload:n,label:r})=>D?e.createElement(D,{payload:null==n?void 0:n.map((e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=z.get(e.dataKey))&&void 0!==t?t:a8})})),active:t,label:r}):e.createElement(H8,{active:t,payload:n,label:r,valueFormatter:u,categoryColors:z}):e.createElement(e.Fragment,null),position:{y:0}}),m?e.createElement(z$,{verticalAlign:"top",height:I,content:({payload:e})=>W8({payload:e},z,L,R,W?e=>V(e):void 0,M)}):null,o.map((t=>{var n;return e.createElement(y4,{className:M8(L8(null!==(n=z.get(t))&&void 0!==n?n:a8,O8).strokeColor),strokeOpacity:_||R&&R!==t?.3:1,activeDot:t=>{var n;const{cx:o,cy:i,stroke:a,strokeLinecap:u,strokeLinejoin:l,strokeWidth:s,dataKey:c}=t;return e.createElement(i0,{className:M8("stroke-tremor-background dark:stroke-dark-tremor-background",N?"cursor-pointer":"",L8(null!==(n=z.get(c))&&void 0!==n?n:a8,O8).fillColor),cx:o,cy:i,r:5,fill:"",stroke:a,strokeLinecap:u,strokeLinejoin:l,strokeWidth:s,onClick:(e,n)=>function(e,t){t.stopPropagation(),W&&(e.index===(null==_?void 0:_.index)&&e.dataKey===(null==_?void 0:_.dataKey)||n9(r,e.dataKey)&&R&&R===e.dataKey?(B(void 0),F(void 0),null==N||N(null)):(B(e.dataKey),F({index:e.index,dataKey:e.dataKey}),null==N||N(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}(t,n)})},dot:n=>{var o;const{stroke:i,strokeLinecap:a,strokeLinejoin:u,strokeWidth:l,cx:s,cy:c,dataKey:d,index:f}=n;return n9(r,t)&&!(_||R&&R!==t)||(null==_?void 0:_.index)===f&&(null==_?void 0:_.dataKey)===t?e.createElement(i0,{key:f,cx:s,cy:c,r:5,stroke:i,fill:"",strokeLinecap:a,strokeLinejoin:u,strokeWidth:l,className:M8("stroke-tremor-background dark:stroke-dark-tremor-background",N?"cursor-pointer":"",L8(null!==(o=z.get(d))&&void 0!==o?o:a8,O8).fillColor)}):e.createElement(e.Fragment,{key:f})},key:t,name:t,type:g,dataKey:t,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:v,animationDuration:h,connectNulls:k})})),N?o.map((t=>e.createElement(y4,{className:M8("cursor-pointer"),strokeOpacity:0,key:t,name:t,type:g,dataKey:t,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:k,onClick:(e,t)=>{t.stopPropagation();const{name:n}=e;V(n)}}))):null):e.createElement(Q8,{noDataText:j})))}));s9.displayName="LineChart";const c9=({children:t})=>e.createElement("div",{className:M8("rounded-tremor-default text-tremor-default border","bg-tremor-background shadow-tremor-dropdown border-tremor-border","dark:bg-dark-tremor-background dark:shadow-dark-tremor-dropdown dark:border-dark-tremor-border")},t),d9=({value:t,name:n})=>e.createElement("div",{className:"flex items-center justify-between space-x-8"},e.createElement("div",{className:"flex items-center space-x-2"},e.createElement("p",{className:M8("text-right whitespace-nowrap","text-tremor-content","dark:text-dark-tremor-content")},n)),e.createElement("p",{className:M8("font-medium tabular-nums text-right whitespace-nowrap","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},t)),f9=({label:t,active:n,payload:r,valueFormatter:o,axis:i,category:a,categoryColors:u})=>{var l,s;return n&&r?e.createElement(c9,null,e.createElement("div",{className:M8("flex items-center space-x-2 border-b px-4 py-2","border-tremor-border","dark:border-dark-tremor-border")},e.createElement("span",{className:M8("shrink-0 rounded-tremor-full border-2 h-3 w-3","border-tremor-background shadow-tremor-card","dark:border-dark-tremor-background dark:shadow-dark-tremor-card",L8(a&&null!==(s=u.get(null===(l=null==r?void 0:r[0])||void 0===l?void 0:l.payload[a]))&&void 0!==s?s:c8,m8).bgColor)}),e.createElement("p",{className:M8("font-medium","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},t)),e.createElement("div",{className:M8("px-4 py-2 space-y-1")},r.map((({value:t,name:n},r)=>{var a,u;const l=null!==(a=Object.keys(i).find((e=>i[e]===n)))&&void 0!==a?a:"",s=null!==(u=o[l])&&void 0!==u?u:E8;return e.createElement(d9,{key:`id-${r}`,value:o&&s?s(t):`${t}`,name:n})})))):null},h9=e.forwardRef(((t,n)=>{const{data:r=[],x:o,y:i,size:a,category:u,colors:l=N8,showOpacity:s=!1,sizeRange:c=[1,1e3],valueFormatter:d={x:E8,y:E8,size:E8},startEndOnly:f=!1,showXAxis:h=!0,showYAxis:v=!0,yAxisWidth:p=56,intervalType:m="equidistantPreserveStart",animationDuration:b=900,showAnimation:y=!1,showTooltip:g=!0,showLegend:w=!0,showGridLines:x=!0,autoMinXValue:k=!1,minXValue:O,maxXValue:j,autoMinYValue:S=!1,minYValue:N,maxYValue:M,allowDecimals:C=!0,noDataText:A,onValueChange:T,customTooltip:E,rotateLabelX:D,className:P,enableLegendSlider:I=!1,tickGap:L=5}=t,_=Ar(t,["data","x","y","size","category","colors","showOpacity","sizeRange","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinXValue","minXValue","maxXValue","autoMinYValue","minYValue","maxYValue","allowDecimals","noDataText","onValueChange","customTooltip","rotateLabelX","className","enableLegendSlider","tickGap"]),F=E,[R,B]=e.useState(60),[z,$]=e.useState(void 0),[W,V]=e.useState(void 0),U=!!T;function H(e,t,n){n.stopPropagation(),U&&(t9(z,e.node)?(V(void 0),$(void 0),null==T||T(null)):($(e.node),V(e.payload[u]),null==T||T(Object.assign({eventType:"bubble",categoryClicked:e.payload[u]},e.payload))))}const q=((e,t)=>{if(!t)return[];const n=new Set;return e.forEach((e=>{n.add(e[t])})),Array.from(n)})(r,u),K=J8(q,l),G=e9(k,O,j),Y=e9(S,N,M);return e.createElement("div",Object.assign({ref:n,className:M8("w-full h-80",P)},_),e.createElement(KV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(r8,{onClick:U&&(W||z)?()=>{$(void 0),V(void 0),null==T||T(null)}:void 0,margin:{left:20,right:20}},x?e.createElement(t4,{className:M8("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!0}):null,o?e.createElement(e6,{hide:!h,dataKey:o,interval:f?"preserveStartEnd":m,tick:{transform:"translate(0, 6)"},ticks:f?[r[0][o],r[r.length-1][o]]:void 0,type:"number",name:o,fill:"",stroke:"",className:M8("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,tickFormatter:d.x,axisLine:!1,minTickGap:L,domain:G,allowDataOverflow:!0,angle:null==D?void 0:D.angle,dy:null==D?void 0:D.verticalShift,height:null==D?void 0:D.xAxisHeight}):null,i?e.createElement(n6,{width:p,hide:!v,axisLine:!1,tickLine:!1,dataKey:i,type:"number",name:i,domain:Y,tick:{transform:"translate(-3, 0)"},tickFormatter:d.y,fill:"",stroke:"",className:M8("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),allowDecimals:C,allowDataOverflow:!0}):null,e.createElement(mV,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:g?({active:t,payload:n,label:r})=>{var l,s;const c=u?null===(s=null===(l=null==n?void 0:n[0])||void 0===l?void 0:l.payload)||void 0===s?void 0:s[u]:r;return F?e.createElement(F,{payload:null==n?void 0:n.map((e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=K.get(c))&&void 0!==t?t:a8})})),active:t,label:c}):e.createElement(f9,{active:t,payload:n,label:c,valueFormatter:d,axis:{x:o,y:i,size:a},category:u,categoryColors:K})}:e.createElement(e.Fragment,null)}),a?e.createElement(L4,{dataKey:a,type:"number",range:c,name:a}):null,q.map((t=>{var n,o;return e.createElement(Q4,{className:M8(L8(null!==(n=K.get(t))&&void 0!==n?n:a8,O8).fillColor,s?L8(null!==(o=K.get(t))&&void 0!==o?o:a8,O8).strokeColor:"",T?"cursor-pointer":""),fill:`url(#${K.get(t)})`,fillOpacity:s?.7:1,key:t,name:t,data:u?r.filter((e=>e[u]===t)):r,isAnimationActive:y,animationDuration:b,shape:t=>((t,n,r)=>{const{cx:o,cy:i,width:a,node:u,fillOpacity:l,name:s}=t;return e.createElement(i0,{cx:o,cy:i,r:a/2,opacity:n||r&&r!==s?t9(n,u)?l:.3:l})})(t,z,W),onClick:H})})),w?e.createElement(z$,{verticalAlign:"top",height:R,content:({payload:e})=>W8({payload:e},K,B,W,U?e=>{return t=e,void(U&&(t!==W||z?(V(t),null==T||T({eventType:"category",categoryClicked:t})):(V(void 0),null==T||T(null)),$(void 0)));var t}:void 0,I)}):null):e.createElement(Q8,{noDataText:A})))}));h9.displayName="ScatterChart";var v9="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function p9(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!p9(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!p9(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function m9(e){const t=r.useRef(e);return v9((()=>{t.current=e})),t}var b9="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;let y9=!1,g9=0;const w9=()=>"floating-ui-"+g9++;const x9=r["useId".toString()]||function(){const[e,t]=r.useState((()=>y9?w9():void 0));return b9((()=>{null==e&&t(w9())}),[]),r.useEffect((()=>{y9||(y9=!0)}),[]),e};const k9=r.createContext(null),O9=r.createContext(null),j9=()=>{var e;return(null==(e=r.useContext(k9))?void 0:e.id)||null},S9=()=>r.useContext(O9);function N9(e){return(null==e?void 0:e.ownerDocument)||document}function M9(e){return N9(e).defaultView||window}function C9(e){return!!e&&e instanceof M9(e).Element}function A9(e){return!!e&&e instanceof M9(e).HTMLElement}function T9(e){if(0===e.mozInputSource&&e.isTrusted)return!0;const t=/Android/i;return(t.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}())||t.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}()))&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType}function E9(e){return 0===e.width&&0===e.height||1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"!==e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail}function D9(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function P9(t){const n=e.useRef(t);return b9((()=>{n.current=t})),n}const I9="data-floating-ui-safe-polygon";function L9(e,t,n){return n&&!D9(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function _9(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&(r=n,"undefined"!=typeof ShadowRoot&&(r instanceof M9(r).ShadowRoot||r instanceof ShadowRoot))){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}var r;return!1}function F9(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}))||[],r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))}))||[],n=n.concat(r);return n}const R9=r["useInsertionEffect".toString()]||(e=>e());function B9(e){const t=r.useRef((()=>{}));return R9((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function z9(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}const $9={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},W9={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"};function V9(e){void 0===e&&(e={});const{open:t=!1,onOpenChange:n,nodeId:i}=e,a=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:a,whileElementsMounted:u,open:l}=e,[s,c]=r.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,f]=r.useState(i);p9(d,i)||f(i);const h=r.useRef(null),v=r.useRef(null),p=r.useRef(s),m=m9(u),b=m9(a),[y,g]=r.useState(null),[w,x]=r.useState(null),k=r.useCallback((e=>{h.current!==e&&(h.current=e,g(e))}),[]),O=r.useCallback((e=>{v.current!==e&&(v.current=e,x(e))}),[]),j=r.useCallback((()=>{if(!h.current||!v.current)return;const e={placement:t,strategy:n,middleware:d};b.current&&(e.platform=b.current),kn(h.current,v.current,e).then((e=>{const t={...e,isPositioned:!0};S.current&&!p9(p.current,t)&&(p.current=t,o.flushSync((()=>{c(t)})))}))}),[d,t,n,b]);v9((()=>{!1===l&&p.current.isPositioned&&(p.current.isPositioned=!1,c((e=>({...e,isPositioned:!1}))))}),[l]);const S=r.useRef(!1);v9((()=>(S.current=!0,()=>{S.current=!1})),[]),v9((()=>{if(y&&w){if(m.current)return m.current(y,w,j);j()}}),[y,w,j,m]);const N=r.useMemo((()=>({reference:h,floating:v,setReference:k,setFloating:O})),[k,O]),M=r.useMemo((()=>({reference:y,floating:w})),[y,w]);return r.useMemo((()=>({...s,update:j,refs:N,elements:M,reference:k,floating:O})),[s,j,N,M,k,O])}(e),u=S9(),l=r.useRef(null),s=r.useRef({}),c=r.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter((e=>e!==n)))}}}()))[0],[d,f]=r.useState(null),h=r.useCallback((e=>{const t=C9(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;a.refs.setReference(t)}),[a.refs]),v=r.useCallback((e=>{(C9(e)||null===e)&&(l.current=e,f(e)),(C9(a.refs.reference.current)||null===a.refs.reference.current||null!==e&&!C9(e))&&a.refs.setReference(e)}),[a.refs]),p=r.useMemo((()=>({...a.refs,setReference:v,setPositionReference:h,domReference:l})),[a.refs,v,h]),m=r.useMemo((()=>({...a.elements,domReference:d})),[a.elements,d]),b=B9(n),y=r.useMemo((()=>({...a,refs:p,elements:m,dataRef:s,nodeId:i,events:c,open:t,onOpenChange:b})),[a,i,c,t,b,p,m]);return b9((()=>{const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===i));e&&(e.context=y)})),r.useMemo((()=>({...a,context:y,refs:p,reference:v,positionReference:h})),[a,p,y,v,h])}function U9(e,t,n){const r=new Map;return{..."floating"===n&&{tabIndex:-1},...e,...t.map((e=>e?e[n]:null)).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,o]=t;var i;0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(i=r.get(n))||i.push(o),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];null==(e=r.get(n))||e.forEach((e=>e(...o)))})):e[n]=o})),e):e),{})}}const H9=t=>{const[n,o]=e.useState(!1),[i,a]=e.useState(),{x:u,y:l,refs:s,strategy:c,context:d}=V9({open:n,onOpenChange:e=>{if(e&&t){const n=setTimeout((()=>{o(e)}),t);a(n)}else clearTimeout(i),o(e)},placement:"top",whileElementsMounted:xn,middleware:[zt(5),_t({fallbackAxisSideDirection:"start"}),$t()]}),f=function(e,t){let{enabled:n=!0,delay:o=0,handleClose:i=null,mouseOnly:a=!1,restMs:u=0,move:l=!0}=void 0===t?{}:t;const{open:s,onOpenChange:c,dataRef:d,events:f,elements:{domReference:h,floating:v},refs:p}=e,m=S9(),b=j9(),y=P9(i),g=P9(o),w=r.useRef(),x=r.useRef(),k=r.useRef(),O=r.useRef(),j=r.useRef(!0),S=r.useRef(!1),N=r.useRef((()=>{})),M=r.useCallback((()=>{var e;const t=null==(e=d.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[d]);r.useEffect((()=>{if(n)return f.on("dismiss",e),()=>{f.off("dismiss",e)};function e(){clearTimeout(x.current),clearTimeout(O.current),j.current=!0}}),[n,f]),r.useEffect((()=>{if(!n||!y.current||!s)return;function e(){M()&&c(!1)}const t=N9(v).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[v,s,c,n,y,d,M]);const C=r.useCallback((function(e){void 0===e&&(e=!0);const t=L9(g.current,"close",w.current);t&&!k.current?(clearTimeout(x.current),x.current=setTimeout((()=>c(!1)),t)):e&&(clearTimeout(x.current),c(!1))}),[g,c]),A=r.useCallback((()=>{N.current(),k.current=void 0}),[]),T=r.useCallback((()=>{if(S.current){const e=N9(p.floating.current).body;e.style.pointerEvents="",e.removeAttribute(I9),S.current=!1}}),[p]);return r.useEffect((()=>{if(n&&C9(h)){const e=h;return s&&e.addEventListener("mouseleave",i),null==v||v.addEventListener("mouseleave",i),l&&e.addEventListener("mousemove",r,{once:!0}),e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",o),()=>{s&&e.removeEventListener("mouseleave",i),null==v||v.removeEventListener("mouseleave",i),l&&e.removeEventListener("mousemove",r),e.removeEventListener("mouseenter",r),e.removeEventListener("mouseleave",o)}}function t(){return!!d.current.openEvent&&["click","mousedown"].includes(d.current.openEvent.type)}function r(e){if(clearTimeout(x.current),j.current=!1,a&&!D9(w.current)||u>0&&0===L9(g.current,"open"))return;d.current.openEvent=e;const t=L9(g.current,"open",w.current);t?x.current=setTimeout((()=>{c(!0)}),t):c(!0)}function o(n){if(t())return;N.current();const r=N9(v);if(clearTimeout(O.current),y.current){s||clearTimeout(x.current),k.current=y.current({...e,tree:m,x:n.clientX,y:n.clientY,onClose(){T(),A(),C()}});const t=k.current;return r.addEventListener("mousemove",t),void(N.current=()=>{r.removeEventListener("mousemove",t)})}C()}function i(n){t()||null==y.current||y.current({...e,tree:m,x:n.clientX,y:n.clientY,onClose(){T(),A(),C()}})(n)}}),[h,v,n,e,a,u,l,C,A,T,c,s,m,g,y,d]),b9((()=>{var e;if(n&&s&&null!=(e=y.current)&&e.Ne.blockPointerEvents&&M()){const e=N9(v).body;if(e.setAttribute(I9,""),e.style.pointerEvents="none",S.current=!0,C9(h)&&v){var t,r;const e=h,n=null==m||null==(t=m.nodesRef.current.find((e=>e.id===b)))||null==(r=t.context)?void 0:r.elements.floating;return n&&(n.style.pointerEvents=""),e.style.pointerEvents="auto",v.style.pointerEvents="auto",()=>{e.style.pointerEvents="",v.style.pointerEvents=""}}}}),[n,s,b,v,h,m,y,d,M]),b9((()=>{s||(w.current=void 0,A(),T())}),[s,A,T]),r.useEffect((()=>()=>{A(),clearTimeout(x.current),clearTimeout(O.current),T()}),[n,A,T]),r.useMemo((()=>{if(!n)return{};function e(e){w.current=e.pointerType}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove(){s||0===u||(clearTimeout(O.current),O.current=setTimeout((()=>{j.current||c(!0)}),u))}},floating:{onMouseEnter(){clearTimeout(x.current)},onMouseLeave(){f.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),C(!1)}}}}),[f,n,u,s,c,C])}(d,{move:!1}),h=function(e,t){let{open:n,onOpenChange:o,dataRef:i,events:a,refs:u,elements:{floating:l,domReference:s}}=e,{enabled:c=!0,keyboardOnly:d=!0}=void 0===t?{}:t;const f=r.useRef(""),h=r.useRef(!1),v=r.useRef();return r.useEffect((()=>{if(!c)return;const e=N9(l).defaultView||window;function t(){!n&&A9(s)&&s===function(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(r=n.shadowRoot)?void 0:r.activeElement);){var n,r;t=t.shadowRoot.activeElement}return t}(N9(s))&&(h.current=!0)}return e.addEventListener("blur",t),()=>{e.removeEventListener("blur",t)}}),[l,s,n,c]),r.useEffect((()=>{if(c)return a.on("dismiss",e),()=>{a.off("dismiss",e)};function e(e){"referencePress"!==e.type&&"escapeKey"!==e.type||(h.current=!0)}}),[a,c]),r.useEffect((()=>()=>{clearTimeout(v.current)}),[]),r.useMemo((()=>c?{reference:{onPointerDown(e){let{pointerType:t}=e;f.current=t,h.current=!(!t||!d)},onMouseLeave(){h.current=!1},onFocus(e){var t;h.current||"focus"===e.type&&"mousedown"===(null==(t=i.current.openEvent)?void 0:t.type)&&i.current.openEvent&&z9(i.current.openEvent,s)||(i.current.openEvent=e.nativeEvent,o(!0))},onBlur(e){h.current=!1;const t=e.relatedTarget,n=C9(t)&&t.hasAttribute("data-floating-ui-focus-guard")&&"outside"===t.getAttribute("data-type");v.current=setTimeout((()=>{_9(u.floating.current,t)||_9(s,t)||n||o(!1)}))}}}:{}),[c,d,s,u,i,o])}(d),v=function(e,t){let{open:n,onOpenChange:o,events:i,nodeId:a,elements:{reference:u,domReference:l,floating:s},dataRef:c}=e,{enabled:d=!0,escapeKey:f=!0,outsidePress:h=!0,outsidePressEvent:v="pointerdown",referencePress:p=!1,referencePressEvent:m="pointerdown",ancestorScroll:b=!1,bubbles:y=!0}=void 0===t?{}:t;const g=S9(),w=null!=j9(),x=B9("function"==typeof h?h:()=>!1),k="function"==typeof h?x:h,O=r.useRef(!1),{escapeKeyBubbles:j,outsidePressBubbles:S}=function(e){var t,n;return void 0===e&&(e=!0),{escapeKeyBubbles:"boolean"==typeof e?e:null==(t=e.escapeKey)||t,outsidePressBubbles:"boolean"==typeof e?e:null==(n=e.outsidePress)||n}}(y);return r.useEffect((()=>{if(!n||!d)return;function e(e){if("Escape"===e.key){const e=g?F9(g.nodesRef.current,a):[];if(e.length>0){let t=!0;if(e.forEach((e=>{var n;null==(n=e.context)||!n.open||e.context.dataRef.current.Me||(t=!1)})),!t)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),o(!1)}}function t(e){const t=O.current;if(O.current=!1,t)return;if("function"==typeof k&&!k(e))return;const n=function(e){return"composedPath"in e?e.composedPath()[0]:e.target}(e);if(A9(n)&&s){const t=s.ownerDocument.defaultView||window,r=n.scrollWidth>n.clientWidth,o=n.scrollHeight>n.clientHeight;let i=o&&e.offsetX>n.clientWidth;if(o&&"rtl"===t.getComputedStyle(n).direction&&(i=e.offsetX<=n.offsetWidth-n.clientWidth),i||r&&e.offsetY>n.clientHeight)return}const r=g&&F9(g.nodesRef.current,a).some((t=>{var n;return z9(e,null==(n=t.context)?void 0:n.elements.floating)}));if(z9(e,s)||z9(e,l)||r)return;const u=g?F9(g.nodesRef.current,a):[];if(u.length>0){let e=!0;if(u.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.Ce||(e=!1)})),!e)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:T9(e)||E9(e)}}),o(!1)}function r(){o(!1)}c.current.Me=j,c.current.Ce=S;const h=N9(s);f&&h.addEventListener("keydown",e),k&&h.addEventListener(v,t);let p=[];return b&&(C9(l)&&(p=un(l)),C9(s)&&(p=p.concat(un(s))),!C9(u)&&u&&u.contextElement&&(p=p.concat(un(u.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=h.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",r,{passive:!0})})),()=>{f&&h.removeEventListener("keydown",e),k&&h.removeEventListener(v,t),p.forEach((e=>{e.removeEventListener("scroll",r)}))}}),[c,s,l,u,f,k,v,i,g,a,n,o,b,d,j,S,w]),r.useEffect((()=>{O.current=!1}),[k,v]),r.useMemo((()=>d?{reference:{[$9[m]]:()=>{p&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),o(!1))}},floating:{[W9[v]]:()=>{O.current=!0}}}:{}),[d,i,p,v,m,o])}(d),p=function(e,t){let{open:n}=e,{enabled:o=!0,role:i="dialog"}=void 0===t?{}:t;const a=x9(),u=x9();return r.useMemo((()=>{const e={id:a,role:i};return o?"tooltip"===i?{reference:{"aria-describedby":n?a:void 0},floating:e}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":"alertdialog"===i?"dialog":i,"aria-controls":n?a:void 0,..."listbox"===i&&{role:"combobox"},..."menu"===i&&{id:u}},floating:{...e,..."menu"===i&&{"aria-labelledby":u}}}:{}}),[o,i,n,a,u])}(d,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:b}=function(e){void 0===e&&(e=[]);const t=e,n=r.useCallback((t=>U9(t,e,"reference")),t),o=r.useCallback((t=>U9(t,e,"floating")),t),i=r.useCallback((t=>U9(t,e,"item")),e.map((e=>null==e?void 0:e.item)));return r.useMemo((()=>({getReferenceProps:n,getFloatingProps:o,getItemProps:i})),[n,o,i])}([f,h,v,p]);return{tooltipProps:{open:n,x:u,y:l,refs:s,strategy:c,getFloatingProps:b},getReferenceProps:m}},q9=({text:t,open:n,x:r,y:o,refs:i,strategy:a,getFloatingProps:u})=>n&&t?e.createElement("div",Object.assign({className:M8("max-w-xs text-sm z-20 rounded-tremor-default opacity-100 px-2.5 py-1 whitespace-nowrap","text-white bg-tremor-background-emphasis","text-white dark:bg-dark-tremor-background-subtle"),ref:i.setFloating,style:{position:a,top:null!=o?o:0,left:null!=r?r:0}},u()),t):null;q9.displayName="Tooltip";const K9={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},G9={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},Y9=I8("Badge"),X9=e.forwardRef(((t,n)=>{const{color:r,icon:o,size:i=f8.SM,tooltip:a,className:u,children:l}=t,s=Ar(t,["color","icon","size","tooltip","className","children"]),c=o||null,{tooltipProps:d,getReferenceProps:f}=H9();return e.createElement("span",Object.assign({ref:P8([n,d.refs.setReference]),className:M8(Y9("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",r?M8(L8(r,m8).bgColor,L8(r,j8).textColor,L8(r,x8).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):M8("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),K9[i].paddingX,K9[i].paddingY,K9[i].fontSize,u)},f,s),e.createElement(q9,Object.assign({text:a},d)),c?e.createElement(c,{className:M8(Y9("icon"),"shrink-0 -ml-1 mr-1.5",G9[i].height,G9[i].width)}):null,e.createElement("span",{className:M8(Y9("text"),"whitespace-nowrap")},l))}));X9.displayName="Badge";const Z9={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-1",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-1.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-1.5",fontSize:"text-lg"},xl:{paddingX:"px-3.5",paddingY:"py-1.5",fontSize:"text-xl"}},Q9={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},J9={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},e7={[i8.Increase]:{bgColor:L8(s8,m8).bgColor,textColor:L8(s8,j8).textColor,ringColor:L8(s8,x8).ringColor},[i8.ModerateIncrease]:{bgColor:L8(s8,m8).bgColor,textColor:L8(s8,j8).textColor,ringColor:L8(s8,x8).ringColor},[i8.Decrease]:{bgColor:L8(u8,m8).bgColor,textColor:L8(u8,j8).textColor,ringColor:L8(u8,x8).ringColor},[i8.ModerateDecrease]:{bgColor:L8(u8,m8).bgColor,textColor:L8(u8,j8).textColor,ringColor:L8(u8,x8).ringColor},[i8.Unchanged]:{bgColor:L8(l8,m8).bgColor,textColor:L8(l8,j8).textColor,ringColor:L8(l8,x8).ringColor}},t7={[i8.Increase]:t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z"}))},[i8.ModerateIncrease]:t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M16.0037 9.41421L7.39712 18.0208L5.98291 16.6066L14.5895 8H7.00373V6H18.0037V17H16.0037V9.41421Z"}))},[i8.Decrease]:t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z"}))},[i8.ModerateDecrease]:t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M14.5895 16.0032L5.98291 7.39664L7.39712 5.98242L16.0037 14.589V7.00324H18.0037V18.0032H7.00373V16.0032H14.5895Z"}))},[i8.Unchanged]:t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z"}))}},n7=I8("BadgeDelta"),r7=e.forwardRef(((t,n)=>{const{deltaType:r=i8.Increase,isIncreasePositive:o=!0,size:i=f8.SM,tooltip:a,children:u,className:l}=t,s=Ar(t,["deltaType","isIncreasePositive","size","tooltip","children","className"]),c=t7[r],d=T8(r,o),f=u?Q9:Z9,{tooltipProps:h,getReferenceProps:v}=H9();return e.createElement("span",Object.assign({ref:P8([n,h.refs.setReference]),className:M8(n7("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",e7[d].bgColor,e7[d].textColor,e7[d].ringColor,f[i].paddingX,f[i].paddingY,f[i].fontSize,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60",l)},v,s),e.createElement(q9,Object.assign({text:a},h)),e.createElement(c,{className:M8(n7("icon"),"shrink-0",u?M8("-ml-1 mr-1.5"):J9[i].height,J9[i].width)}),u?e.createElement("span",{className:M8(n7("text"),"whitespace-nowrap")},u):null)}));r7.displayName="BadgeDelta";const o7={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},i7={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},a7={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},u7=I8("Icon"),l7={Simple:"simple",Light:"light",Shadow:"shadow",Solid:"solid",Outlined:"outlined"},s7=e.forwardRef(((t,n)=>{const{icon:r,variant:o=l7.Simple,tooltip:i,size:a=f8.SM,color:u,className:l}=t,s=Ar(t,["icon","variant","tooltip","size","color","className"]),c=r,d=((e,t)=>{switch(e){case"simple":return{textColor:t?L8(t,O8).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?L8(t,O8).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?M8(L8(t,m8).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?L8(t,O8).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?M8(L8(t,m8).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?L8(t,O8).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?M8(L8(t,m8).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?L8(t,O8).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?M8(L8(t,m8).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?L8(t,w8).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?M8(L8(t,w8).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(o,u),{tooltipProps:f,getReferenceProps:h}=H9();return e.createElement("span",Object.assign({ref:P8([n,f.refs.setReference]),className:M8(u7("root"),"inline-flex shrink-0 items-center justify-center",d.bgColor,d.textColor,d.borderColor,d.ringColor,a7[o].rounded,a7[o].border,a7[o].shadow,a7[o].ring,o7[a].paddingX,o7[a].paddingY,l)},h,s),e.createElement(q9,Object.assign({text:i},f)),e.createElement(c,{className:M8(u7("icon"),"shrink-0",i7[a].height,i7[a].width)}))}));s7.displayName="Icon";const c7=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],d7=e=>({_s:e,status:c7[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),f7=e=>e?6:5,h7=(e,t,n,r,o)=>{clearTimeout(r.current);const i=d7(e);t(i),n.current=i,o&&o({current:i})},v7=({enter:t=!0,exit:n=!0,preEnter:r,preExit:o,timeout:i,initialEntered:a,mountOnEnter:u,unmountOnExit:l,onStateChange:s}={})=>{const[c,d]=e.useState((()=>d7(a?2:f7(u)))),f=e.useRef(c),h=e.useRef(),[v,p]=(e=>"object"==typeof e?[e.enter,e.exit]:[e,e])(i),m=e.useCallback((()=>{const e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return f7(t)}})(f.current._s,l);e&&h7(e,d,f,h,s)}),[s,l]),b=e.useCallback((e=>{const i=e=>{switch(h7(e,d,f,h,s),e){case 1:v>=0&&(h.current=setTimeout(m,v));break;case 4:p>=0&&(h.current=setTimeout(m,p));break;case 0:case 3:h.current=((e,t)=>setTimeout((()=>{isNaN(document.body.offsetTop)||e(t+1)}),0))(i,e)}},a=f.current.isEnter;"boolean"!=typeof e&&(e=!a),e?!a&&i(t?r?0:1:2):a&&i(n?o?3:4:f7(l))}),[m,s,t,n,r,o,v,p,l]);return e.useEffect((()=>()=>clearTimeout(h.current)),[]),[c,b,m]},p7=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))},m7={xs:{height:"h-4",width:"w-4"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-6",width:"w-6"},xl:{height:"h-6",width:"w-6"}},b7=(e,t)=>{switch(e){case"primary":return{textColor:t?L8("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?L8("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?L8(t,m8).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?L8(t,b8).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?L8(t,y8).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?L8(t,g8).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?L8(t,O8).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?L8(t,O8).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:L8("transparent").bgColor,hoverBgColor:t?M8(L8(t,m8).hoverBgColor,"hover:bg-opacity-20 dark:hover:bg-opacity-20"):"hover:bg-tremor-brand-faint dark:hover:bg-dark-tremor-brand-faint",borderColor:t?L8(t,y8).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?L8(t,O8).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?L8(t,S8).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:L8("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},y7=I8("Button"),g7=({loading:t,iconSize:n,iconPosition:r,Icon:o,needMargin:i,transitionStatus:a})=>{const u=i?r===h8.Left?M8("-ml-1","mr-1.5"):M8("-mr-1","ml-1.5"):"",l=M8("w-0 h-0"),s={default:l,entering:l,entered:n,exiting:n,exited:l};return t?e.createElement(p7,{className:M8(y7("icon"),"animate-spin shrink-0",u,s.default,s[a]),style:{transition:"width 150ms"}}):e.createElement(o,{className:M8(y7("icon"),"shrink-0",n,u)})},w7=e.forwardRef(((t,n)=>{const{icon:r,iconPosition:o=h8.Left,size:i=f8.SM,color:a,variant:u="primary",disabled:l,loading:s=!1,loadingText:c,children:d,tooltip:f,className:h}=t,v=Ar(t,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),p=r,m=s||l,b=void 0!==p||s,y=s&&c,g=!(!d&&!y),w=M8(m7[i].height,m7[i].width),x="light"!==u?M8("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",k=b7(u,a),O=(e=>"light"!==e?{xs:{paddingX:"px-2.5",paddingY:"py-1.5",fontSize:"text-xs"},sm:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-sm"},md:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-md"},lg:{paddingX:"px-4",paddingY:"py-2.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-3",fontSize:"text-xl"}}:{xs:{paddingX:"",paddingY:"",fontSize:"text-xs"},sm:{paddingX:"",paddingY:"",fontSize:"text-sm"},md:{paddingX:"",paddingY:"",fontSize:"text-md"},lg:{paddingX:"",paddingY:"",fontSize:"text-lg"},xl:{paddingX:"",paddingY:"",fontSize:"text-xl"}})(u)[i],{tooltipProps:j,getReferenceProps:S}=H9(300),[N,M]=v7({timeout:50});return e.useEffect((()=>{M(s)}),[s]),e.createElement("button",Object.assign({ref:P8([n,j.refs.setReference]),className:M8(y7("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",x,O.paddingX,O.paddingY,O.fontSize,k.textColor,k.bgColor,k.borderColor,k.hoverBorderColor,m?"opacity-50 cursor-not-allowed":M8(b7(u,a).hoverTextColor,b7(u,a).hoverBgColor,b7(u,a).hoverBorderColor),h),disabled:m},S,v),e.createElement(q9,Object.assign({text:f},j)),b&&o!==h8.Right?e.createElement(g7,{loading:s,iconSize:w,iconPosition:o,Icon:p,transitionStatus:N.status,needMargin:g}):null,y||d?e.createElement("span",{className:M8(y7("text"),"text-tremor-default whitespace-nowrap")},y?c:d):null,b&&o===h8.Right?e.createElement(g7,{loading:s,iconSize:w,iconPosition:o,Icon:p,transitionStatus:N.status,needMargin:g}):null)}));function x7(e,t,n){let r,o=n.initialDeps??[];return()=>{var i,a,u,l;let s;n.key&&(null==(i=n.debug)?void 0:i.call(n))&&(s=Date.now());const c=e(),d=c.length!==o.length||c.some(((e,t)=>o[t]!==e));if(!d)return r;let f;if(o=c,n.key&&(null==(a=n.debug)?void 0:a.call(n))&&(f=Date.now()),r=t(...c),n.key&&(null==(u=n.debug)?void 0:u.call(n))){const e=Math.round(100*(Date.now()-s))/100,t=Math.round(100*(Date.now()-f))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,r),r}}function k7(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}w7.displayName="Button";const O7=e=>e,j7=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},S7=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e=>{const{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(r(n.getBoundingClientRect()),"undefined"==typeof ResizeObserver)return()=>{};const o=new ResizeObserver((e=>{const t=e[0];if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return void r({width:e.inlineSize,height:e.blockSize})}r(n.getBoundingClientRect())}));return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},N7=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=()=>{t(n[e.options.horizontal?"scrollLeft":"scrollTop"])};return r(),n.addEventListener("scroll",r,{passive:!0}),()=>{n.removeEventListener("scroll",r)}},M7=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e){return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},C7=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const a=e+t;null==(i=null==(o=r.scrollElement)?void 0:o.scrollTo)||i.call(o,{[r.options.horizontal?"left":"top"]:a,behavior:n})};class A7{constructor(e){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||("undefined"!=typeof ResizeObserver?e=new ResizeObserver((e=>{e.forEach((e=>{this._measureElement(e.target,e)}))})):null);return{disconnect:()=>{var e;return null==(e=t())?void 0:e.disconnect()},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,n])=>{void 0===n&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:O7,rangeExtractor:j7,onChange:()=>{},measureElement:M7,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=x7((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((e=>e())),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const e=this.options.getScrollElement();this.scrollElement!==e&&(this.cleanup(),this.scrollElement=e,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,(e=>{this.scrollAdjustments=0,this.scrollOffset!==e&&(null!==this.isScrollingTimeoutId&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset<e?"forward":"backward",this.scrollOffset=e,this.maybeNotify(),this.isScrollingTimeoutId=setTimeout((()=>{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()}),this.options.scrollingDelay))}))))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=x7((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey]),((e,t,n,r)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r})),{key:!1}),this.getFurthestMeasurement=(e,t)=>{const n=new Map,r=new Map;for(let o=t-1;o>=0;o--){const t=e[o];if(n.has(t.lane))continue;const i=r.get(t.lane);if(null==i||t.end>i.end?r.set(t.lane,t):t.end<i.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurements=x7((()=>[this.memoOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:n,getItemKey:r},o)=>{const i=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const a=this.measurementsCache.slice(0,i);for(let u=i;u<e;u++){const e=r(u),i=1===this.options.lanes?a[u-1]:this.getFurthestMeasurement(a,u),l=i?i.end:t+n,s=o.get(e),c="number"==typeof s?s:this.options.estimateSize(u),d=l+c,f=i?i.lane:u%this.options.lanes;a[u]={index:u,start:l,size:c,end:d,key:e,lane:f}}return this.measurementsCache=a,a}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=x7((()=>[this.getMeasurements(),this.getSize(),this.scrollOffset]),((e,t,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,o=t=>e[t].start,i=T7(0,r,o,n);let a=i;for(;a<r&&e[a].end<n+t;)a++;return{startIndex:i,endIndex:a}}({measurements:e,outerSize:t,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=x7((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((e,t,n,r)=>null===t?[]:e({...t,overscan:n,count:r})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.measurementsCache[this.indexFromElement(e)];if(!n||!e.isConnected)return void this.measureElementCache.forEach(((t,n)=>{t===e&&(this.observer.unobserve(e),this.measureElementCache.delete(n))}));const r=this.measureElementCache.get(n.key);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.measureElementCache.set(n.key,e));const o=this.options.measureElement(e,t,this);this.resizeItem(n,o)},this.resizeItem=(e,t)=>{const n=t-(this.itemSizeCache.get(e.key)??e.size);0!==n&&(e.start<this.scrollOffset+this.scrollAdjustments&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=n,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(e.index),this.itemSizeCache=new Map(this.itemSizeCache.set(e.key,t)),this.notify(!1))},this.measureElement=e=>{e&&this._measureElement(e,void 0)},this.getVirtualItems=x7((()=>[this.getIndexes(),this.getMeasurements()]),((e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=t[e[r]];n.push(o)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();return k7(t[T7(0,t.length-1,(e=>k7(t[e]).start),e)])},this.getOffsetForAlignment=(e,t)=>{const n=this.getSize();"auto"===t&&(t=e<=this.scrollOffset?"start":e>=this.scrollOffset+n?"end":"start"),"start"===t||("end"===t?e-=n:"center"===t&&(e-=n/2));const r=this.options.horizontal?"scrollWidth":"scrollHeight",o=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[r]:this.scrollElement[r]:0)-this.getSize();return Math.max(Math.min(o,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=k7(this.getMeasurements()[e]);if("auto"===t)if(n.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=this.scrollOffset+this.options.scrollPaddingStart))return[this.scrollOffset,t];t="start"}const r="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,t),t]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[r,o]=this.getOffsetForIndex(e,t);this._scrollToOffset(r,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout((()=>{this.scrollToIndexTimeoutId=null;if(this.measureElementCache.has(this.options.getItemKey(e))){const[t]=this.getOffsetForIndex(e,o);((e,t)=>Math.abs(e-t)<1)(t,this.scrollOffset)||this.scrollToIndex(e,{align:o,behavior:n})}else this.scrollToIndex(e,{align:o,behavior:n})})))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;return n=0===t.length?this.options.paddingStart:1===this.options.lanes?(null==(e=t[t.length-1])?void 0:e.end)??0:Math.max(...t.slice(-this.options.lanes).map((e=>e.end))),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})),this.maybeNotify()}}const T7=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else{if(!(i>r))return o;t=o-1}}return e>0?e-1:0};const E7="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function D7(e){return function(e){const n=r.useReducer((()=>({})),{})[1],o={...e,onChange:(r,o)=>{var i;o?t.flushSync(n):n(),null==(i=e.onChange)||i.call(e,r,o)}},[i]=r.useState((()=>new A7(o)));return i.setOptions(o),r.useEffect((()=>i._didMount()),[]),E7((()=>i._willUpdate())),i}({observeElementRect:S7,observeElementOffset:N7,scrollToFn:C7,...e})}var P7=Object.defineProperty,I7=(e,t,n)=>(((e,t,n)=>{t in e?P7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let L7=new class{constructor(){I7(this,"current",this.detect()),I7(this,"handoffState","pending"),I7(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},_7=(t,n)=>{L7.isServer?e.useEffect(t,n):e.useLayoutEffect(t,n)};function F7(t){let n=e.useRef(t);return _7((()=>{n.current=t}),[t]),n}function R7(t,n){let[r,o]=e.useState(t),i=F7(t);return _7((()=>o(i.current)),[i,o,...n]),r}let B7=function(t){let n=F7(t);return e.useCallback(((...e)=>n.current(...e)),[n])};function z7(t,n,r){let[o,i]=e.useState(r),a=void 0!==t,u=e.useRef(a),l=e.useRef(!1),s=e.useRef(!1);return!a||u.current||l.current?!a&&u.current&&!s.current&&(s.current=!0,u.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(l.current=!0,u.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[a?t:o,B7((e=>(a||i(e),null==n?void 0:n(e))))]}function $7(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function W7(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add((()=>e.removeEventListener(n,r,o)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return $7((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=W7();return e(t),this.add((()=>t.dispose()))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function V7(){let[t]=e.useState(W7);return e.useEffect((()=>()=>t.dispose()),[t]),t}function U7(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in r&&(e=>e.useSyncExternalStore)(r)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=r.useState(L7.isHandoffComplete);return t&&!1===L7.isHandoffComplete&&n(!1),r.useEffect((()=>{!0!==t&&n(!0)}),[t]),r.useEffect((()=>L7.handoff()),[]),!e&&t}var H7;let q7=null!=(H7=e.useId)?H7:function(){let t=U7(),[n,r]=e.useState(t?()=>L7.nextId():null);return _7((()=>{null===n&&r(L7.nextId())}),[n]),null!=n?""+n:void 0};function K7(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,K7),r}function G7(e){return L7.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Y7=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var X7=(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))(X7||{}),Z7=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Z7||{}),Q7=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Q7||{});function J7(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(Y7)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var eee=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(eee||{});function tee(e,t=0){var n;return e!==(null==(n=G7(e))?void 0:n.body)&&K7(t,{0:()=>e.matches(Y7),1(){let t=e;for(;null!==t;){if(t.matches(Y7))return!0;t=t.parentElement}return!1}})}var nee=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(nee||{});function ree(e){null==e||e.focus({preventScroll:!0})}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let oee=["textarea","input"].join(",");function iee(e,t=(e=>e)){return e.slice().sort(((e,n)=>{let r=t(e),o=t(n);if(null===r||null===o)return 0;let i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function aee(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?n?iee(e):e:J7(e);o.length>0&&a.length>1&&(a=a.filter((e=>!o.includes(e)))),r=null!=r?r:i.activeElement;let u,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,a.indexOf(r))-1;if(4&t)return Math.max(0,a.indexOf(r))+1;if(8&t)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&t?{preventScroll:!0}:{},d=0,f=a.length;do{if(d>=f||d+f<=0)return 0;let e=s+d;if(16&t)e=(e+f)%f;else{if(e<0)return 3;if(e>=f)return 1}u=a[e],null==u||u.focus(c),d+=l}while(u!==i.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,oee))&&n}(u)&&u.select(),2}function uee(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function lee(){return uee()||/Android/gi.test(window.navigator.userAgent)}function see(t,n,r){let o=F7(n);e.useEffect((()=>{function e(e){o.current(e)}return document.addEventListener(t,e,r),()=>document.removeEventListener(t,e,r)}),[t,r])}function cee(t,n,r){let o=F7(n);e.useEffect((()=>{function e(e){o.current(e)}return window.addEventListener(t,e,r),()=>window.removeEventListener(t,e,r)}),[t,r])}function dee(t,n,r=!0){let o=e.useRef(!1);function i(e,r){if(!o.current||e.defaultPrevented)return;let i=r(e);if(null===i||!i.getRootNode().contains(i)||!i.isConnected)return;let a=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of a){if(null===t)continue;let n=t instanceof HTMLElement?t:t.current;if(null!=n&&n.contains(i)||e.composed&&e.composedPath().includes(n))return}return!tee(i,eee.Loose)&&-1!==i.tabIndex&&e.preventDefault(),n(e,i)}e.useEffect((()=>{requestAnimationFrame((()=>{o.current=r}))}),[r]);let a=e.useRef(null);see("pointerdown",(e=>{var t,n;o.current&&(a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),see("mousedown",(e=>{var t,n;o.current&&(a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),see("click",(e=>{lee()||a.current&&(i(e,(()=>a.current)),a.current=null)}),!0),see("touchend",(e=>i(e,(()=>e.target instanceof HTMLElement?e.target:null))),!0),cee("blur",(e=>i(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function fee(...t){return e.useMemo((()=>G7(...t)),[...t])}function hee(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function vee(t,n){let[r,o]=e.useState((()=>hee(t)));return _7((()=>{o(hee(t))}),[t.type,t.as]),_7((()=>{r||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&o("button")}),[r,n]),r}let pee=Symbol();function mee(e,t=!0){return Object.assign(e,{[pee]:t})}function bee(...t){let n=e.useRef(t);e.useEffect((()=>{n.current=t}),[t]);let r=B7((e=>{for(let t of n.current)null!=t&&("function"==typeof t?t(e):t.current=e)}));return t.every((e=>null==e||(null==e?void 0:e[pee])))?void 0:r}function yee(e){return[e.screenX,e.screenY]}function gee(){let t=e.useRef([-1,-1]);return{wasMoved(e){let n=yee(e);return(t.current[0]!==n[0]||t.current[1]!==n[1])&&(t.current=n,!0)},update(e){t.current=yee(e)}}}function wee(t,n){let r=e.useRef([]),o=B7(t);e.useEffect((()=>{let e=[...r.current];for(let[t,i]of n.entries())if(r.current[t]!==i){let t=o(n,e);return r.current=n,t}}),[o,...n])}function xee(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var kee=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(kee||{}),Oee=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Oee||{});function jee({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:a,mergeRefs:u}){u=null!=u?u:Mee;let l=Cee(t,e);if(i)return See(l,n,r,a,u);let s=null!=o?o:0;if(2&s){let{static:e=!1,...t}=l;if(e)return See(t,n,r,a,u)}if(1&s){let{unmount:e=!0,...t}=l;return K7(e?0:1,{0:()=>null,1:()=>See({...t,hidden:!0,style:{display:"none"}},n,r,a,u)})}return See(l,n,r,a,u)}function See(t,n={},r,o,i){let{as:a=r,children:u,refName:l="ref",...s}=Eee(t,["unmount","static"]),c=void 0!==t.ref?{[l]:t.ref}:{},d="function"==typeof u?u(n):u;"className"in s&&s.className&&"function"==typeof s.className&&(s.className=s.className(n));let f={};if(n){let e=!1,t=[];for(let[r,o]of Object.entries(n))"boolean"==typeof o&&(e=!0),!0===o&&t.push(r);e&&(f["data-headlessui-state"]=t.join(" "))}if(a===e.Fragment&&Object.keys(Tee(s)).length>0){if(!e.isValidElement(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${o} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map((e=>` - ${e}`)).join("\n"),"","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((e=>` - ${e}`)).join("\n")].join("\n"));let t=d.props,n="function"==typeof(null==t?void 0:t.className)?(...e)=>xee(null==t?void 0:t.className(...e),s.className):xee(null==t?void 0:t.className,s.className),r=n?{className:n}:{};return e.cloneElement(d,Object.assign({},Cee(d.props,Tee(Eee(s,["ref"]))),f,c,{ref:i(d.ref,c.ref)},r))}return e.createElement(a,Object.assign({},Eee(s,["ref"]),a!==e.Fragment&&c,a!==e.Fragment&&f),d)}function Nee(){let t=e.useRef([]),n=e.useCallback((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}),[]);return(...e)=>{if(!e.every((e=>null==e)))return t.current=e,n}}function Mee(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Cee(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let r in n)Object.assign(t,{[r](e,...t){let o=n[r];for(let n of o){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function Aee(t){var n;return Object.assign(e.forwardRef(t),{displayName:null!=(n=t.displayName)?n:t.name})}function Tee(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function Eee(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}var Dee=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Dee||{});let Pee=Aee((function(e,t){var n;let{features:r=1,...o}=e;return jee({ourProps:{ref:t,"aria-hidden":2==(2&r)||(null!=(n=o["aria-hidden"])?n:void 0),style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...4==(4&r)&&2!=(2&r)&&{display:"none"}}},theirProps:o,slot:{},defaultTag:"div",name:"Hidden"})})),Iee=e.createContext(null);Iee.displayName="OpenClosedContext";var Lee=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Lee||{});function _ee(){return e.useContext(Iee)}function Fee({value:t,children:n}){return e.createElement(Iee.Provider,{value:t},n)}let Ree=[];function Bee(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}!function(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}((()=>{function e(e){e.target instanceof HTMLElement&&e.target!==document.body&&Ree[0]!==e.target&&(Ree.unshift(e.target),Ree=Ree.filter((e=>null!=e&&e.isConnected)),Ree.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})}));var zee=(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))(zee||{});function $ee(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:for(let e=o-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=o+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}function Wee(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))Uee(n,Vee(t,r),o);return n}function Vee(e,t){return e?e+"["+t+"]":t}function Uee(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())Uee(e,Vee(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):Wee(n,t,e)}var Hee=(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))(Hee||{}),qee=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(qee||{}),Kee=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Kee||{}),Gee=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Gee||{}),Yee=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(Yee||{});function Xee(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),o=r.length>0&&null!==r[0].dataRef.current.order?r.sort(((e,t)=>e.dataRef.current.order-t.dataRef.current.order)):iee(r,(e=>e.dataRef.current.domRef.current)),i=n?o.indexOf(n):null;return-1===i&&(i=null),{options:o,activeOptionIndex:i}}let Zee={1(e){var t;return null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var t,n;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(n=e.dataRef.current)&&n.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0}}return{...e,comboboxState:0}},2(e,t){var n,r,o,i,a;if(null!=(n=e.dataRef.current)&&n.disabled||null!=(r=e.dataRef.current)&&r.optionsRef.current&&(null==(o=e.dataRef.current)||!o.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let n=t.focus===zee.Specific?t.idx:$ee(t,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var t,n;return null!=(n=null!=(t=e.activeOptionIndex)?t:e.virtual.options.findIndex((t=>!e.virtual.disabled(t))))?n:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),r=null!=(i=t.trigger)?i:2;return e.activeOptionIndex===n&&e.activationTrigger===r?e:{...e,activeOptionIndex:n,activationTrigger:r}}let u=Xee(e);if(null===u.activeOptionIndex){let e=u.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(u.activeOptionIndex=e)}let l=t.focus===zee.Specific?t.idx:$ee(t,{resolveItems:()=>u.options,resolveActiveIndex:()=>u.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),s=null!=(a=t.trigger)?a:2;return e.activeOptionIndex===l&&e.activationTrigger===s?e:{...e,...u,activeOptionIndex:l,activationTrigger:s}},3:(e,t)=>{var n,r,o;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:[...e.options,t.payload]};let i=t.payload,a=Xee(e,(e=>(e.push(i),e)));null===e.activeOptionIndex&&null!=(r=e.dataRef.current)&&r.isSelected(t.payload.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(i));let u={...e,...a,activationTrigger:2};return null!=(o=e.dataRef.current)&&o.Ae&&void 0===e.dataRef.current.value&&(u.activeOptionIndex=0),u},4:(e,t)=>{var n;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:e.options.filter((e=>e.id!==t.id))};let r=Xee(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...r,activationTrigger:2}},5:(e,t)=>e.labelId===t.id?e:{...e,labelId:t.id},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n;if((null==(n=e.virtual)?void 0:n.options)===t.options)return e;let r=e.activeOptionIndex;if(null!==e.activeOptionIndex){let n=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);r=-1!==n?n:null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:t.options})}}},Qee=e.createContext(null);function Jee(t){let n=e.useContext(Qee);if(null===n){let e=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Jee),e}return n}Qee.displayName="ComboboxActionsContext";let ete=e.createContext(null);function tte(t){var n;let r=rte("VirtualProvider"),[o,i]=e.useMemo((()=>{let e=r.optionsRef.current;if(!e)return[0,0];let t=window.getComputedStyle(e);return[parseFloat(t.paddingBlockStart||t.paddingTop),parseFloat(t.paddingBlockEnd||t.paddingBottom)]}),[r.optionsRef.current]),a=D7({scrollPaddingStart:o,scrollPaddingEnd:i,count:r.virtual.options.length,estimateSize:()=>40,getScrollElement(){var e;return null!=(e=r.optionsRef.current)?e:null},overscan:12}),[u,l]=e.useState(0);return _7((()=>{l((e=>e+1))}),[null==(n=r.virtual)?void 0:n.options]),e.createElement(ete.Provider,{value:a},e.createElement("div",{style:{position:"relative",width:"100%",height:`${a.getTotalSize()}px`},ref:e=>{if(e){if("undefined"!=typeof process&&void 0!==process.env.JEST_WORKER_ID||0===r.activationTrigger)return;null!==r.activeOptionIndex&&r.virtual.options.length>r.activeOptionIndex&&a.scrollToIndex(r.activeOptionIndex)}}},a.getVirtualItems().map((n=>{var o;return e.createElement(e.Fragment,{key:n.key},e.cloneElement(null==(o=t.children)?void 0:o.call(t,{option:r.virtual.options[n.index],open:0===r.comboboxState}),{key:`${u}-${n.key}`,"data-index":n.index,"aria-setsize":r.virtual.options.length,"aria-posinset":n.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${n.start}px)`,overflowAnchor:"none"}}))}))))}let nte=e.createContext(null);function rte(t){let n=e.useContext(nte);if(null===n){let e=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,rte),e}return n}function ote(e,t){return K7(t.type,Zee,e,t)}nte.displayName="ComboboxDataContext";let ite=e.Fragment;let ate=kee.RenderStrategy|kee.Static;let ute=Aee((function(t,n){let{value:r,defaultValue:o,onChange:i,form:a,name:u,by:l=null,disabled:s=!1,Ae:c=!1,nullable:d=!1,multiple:f=!1,immediate:h=!1,virtual:v=null,...p}=t,[m=(f?[]:void 0),b]=z7(r,i,o),[y,g]=e.useReducer(ote,{dataRef:e.createRef(),comboboxState:c?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),w=e.useRef(!1),x=e.useRef({static:!1,hold:!1}),k=e.useRef(null),O=e.useRef(null),j=e.useRef(null),S=e.useRef(null),N=B7("string"==typeof l?(e,t)=>{let n=l;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:null!=l?l:(e,t)=>e===t),M=B7((e=>y.options.findIndex((t=>N(t.dataRef.current.value,e))))),C=e.useCallback((e=>K7(T.mode,{1:()=>m.some((t=>N(t,e))),0:()=>N(m,e)})),[m]),A=B7((e=>y.activeOptionIndex===M(e))),T=e.useMemo((()=>({...y,immediate:false,optionsPropsRef:x,labelRef:k,inputRef:O,buttonRef:j,optionsRef:S,value:m,defaultValue:o,disabled:s,mode:f?1:0,virtual:y.virtual,get activeOptionIndex(){if(w.current&&null===y.activeOptionIndex&&y.options.length>0){let e=y.options.findIndex((e=>!e.dataRef.current.disabled));if(-1!==e)return e}return y.activeOptionIndex},calculateIndex:M,compare:N,isSelected:C,isActive:A,nullable:d,Ae:c})),[m,o,s,f,d,c,y,null]);_7((()=>{}),[null,void 0]),_7((()=>{y.dataRef.current=T}),[T]),dee([T.buttonRef,T.inputRef,T.optionsRef],(()=>z.closeCombobox()),0===T.comboboxState);let E=e.useMemo((()=>{var e,t,n;return{open:0===T.comboboxState,disabled:s,activeIndex:T.activeOptionIndex,activeOption:null===T.activeOptionIndex?null:T.virtual?T.virtual.options[null!=(e=T.activeOptionIndex)?e:0]:null!=(n=null==(t=T.options[T.activeOptionIndex])?void 0:t.dataRef.current.value)?n:null,value:m}}),[T,s,m]),D=B7((()=>{if(null!==T.activeOptionIndex){if(T.virtual)R(T.virtual.options[T.activeOptionIndex]);else{let{dataRef:e}=T.options[T.activeOptionIndex];R(e.current.value)}z.goToOption(zee.Specific,T.activeOptionIndex)}})),P=B7((()=>{g({type:0}),w.current=!0})),I=B7((()=>{g({type:1}),w.current=!1})),L=B7(((e,t,n)=>(w.current=!1,e===zee.Specific?g({type:2,focus:zee.Specific,idx:t,trigger:n}):g({type:2,focus:e,trigger:n})))),_=B7(((e,t)=>(g({type:3,payload:{id:e,dataRef:t}}),()=>{T.isActive(t.current.value)&&(w.current=!0),g({type:4,id:e})}))),F=B7((e=>(g({type:5,id:e}),()=>g({type:5,id:null})))),R=B7((e=>K7(T.mode,{0:()=>null==b?void 0:b(e),1(){let t=T.value.slice(),n=t.findIndex((t=>N(t,e)));return-1===n?t.push(e):t.splice(n,1),null==b?void 0:b(t)}}))),B=B7((e=>{g({type:6,trigger:e})})),z=e.useMemo((()=>({onChange:R,registerOption:_,registerLabel:F,goToOption:L,closeCombobox:I,openCombobox:P,setActivationTrigger:B,selectActiveOption:D})),[]),$=null===n?{}:{ref:n},W=e.useRef(null),V=V7();return e.useEffect((()=>{W.current&&void 0!==o&&V.addEventListener(W.current,"reset",(()=>{null==b||b(o)}))}),[W,b]),e.createElement(Qee.Provider,{value:z},e.createElement(nte.Provider,{value:T},e.createElement(Fee,{value:K7(T.comboboxState,{0:Lee.Open,1:Lee.Closed})},null!=u&&null!=m&&Wee({[u]:m}).map((([t,n],r)=>e.createElement(Pee,{features:Dee.Hidden,ref:0===r?e=>{var t;W.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0,...Tee({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:a,name:t,value:n})}))),jee({ourProps:$,theirProps:p,slot:E,defaultTag:ite,name:"Combobox"}))))})),lte=Aee((function(t,n){var r;let o=rte("Combobox.Button"),i=Jee("Combobox.Button"),a=bee(o.buttonRef,n),u=q7(),{id:l=`headlessui-combobox-button-${u}`,...s}=t,c=V7(),d=B7((e=>{switch(e.key){case Hee.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&i.openCombobox(),c.nextFrame((()=>{var e;return null==(e=o.inputRef.current)?void 0:e.focus({preventScroll:!0})}));case Hee.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&(i.openCombobox(),c.nextFrame((()=>{o.value||i.goToOption(zee.Last)}))),c.nextFrame((()=>{var e;return null==(e=o.inputRef.current)?void 0:e.focus({preventScroll:!0})}));case Hee.Escape:return 0!==o.comboboxState?void 0:(e.preventDefault(),o.optionsRef.current&&!o.optionsPropsRef.current.static&&e.stopPropagation(),i.closeCombobox(),c.nextFrame((()=>{var e;return null==(e=o.inputRef.current)?void 0:e.focus({preventScroll:!0})})));default:return}})),f=B7((e=>{if(Bee(e.currentTarget))return e.preventDefault();0===o.comboboxState?i.closeCombobox():(e.preventDefault(),i.openCombobox()),c.nextFrame((()=>{var e;return null==(e=o.inputRef.current)?void 0:e.focus({preventScroll:!0})}))})),h=R7((()=>{if(o.labelId)return[o.labelId,l].join(" ")}),[o.labelId,l]),v=e.useMemo((()=>({open:0===o.comboboxState,disabled:o.disabled,value:o.value})),[o]);return jee({ourProps:{ref:a,id:l,type:vee(t,o.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==(r=o.optionsRef.current)?void 0:r.id,"aria-expanded":0===o.comboboxState,"aria-labelledby":h,disabled:o.disabled,onClick:f,onKeyDown:d},theirProps:s,slot:v,defaultTag:"button",name:"Combobox.Button"})})),ste=Aee((function(t,n){var r,o,i,a,u;let l=q7(),{id:s=`headlessui-combobox-input-${l}`,onChange:c,displayValue:d,type:f="text",...h}=t,v=rte("Combobox.Input"),p=Jee("Combobox.Input"),m=bee(v.inputRef,n),b=fee(v.inputRef),y=e.useRef(!1),g=V7(),w=B7((()=>{p.onChange(null),v.optionsRef.current&&(v.optionsRef.current.scrollTop=0),p.goToOption(zee.Nothing)})),x=function(){var e;return"function"==typeof d&&void 0!==v.value?null!=(e=d(v.value))?e:"":"string"==typeof v.value?v.value:""}();wee((([e,t],[n,r])=>{if(y.current)return;let o=v.inputRef.current;o&&((0===r&&1===t||e!==n)&&(o.value=e),requestAnimationFrame((()=>{if(y.current||!o||(null==b?void 0:b.activeElement)!==o)return;let{selectionStart:e,selectionEnd:t}=o;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&o.setSelectionRange(o.value.length,o.value.length)})))}),[x,v.comboboxState,b]),wee((([e],[t])=>{if(0===e&&1===t){if(y.current)return;let e=v.inputRef.current;if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:r,selectionDirection:o}=e;e.value="",e.value=t,null!==o?e.setSelectionRange(n,r,o):e.setSelectionRange(n,r)}}),[v.comboboxState]);let k=e.useRef(!1),O=B7((()=>{k.current=!0})),j=B7((()=>{g.nextFrame((()=>{k.current=!1}))})),S=B7((e=>{switch(y.current=!0,e.key){case Hee.Enter:if(y.current=!1,0!==v.comboboxState||k.current)return;if(e.preventDefault(),e.stopPropagation(),null===v.activeOptionIndex)return void p.closeCombobox();p.selectActiveOption(),0===v.mode&&p.closeCombobox();break;case Hee.ArrowDown:return y.current=!1,e.preventDefault(),e.stopPropagation(),K7(v.comboboxState,{0:()=>p.goToOption(zee.Next),1:()=>p.openCombobox()});case Hee.ArrowUp:return y.current=!1,e.preventDefault(),e.stopPropagation(),K7(v.comboboxState,{0:()=>p.goToOption(zee.Previous),1:()=>{p.openCombobox(),g.nextFrame((()=>{v.value||p.goToOption(zee.Last)}))}});case Hee.Home:if(e.shiftKey)break;return y.current=!1,e.preventDefault(),e.stopPropagation(),p.goToOption(zee.First);case Hee.PageUp:return y.current=!1,e.preventDefault(),e.stopPropagation(),p.goToOption(zee.First);case Hee.End:if(e.shiftKey)break;return y.current=!1,e.preventDefault(),e.stopPropagation(),p.goToOption(zee.Last);case Hee.PageDown:return y.current=!1,e.preventDefault(),e.stopPropagation(),p.goToOption(zee.Last);case Hee.Escape:return y.current=!1,0!==v.comboboxState?void 0:(e.preventDefault(),v.optionsRef.current&&!v.optionsPropsRef.current.static&&e.stopPropagation(),v.nullable&&0===v.mode&&null===v.value&&w(),p.closeCombobox());case Hee.Tab:if(y.current=!1,0!==v.comboboxState)return;0===v.mode&&1!==v.activationTrigger&&p.selectActiveOption(),p.closeCombobox()}})),N=B7((e=>{null==c||c(e),v.nullable&&0===v.mode&&""===e.target.value&&w(),p.openCombobox()})),M=B7((e=>{var t,n,r;let o=null!=(t=e.relatedTarget)?t:Ree.find((t=>t!==e.currentTarget));if(y.current=!1,!(null!=(n=v.optionsRef.current)&&n.contains(o)||null!=(r=v.buttonRef.current)&&r.contains(o)||0!==v.comboboxState))return e.preventDefault(),0===v.mode&&(v.nullable&&null===v.value?w():1!==v.activationTrigger&&p.selectActiveOption()),p.closeCombobox()})),C=B7((e=>{var t,n,r;let o=null!=(t=e.relatedTarget)?t:Ree.find((t=>t!==e.currentTarget));null!=(n=v.buttonRef.current)&&n.contains(o)||null!=(r=v.optionsRef.current)&&r.contains(o)||v.disabled||v.immediate&&0!==v.comboboxState&&(p.openCombobox(),g.nextFrame((()=>{p.setActivationTrigger(1)})))})),A=R7((()=>{if(v.labelId)return[v.labelId].join(" ")}),[v.labelId]),T=e.useMemo((()=>({open:0===v.comboboxState,disabled:v.disabled})),[v]),E={ref:m,id:s,role:"combobox",type:f,"aria-controls":null==(r=v.optionsRef.current)?void 0:r.id,"aria-expanded":0===v.comboboxState,"aria-activedescendant":null===v.activeOptionIndex?void 0:v.virtual?null==(o=v.options.find((e=>{var t;return!(null!=(t=v.virtual)&&t.disabled(e.dataRef.current.value))&&v.compare(e.dataRef.current.value,v.virtual.options[v.activeOptionIndex])})))?void 0:o.id:null==(i=v.options[v.activeOptionIndex])?void 0:i.id,"aria-labelledby":A,"aria-autocomplete":"list",defaultValue:null!=(u=null!=(a=t.defaultValue)?a:void 0!==v.defaultValue?null==d?void 0:d(v.defaultValue):null)?u:v.defaultValue,disabled:v.disabled,onCompositionStart:O,onCompositionEnd:j,onKeyDown:S,onChange:N,onFocus:C,onBlur:M};return jee({ourProps:E,theirProps:h,slot:T,defaultTag:"input",name:"Combobox.Input"})})),cte=Aee((function(t,n){let r=q7(),{id:o=`headlessui-combobox-label-${r}`,...i}=t,a=rte("Combobox.Label"),u=Jee("Combobox.Label"),l=bee(a.labelRef,n);_7((()=>u.registerLabel(o)),[o]);let s=B7((()=>{var e;return null==(e=a.inputRef.current)?void 0:e.focus({preventScroll:!0})})),c=e.useMemo((()=>({open:0===a.comboboxState,disabled:a.disabled})),[a]);return jee({ourProps:{ref:l,id:o,onClick:s},theirProps:i,slot:c,defaultTag:"label",name:"Combobox.Label"})})),dte=Aee((function(t,n){let r=q7(),{id:o=`headlessui-combobox-options-${r}`,hold:i=!1,...a}=t,u=rte("Combobox.Options"),l=bee(u.optionsRef,n),s=_ee(),c=null!==s?(s&Lee.Open)===Lee.Open:0===u.comboboxState;_7((()=>{var e;u.optionsPropsRef.current.static=null!=(e=t.static)&&e}),[u.optionsPropsRef,t.static]),_7((()=>{u.optionsPropsRef.current.hold=i}),[u.optionsPropsRef,i]),function({container:t,accept:n,walk:r,enabled:o=!0}){let i=e.useRef(n),a=e.useRef(r);e.useEffect((()=>{i.current=n,a.current=r}),[n,r]),_7((()=>{if(!t||!o)return;let e=G7(t);if(!e)return;let n=i.current,r=a.current,u=Object.assign((e=>n(e)),{acceptNode:n}),l=e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,u,!1);for(;l.nextNode();)r(l.currentNode)}),[t,o,i,a])}({container:u.optionsRef.current,enabled:0===u.comboboxState,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let d=R7((()=>{var e,t;return null!=(t=u.labelId)?t:null==(e=u.buttonRef.current)?void 0:e.id}),[u.labelId,u.buttonRef.current]),f=e.useMemo((()=>({open:0===u.comboboxState,option:void 0})),[u]),h={"aria-labelledby":d,role:"listbox","aria-multiselectable":1===u.mode||void 0,id:o,ref:l};return u.virtual&&0===u.comboboxState&&Object.assign(a,{children:e.createElement(tte,null,a.children)}),jee({ourProps:h,theirProps:a,slot:f,defaultTag:"ul",features:ate,visible:c,name:"Combobox.Options"})})),fte=Aee((function(t,n){var r;let o=q7(),{id:i=`headlessui-combobox-option-${o}`,disabled:a=!1,value:u,order:l=null,...s}=t,c=rte("Combobox.Option"),d=Jee("Combobox.Option"),f=c.virtual?c.activeOptionIndex===c.calculateIndex(u):null!==c.activeOptionIndex&&(null==(r=c.options[c.activeOptionIndex])?void 0:r.id)===i,h=c.isSelected(u),v=e.useRef(null),p=F7({disabled:a,value:u,domRef:v,order:l}),m=e.useContext(ete),b=bee(n,v,m?m.measureElement:null),y=B7((()=>d.onChange(u)));_7((()=>d.registerOption(i,p)),[p,i]);let g=e.useRef(!(c.virtual||c.Ae));_7((()=>{if(!c.virtual||!c.Ae)return;let e=W7();return e.requestAnimationFrame((()=>{g.current=!0})),e.dispose}),[c.virtual,c.Ae]),_7((()=>{if(!g.current||0!==c.comboboxState||!f||0===c.activationTrigger)return;let e=W7();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=v.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[v,f,c.comboboxState,c.activationTrigger,c.activeOptionIndex]);let w=B7((e=>{var t;if(a||null!=(t=c.virtual)&&t.disabled(u))return e.preventDefault();y(),lee()||requestAnimationFrame((()=>{var e;return null==(e=c.inputRef.current)?void 0:e.focus({preventScroll:!0})})),0===c.mode&&requestAnimationFrame((()=>d.closeCombobox()))})),x=B7((()=>{var e;if(a||null!=(e=c.virtual)&&e.disabled(u))return d.goToOption(zee.Nothing);let t=c.calculateIndex(u);d.goToOption(zee.Specific,t)})),k=gee(),O=B7((e=>k.update(e))),j=B7((e=>{var t;if(!k.wasMoved(e)||a||null!=(t=c.virtual)&&t.disabled(u)||f)return;let n=c.calculateIndex(u);d.goToOption(zee.Specific,n,0)})),S=B7((e=>{var t;k.wasMoved(e)&&(a||null!=(t=c.virtual)&&t.disabled(u)||f&&(c.optionsPropsRef.current.hold||d.goToOption(zee.Nothing)))})),N=e.useMemo((()=>({active:f,selected:h,disabled:a})),[f,h,a]);return jee({ourProps:{id:i,ref:b,role:"option",tabIndex:!0===a?void 0:-1,"aria-disabled":!0===a||void 0,"aria-selected":h,disabled:void 0,onClick:w,onFocus:x,onPointerEnter:O,onMouseEnter:O,onPointerMove:j,onMouseMove:j,onPointerLeave:S,onMouseLeave:S},theirProps:s,slot:N,defaultTag:"li",name:"Combobox.Option"})})),hte=Object.assign(ute,{Input:ste,Button:lte,Label:cte,Options:dte,Option:fte});function vte(t,n,r,o){let i=F7(r);e.useEffect((()=>{function e(e){i.current(e)}return(t=null!=t?t:window).addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}),[t,n,o])}function pte(){let t=e.useRef(!1);return _7((()=>(t.current=!0,()=>{t.current=!1})),[]),t}function mte(t){let n=B7(t),r=e.useRef(!1);e.useEffect((()=>(r.current=!1,()=>{r.current=!0,$7((()=>{r.current&&n()}))})),[n])}var bte=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(bte||{});function yte(){let t=e.useRef(0);return cee("keydown",(e=>{"Tab"===e.key&&(t.current=e.shiftKey?1:0)}),!0),t}function gte(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}var wte=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(wte||{});let xte=Aee((function(t,n){let r=e.useRef(null),o=bee(r,n),{initialFocus:i,containers:a,features:u=30,...l}=t;U7()||(u=1);let s=fee(r);!function({ownerDocument:t},n){let r=function(t=!0){let n=e.useRef(Ree.slice());return wee((([e],[t])=>{!0===t&&!1===e&&$7((()=>{n.current.splice(0)})),!1===t&&!0===e&&(n.current=Ree.slice())}),[t,Ree,n]),B7((()=>{var e;return null!=(e=n.current.find((e=>null!=e&&e.isConnected)))?e:null}))}(n);wee((()=>{n||(null==t?void 0:t.activeElement)===(null==t?void 0:t.body)&&ree(r())}),[n]),mte((()=>{n&&ree(r())}))}({ownerDocument:s},Boolean(16&u));let c=function({ownerDocument:t,container:n,initialFocus:r},o){let i=e.useRef(null),a=pte();return wee((()=>{if(!o)return;let e=n.current;e&&$7((()=>{if(!a.current)return;let n=null==t?void 0:t.activeElement;if(null!=r&&r.current){if((null==r?void 0:r.current)===n)return void(i.current=n)}else if(e.contains(n))return void(i.current=n);null!=r&&r.current?ree(r.current):aee(e,X7.First)===Z7.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=null==t?void 0:t.activeElement}))}),[o]),i}({ownerDocument:s,container:r,initialFocus:i},Boolean(2&u));!function({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){let i=pte();vte(null==e?void 0:e.defaultView,"focus",(e=>{if(!o||!i.current)return;let a=gte(n);t.current instanceof HTMLElement&&a.add(t.current);let u=r.current;if(!u)return;let l=e.target;l&&l instanceof HTMLElement?Ote(a,l)?(r.current=l,ree(l)):(e.preventDefault(),e.stopPropagation(),ree(u)):ree(r.current)}),!0)}({ownerDocument:s,container:r,containers:a,previousActiveElement:c},Boolean(8&u));let d=yte(),f=B7((e=>{let t=r.current;t&&K7(d.current,{[bte.Forwards]:()=>{aee(t,X7.First,{skipElements:[e.relatedTarget]})},[bte.Backwards]:()=>{aee(t,X7.Last,{skipElements:[e.relatedTarget]})}})})),h=V7(),v=e.useRef(!1),p={ref:o,onKeyDown(e){"Tab"==e.key&&(v.current=!0,h.requestAnimationFrame((()=>{v.current=!1})))},onBlur(e){let t=gte(a);r.current instanceof HTMLElement&&t.add(r.current);let n=e.relatedTarget;n instanceof HTMLElement&&"true"!==n.dataset.headlessuiFocusGuard&&(Ote(t,n)||(v.current?aee(r.current,K7(d.current,{[bte.Forwards]:()=>X7.Next,[bte.Backwards]:()=>X7.Previous})|X7.WrapAround,{relativeTo:e.target}):e.target instanceof HTMLElement&&ree(e.target)))}};return e.createElement(e.Fragment,null,Boolean(4&u)&&e.createElement(Pee,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:Dee.Focusable}),jee({ourProps:p,theirProps:l,defaultTag:"div",name:"FocusTrap"}),Boolean(4&u)&&e.createElement(Pee,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:Dee.Focusable}))})),kte=Object.assign(xte,{features:wte});function Ote(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let jte=e.createContext(!1);function Ste(t){return e.createElement(jte.Provider,{value:t.force},t.children)}function Nte(t){let n=e.useContext(jte),r=e.useContext(Ate),o=fee(t),[i,a]=e.useState((()=>{if(!n&&null!==r||L7.isServer)return null;let e=null==o?void 0:o.getElementById("headlessui-portal-root");if(e)return e;if(null===o)return null;let t=o.createElement("div");return t.setAttribute("id","headlessui-portal-root"),o.body.appendChild(t)}));return e.useEffect((()=>{null!==i&&(null!=o&&o.body.contains(i)||null==o||o.body.appendChild(i))}),[i,o]),e.useEffect((()=>{n||null!==r&&a(r.current)}),[r,a,n]),i}let Mte=e.Fragment;let Cte=e.Fragment,Ate=e.createContext(null);let Tte=e.createContext(null);function Ete(){let t=e.useContext(Tte),n=e.useRef([]),r=B7((e=>(n.current.push(e),t&&t.register(e),()=>o(e)))),o=B7((e=>{let r=n.current.indexOf(e);-1!==r&&n.current.splice(r,1),t&&t.unregister(e)})),i=e.useMemo((()=>({register:r,unregister:o,portals:n})),[r,o,n]);return[n,e.useMemo((()=>function({children:t}){return e.createElement(Tte.Provider,{value:i},t)}),[i])]}let Dte=Aee((function(n,r){let o=n,i=e.useRef(null),a=bee(mee((e=>{i.current=e})),r),u=fee(i),l=Nte(i),[s]=e.useState((()=>{var e;return L7.isServer?null:null!=(e=null==u?void 0:u.createElement("div"))?e:null})),c=e.useContext(Tte),d=U7();return _7((()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))}),[l,s]),_7((()=>{if(s&&c)return c.register(s)}),[c,s]),mte((()=>{var e;!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&(null==(e=l.parentElement)||e.removeChild(l)))})),d&&l&&s?t.createPortal(jee({ourProps:{ref:a},theirProps:o,defaultTag:Mte,name:"Portal"}),s):null})),Pte=Aee((function(t,n){let{target:r,...o}=t,i={ref:bee(n)};return e.createElement(Ate.Provider,{value:r},jee({ourProps:i,theirProps:o,defaultTag:Cte,name:"Popover.Group"}))})),Ite=Object.assign(Dte,{Group:Pte});const Lte="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},{useState:_te,useEffect:Fte,useLayoutEffect:Rte,useDebugValue:Bte}=r;function zte(e){const t=e.getSnapshot,n=e.value;try{const e=t();return!Lte(n,e)}catch{return!0}}const $te=!("undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement)?function(e,t,n){return t()}:function(e,t,n){const r=t(),[{inst:o},i]=_te({inst:{value:r,getSnapshot:t}});return Rte((()=>{o.value=r,o.getSnapshot=t,zte(o)&&i({inst:o})}),[e,r,t]),Fte((()=>(zte(o)&&i({inst:o}),e((()=>{zte(o)&&i({inst:o})})))),[e]),Bte(r),r},Wte="useSyncExternalStore"in r?(e=>e.useSyncExternalStore)(r):$te;function Vte(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=(null!=(n=t.defaultView)?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,i=e-o;n.style(r,"paddingRight",`${i}px`)}}}function Ute(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Hte=function(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...o){let i=t[e].call(n,...o);i&&(n=i,r.forEach((e=>e())))}}}((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:W7(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Ute(n)},o=[uee()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=W7();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let o=null!=(n=window.scrollY)?n:window.pageYOffset,i=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:o}=new URL(n.href),a=e.querySelector(o);a&&!r(a)&&(i=a)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;o!==t&&window.scrollTo(0,o),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)}))}))}}:{},Vte(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];o.forEach((({before:e})=>null==e?void 0:e(r))),o.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function qte(e,t,n){let r=function(e){return Wte(e.subscribe,e.getSnapshot,e.getSnapshot)}(Hte),o=e?r.get(e):void 0,i=!!o&&o.count>0;return _7((()=>{if(e&&t)return Hte.dispatch("PUSH",e,n),()=>Hte.dispatch("POP",e,n)}),[t,e]),i}Hte.subscribe((()=>{let e=Hte.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&Hte.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&Hte.dispatch("TEARDOWN",n)}}));let Kte=new Map,Gte=new Map;function Yte(e,t=!0){_7((()=>{var n;if(!t)return;let r="function"==typeof e?e():e.current;if(!r)return;let o=null!=(n=Gte.get(r))?n:0;return Gte.set(r,o+1),0!==o||(Kte.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),function(){var e;if(!r)return;let t=null!=(e=Gte.get(r))?e:1;if(1===t?Gte.delete(r):Gte.set(r,t-1),1!==t)return;let n=Kte.get(r);n&&(null===n["aria-hidden"]?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,Kte.delete(r))}}),[e,t])}function Xte({defaultContainers:t=[],portals:n,mainTreeNodeRef:r}={}){var o;let i=e.useRef(null!=(o=null==r?void 0:r.current)?o:null),a=fee(i),u=B7((()=>{var e,r,o;let u=[];for(let n of t)null!==n&&(n instanceof HTMLElement?u.push(n):"current"in n&&n.current instanceof HTMLElement&&u.push(n.current));if(null!=n&&n.current)for(let t of n.current)u.push(t);for(let t of null!=(e=null==a?void 0:a.querySelectorAll("html > *, body > *"))?e:[])t!==document.body&&t!==document.head&&t instanceof HTMLElement&&"headlessui-portal-root"!==t.id&&(t.contains(i.current)||t.contains(null==(o=null==(r=i.current)?void 0:r.getRootNode())?void 0:o.host)||u.some((e=>t.contains(e)))||u.push(t));return u}));return{resolveContainers:u,contains:B7((e=>u().some((t=>t.contains(e))))),mainTreeNodeRef:i,MainTreeNode:e.useMemo((()=>function(){return null!=r?null:e.createElement(Pee,{features:Dee.Hidden,ref:i})}),[i,r])}}let Zte=e.createContext((()=>{}));Zte.displayName="StackContext";var Qte=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Qte||{});function Jte({children:t,onUpdate:n,type:r,element:o,enabled:i}){let a=e.useContext(Zte),u=B7(((...e)=>{null==n||n(...e),a(...e)}));return _7((()=>{let e=void 0===i||!0===i;return e&&u(0,r,o),()=>{e&&u(1,r,o)}}),[u,r,o,i]),e.createElement(Zte.Provider,{value:u},t)}let ene=e.createContext(null);function tne(){let t=e.useContext(ene);if(null===t){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,tne),e}return t}function nne(){let[t,n]=e.useState([]);return[t.length>0?t.join(" "):void 0,e.useMemo((()=>function(t){let r=B7((e=>(n((t=>[...t,e])),()=>n((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),o=e.useMemo((()=>({register:r,slot:t.slot,name:t.name,props:t.props})),[r,t.slot,t.name,t.props]);return e.createElement(ene.Provider,{value:o},t.children)}),[n])]}let rne=Aee((function(e,t){let n=q7(),{id:r=`headlessui-description-${n}`,...o}=e,i=tne(),a=bee(t);return _7((()=>i.register(r)),[r,i.register]),jee({ourProps:{ref:a,...i.props,id:r},theirProps:o,slot:i.slot||{},defaultTag:"p",name:i.name||"Description"})})),one=Object.assign(rne,{});var ine=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ine||{}),ane=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(ane||{});let une={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},lne=e.createContext(null);function sne(t){let n=e.useContext(lne);if(null===n){let e=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,sne),e}return n}function cne(e,t){return K7(t.type,une,e,t)}lne.displayName="DialogContext";let dne=kee.RenderStrategy|kee.Static;let fne=Aee((function(t,n){let r=q7(),{id:o=`headlessui-dialog-${r}`,open:i,onClose:a,initialFocus:u,role:l="dialog",Ae:s=!1,...c}=t,[d,f]=e.useState(0),h=e.useRef(!1);l="dialog"===l||"alertdialog"===l?l:(h.current||(h.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog");let v=_ee();void 0===i&&null!==v&&(i=(v&Lee.Open)===Lee.Open);let p=e.useRef(null),m=bee(p,n),b=fee(p),y=t.hasOwnProperty("open")||null!==v,g=t.hasOwnProperty("onClose");if(!y&&!g)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!y)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!g)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof i)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if("function"!=typeof a)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${a}`);let w=i?0:1,[x,k]=e.useReducer(cne,{titleId:null,descriptionId:null,panelRef:e.createRef()}),O=B7((()=>a(!1))),j=B7((e=>k({type:0,id:e}))),S=!!U7()&&(!s&&0===w),N=d>1,M=null!==e.useContext(lne),[C,A]=Ete(),T={get current(){var e;return null!=(e=x.panelRef.current)?e:p.current}},{resolveContainers:E,mainTreeNodeRef:D,MainTreeNode:P}=Xte({portals:C,defaultContainers:[T]}),I=N?"parent":"leaf",L=null!==v&&(v&Lee.Closing)===Lee.Closing,_=!M&&!L&&S,F=e.useCallback((()=>{var e,t;return null!=(t=Array.from(null!=(e=null==b?void 0:b.querySelectorAll("body > *"))?e:[]).find((e=>"headlessui-portal-root"!==e.id&&(e.contains(D.current)&&e instanceof HTMLElement))))?t:null}),[D]);Yte(F,_);let R=!!N||S,B=e.useCallback((()=>{var e,t;return null!=(t=Array.from(null!=(e=null==b?void 0:b.querySelectorAll("[data-headlessui-portal]"))?e:[]).find((e=>e.contains(D.current)&&e instanceof HTMLElement)))?t:null}),[D]);Yte(B,R),dee(E,O,!(!S||N));let z=!(N||0!==w);vte(null==b?void 0:b.defaultView,"keydown",(e=>{z&&(e.defaultPrevented||e.key===Hee.Escape&&(e.preventDefault(),e.stopPropagation(),O()))})),function(e,t,n=(()=>[document.body])){qte(e,t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}(b,!(L||0!==w||M),E),e.useEffect((()=>{if(0!==w||!p.current)return;let e=new ResizeObserver((e=>{for(let t of e){let e=t.target.getBoundingClientRect();0===e.x&&0===e.y&&0===e.width&&0===e.height&&O()}}));return e.observe(p.current),()=>e.disconnect()}),[w,p,O]);let[$,W]=nne(),V=e.useMemo((()=>[{dialogState:w,close:O,setTitleId:j},x]),[w,x,O,j]),U=e.useMemo((()=>({open:0===w})),[w]),H={ref:m,id:o,role:l,"aria-modal":0===w||void 0,"aria-labelledby":x.titleId,"aria-describedby":$};return e.createElement(Jte,{type:"Dialog",enabled:0===w,element:p,onUpdate:B7(((e,t)=>{"Dialog"===t&&K7(e,{[Qte.Add]:()=>f((e=>e+1)),[Qte.Remove]:()=>f((e=>e-1))})}))},e.createElement(Ste,{force:!0},e.createElement(Ite,null,e.createElement(lne.Provider,{value:V},e.createElement(Ite.Group,{target:p},e.createElement(Ste,{force:!1},e.createElement(W,{slot:U,name:"Dialog.Description"},e.createElement(kte,{initialFocus:u,containers:E,features:S?K7(I,{parent:kte.features.RestoreFocus,leaf:kte.features.All&~kte.features.FocusLock}):kte.features.None},e.createElement(A,null,jee({ourProps:H,theirProps:c,slot:U,defaultTag:"div",features:dne,visible:0===w,name:"Dialog"}))))))))),e.createElement(P,null))})),hne=Aee((function(t,n){let r=q7(),{id:o=`headlessui-dialog-backdrop-${r}`,...i}=t,[{dialogState:a},u]=sne("Dialog.Backdrop"),l=bee(n);e.useEffect((()=>{if(null===u.panelRef.current)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")}),[u.panelRef]);let s=e.useMemo((()=>({open:0===a})),[a]);return e.createElement(Ste,{force:!0},e.createElement(Ite,null,jee({ourProps:{ref:l,id:o,"aria-hidden":!0},theirProps:i,slot:s,defaultTag:"div",name:"Dialog.Backdrop"})))})),vne=Aee((function(t,n){let r=q7(),{id:o=`headlessui-dialog-panel-${r}`,...i}=t,[{dialogState:a},u]=sne("Dialog.Panel"),l=bee(n,u.panelRef),s=e.useMemo((()=>({open:0===a})),[a]),c=B7((e=>{e.stopPropagation()}));return jee({ourProps:{ref:l,id:o,onClick:c},theirProps:i,slot:s,defaultTag:"div",name:"Dialog.Panel"})})),pne=Aee((function(t,n){let r=q7(),{id:o=`headlessui-dialog-overlay-${r}`,...i}=t,[{dialogState:a,close:u}]=sne("Dialog.Overlay"),l=bee(n),s=B7((e=>{if(e.target===e.currentTarget){if(Bee(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),u()}}));return jee({ourProps:{ref:l,id:o,"aria-hidden":!0,onClick:s},theirProps:i,slot:e.useMemo((()=>({open:0===a})),[a]),defaultTag:"div",name:"Dialog.Overlay"})})),mne=Aee((function(t,n){let r=q7(),{id:o=`headlessui-dialog-title-${r}`,...i}=t,[{dialogState:a,setTitleId:u}]=sne("Dialog.Title"),l=bee(n);e.useEffect((()=>(u(o),()=>u(null))),[o,u]);let s=e.useMemo((()=>({open:0===a})),[a]);return jee({ourProps:{ref:l,id:o},theirProps:i,slot:s,defaultTag:"h2",name:"Dialog.Title"})})),bne=Object.assign(fne,{Backdrop:hne,Panel:vne,Overlay:pne,Title:mne,Description:one});var yne;let gne=null!=(yne=e.startTransition)?yne:function(e){e()};var wne=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(wne||{}),xne=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.LinkPanel=4]="LinkPanel",e[e.UnlinkPanel=5]="UnlinkPanel",e))(xne||{});let kne={0:e=>({...e,disclosureState:K7(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},4:e=>!0===e.linkedPanel?e:{...e,linkedPanel:!0},5:e=>!1===e.linkedPanel?e:{...e,linkedPanel:!1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}},One=e.createContext(null);function jne(t){let n=e.useContext(One);if(null===n){let e=new Error(`<${t} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,jne),e}return n}One.displayName="DisclosureContext";let Sne=e.createContext(null);function Nne(t){let n=e.useContext(Sne);if(null===n){let e=new Error(`<${t} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Nne),e}return n}Sne.displayName="DisclosureAPIContext";let Mne=e.createContext(null);function Cne(e,t){return K7(t.type,kne,e,t)}Mne.displayName="DisclosurePanelContext";let Ane=e.Fragment;let Tne=kee.RenderStrategy|kee.Static;let Ene=Aee((function(t,n){let{defaultOpen:r=!1,...o}=t,i=e.useRef(null),a=bee(n,mee((e=>{i.current=e}),void 0===t.as||t.as===e.Fragment)),u=e.useRef(null),l=e.useRef(null),s=e.useReducer(Cne,{disclosureState:r?0:1,linkedPanel:!1,buttonRef:l,panelRef:u,buttonId:null,panelId:null}),[{disclosureState:c,buttonId:d},f]=s,h=B7((e=>{f({type:1});let t=G7(i);if(!t||!d)return;let n=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(d):t.getElementById(d);null==n||n.focus()})),v=e.useMemo((()=>({close:h})),[h]),p=e.useMemo((()=>({open:0===c,close:h})),[c,h]),m={ref:a};return e.createElement(One.Provider,{value:s},e.createElement(Sne.Provider,{value:v},e.createElement(Fee,{value:K7(c,{0:Lee.Open,1:Lee.Closed})},jee({ourProps:m,theirProps:o,slot:p,defaultTag:Ane,name:"Disclosure"}))))})),Dne=Aee((function(t,n){let r=q7(),{id:o=`headlessui-disclosure-button-${r}`,...i}=t,[a,u]=jne("Disclosure.Button"),l=e.useContext(Mne),s=null!==l&&l===a.panelId,c=e.useRef(null),d=bee(c,n,s?null:a.buttonRef),f=Nee();e.useEffect((()=>{if(!s)return u({type:2,buttonId:o}),()=>{u({type:2,buttonId:null})}}),[o,u,s]);let h=B7((e=>{var t;if(s){if(1===a.disclosureState)return;switch(e.key){case Hee.Space:case Hee.Enter:e.preventDefault(),e.stopPropagation(),u({type:0}),null==(t=a.buttonRef.current)||t.focus()}}else switch(e.key){case Hee.Space:case Hee.Enter:e.preventDefault(),e.stopPropagation(),u({type:0})}})),v=B7((e=>{if(e.key===Hee.Space)e.preventDefault()})),p=B7((e=>{var n;Bee(e.currentTarget)||t.disabled||(s?(u({type:0}),null==(n=a.buttonRef.current)||n.focus()):u({type:0}))})),m=e.useMemo((()=>({open:0===a.disclosureState})),[a]),b=vee(t,c);return jee({mergeRefs:f,ourProps:s?{ref:d,type:b,onKeyDown:h,onClick:p}:{ref:d,id:o,type:b,"aria-expanded":0===a.disclosureState,"aria-controls":a.linkedPanel?a.panelId:void 0,onKeyDown:h,onKeyUp:v,onClick:p},theirProps:i,slot:m,defaultTag:"button",name:"Disclosure.Button"})})),Pne=Aee((function(t,n){let r=q7(),{id:o=`headlessui-disclosure-panel-${r}`,...i}=t,[a,u]=jne("Disclosure.Panel"),{close:l}=Nne("Disclosure.Panel"),s=Nee(),c=bee(n,a.panelRef,(e=>{gne((()=>u({type:e?4:5})))}));e.useEffect((()=>(u({type:3,panelId:o}),()=>{u({type:3,panelId:null})})),[o,u]);let d=_ee(),f=null!==d?(d&Lee.Open)===Lee.Open:0===a.disclosureState,h=e.useMemo((()=>({open:0===a.disclosureState,close:l})),[a,l]),v={ref:c,id:o};return e.createElement(Mne.Provider,{value:a.panelId},jee({mergeRefs:s,ourProps:v,theirProps:i,slot:h,defaultTag:"div",features:Tne,visible:f,name:"Disclosure.Panel"}))})),Ine=Object.assign(Ene,{Button:Dne,Panel:Pne}),Lne=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function _ne(e){var t,n;let r=null!=(t=e.innerText)?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let i=!1;for(let u of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))u.remove(),i=!0;let a=i?null!=(n=o.innerText)?n:"":r;return Lne.test(a)&&(a=a.replace(Lne,"")),a}function Fne(t){let n=e.useRef(""),r=e.useRef("");return B7((()=>{let e=t.current;if(!e)return"";let o=e.innerText;if(n.current===o)return r.current;let i=function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map((e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():_ne(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return _ne(e).trim()}(e).trim().toLowerCase();return n.current=o,r.current=i,i}))}var Rne=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Rne||{}),Bne=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Bne||{}),zne=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(zne||{}),$ne=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))($ne||{});function Wne(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=iee(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),o=n?r.indexOf(n):null;return-1===o&&(o=null),{options:r,activeOptionIndex:o}}let Vne={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1},0(e){if(e.dataRef.current.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex((e=>n(e.dataRef.current.value)));return-1!==r&&(t=r),{...e,listboxState:0,activeOptionIndex:t}},2(e,t){var n;if(e.dataRef.current.disabled||1===e.listboxState)return e;let r=Wne(e),o=$ee(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:o,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find((e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))})),i=o?e.options.indexOf(o):-1;return-1===i||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Wne(e,(e=>[...e,n]));return null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=Wne(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}},7:(e,t)=>({...e,labelId:t.id})},Une=e.createContext(null);function Hne(t){let n=e.useContext(Une);if(null===n){let e=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Hne),e}return n}Une.displayName="ListboxActionsContext";let qne=e.createContext(null);function Kne(t){let n=e.useContext(qne);if(null===n){let e=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Kne),e}return n}function Gne(e,t){return K7(t.type,Vne,e,t)}qne.displayName="ListboxDataContext";let Yne=e.Fragment;let Xne=kee.RenderStrategy|kee.Static;let Zne=Aee((function(t,n){let{value:r,defaultValue:o,form:i,name:a,onChange:u,by:l=((e,t)=>e===t),disabled:s=!1,horizontal:c=!1,multiple:d=!1,...f}=t;const h=c?"horizontal":"vertical";let v=bee(n),[p=(d?[]:void 0),m]=z7(r,u,o),[b,y]=e.useReducer(Gne,{dataRef:e.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),g=e.useRef({static:!1,hold:!1}),w=e.useRef(null),x=e.useRef(null),k=e.useRef(null),O=B7("string"==typeof l?(e,t)=>{let n=l;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:l),j=e.useCallback((e=>K7(S.mode,{1:()=>p.some((t=>O(t,e))),0:()=>O(p,e)})),[p]),S=e.useMemo((()=>({...b,value:p,disabled:s,mode:d?1:0,orientation:h,compare:O,isSelected:j,optionsPropsRef:g,labelRef:w,buttonRef:x,optionsRef:k})),[p,s,d,b]);_7((()=>{b.dataRef.current=S}),[S]),dee([S.buttonRef,S.optionsRef],((e,t)=>{var n;y({type:1}),tee(t,eee.Loose)||(e.preventDefault(),null==(n=S.buttonRef.current)||n.focus())}),0===S.listboxState);let N=e.useMemo((()=>({open:0===S.listboxState,disabled:s,value:p})),[S,s,p]),M=B7((e=>{let t=S.options.find((t=>t.id===e));t&&I(t.dataRef.current.value)})),C=B7((()=>{if(null!==S.activeOptionIndex){let{dataRef:e,id:t}=S.options[S.activeOptionIndex];I(e.current.value),y({type:2,focus:zee.Specific,id:t})}})),A=B7((()=>y({type:0}))),T=B7((()=>y({type:1}))),E=B7(((e,t,n)=>e===zee.Specific?y({type:2,focus:zee.Specific,id:t,trigger:n}):y({type:2,focus:e,trigger:n}))),D=B7(((e,t)=>(y({type:5,id:e,dataRef:t}),()=>y({type:6,id:e})))),P=B7((e=>(y({type:7,id:e}),()=>y({type:7,id:null})))),I=B7((e=>K7(S.mode,{0:()=>null==m?void 0:m(e),1(){let t=S.value.slice(),n=t.findIndex((t=>O(t,e)));return-1===n?t.push(e):t.splice(n,1),null==m?void 0:m(t)}}))),L=B7((e=>y({type:3,value:e}))),_=B7((()=>y({type:4}))),F=e.useMemo((()=>({onChange:I,registerOption:D,registerLabel:P,goToOption:E,closeListbox:T,openListbox:A,selectActiveOption:C,selectOption:M,search:L,clearSearch:_})),[]),R={ref:v},B=e.useRef(null),z=V7();return e.useEffect((()=>{B.current&&void 0!==o&&z.addEventListener(B.current,"reset",(()=>{null==m||m(o)}))}),[B,m]),e.createElement(Une.Provider,{value:F},e.createElement(qne.Provider,{value:S},e.createElement(Fee,{value:K7(S.listboxState,{0:Lee.Open,1:Lee.Closed})},null!=a&&null!=p&&Wee({[a]:p}).map((([t,n],r)=>e.createElement(Pee,{features:Dee.Hidden,ref:0===r?e=>{var t;B.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0,...Tee({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,name:t,value:n})}))),jee({ourProps:R,theirProps:f,slot:N,defaultTag:Yne,name:"Listbox"}))))})),Qne=Aee((function(t,n){var r;let o=q7(),{id:i=`headlessui-listbox-button-${o}`,...a}=t,u=Kne("Listbox.Button"),l=Hne("Listbox.Button"),s=bee(u.buttonRef,n),c=V7(),d=B7((e=>{switch(e.key){case Hee.Space:case Hee.Enter:case Hee.ArrowDown:e.preventDefault(),l.openListbox(),c.nextFrame((()=>{u.value||l.goToOption(zee.First)}));break;case Hee.ArrowUp:e.preventDefault(),l.openListbox(),c.nextFrame((()=>{u.value||l.goToOption(zee.Last)}))}})),f=B7((e=>{if(e.key===Hee.Space)e.preventDefault()})),h=B7((e=>{if(Bee(e.currentTarget))return e.preventDefault();0===u.listboxState?(l.closeListbox(),c.nextFrame((()=>{var e;return null==(e=u.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(e.preventDefault(),l.openListbox())})),v=R7((()=>{if(u.labelId)return[u.labelId,i].join(" ")}),[u.labelId,i]),p=e.useMemo((()=>({open:0===u.listboxState,disabled:u.disabled,value:u.value})),[u]);return jee({ourProps:{ref:s,id:i,type:vee(t,u.buttonRef),"aria-haspopup":"listbox","aria-controls":null==(r=u.optionsRef.current)?void 0:r.id,"aria-expanded":0===u.listboxState,"aria-labelledby":v,disabled:u.disabled,onKeyDown:d,onKeyUp:f,onClick:h},theirProps:a,slot:p,defaultTag:"button",name:"Listbox.Button"})})),Jne=Aee((function(t,n){let r=q7(),{id:o=`headlessui-listbox-label-${r}`,...i}=t,a=Kne("Listbox.Label"),u=Hne("Listbox.Label"),l=bee(a.labelRef,n);_7((()=>u.registerLabel(o)),[o]);let s=B7((()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})})),c=e.useMemo((()=>({open:0===a.listboxState,disabled:a.disabled})),[a]);return jee({ourProps:{ref:l,id:o,onClick:s},theirProps:i,slot:c,defaultTag:"label",name:"Listbox.Label"})})),ere=Aee((function(t,n){var r;let o=q7(),{id:i=`headlessui-listbox-options-${o}`,...a}=t,u=Kne("Listbox.Options"),l=Hne("Listbox.Options"),s=bee(u.optionsRef,n),c=V7(),d=V7(),f=_ee(),h=null!==f?(f&Lee.Open)===Lee.Open:0===u.listboxState;e.useEffect((()=>{var e;let t=u.optionsRef.current;t&&0===u.listboxState&&t!==(null==(e=G7(t))?void 0:e.activeElement)&&t.focus({preventScroll:!0})}),[u.listboxState,u.optionsRef]);let v=B7((e=>{switch(d.dispose(),e.key){case Hee.Space:if(""!==u.searchQuery)return e.preventDefault(),e.stopPropagation(),l.search(e.key);case Hee.Enter:if(e.preventDefault(),e.stopPropagation(),null!==u.activeOptionIndex){let{dataRef:e}=u.options[u.activeOptionIndex];l.onChange(e.current.value)}0===u.mode&&(l.closeListbox(),W7().nextFrame((()=>{var e;return null==(e=u.buttonRef.current)?void 0:e.focus({preventScroll:!0})})));break;case K7(u.orientation,{vertical:Hee.ArrowDown,horizontal:Hee.ArrowRight}):return e.preventDefault(),e.stopPropagation(),l.goToOption(zee.Next);case K7(u.orientation,{vertical:Hee.ArrowUp,horizontal:Hee.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),l.goToOption(zee.Previous);case Hee.Home:case Hee.PageUp:return e.preventDefault(),e.stopPropagation(),l.goToOption(zee.First);case Hee.End:case Hee.PageDown:return e.preventDefault(),e.stopPropagation(),l.goToOption(zee.Last);case Hee.Escape:return e.preventDefault(),e.stopPropagation(),l.closeListbox(),c.nextFrame((()=>{var e;return null==(e=u.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));case Hee.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(l.search(e.key),d.setTimeout((()=>l.clearSearch()),350))}})),p=R7((()=>{var e;return null==(e=u.buttonRef.current)?void 0:e.id}),[u.buttonRef.current]),m=e.useMemo((()=>({open:0===u.listboxState})),[u]);return jee({ourProps:{"aria-activedescendant":null===u.activeOptionIndex||null==(r=u.options[u.activeOptionIndex])?void 0:r.id,"aria-multiselectable":1===u.mode||void 0,"aria-labelledby":p,"aria-orientation":u.orientation,id:i,onKeyDown:v,role:"listbox",tabIndex:0,ref:s},theirProps:a,slot:m,defaultTag:"ul",features:Xne,visible:h,name:"Listbox.Options"})})),tre=Aee((function(t,n){let r=q7(),{id:o=`headlessui-listbox-option-${r}`,disabled:i=!1,value:a,...u}=t,l=Kne("Listbox.Option"),s=Hne("Listbox.Option"),c=null!==l.activeOptionIndex&&l.options[l.activeOptionIndex].id===o,d=l.isSelected(a),f=e.useRef(null),h=Fne(f),v=F7({disabled:i,value:a,domRef:f,get textValue(){return h()}}),p=bee(n,f);_7((()=>{if(0!==l.listboxState||!c||0===l.activationTrigger)return;let e=W7();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=f.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[f,c,l.listboxState,l.activationTrigger,l.activeOptionIndex]),_7((()=>s.registerOption(o,v)),[v,o]);let m=B7((e=>{if(i)return e.preventDefault();s.onChange(a),0===l.mode&&(s.closeListbox(),W7().nextFrame((()=>{var e;return null==(e=l.buttonRef.current)?void 0:e.focus({preventScroll:!0})})))})),b=B7((()=>{if(i)return s.goToOption(zee.Nothing);s.goToOption(zee.Specific,o)})),y=gee(),g=B7((e=>y.update(e))),w=B7((e=>{y.wasMoved(e)&&(i||c||s.goToOption(zee.Specific,o,0))})),x=B7((e=>{y.wasMoved(e)&&(i||c&&s.goToOption(zee.Nothing))})),k=e.useMemo((()=>({active:c,selected:d,disabled:i})),[c,d,i]);return jee({ourProps:{id:o,ref:p,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":d,disabled:void 0,onClick:m,onFocus:b,onPointerEnter:g,onMouseEnter:g,onPointerMove:w,onMouseMove:w,onPointerLeave:x,onMouseLeave:x},theirProps:u,slot:k,defaultTag:"li",name:"Listbox.Option"})})),nre=Object.assign(Zne,{Button:Qne,Label:Jne,Options:ere,Option:tre});var rre=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(rre||{}),ore=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(ore||{});let ire={0:e=>{let t={...e,popoverState:K7(e.popoverState,{0:1,1:0})};return 0===t.popoverState&&(t.Ae=!1),t},1:e=>1===e.popoverState?e:{...e,popoverState:1},2:(e,t)=>e.button===t.button?e:{...e,button:t.button},3:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},4:(e,t)=>e.panel===t.panel?e:{...e,panel:t.panel},5:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}},are=e.createContext(null);function ure(t){let n=e.useContext(are);if(null===n){let e=new Error(`<${t} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,ure),e}return n}are.displayName="PopoverContext";let lre=e.createContext(null);function sre(t){let n=e.useContext(lre);if(null===n){let e=new Error(`<${t} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,sre),e}return n}lre.displayName="PopoverAPIContext";let cre=e.createContext(null);function dre(){return e.useContext(cre)}cre.displayName="PopoverGroupContext";let fre=e.createContext(null);function hre(e,t){return K7(t.type,ire,e,t)}fre.displayName="PopoverPanelContext";let vre=kee.RenderStrategy|kee.Static;let pre=kee.RenderStrategy|kee.Static;let mre=Aee((function(t,n){var r;let{Ae:o=!1,...i}=t,a=e.useRef(null),u=bee(n,mee((e=>{a.current=e}))),l=e.useRef([]),s=e.useReducer(hre,{Ae:o,popoverState:o?0:1,buttons:l,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:e.createRef(),afterPanelSentinel:e.createRef()}),[{popoverState:c,button:d,buttonId:f,panel:h,panelId:v,beforePanelSentinel:p,afterPanelSentinel:m},b]=s,y=fee(null!=(r=a.current)?r:d),g=e.useMemo((()=>{if(!d||!h)return!1;for(let a of document.querySelectorAll("body > *"))if(Number(null==a?void 0:a.contains(d))^Number(null==a?void 0:a.contains(h)))return!0;let e=J7(),t=e.indexOf(d),n=(t+e.length-1)%e.length,r=(t+1)%e.length,o=e[n],i=e[r];return!h.contains(o)&&!h.contains(i)}),[d,h]),w=F7(f),x=F7(v),k=e.useMemo((()=>({buttonId:w,panelId:x,close:()=>b({type:1})})),[w,x,b]),O=dre(),j=null==O?void 0:O.registerPopover,S=B7((()=>{var e;return null!=(e=null==O?void 0:O.isFocusWithinPopoverGroup())?e:(null==y?void 0:y.activeElement)&&((null==d?void 0:d.contains(y.activeElement))||(null==h?void 0:h.contains(y.activeElement)))}));e.useEffect((()=>null==j?void 0:j(k)),[j,k]);let[N,M]=Ete(),C=Xte({mainTreeNodeRef:null==O?void 0:O.mainTreeNodeRef,portals:N,defaultContainers:[d,h]});vte(null==y?void 0:y.defaultView,"focus",(e=>{var t,n,r,o;e.target!==window&&e.target instanceof HTMLElement&&0===c&&(S()||d&&h&&(C.contains(e.target)||null!=(n=null==(t=p.current)?void 0:t.contains)&&n.call(t,e.target)||null!=(o=null==(r=m.current)?void 0:r.contains)&&o.call(r,e.target)||b({type:1})))}),!0),dee(C.resolveContainers,((e,t)=>{b({type:1}),tee(t,eee.Loose)||(e.preventDefault(),null==d||d.focus())}),0===c);let A=B7((e=>{b({type:1});let t=e?e instanceof HTMLElement?e:"current"in e&&e.current instanceof HTMLElement?e.current:d:d;null==t||t.focus()})),T=e.useMemo((()=>({close:A,isPortalled:g})),[A,g]),E=e.useMemo((()=>({open:0===c,close:A})),[c,A]),D={ref:u};return e.createElement(fre.Provider,{value:null},e.createElement(are.Provider,{value:s},e.createElement(lre.Provider,{value:T},e.createElement(Fee,{value:K7(c,{0:Lee.Open,1:Lee.Closed})},e.createElement(M,null,jee({ourProps:D,theirProps:i,slot:E,defaultTag:"div",name:"Popover"}),e.createElement(C.MainTreeNode,null))))))})),bre=Aee((function(t,n){let r=q7(),{id:o=`headlessui-popover-button-${r}`,...i}=t,[a,u]=ure("Popover.Button"),{isPortalled:l}=sre("Popover.Button"),s=e.useRef(null),c=`headlessui-focus-sentinel-${q7()}`,d=dre(),f=null==d?void 0:d.closeOthers,h=null!==e.useContext(fre);e.useEffect((()=>{if(!h)return u({type:3,buttonId:o}),()=>{u({type:3,buttonId:null})}}),[h,o,u]);let[v]=e.useState((()=>Symbol())),p=bee(s,n,h?null:e=>{if(e)a.buttons.current.push(v);else{let e=a.buttons.current.indexOf(v);-1!==e&&a.buttons.current.splice(e,1)}a.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),e&&u({type:2,button:e})}),m=bee(s,n),b=fee(s),y=B7((e=>{var t,n,r;if(h){if(1===a.popoverState)return;switch(e.key){case Hee.Space:case Hee.Enter:e.preventDefault(),null==(n=(t=e.target).click)||n.call(t),u({type:1}),null==(r=a.button)||r.focus()}}else switch(e.key){case Hee.Space:case Hee.Enter:e.preventDefault(),e.stopPropagation(),1===a.popoverState&&(null==f||f(a.buttonId)),u({type:0});break;case Hee.Escape:if(0!==a.popoverState)return null==f?void 0:f(a.buttonId);if(!s.current||null!=b&&b.activeElement&&!s.current.contains(b.activeElement))return;e.preventDefault(),e.stopPropagation(),u({type:1})}})),g=B7((e=>{h||e.key===Hee.Space&&e.preventDefault()})),w=B7((e=>{var n,r;Bee(e.currentTarget)||t.disabled||(h?(u({type:1}),null==(n=a.button)||n.focus()):(e.preventDefault(),e.stopPropagation(),1===a.popoverState&&(null==f||f(a.buttonId)),u({type:0}),null==(r=a.button)||r.focus()))})),x=B7((e=>{e.preventDefault(),e.stopPropagation()})),k=0===a.popoverState,O=e.useMemo((()=>({open:k})),[k]),j=vee(t,s),S=h?{ref:m,type:j,onKeyDown:y,onClick:w}:{ref:p,id:a.buttonId,type:j,"aria-expanded":0===a.popoverState,"aria-controls":a.panel?a.panelId:void 0,onKeyDown:y,onKeyUp:g,onClick:w,onMouseDown:x},N=yte(),M=B7((()=>{let e=a.panel;e&&K7(N.current,{[bte.Forwards]:()=>aee(e,X7.First),[bte.Backwards]:()=>aee(e,X7.Last)})===Z7.Error&&aee(J7().filter((e=>"true"!==e.dataset.headlessuiFocusGuard)),K7(N.current,{[bte.Forwards]:X7.Next,[bte.Backwards]:X7.Previous}),{relativeTo:a.button})}));return e.createElement(e.Fragment,null,jee({ourProps:S,theirProps:i,slot:O,defaultTag:"button",name:"Popover.Button"}),k&&!h&&l&&e.createElement(Pee,{id:c,features:Dee.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:M}))})),yre=Aee((function(t,n){let r=q7(),{id:o=`headlessui-popover-overlay-${r}`,...i}=t,[{popoverState:a},u]=ure("Popover.Overlay"),l=bee(n),s=_ee(),c=null!==s?(s&Lee.Open)===Lee.Open:0===a,d=B7((e=>{if(Bee(e.currentTarget))return e.preventDefault();u({type:1})}));return jee({ourProps:{ref:l,id:o,"aria-hidden":!0,onClick:d},theirProps:i,slot:e.useMemo((()=>({open:0===a})),[a]),defaultTag:"div",features:vre,visible:c,name:"Popover.Overlay"})})),gre=Aee((function(t,n){let r=q7(),{id:o=`headlessui-popover-panel-${r}`,focus:i=!1,...a}=t,[u,l]=ure("Popover.Panel"),{close:s,isPortalled:c}=sre("Popover.Panel"),d=`headlessui-focus-sentinel-before-${q7()}`,f=`headlessui-focus-sentinel-after-${q7()}`,h=e.useRef(null),v=bee(h,n,(e=>{l({type:4,panel:e})})),p=fee(h),m=Nee();_7((()=>(l({type:5,panelId:o}),()=>{l({type:5,panelId:null})})),[o,l]);let b=_ee(),y=null!==b?(b&Lee.Open)===Lee.Open:0===u.popoverState,g=B7((e=>{var t;if(e.key===Hee.Escape){if(0!==u.popoverState||!h.current||null!=p&&p.activeElement&&!h.current.contains(p.activeElement))return;e.preventDefault(),e.stopPropagation(),l({type:1}),null==(t=u.button)||t.focus()}}));e.useEffect((()=>{var e;t.static||1===u.popoverState&&(null==(e=t.unmount)||e)&&l({type:4,panel:null})}),[u.popoverState,t.unmount,t.static,l]),e.useEffect((()=>{if(u.Ae||!i||0!==u.popoverState||!h.current)return;let e=null==p?void 0:p.activeElement;h.current.contains(e)||aee(h.current,X7.First)}),[u.Ae,i,h,u.popoverState]);let w=e.useMemo((()=>({open:0===u.popoverState,close:s})),[u,s]),x={ref:v,id:o,onKeyDown:g,onBlur:i&&0===u.popoverState?e=>{var t,n,r,o,i;let a=e.relatedTarget;a&&h.current&&(null!=(t=h.current)&&t.contains(a)||(l({type:1}),(null!=(r=null==(n=u.beforePanelSentinel.current)?void 0:n.contains)&&r.call(n,a)||null!=(i=null==(o=u.afterPanelSentinel.current)?void 0:o.contains)&&i.call(o,a))&&a.focus({preventScroll:!0})))}:void 0,tabIndex:-1},k=yte(),O=B7((()=>{let e=h.current;e&&K7(k.current,{[bte.Forwards]:()=>{var t;aee(e,X7.First)===Z7.Error&&(null==(t=u.afterPanelSentinel.current)||t.focus())},[bte.Backwards]:()=>{var e;null==(e=u.button)||e.focus({preventScroll:!0})}})})),j=B7((()=>{let e=h.current;e&&K7(k.current,{[bte.Forwards]:()=>{var e;if(!u.button)return;let t=J7(),n=t.indexOf(u.button),r=t.slice(0,n+1),o=[...t.slice(n+1),...r];for(let i of o.slice())if("true"===i.dataset.headlessuiFocusGuard||null!=(e=u.panel)&&e.contains(i)){let e=o.indexOf(i);-1!==e&&o.splice(e,1)}aee(o,X7.First,{sorted:!1})},[bte.Backwards]:()=>{var t;aee(e,X7.Previous)===Z7.Error&&(null==(t=u.button)||t.focus())}})}));return e.createElement(fre.Provider,{value:o},y&&c&&e.createElement(Pee,{id:d,ref:u.beforePanelSentinel,features:Dee.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:O}),jee({mergeRefs:m,ourProps:x,theirProps:a,slot:w,defaultTag:"div",features:pre,visible:y,name:"Popover.Panel"}),y&&c&&e.createElement(Pee,{id:f,ref:u.afterPanelSentinel,features:Dee.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:j}))})),wre=Aee((function(t,n){let r=e.useRef(null),o=bee(r,n),[i,a]=e.useState([]),u=function(){let t=e.useRef(null);return{mainTreeNodeRef:t,MainTreeNode:e.useMemo((()=>function(){return e.createElement(Pee,{features:Dee.Hidden,ref:t})}),[t])}}(),l=B7((e=>{a((t=>{let n=t.indexOf(e);if(-1!==n){let e=t.slice();return e.splice(n,1),e}return t}))})),s=B7((e=>(a((t=>[...t,e])),()=>l(e)))),c=B7((()=>{var e;let t=G7(r);if(!t)return!1;let n=t.activeElement;return!(null==(e=r.current)||!e.contains(n))||i.some((e=>{var r,o;return(null==(r=t.getElementById(e.buttonId.current))?void 0:r.contains(n))||(null==(o=t.getElementById(e.panelId.current))?void 0:o.contains(n))}))})),d=B7((e=>{for(let t of i)t.buttonId.current!==e&&t.close()})),f=e.useMemo((()=>({registerPopover:s,unregisterPopover:l,isFocusWithinPopoverGroup:c,closeOthers:d,mainTreeNodeRef:u.mainTreeNodeRef})),[s,l,c,d,u.mainTreeNodeRef]),h=e.useMemo((()=>({})),[]),v=t,p={ref:o};return e.createElement(cre.Provider,{value:f},jee({ourProps:p,theirProps:v,slot:h,defaultTag:"div",name:"Popover.Group"}),e.createElement(u.MainTreeNode,null))})),xre=Object.assign(mre,{Button:bre,Overlay:yre,Panel:gre,Group:wre}),kre=e.createContext(null);function Ore(){let t=e.useContext(kre);if(null===t){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Ore),e}return t}let jre=Aee((function(e,t){let n=q7(),{id:r=`headlessui-label-${n}`,passive:o=!1,...i}=e,a=Ore(),u=bee(t);_7((()=>a.register(r)),[r,a.register]);let l={ref:u,...a.props,id:r};return o&&("onClick"in l&&(delete l.htmlFor,delete l.onClick),"onClick"in i&&delete i.onClick),jee({ourProps:l,theirProps:i,slot:a.slot||{},defaultTag:"label",name:a.name||"Label"})})),Sre=Object.assign(jre,{});let Nre=e.createContext(null);Nre.displayName="GroupContext";let Mre=e.Fragment;let Cre=Aee((function(t,n){let r=q7(),{id:o=`headlessui-switch-${r}`,checked:i,defaultChecked:a=!1,onChange:u,name:l,value:s,form:c,...d}=t,f=e.useContext(Nre),h=e.useRef(null),v=bee(h,n,null===f?null:f.setSwitch),[p,m]=z7(i,u,a),b=B7((()=>null==m?void 0:m(!p))),y=B7((e=>{if(Bee(e.currentTarget))return e.preventDefault();e.preventDefault(),b()})),g=B7((e=>{e.key===Hee.Space?(e.preventDefault(),b()):e.key===Hee.Enter&&function(e){var t,n;let r=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(r){for(let t of r.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=r.requestSubmit)||n.call(r)}}(e.currentTarget)})),w=B7((e=>e.preventDefault())),x=e.useMemo((()=>({checked:p})),[p]),k={id:o,ref:v,role:"switch",type:vee(t,h),tabIndex:0,"aria-checked":p,"aria-labelledby":null==f?void 0:f.labelledby,"aria-describedby":null==f?void 0:f.describedby,onClick:y,onKeyUp:g,onKeyPress:w},O=V7();return e.useEffect((()=>{var e;let t=null==(e=h.current)?void 0:e.closest("form");t&&void 0!==a&&O.addEventListener(t,"reset",(()=>{m(a)}))}),[h,m]),e.createElement(e.Fragment,null,null!=l&&p&&e.createElement(Pee,{features:Dee.Hidden,...Tee({as:"input",type:"checkbox",hidden:!0,readOnly:!0,form:c,checked:p,name:l,value:s})}),jee({ourProps:k,theirProps:d,slot:x,defaultTag:"button",name:"Switch"}))})),Are=function(t){var n;let[r,o]=e.useState(null),[i,a]=function(){let[t,n]=e.useState([]);return[t.length>0?t.join(" "):void 0,e.useMemo((()=>function(t){let r=B7((e=>(n((t=>[...t,e])),()=>n((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),o=e.useMemo((()=>({register:r,slot:t.slot,name:t.name,props:t.props})),[r,t.slot,t.name,t.props]);return e.createElement(kre.Provider,{value:o},t.children)}),[n])]}(),[u,l]=nne(),s=e.useMemo((()=>({switch:r,setSwitch:o,labelledby:i,describedby:u})),[r,o,i,u]),c=t;return e.createElement(l,{name:"Switch.Description"},e.createElement(a,{name:"Switch.Label",props:{htmlFor:null==(n=s.switch)?void 0:n.id,onClick(e){r&&("LABEL"===e.currentTarget.tagName&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},e.createElement(Nre.Provider,{value:s},jee({ourProps:{},theirProps:c,defaultTag:Mre,name:"Switch.Group"}))))},Tre=Object.assign(Cre,{Group:Are,Label:Sre,Description:one});function Ere({onFocus:t}){let[n,r]=e.useState(!0),o=pte();return n?e.createElement(Pee,{as:"button",type:"button",features:Dee.Focusable,onFocus:e=>{e.preventDefault();let n,i=50;n=requestAnimationFrame((function e(){if(i--<=0)n&&cancelAnimationFrame(n);else if(t()){if(cancelAnimationFrame(n),!o.current)return;r(!1)}else n=requestAnimationFrame(e)}))}}):null}const Dre=r.createContext(null);function Pre({children:e}){let t=r.useRef({groups:new Map,get(e,t){var n;let r=this.groups.get(e);r||(r=new Map,this.groups.set(e,r));let o=null!=(n=r.get(t))?n:0;return r.set(t,o+1),[Array.from(r.keys()).indexOf(t),function(){let e=r.get(t);e>1?r.set(t,e-1):r.delete(t)}]}});return r.createElement(Dre.Provider,{value:t},e)}function Ire(e){let t=r.useContext(Dre);if(!t)throw new Error("You must wrap your component in a <StableCollection>");let n=function(){var e,t,n;let o=null!=(n=null==(t=null==(e=r.Te)?void 0:e.ReactCurrentOwner)?void 0:t.current)?n:null;if(!o)return Symbol();let i=[],a=o;for(;a;)i.push(a.index),a=a.return;return"$."+i.join(".")}(),[o,i]=t.current.get(e,n);return r.useEffect((()=>i),[]),o}var Lre=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Lre||{}),_re=(e=>(e[e.Less=-1]="Less",e[e.Equal=0]="Equal",e[e.Greater=1]="Greater",e))(_re||{}),Fre=(e=>(e[e.SetSelectedIndex=0]="SetSelectedIndex",e[e.RegisterTab=1]="RegisterTab",e[e.UnregisterTab=2]="UnregisterTab",e[e.RegisterPanel=3]="RegisterPanel",e[e.UnregisterPanel=4]="UnregisterPanel",e))(Fre||{});let Rre={0(e,t){var n;let r=iee(e.tabs,(e=>e.current)),o=iee(e.panels,(e=>e.current)),i=r.filter((e=>{var t;return!(null!=(t=e.current)&&t.hasAttribute("disabled"))})),a={...e,tabs:r,panels:o};if(t.index<0||t.index>r.length-1){let n=K7(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>K7(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===i.length)return a;let o=K7(n,{0:()=>r.indexOf(i[0]),1:()=>r.indexOf(i[i.length-1])});return{...a,selectedIndex:-1===o?e.selectedIndex:o}}let u=r.slice(0,t.index),l=[...r.slice(t.index),...u].find((e=>i.includes(e)));if(!l)return a;let s=null!=(n=r.indexOf(l))?n:e.selectedIndex;return-1===s&&(s=e.selectedIndex),{...a,selectedIndex:s}},1(e,t){var n;if(e.tabs.includes(t.tab))return e;let r=e.tabs[e.selectedIndex],o=iee([...e.tabs,t.tab],(e=>e.current)),i=null!=(n=o.indexOf(r))?n:e.selectedIndex;return-1===i&&(i=e.selectedIndex),{...e,tabs:o,selectedIndex:i}},2:(e,t)=>({...e,tabs:e.tabs.filter((e=>e!==t.tab))}),3:(e,t)=>e.panels.includes(t.panel)?e:{...e,panels:iee([...e.panels,t.panel],(e=>e.current))},4:(e,t)=>({...e,panels:e.panels.filter((e=>e!==t.panel))})},Bre=e.createContext(null);function zre(t){let n=e.useContext(Bre);if(null===n){let e=new Error(`<${t} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,zre),e}return n}Bre.displayName="TabsDataContext";let $re=e.createContext(null);function Wre(t){let n=e.useContext($re);if(null===n){let e=new Error(`<${t} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Wre),e}return n}function Vre(e,t){return K7(t.type,Rre,e,t)}$re.displayName="TabsActionsContext";let Ure=e.Fragment;let Hre=kee.RenderStrategy|kee.Static;let qre=Aee((function(t,n){var r,o;let i=q7(),{id:a=`headlessui-tabs-tab-${i}`,...u}=t,{orientation:l,activation:s,selectedIndex:c,tabs:d,panels:f}=zre("Tab"),h=Wre("Tab"),v=zre("Tab"),p=e.useRef(null),m=bee(p,n);_7((()=>h.registerTab(p)),[h,p]);let b=Ire("tabs"),y=d.indexOf(p);-1===y&&(y=b);let g=y===c,w=B7((e=>{var t;let n=e();if(n===Z7.Success&&"auto"===s){let e=null==(t=G7(p))?void 0:t.activeElement,n=v.tabs.findIndex((t=>t.current===e));-1!==n&&h.change(n)}return n})),x=B7((e=>{let t=d.map((e=>e.current)).filter(Boolean);if(e.key===Hee.Space||e.key===Hee.Enter)return e.preventDefault(),e.stopPropagation(),void h.change(y);switch(e.key){case Hee.Home:case Hee.PageUp:return e.preventDefault(),e.stopPropagation(),w((()=>aee(t,X7.First)));case Hee.End:case Hee.PageDown:return e.preventDefault(),e.stopPropagation(),w((()=>aee(t,X7.Last)))}return w((()=>K7(l,{vertical:()=>e.key===Hee.ArrowUp?aee(t,X7.Previous|X7.WrapAround):e.key===Hee.ArrowDown?aee(t,X7.Next|X7.WrapAround):Z7.Error,horizontal:()=>e.key===Hee.ArrowLeft?aee(t,X7.Previous|X7.WrapAround):e.key===Hee.ArrowRight?aee(t,X7.Next|X7.WrapAround):Z7.Error})))===Z7.Success?e.preventDefault():void 0})),k=e.useRef(!1),O=B7((()=>{var e;k.current||(k.current=!0,null==(e=p.current)||e.focus({preventScroll:!0}),h.change(y),$7((()=>{k.current=!1})))})),j=B7((e=>{e.preventDefault()})),S=e.useMemo((()=>({selected:g})),[g]);return jee({ourProps:{ref:m,onKeyDown:x,onMouseDown:j,onClick:O,id:a,role:"tab",type:vee(t,p),"aria-controls":null==(o=null==(r=f[y])?void 0:r.current)?void 0:o.id,"aria-selected":g,tabIndex:g?0:-1},theirProps:u,slot:S,defaultTag:"button",name:"Tabs.Tab"})})),Kre=Aee((function(t,n){let{defaultIndex:r=0,vertical:o=!1,manual:i=!1,onChange:a,selectedIndex:u=null,...l}=t;const s=o?"vertical":"horizontal",c=i?"manual":"auto";let d=null!==u,f=bee(n),[h,v]=e.useReducer(Vre,{selectedIndex:null!=u?u:r,tabs:[],panels:[]}),p=e.useMemo((()=>({selectedIndex:h.selectedIndex})),[h.selectedIndex]),m=F7(a||(()=>{})),b=F7(h.tabs),y=e.useMemo((()=>({orientation:s,activation:c,...h})),[s,c,h]),g=B7((e=>(v({type:1,tab:e}),()=>v({type:2,tab:e})))),w=B7((e=>(v({type:3,panel:e}),()=>v({type:4,panel:e})))),x=B7((e=>{k.current!==e&&m.current(e),d||v({type:0,index:e})})),k=F7(d?t.selectedIndex:h.selectedIndex),O=e.useMemo((()=>({registerTab:g,registerPanel:w,change:x})),[]);_7((()=>{v({type:0,index:null!=u?u:r})}),[u]),_7((()=>{if(void 0===k.current||h.tabs.length<=0)return;let e=iee(h.tabs,(e=>e.current));e.some(((e,t)=>h.tabs[t]!==e))&&x(e.indexOf(h.tabs[k.current]))}));let j={ref:f};return e.createElement(Pre,null,e.createElement($re.Provider,{value:O},e.createElement(Bre.Provider,{value:y},y.tabs.length<=0&&e.createElement(Ere,{onFocus:()=>{var e,t;for(let n of b.current)if(0===(null==(e=n.current)?void 0:e.tabIndex))return null==(t=n.current)||t.focus(),!0;return!1}}),jee({ourProps:j,theirProps:l,slot:p,defaultTag:Ure,name:"Tabs"}))))})),Gre=Aee((function(e,t){let{orientation:n,selectedIndex:r}=zre("Tab.List");return jee({ourProps:{ref:bee(t),role:"tablist","aria-orientation":n},theirProps:e,slot:{selectedIndex:r},defaultTag:"div",name:"Tabs.List"})})),Yre=Aee((function(t,n){let{selectedIndex:r}=zre("Tab.Panels");return jee({ourProps:{ref:bee(n)},theirProps:t,slot:e.useMemo((()=>({selectedIndex:r})),[r]),defaultTag:"div",name:"Tabs.Panels"})})),Xre=Aee((function(t,n){var r,o,i,a;let u=q7(),{id:l=`headlessui-tabs-panel-${u}`,tabIndex:s=0,...c}=t,{selectedIndex:d,tabs:f,panels:h}=zre("Tab.Panel"),v=Wre("Tab.Panel"),p=e.useRef(null),m=bee(p,n);_7((()=>v.registerPanel(p)),[v,p]);let b=Ire("panels"),y=h.indexOf(p);-1===y&&(y=b);let g=y===d,w=e.useMemo((()=>({selected:g})),[g]),x={ref:m,id:l,role:"tabpanel","aria-labelledby":null==(o=null==(r=f[y])?void 0:r.current)?void 0:o.id,tabIndex:g?s:-1};return g||null!=(i=c.unmount)&&!i||null!=(a=c.static)&&a?jee({ourProps:x,theirProps:c,slot:w,defaultTag:"div",features:Hre,visible:g,name:"Tabs.Panel"}):e.createElement(Pee,{as:"span","aria-hidden":"true",...x})})),Zre=Object.assign(qre,{Group:Kre,List:Gre,Panels:Yre,Panel:Xre});function Qre(e,...t){e&&t.length>0&&e.classList.add(...t)}function Jre(e,...t){e&&t.length>0&&e.classList.remove(...t)}function eoe(e,t,n,r){let o=n?"enter":"leave",i=W7(),a=void 0!==r?function(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}(r):()=>{};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");let u=K7(o,{enter:()=>t.enter,leave:()=>t.leave}),l=K7(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),s=K7(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Jre(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Qre(e,...t.base,...u,...s),i.nextFrame((()=>{Jre(e,...t.base,...u,...s),Qre(e,...t.base,...u,...l),function(e,t){let n=W7();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[i,a]=[r,o].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),u=i+a;if(0!==u){n.group((n=>{n.setTimeout((()=>{t(),n.dispose()}),u),n.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&n.dispose()}))}));let r=n.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),r())}))}else t();n.add((()=>t())),n.dispose}(e,(()=>(Jre(e,...t.base,...u),Qre(e,...t.base,...t.entered),a())))})),i.dispose}function toe(e=""){return e.split(/\s+/).filter((e=>e.length>1))}let noe=e.createContext(null);noe.displayName="TransitionContext";var roe=(e=>(e.Visible="visible",e.Hidden="hidden",e))(roe||{});let ooe=e.createContext(null);function ioe(e){return"children"in e?ioe(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function aoe(t,n){let r=F7(t),o=e.useRef([]),i=pte(),a=V7(),u=B7(((e,t=Oee.Hidden)=>{let n=o.current.findIndex((({el:t})=>t===e));-1!==n&&(K7(t,{[Oee.Unmount](){o.current.splice(n,1)},[Oee.Hidden](){o.current[n].state="hidden"}}),a.microTask((()=>{var e;!ioe(o)&&i.current&&(null==(e=r.current)||e.call(r))})))})),l=B7((e=>{let t=o.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):o.current.push({el:e,state:"visible"}),()=>u(e,Oee.Unmount)})),s=e.useRef([]),c=e.useRef(Promise.resolve()),d=e.useRef({enter:[],leave:[],idle:[]}),f=B7(((e,t,r)=>{s.current.splice(0),n&&(n.chains.current[t]=n.chains.current[t].filter((([t])=>t!==e))),null==n||n.chains.current[t].push([e,new Promise((e=>{s.current.push(e)}))]),null==n||n.chains.current[t].push([e,new Promise((e=>{Promise.all(d.current[t].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===t?c.current=c.current.then((()=>null==n?void 0:n.wait.current)).then((()=>r(t))):r(t)})),h=B7(((e,t,n)=>{Promise.all(d.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=s.current.shift())||e()})).then((()=>n(t)))}));return e.useMemo((()=>({children:o,register:l,unregister:u,onStart:f,onStop:h,wait:c,chains:d})),[l,u,o,f,h,d,c])}function uoe(){}ooe.displayName="NestingContext";let loe=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function soe(e){var t;let n={};for(let r of loe)n[r]=null!=(t=e[r])?t:uoe;return n}let coe=kee.RenderStrategy;let doe=Aee((function(t,n){let{show:r,appear:o=!1,unmount:i=!0,...a}=t,u=e.useRef(null),l=bee(u,n);U7();let s=_ee();if(void 0===r&&null!==s&&(r=(s&Lee.Open)===Lee.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=e.useState(r?"visible":"hidden"),f=aoe((()=>{d("hidden")})),[h,v]=e.useState(!0),p=e.useRef([r]);_7((()=>{!1!==h&&p.current[p.current.length-1]!==r&&(p.current.push(r),v(!1))}),[p,r]);let m=e.useMemo((()=>({show:r,appear:o,initial:h})),[r,o,h]);e.useEffect((()=>{if(r)d("visible");else if(ioe(f)){let e=u.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&d("hidden")}else d("hidden")}),[r,f]);let b={unmount:i},y=B7((()=>{var e;h&&v(!1),null==(e=t.beforeEnter)||e.call(t)})),g=B7((()=>{var e;h&&v(!1),null==(e=t.beforeLeave)||e.call(t)}));return e.createElement(ooe.Provider,{value:f},e.createElement(noe.Provider,{value:m},jee({ourProps:{...b,as:e.Fragment,children:e.createElement(foe,{ref:l,...b,...a,beforeEnter:y,beforeLeave:g})},theirProps:{},defaultTag:e.Fragment,features:coe,visible:"visible"===c,name:"Transition"})))})),foe=Aee((function(t,n){var r,o;let{beforeEnter:i,afterEnter:a,beforeLeave:u,afterLeave:l,enter:s,enterFrom:c,enterTo:d,entered:f,leave:h,leaveFrom:v,leaveTo:p,...m}=t,b=e.useRef(null),y=bee(b,n),g=null==(r=m.unmount)||r?Oee.Unmount:Oee.Hidden,{show:w,appear:x,initial:k}=function(){let t=e.useContext(noe);if(null===t)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}(),[O,j]=e.useState(w?"visible":"hidden"),S=function(){let t=e.useContext(ooe);if(null===t)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}(),{register:N,unregister:M}=S;e.useEffect((()=>N(b)),[N,b]),e.useEffect((()=>{if(g===Oee.Hidden&&b.current)return w&&"visible"!==O?void j("visible"):K7(O,{hidden:()=>M(b),visible:()=>N(b)})}),[O,b,N,M,w,g]);let C=F7({base:toe(m.className),enter:toe(s),enterFrom:toe(c),enterTo:toe(d),entered:toe(f),leave:toe(h),leaveFrom:toe(v),leaveTo:toe(p)}),A=function(t){let n=e.useRef(soe(t));return e.useEffect((()=>{n.current=soe(t)}),[t]),n}({beforeEnter:i,afterEnter:a,beforeLeave:u,afterLeave:l}),T=U7();e.useEffect((()=>{if(T&&"visible"===O&&null===b.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[b,O,T]);let E=x&&w&&k,D=!T||k&&!x?"idle":w?"enter":"leave",P=function(t=0){let[n,r]=e.useState(t),o=pte(),i=e.useCallback((e=>{o.current&&r((t=>t|e))}),[n,o]),a=e.useCallback((e=>Boolean(n&e)),[n]),u=e.useCallback((e=>{o.current&&r((t=>t&~e))}),[r,o]),l=e.useCallback((e=>{o.current&&r((t=>t^e))}),[r]);return{flags:n,addFlag:i,hasFlag:a,removeFlag:u,toggleFlag:l}}(0),I=B7((e=>K7(e,{enter:()=>{P.addFlag(Lee.Opening),A.current.beforeEnter()},leave:()=>{P.addFlag(Lee.Closing),A.current.beforeLeave()},idle:()=>{}}))),L=B7((e=>K7(e,{enter:()=>{P.removeFlag(Lee.Opening),A.current.afterEnter()},leave:()=>{P.removeFlag(Lee.Closing),A.current.afterLeave()},idle:()=>{}}))),_=aoe((()=>{j("hidden"),M(b)}),S),F=e.useRef(!1);!function({immediate:e,container:t,direction:n,classes:r,onStart:o,onStop:i}){let a=pte(),u=V7(),l=F7(n);_7((()=>{e&&(l.current="enter")}),[e]),_7((()=>{let e=W7();u.add(e.dispose);let n=t.current;if(n&&"idle"!==l.current&&a.current)return e.dispose(),o.current(l.current),e.add(eoe(n,r.current,"enter"===l.current,(()=>{e.dispose(),i.current(l.current)}))),e.dispose}),[n])}({immediate:E,container:b,classes:C,direction:D,onStart:F7((e=>{F.current=!0,_.onStart(b,e,I)})),onStop:F7((e=>{F.current=!1,_.onStop(b,e,L),"leave"===e&&!ioe(_)&&(j("hidden"),M(b))}))});let R=m,B={ref:y};return E?R={...R,className:xee(m.className,...C.current.enter,...C.current.enterFrom)}:F.current&&(R.className=xee(m.className,null==(o=b.current)?void 0:o.className),""===R.className&&delete R.className),e.createElement(ooe.Provider,{value:_},e.createElement(Fee,{value:K7(O,{visible:Lee.Open,hidden:Lee.Closed})|P.flags},jee({ourProps:B,theirProps:R,defaultTag:"div",features:coe,visible:"visible"===O,name:"Transition.Child"})))})),hoe=Aee((function(t,n){let r=null!==e.useContext(noe),o=null!==_ee();return e.createElement(e.Fragment,null,!r&&o?e.createElement(doe,{ref:n,...t}):e.createElement(foe,{ref:n,...t}))})),voe=Object.assign(doe,{Child:hoe,Root:doe});const poe=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}),e.createElement("path",{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"}))},moe=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))};var boe=function(){return boe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},boe.apply(this,arguments)};function yoe(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var goe,woe={exports:{}},xoe={};woe.exports=function(){if(goe)return xoe;goe=1;var t=e,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.Te.ReactCurrentOwner,a={key:!0,ref:!0,Ee:!0,De:!0};function u(e,t,r){var u,l={},s=null,c=null;for(u in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,u)&&!a.hasOwnProperty(u)&&(l[u]=t[u]);if(e&&e.defaultProps)for(u in t=e.defaultProps)void 0===l[u]&&(l[u]=t[u]);return{$$typeof:n,type:e,key:s,ref:c,props:l,_owner:i.current}}return xoe.Fragment=r,xoe.jsx=u,xoe.jsxs=u,xoe}();var koe=woe.exports;function Ooe(e){return"multiple"===e.mode}function joe(e){return"range"===e.mode}function Soe(e){return"single"===e.mode}var Noe={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var Moe=Object.freeze({__proto__:null,formatCaption:function(e,t){return Vu(e,"LLLL y",t)},formatDay:function(e,t){return Vu(e,"d",t)},formatMonthCaption:function(e,t){return Vu(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Vu(e,"cccccc",t)},formatYearCaption:function(e,t){return Vu(e,"yyyy",t)}}),Coe=Object.freeze({__proto__:null,labelDay:function(e,t,n){return Vu(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return Vu(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var Aoe=e.createContext(void 0);function Toe(e){var t,n,r=e.initialProps,o=function(){var e=Noe,t=Fu,n=new Date;return{captionLayout:"buttons",classNames:e,formatters:Moe,labels:Coe,locale:t,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:n,mode:"default"}}(),i=function(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,o=e.toMonth,i=e.fromDate,a=e.toDate;return r?i=Ka(r):t&&(i=new Date(t,0,1)),o?a=qa(o):n&&(a=new Date(n,11,31)),{fromDate:i?La(i):void 0,toDate:a?La(a):void 0}}(r),a=i.fromDate,u=i.toDate,l=null!==(t=r.captionLayout)&&void 0!==t?t:o.captionLayout;"buttons"===l||a&&u||(l="buttons"),(Soe(r)||Ooe(r)||joe(r))&&(n=r.onSelect);var s=boe(boe(boe({},o),r),{captionLayout:l,classNames:boe(boe({},o.classNames),r.classNames),components:boe({},r.components),formatters:boe(boe({},o.formatters),r.formatters),fromDate:a,labels:boe(boe({},o.labels),r.labels),mode:r.mode||o.mode,modifiers:boe(boe({},o.modifiers),r.modifiers),modifiersClassNames:boe(boe({},o.modifiersClassNames),r.modifiersClassNames),onSelect:n,styles:boe(boe({},o.styles),r.styles),toDate:u});return koe.jsx(Aoe.Provider,boe({value:s},{children:e.children}))}function Eoe(){var t=e.useContext(Aoe);if(!t)throw new Error("useDayPicker must be used within a DayPickerProvider.");return t}function Doe(e){var t=Eoe(),n=t.locale,r=t.classNames,o=t.styles,i=t.formatters.formatCaption;return koe.jsx("div",boe({className:r.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id},{children:i(e.displayMonth,{locale:n})}))}function Poe(e){return koe.jsx("svg",boe({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:koe.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Ioe(e){var t,n,r=e.onChange,o=e.value,i=e.children,a=e.caption,u=e.className,l=e.style,s=Eoe(),c=null!==(n=null===(t=s.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==n?n:Poe;return koe.jsxs("div",boe({className:u,style:l},{children:[koe.jsx("span",boe({className:s.classNames.vhidden},{children:e["aria-label"]})),koe.jsx("select",boe({name:e.name,"aria-label":e["aria-label"],className:s.classNames.dropdown,style:s.styles.dropdown,value:o,onChange:r},{children:i})),koe.jsxs("div",boe({className:s.classNames.caption_label,style:s.styles.caption_label,"aria-hidden":"true"},{children:[a,koe.jsx(c,{className:s.classNames.dropdown_icon,style:s.styles.dropdown_icon})]}))]}))}function Loe(e){var t,n=Eoe(),r=n.fromDate,o=n.toDate,i=n.styles,a=n.locale,u=n.formatters.formatMonthCaption,l=n.classNames,s=n.components,c=n.labels.labelMonthDropdown;if(!r)return koe.jsx(koe.Fragment,{});if(!o)return koe.jsx(koe.Fragment,{});var d=[];if(el(r,o))for(var f=Ka(r),h=r.getMonth();h<=o.getMonth();h++)d.push(nl(f,h));else for(f=Ka(new Date),h=0;h<=11;h++)d.push(nl(f,h));var v=null!==(t=null==s?void 0:s.Dropdown)&&void 0!==t?t:Ioe;return koe.jsx(v,boe({name:"months","aria-label":c(),className:l.dropdown_month,style:i.dropdown_month,onChange:function(t){var n=Number(t.target.value),r=nl(Ka(e.displayMonth),n);e.onChange(r)},value:e.displayMonth.getMonth(),caption:u(e.displayMonth,{locale:a})},{children:d.map((function(e){return koe.jsx("option",boe({value:e.getMonth()},{children:u(e,{locale:a})}),e.getMonth())}))}))}function _oe(e){var t,n=e.displayMonth,r=Eoe(),o=r.fromDate,i=r.toDate,a=r.locale,u=r.styles,l=r.classNames,s=r.components,c=r.formatters.formatYearCaption,d=r.labels.labelYearDropdown,f=[];if(!o)return koe.jsx(koe.Fragment,{});if(!i)return koe.jsx(koe.Fragment,{});for(var h=o.getFullYear(),v=i.getFullYear(),p=h;p<=v;p++)f.push(rl(Ga(new Date),p));var m=null!==(t=null==s?void 0:s.Dropdown)&&void 0!==t?t:Ioe;return koe.jsx(m,boe({name:"years","aria-label":d(),className:l.dropdown_year,style:u.dropdown_year,onChange:function(t){var r=rl(Ka(n),Number(t.target.value));e.onChange(r)},value:n.getFullYear(),caption:c(n,{locale:a})},{children:f.map((function(e){return koe.jsx("option",boe({value:e.getFullYear()},{children:c(e,{locale:a})}),e.getFullYear())}))}))}function Foe(){var t=Eoe(),n=function(e){var t=e.month,n=e.defaultMonth,r=e.today,o=t||n||r||new Date,i=e.toDate,a=e.fromDate,u=e.numberOfMonths,l=void 0===u?1:u;return i&&Ua(i,o)<0&&(o=Ca(i,-1*(l-1))),a&&Ua(o,a)<0&&(o=a),Ka(o)}(t),r=function(t,n){var r=e.useState(t),o=r[0];return[void 0===n?o:n,r[1]]}(n,t.month),o=r[0],i=r[1];return[o,function(e){var n;if(!t.disableNavigation){var r=Ka(e);i(r),null===(n=t.onMonthChange)||void 0===n||n.call(t,r)}}]}var Roe=e.createContext(void 0);function Boe(e){var t=Eoe(),n=Foe(),r=n[0],o=n[1],i=function(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,o=Ka(e),i=Ua(Ka(Ca(o,r)),o),a=[],u=0;u<i;u++){var l=Ca(o,u);a.push(l)}return n&&(a=a.reverse()),a}(r,t),a=function(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,o=t.numberOfMonths,i=void 0===o?1:o,a=r?i:1,u=Ka(e);if(!n)return Ca(u,a);if(!(Ua(n,e)<i))return Ca(u,a)}}(r,t),u=function(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,o=t.numberOfMonths,i=r?void 0===o?1:o:1,a=Ka(e);if(!n)return Ca(a,-i);if(!(Ua(a,n)<=0))return Ca(a,-i)}}(r,t),l=function(e){return i.some((function(t){return Ju(e,t)}))},s={currentMonth:r,displayMonths:i,goToMonth:o,goToDate:function(e,n){l(e)||(n&&Qu(e,n)?o(Ca(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:u,nextMonth:a,isDateDisplayed:l};return koe.jsx(Roe.Provider,boe({value:s},{children:e.children}))}function zoe(){var t=e.useContext(Roe);if(!t)throw new Error("useNavigation must be used within a NavigationProvider");return t}function $oe(e){var t,n=Eoe(),r=n.classNames,o=n.styles,i=n.components,a=zoe().goToMonth,u=function(t){a(Ca(t,e.displayIndex?-e.displayIndex:0))},l=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:Doe,s=koe.jsx(l,{id:e.id,displayMonth:e.displayMonth});return koe.jsxs("div",boe({className:r.caption_dropdowns,style:o.caption_dropdowns},{children:[koe.jsx("div",boe({className:r.vhidden},{children:s})),koe.jsx(Loe,{onChange:u,displayMonth:e.displayMonth}),koe.jsx(_oe,{onChange:u,displayMonth:e.displayMonth})]}))}function Woe(e){return koe.jsx("svg",boe({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:koe.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Voe(e){return koe.jsx("svg",boe({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:koe.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Uoe=e.forwardRef((function(e,t){var n=Eoe(),r=n.classNames,o=n.styles,i=[r.button_reset,r.button];e.className&&i.push(e.className);var a=i.join(" "),u=boe(boe({},o.button_reset),o.button);return e.style&&Object.assign(u,e.style),koe.jsx("button",boe({},e,{ref:t,type:"button",className:a,style:u}))}));function Hoe(e){var t,n,r=Eoe(),o=r.dir,i=r.locale,a=r.classNames,u=r.styles,l=r.labels,s=l.labelPrevious,c=l.labelNext,d=r.components;if(!e.nextMonth&&!e.previousMonth)return koe.jsx(koe.Fragment,{});var f=s(e.previousMonth,{locale:i}),h=[a.nav_button,a.nav_button_previous].join(" "),v=c(e.nextMonth,{locale:i}),p=[a.nav_button,a.nav_button_next].join(" "),m=null!==(t=null==d?void 0:d.IconRight)&&void 0!==t?t:Voe,b=null!==(n=null==d?void 0:d.IconLeft)&&void 0!==n?n:Woe;return koe.jsxs("div",boe({className:a.nav,style:u.nav},{children:[!e.hidePrevious&&koe.jsx(Uoe,boe({name:"previous-month","aria-label":f,className:h,style:u.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick},{children:"rtl"===o?koe.jsx(m,{className:a.nav_icon,style:u.nav_icon}):koe.jsx(b,{className:a.nav_icon,style:u.nav_icon})})),!e.hideNext&&koe.jsx(Uoe,boe({name:"next-month","aria-label":v,className:p,style:u.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick},{children:"rtl"===o?koe.jsx(b,{className:a.nav_icon,style:u.nav_icon}):koe.jsx(m,{className:a.nav_icon,style:u.nav_icon})}))]}))}function qoe(e){var t=Eoe().numberOfMonths,n=zoe(),r=n.previousMonth,o=n.nextMonth,i=n.goToMonth,a=n.displayMonths,u=a.findIndex((function(t){return Ju(e.displayMonth,t)})),l=0===u,s=u===a.length-1,c=t>1&&(l||!s),d=t>1&&(s||!l);return koe.jsx(Hoe,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:d,nextMonth:o,previousMonth:r,onPreviousClick:function(){r&&i(r)},onNextClick:function(){o&&i(o)}})}function Koe(e){var t,n,r=Eoe(),o=r.classNames,i=r.disableNavigation,a=r.styles,u=r.captionLayout,l=r.components,s=null!==(t=null==l?void 0:l.CaptionLabel)&&void 0!==t?t:Doe;return n=i?koe.jsx(s,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===u?koe.jsx($oe,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===u?koe.jsxs(koe.Fragment,{children:[koe.jsx($oe,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),koe.jsx(qoe,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):koe.jsxs(koe.Fragment,{children:[koe.jsx(s,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),koe.jsx(qoe,{displayMonth:e.displayMonth,id:e.id})]}),koe.jsx("div",boe({className:o.caption,style:a.caption},{children:n}))}function Goe(e){var t=Eoe(),n=t.footer,r=t.styles,o=t.classNames.tfoot;return n?koe.jsx("tfoot",boe({className:o,style:r.tfoot},{children:koe.jsx("tr",{children:koe.jsx("td",boe({colSpan:8},{children:n}))})})):koe.jsx(koe.Fragment,{})}function Yoe(){var e=Eoe(),t=e.classNames,n=e.styles,r=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,a=e.ISOWeek,u=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,s=function(e,t,n){for(var r=n?Da(new Date):Ea(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=Ma(r,i);o.push(a)}return o}(o,i,a);return koe.jsxs("tr",boe({style:n.head_row,className:t.head_row},{children:[r&&koe.jsx("td",{style:n.head_cell,className:t.head_cell}),s.map((function(e,r){return koe.jsx("th",boe({scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":l(e,{locale:o})},{children:u(e,{locale:o})}),r)}))]}))}function Xoe(){var e,t=Eoe(),n=t.classNames,r=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:Yoe;return koe.jsx("thead",boe({style:r.head,className:n.head},{children:koe.jsx(i,{})}))}function Zoe(e){var t=Eoe(),n=t.locale,r=t.formatters.formatDay;return koe.jsx(koe.Fragment,{children:r(e.date,{locale:n})})}var Qoe=e.createContext(void 0);function Joe(e){if(!Ooe(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return koe.jsx(Qoe.Provider,boe({value:t},{children:e.children}))}return koe.jsx(eie,{initialProps:e.initialProps,children:e.children})}function eie(e){var t=e.initialProps,n=e.children,r=t.selected,o=t.min,i=t.max,a={disabled:[]};r&&a.disabled.push((function(e){var t=i&&r.length>i-1,n=r.some((function(t){return Wa(t,e)}));return Boolean(t&&!n)}));var u={selected:r,onDayClick:function(e,n,a){var u,l;if((null===(u=t.onDayClick)||void 0===u||u.call(t,e,n,a),!Boolean(n.selected&&o&&(null==r?void 0:r.length)===o))&&!Boolean(!n.selected&&i&&(null==r?void 0:r.length)===i)){var s=r?yoe([],r,!0):[];if(n.selected){var c=s.findIndex((function(t){return Wa(e,t)}));s.splice(c,1)}else s.push(e);null===(l=t.onSelect)||void 0===l||l.call(t,s,e,n,a)}},modifiers:a};return koe.jsx(Qoe.Provider,boe({value:u},{children:n}))}function tie(){var t=e.useContext(Qoe);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}var nie,rie=e.createContext(void 0);function oie(e){if(!joe(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return koe.jsx(rie.Provider,boe({value:t},{children:e.children}))}return koe.jsx(iie,{initialProps:e.initialProps,children:e.children})}function iie(e){var t=e.initialProps,n=e.children,r=t.selected,o=r||{},i=o.from,a=o.to,u=t.min,l=t.max,s={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(s.range_start=[i],a?(s.range_end=[a],Wa(i,a)||(s.range_middle=[{after:i,before:a}])):s.range_end=[i]):a&&(s.range_start=[a],s.range_end=[a]),u&&(i&&!a&&s.disabled.push({after:tl(i,u-1),before:Ma(i,u-1)}),i&&a&&s.disabled.push({after:i,before:Ma(i,u-1)}),!i&&a&&s.disabled.push({after:tl(a,u-1),before:Ma(a,u-1)})),l){if(i&&!a&&(s.disabled.push({before:Ma(i,1-l)}),s.disabled.push({after:Ma(i,l-1)})),i&&a){var c=l-(Fa(a,i)+1);s.disabled.push({before:tl(i,c)}),s.disabled.push({after:Ma(a,c)})}!i&&a&&(s.disabled.push({before:Ma(a,1-l)}),s.disabled.push({after:Ma(a,l-1)}))}return koe.jsx(rie.Provider,boe({value:{selected:r,onDayClick:function(e,n,o){var i,a;null===(i=t.onDayClick)||void 0===i||i.call(t,e,n,o);var u=function(e,t){var n=t||{},r=n.from,o=n.to;if(r&&o){if(Wa(o,e)&&Wa(r,e))return;if(Wa(o,e))return{from:o,to:void 0};if(Wa(r,e))return;return Zu(r,e)?{from:e,to:o}:{from:r,to:e}}return o?Zu(e,o)?{from:o,to:e}:{from:e,to:o}:r?Qu(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}(e,r);null===(a=t.onSelect)||void 0===a||a.call(t,u,e,n,o)},modifiers:s}},{children:n}))}function aie(){var t=e.useContext(rie);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function uie(e){return Array.isArray(e)?yoe([],e,!0):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(nie||(nie={}));var lie=nie.Selected,sie=nie.Disabled,cie=nie.Hidden,die=nie.Today,fie=nie.RangeEnd,hie=nie.RangeMiddle,vie=nie.RangeStart,pie=nie.Outside;var mie=e.createContext(void 0);function bie(e){var t=Eoe(),n=function(e,t,n){var r,o=((r={})[lie]=uie(e.selected),r[sie]=uie(e.disabled),r[cie]=uie(e.hidden),r[die]=[e.today],r[fie]=[],r[hie]=[],r[vie]=[],r[pie]=[],r);return e.fromDate&&o[sie].push({before:e.fromDate}),e.toDate&&o[sie].push({after:e.toDate}),Ooe(e)?o[sie]=o[sie].concat(t.modifiers[sie]):joe(e)&&(o[sie]=o[sie].concat(n.modifiers[sie]),o[vie]=n.modifiers[vie],o[hie]=n.modifiers[hie],o[fie]=n.modifiers[fie]),o}(t,tie(),aie()),r=function(e){var t={};return Object.entries(e).forEach((function(e){var n=e[0],r=e[1];t[n]=uie(r)})),t}(t.modifiers),o=boe(boe({},n),r);return koe.jsx(mie.Provider,boe({value:o},{children:e.children}))}function yie(){var t=e.useContext(mie);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function gie(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(Va(t))return Wa(e,t);if(function(e){return Array.isArray(e)&&e.every(Va)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"==typeof e&&"from"in e)}(t))return function(e,t){var n,r=t.from,o=t.to;return r&&o?(Fa(o,r)<0&&(r=(n=[o,r])[0],o=n[1]),Fa(e,r)>=0&&Fa(o,e)>=0):o?Wa(o,e):!!r&&Wa(r,e)}(e,t);if(function(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}(t)){var n=Fa(t.before,e)>0,r=Fa(t.after,e)<0;return Zu(t.before,t.after)?r&&n:n||r}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?Fa(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?Fa(t.before,e)>0:"function"==typeof t&&t(e)}))}function wie(e,t,n){var r=Object.keys(t).reduce((function(n,r){var o=t[r];return gie(e,o)&&n.push(r),n}),[]),o={};return r.forEach((function(e){return o[e]=!0})),n&&!Ju(e,n)&&(o.outside=!0),o}var xie=365;function kie(e,t){var n=t.moveBy,r=t.direction,o=t.context,i=t.modifiers,a=t.retry,u=void 0===a?{count:0,lastFocused:e}:a,l=o.weekStartsOn,s=o.fromDate,c=o.toDate,d=o.locale,f={day:Ma,week:Ra,month:Ca,year:Ba,startOfWeek:function(e){return o.ISOWeek?Da(e):Ea(e,{locale:d,weekStartsOn:l})},endOfWeek:function(e){return o.ISOWeek?Xa(e):Ya(e,{locale:d,weekStartsOn:l})}},h=f[n](e,"after"===r?1:-1);"before"===r&&s?h=za([s,h]):"after"===r&&c&&(h=$a([c,h]));var v=!0;if(i){var p=wie(h,i);v=!p.disabled&&!p.hidden}return v?h:u.count>xie?u.lastFocused:kie(h,{moveBy:n,direction:r,context:o,modifiers:i,retry:boe(boe({},u),{count:u.count+1})})}var Oie=e.createContext(void 0);function jie(t){var n=zoe(),r=yie(),o=e.useState(),i=o[0],a=o[1],u=e.useState(),l=u[0],s=u[1],c=function(e,t){for(var n,r,o=Ka(e[0]),i=qa(e[e.length-1]),a=o;a<=i;){var u=wie(a,t);if(u.disabled||u.hidden)a=Ma(a,1);else{if(u.selected)return a;u.today&&!r&&(r=a),n||(n=a),a=Ma(a,1)}}return r||n}(n.displayMonths,r),d=(null!=i?i:l&&n.isDateDisplayed(l))?l:c,f=function(e){a(e)},h=Eoe(),v=function(e,t){if(i){var o=kie(i,{moveBy:e,direction:t,context:h,modifiers:r});Wa(i,o)||(n.goToDate(o,i),f(o))}},p={focusedDay:i,focusTarget:d,blur:function(){s(i),a(void 0)},focus:f,focusDayAfter:function(){return v("day","after")},focusDayBefore:function(){return v("day","before")},focusWeekAfter:function(){return v("week","after")},focusWeekBefore:function(){return v("week","before")},focusMonthBefore:function(){return v("month","before")},focusMonthAfter:function(){return v("month","after")},focusYearBefore:function(){return v("year","before")},focusYearAfter:function(){return v("year","after")},focusStartOfWeek:function(){return v("startOfWeek","before")},focusEndOfWeek:function(){return v("endOfWeek","after")}};return koe.jsx(Oie.Provider,boe({value:p},{children:t.children}))}function Sie(){var t=e.useContext(Oie);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}var Nie=e.createContext(void 0);function Mie(e){if(!Soe(e.initialProps)){var t={selected:void 0};return koe.jsx(Nie.Provider,boe({value:t},{children:e.children}))}return koe.jsx(Cie,{initialProps:e.initialProps,children:e.children})}function Cie(e){var t=e.initialProps,n=e.children,r={selected:t.selected,onDayClick:function(e,n,r){var o,i,a;null===(o=t.onDayClick)||void 0===o||o.call(t,e,n,r),!n.selected||t.required?null===(a=t.onSelect)||void 0===a||a.call(t,e,e,n,r):null===(i=t.onSelect)||void 0===i||i.call(t,void 0,e,n,r)}};return koe.jsx(Nie.Provider,boe({value:r},{children:n}))}function Aie(){var t=e.useContext(Nie);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function Tie(e,t){var n=[e.classNames.day];return Object.keys(t).forEach((function(t){var r=e.modifiersClassNames[t];if(r)n.push(r);else if(function(e){return Object.values(nie).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&n.push(o)}})),n}function Eie(t,n,r){var o,i,a,u=Eoe(),l=Sie(),s=function(e,t){return wie(e,yie(),t)}(t,n),c=function(e,t){var n=Eoe(),r=Aie(),o=tie(),i=aie(),a=Sie(),u=a.focusDayAfter,l=a.focusDayBefore,s=a.focusWeekAfter,c=a.focusWeekBefore,d=a.blur,f=a.focus,h=a.focusMonthBefore,v=a.focusMonthAfter,p=a.focusYearBefore,m=a.focusYearAfter,b=a.focusStartOfWeek,y=a.focusEndOfWeek,g={onClick:function(a){var u,l,s,c;Soe(n)?null===(u=r.onDayClick)||void 0===u||u.call(r,e,t,a):Ooe(n)?null===(l=o.onDayClick)||void 0===l||l.call(o,e,t,a):joe(n)?null===(s=i.onDayClick)||void 0===s||s.call(i,e,t,a):null===(c=n.onDayClick)||void 0===c||c.call(n,e,t,a)},onFocus:function(r){var o;f(e),null===(o=n.onDayFocus)||void 0===o||o.call(n,e,t,r)},onBlur:function(r){var o;d(),null===(o=n.onDayBlur)||void 0===o||o.call(n,e,t,r)},onKeyDown:function(r){var o;switch(r.key){case"ArrowLeft":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?u():l();break;case"ArrowRight":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?l():u();break;case"ArrowDown":r.preventDefault(),r.stopPropagation(),s();break;case"ArrowUp":r.preventDefault(),r.stopPropagation(),c();break;case"PageUp":r.preventDefault(),r.stopPropagation(),r.shiftKey?p():h();break;case"PageDown":r.preventDefault(),r.stopPropagation(),r.shiftKey?m():v();break;case"Home":r.preventDefault(),r.stopPropagation(),b();break;case"End":r.preventDefault(),r.stopPropagation(),y()}null===(o=n.onDayKeyDown)||void 0===o||o.call(n,e,t,r)},onKeyUp:function(r){var o;null===(o=n.onDayKeyUp)||void 0===o||o.call(n,e,t,r)},onMouseEnter:function(r){var o;null===(o=n.onDayMouseEnter)||void 0===o||o.call(n,e,t,r)},onMouseLeave:function(r){var o;null===(o=n.onDayMouseLeave)||void 0===o||o.call(n,e,t,r)},onPointerEnter:function(r){var o;null===(o=n.onDayPointerEnter)||void 0===o||o.call(n,e,t,r)},onPointerLeave:function(r){var o;null===(o=n.onDayPointerLeave)||void 0===o||o.call(n,e,t,r)},onTouchCancel:function(r){var o;null===(o=n.onDayTouchCancel)||void 0===o||o.call(n,e,t,r)},onTouchEnd:function(r){var o;null===(o=n.onDayTouchEnd)||void 0===o||o.call(n,e,t,r)},onTouchMove:function(r){var o;null===(o=n.onDayTouchMove)||void 0===o||o.call(n,e,t,r)},onTouchStart:function(r){var o;null===(o=n.onDayTouchStart)||void 0===o||o.call(n,e,t,r)}};return g}(t,s),d=function(){var e=Eoe(),t=Aie(),n=tie(),r=aie();return Soe(e)?t.selected:Ooe(e)?n.selected:joe(e)?r.selected:void 0}(),f=Boolean(u.onDayClick||"default"!==u.mode);e.useEffect((function(){var e;s.outside||l.focusedDay&&f&&Wa(l.focusedDay,t)&&(null===(e=r.current)||void 0===e||e.focus())}),[l.focusedDay,t,r,f,s.outside]);var h=Tie(u,s).join(" "),v=function(e,t){var n=boe({},e.styles.day);return Object.keys(t).forEach((function(t){var r;n=boe(boe({},n),null===(r=e.modifiersStyles)||void 0===r?void 0:r[t])})),n}(u,s),p=Boolean(s.outside&&!u.showOutsideDays||s.hidden),m=null!==(a=null===(i=u.components)||void 0===i?void 0:i.DayContent)&&void 0!==a?a:Zoe,b={style:v,className:h,children:koe.jsx(m,{date:t,displayMonth:n,activeModifiers:s}),role:"gridcell"},y=l.focusTarget&&Wa(l.focusTarget,t)&&!s.outside,g=l.focusedDay&&Wa(l.focusedDay,t),w=boe(boe(boe({},b),((o={disabled:s.disabled,role:"gridcell"})["aria-selected"]=s.selected,o.tabIndex=g||y?0:-1,o)),c);return{isButton:f,isHidden:p,activeModifiers:s,selectedDays:d,buttonProps:w,divProps:b}}function Die(t){var n=e.useRef(null),r=Eie(t.date,t.displayMonth,n);return r.isHidden?koe.jsx("div",{role:"gridcell"}):r.isButton?koe.jsx(Uoe,boe({name:"day",ref:n},r.buttonProps)):koe.jsx("div",boe({},r.divProps))}function Pie(e){var t=e.number,n=e.dates,r=Eoe(),o=r.onWeekNumberClick,i=r.styles,a=r.classNames,u=r.locale,l=r.labels.labelWeekNumber,s=(0,r.formatters.formatWeekNumber)(Number(t),{locale:u});if(!o)return koe.jsx("span",boe({className:a.weeknumber,style:i.weeknumber},{children:s}));var c=l(Number(t),{locale:u});return koe.jsx(Uoe,boe({name:"week-number","aria-label":c,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,n,e)}},{children:s}))}function Iie(e){var t,n,r,o=Eoe(),i=o.styles,a=o.classNames,u=o.showWeekNumber,l=o.components,s=null!==(t=null==l?void 0:l.Day)&&void 0!==t?t:Die,c=null!==(n=null==l?void 0:l.WeekNumber)&&void 0!==n?n:Pie;return u&&(r=koe.jsx("td",boe({className:a.cell,style:i.cell},{children:koe.jsx(c,{number:e.weekNumber,dates:e.dates})}))),koe.jsxs("tr",boe({className:a.row,style:i.row},{children:[r,e.dates.map((function(t){return koe.jsx("td",boe({className:a.cell,style:i.cell,role:"presentation"},{children:koe.jsx(s,{displayMonth:e.displayMonth,date:t})}),qu(t))}))]}))}function Lie(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?Xa(t):Ya(t,n),o=(null==n?void 0:n.ISOWeek)?Da(e):Ea(e,n),i=Fa(r,o),a=[],u=0;u<=i;u++)a.push(Ma(o,u));var l=a.reduce((function(e,t){var r=(null==n?void 0:n.ISOWeek)?Hu(t):Yu(t,n),o=e.find((function(e){return e.weekNumber===r}));return o?(o.dates.push(t),e):(e.push({weekNumber:r,dates:[t]}),e)}),[]);return l}function _ie(e){var t,n,r,o=Eoe(),i=o.locale,a=o.classNames,u=o.styles,l=o.hideHead,s=o.fixedWeeks,c=o.components,d=o.weekStartsOn,f=o.firstWeekContainsDate,h=o.ISOWeek,v=function(e,t){var n=Lie(Ka(e),qa(e),t);if(null==t?void 0:t.useFixedWeeks){var r=Xu(e,t);if(r<6){var o=n[n.length-1],i=o.dates[o.dates.length-1],a=Ra(i,6-r),u=Lie(Ra(i,1),a,t);n.push.apply(n,u)}}return n}(e.displayMonth,{useFixedWeeks:Boolean(s),ISOWeek:h,locale:i,weekStartsOn:d,firstWeekContainsDate:f}),p=null!==(t=null==c?void 0:c.Head)&&void 0!==t?t:Xoe,m=null!==(n=null==c?void 0:c.Row)&&void 0!==n?n:Iie,b=null!==(r=null==c?void 0:c.Footer)&&void 0!==r?r:Goe;return koe.jsxs("table",boe({id:e.id,className:a.table,style:u.table,role:"grid","aria-labelledby":e["aria-labelledby"]},{children:[!l&&koe.jsx(p,{}),koe.jsx("tbody",boe({className:a.tbody,style:u.tbody},{children:v.map((function(t){return koe.jsx(m,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))})),koe.jsx(b,{displayMonth:e.displayMonth})]}))}var Fie="undefined"!=typeof window&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,Rie=!1,Bie=0;function zie(){return"react-day-picker-".concat(++Bie)}function $ie(t){var n,r,o=Eoe(),i=o.dir,a=o.classNames,u=o.styles,l=o.components,s=zoe().displayMonths,c=function(t){var n,r=null!=t?t:Rie?zie():null,o=e.useState(r),i=o[0],a=o[1];return Fie((function(){null===i&&a(zie())}),[]),e.useEffect((function(){!1===Rie&&(Rie=!0)}),[]),null!==(n=null!=t?t:i)&&void 0!==n?n:void 0}(o.id?"".concat(o.id,"-").concat(t.displayIndex):void 0),d=o.id?"".concat(o.id,"-grid-").concat(t.displayIndex):void 0,f=[a.month],h=u.month,v=0===t.displayIndex,p=t.displayIndex===s.length-1,m=!v&&!p;"rtl"===i&&(p=(n=[v,p])[0],v=n[1]),v&&(f.push(a.caption_start),h=boe(boe({},h),u.caption_start)),p&&(f.push(a.caption_end),h=boe(boe({},h),u.caption_end)),m&&(f.push(a.caption_between),h=boe(boe({},h),u.caption_between));var b=null!==(r=null==l?void 0:l.Caption)&&void 0!==r?r:Koe;return koe.jsxs("div",boe({className:f.join(" "),style:h},{children:[koe.jsx(b,{id:c,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),koe.jsx(_ie,{id:d,"aria-labelledby":c,displayMonth:t.displayMonth})]}),t.displayIndex)}function Wie(e){var t=Eoe(),n=t.classNames,r=t.styles;return koe.jsx("div",boe({className:n.months,style:r.months},{children:e.children}))}function Vie(t){var n,r,o=t.initialProps,i=Eoe(),a=Sie(),u=zoe(),l=e.useState(!1),s=l[0],c=l[1];e.useEffect((function(){i.initialFocus&&a.focusTarget&&(s||(a.focus(a.focusTarget),c(!0)))}),[i.initialFocus,s,a.focus,a.focusTarget,a]);var d=[i.classNames.root,i.className];i.numberOfMonths>1&&d.push(i.classNames.multiple_months),i.showWeekNumber&&d.push(i.classNames.with_weeknumber);var f=boe(boe({},i.styles.root),i.style),h=Object.keys(o).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var n;return boe(boe({},e),((n={})[t]=o[t],n))}),{}),v=null!==(r=null===(n=o.components)||void 0===n?void 0:n.Months)&&void 0!==r?r:Wie;return koe.jsx("div",boe({className:d.join(" "),style:f,dir:i.dir,id:i.id,nonce:o.nonce,title:o.title,lang:o.lang},h,{children:koe.jsx(v,{children:u.displayMonths.map((function(e,t){return koe.jsx($ie,{displayIndex:t,displayMonth:e},t)}))})}))}function Uie(e){var t=e.children,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children"]);return koe.jsx(Toe,boe({initialProps:n},{children:koe.jsx(Boe,{children:koe.jsx(Mie,boe({initialProps:n},{children:koe.jsx(Joe,boe({initialProps:n},{children:koe.jsx(oie,boe({initialProps:n},{children:koe.jsx(bie,{children:koe.jsx(jie,{children:t})})}))}))}))})}))}function Hie(e){return koe.jsx(Uie,boe({},e,{children:koe.jsx(Vie,{initialProps:e})}))}const qie=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z"}))},Kie=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"}))},Gie=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M4.83582 12L11.0429 18.2071L12.4571 16.7929L7.66424 12L12.4571 7.20712L11.0429 5.79291L4.83582 12ZM10.4857 12L16.6928 18.2071L18.107 16.7929L13.3141 12L18.107 7.20712L16.6928 5.79291L10.4857 12Z"}))},Yie=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M19.1642 12L12.9571 5.79291L11.5429 7.20712L16.3358 12L11.5429 16.7929L12.9571 18.2071L19.1642 12ZM13.5143 12L7.30722 5.79291L5.89301 7.20712L10.6859 12L5.89301 16.7929L7.30722 18.2071L13.5143 12Z"}))},Xie=t=>{var{onClick:n,icon:r}=t,o=Ar(t,["onClick","icon"]);const i=r;return e.createElement("button",Object.assign({type:"button",className:M8("flex items-center justify-center p-1 h-7 w-7 outline-none focus:ring-2 transition duration-100 border border-tremor-border dark:border-dark-tremor-border hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted rounded-tremor-small focus:border-tremor-brand-subtle select-none dark:focus:border-dark-tremor-brand-subtle focus:ring-tremor-brand-muted dark:focus:ring-dark-tremor-brand-muted text-tremor-content-subtle dark:text-dark-tremor-content-subtle hover:text-tremor-content dark:hover:text-dark-tremor-content")},o),e.createElement(s7,{onClick:n,icon:i,variant:"simple",color:"slate",size:"sm"}))};function Zie(t){var{mode:n,defaultMonth:r,selected:o,onSelect:i,locale:a,disabled:u,enableYearNavigation:l,classNames:s,weekStartsOn:c=0}=t,d=Ar(t,["mode","defaultMonth","selected","onSelect","locale","disabled","enableYearNavigation","classNames","weekStartsOn"]);return e.createElement(Hie,Object.assign({showOutsideDays:!0,mode:n,defaultMonth:r,selected:o,onSelect:i,locale:a,disabled:u,weekStartsOn:c,classNames:Object.assign({months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-2 relative items-center",caption_label:"text-tremor-default text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis font-medium",nav:"space-x-1 flex items-center",nav_button:"flex items-center justify-center p-1 h-7 w-7 outline-none focus:ring-2 transition duration-100 border border-tremor-border dark:border-dark-tremor-border hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted rounded-tremor-small focus:border-tremor-brand-subtle dark:focus:border-dark-tremor-brand-subtle focus:ring-tremor-brand-muted dark:focus:ring-dark-tremor-brand-muted text-tremor-content-subtle dark:text-dark-tremor-content-subtle hover:text-tremor-content dark:hover:text-dark-tremor-content",nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"w-9 font-normal text-center text-tremor-content-subtle dark:text-dark-tremor-content-subtle",row:"flex w-full mt-0.5",cell:"text-center p-0 relative focus-within:relative text-tremor-default text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",day:"h-9 w-9 p-0 hover:bg-tremor-background-subtle dark:hover:bg-dark-tremor-background-subtle outline-tremor-brand dark:outline-dark-tremor-brand rounded-tremor-default",day_today:"font-bold",day_selected:"aria-selected:bg-tremor-background-emphasis aria-selected:text-tremor-content-inverted dark:aria-selected:bg-dark-tremor-background-emphasis dark:aria-selected:text-dark-tremor-content-inverted ",day_disabled:"text-tremor-content-subtle dark:text-dark-tremor-content-subtle disabled:hover:bg-transparent",day_outside:"text-tremor-content-subtle dark:text-dark-tremor-content-subtle"},s),components:{IconLeft:t=>{var n=Ar(t,[]);return e.createElement(qie,Object.assign({className:"h-4 w-4"},n))},IconRight:t=>{var n=Ar(t,[]);return e.createElement(Kie,Object.assign({className:"h-4 w-4"},n))},Caption:t=>{var n=Ar(t,[]);const{goToMonth:r,nextMonth:o,previousMonth:i,currentMonth:u}=zoe();return e.createElement("div",{className:"flex justify-between items-center"},e.createElement("div",{className:"flex items-center space-x-1"},l&&e.createElement(Xie,{onClick:()=>u&&r(Ba(u,-1)),icon:Gie}),e.createElement(Xie,{onClick:()=>i&&r(i),icon:qie})),e.createElement(Z8,{className:"text-tremor-default tabular-nums capitalize text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis font-medium"},Vu(n.displayMonth,"LLLL yyy",{locale:a})),e.createElement("div",{className:"flex items-center space-x-1"},e.createElement(Xie,{onClick:()=>o&&r(o),icon:Kie}),l&&e.createElement(Xie,{onClick:()=>u&&r(Ba(u,1)),icon:Yie})))}}},d))}Zie.displayName="DateRangePicker";const Qie=I8("DatePicker"),Jie=(t,n)=>{const r=void 0!==n,[o,i]=e.useState(t);return[r?n:o,e=>{r||i(e)}]},eae=I8("DateRangePicker"),tae=[{value:"tdy",text:"Today",from:ol()},{value:"w",text:"Last 7 days",from:il(ol(),{days:7})},{value:"t",text:"Last 30 days",from:il(ol(),{days:30})},{value:"m",text:"Month to Date",from:Ka(ol())},{value:"y",text:"Year to Date",from:Ga(ol())}],nae=(e,t,n,r)=>{const o=(null==n?void 0:n.code)||"en-US";if(!e&&!t)return"";if(e&&!t){if(r)return Vu(e,r);const t={year:"numeric",month:"short",day:"numeric"};return e.toLocaleDateString(o,t)}if(e&&t){if(function(e,t){Sa(2,arguments);var n=Na(e),r=Na(t);return n.getTime()===r.getTime()}(e,t)){if(r)return Vu(e,r);const t={year:"numeric",month:"short",day:"numeric"};return e.toLocaleDateString(o,t)}if(e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()){if(r)return`${Vu(e,r)} - ${Vu(t,r)}`;const n={month:"short",day:"numeric"};return`${e.toLocaleDateString(o,n)} - \n ${t.getDate()}, ${t.getFullYear()}`}{if(r)return`${Vu(e,r)} - ${Vu(t,r)}`;const n={year:"numeric",month:"short",day:"numeric"};return`${e.toLocaleDateString(o,n)} - \n ${t.toLocaleDateString(o,n)}`}}return""},rae=e=>["string","number"].includes(typeof e)?e:e instanceof Array?e.map(rae).join(""):"object"==typeof e&&e?rae(e.props.children):void 0;function oae(t){const n=new Map;return e.Children.map(t,(e=>{var t;n.set(e.props.value,null!==(t=rae(e))&&void 0!==t?t:e.props.value)})),n}function iae(t,n){return e.Children.map(n,(e=>{var n;if((null!==(n=rae(e))&&void 0!==n?n:e.props.value).toLowerCase().includes(t.toLowerCase()))return e}))}const aae=(e,t,n=!1)=>M8(t?"bg-tremor-background-subtle dark:bg-dark-tremor-background-subtle":"bg-tremor-background dark:bg-dark-tremor-background",!t&&"hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted",e?"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis":"text-tremor-content dark:text-dark-tremor-content",t&&"text-tremor-content-subtle dark:text-dark-tremor-content-subtle",n&&"text-red-500",n?"border-red-500":"border-tremor-border dark:border-dark-tremor-border");function uae(e){return null!=e&&""!==e}const lae=ol(),sae=e.forwardRef(((t,n)=>{var r;const{value:o,defaultValue:i,onValueChange:a,minDate:u,maxDate:l,placeholder:s="Select date",disabled:c=!1,locale:d=Fu,enableClear:f=!0,displayFormat:h,className:v,enableYearNavigation:p=!1,weekStartsOn:m=0,disabledDates:b}=t,y=Ar(t,["value","defaultValue","onValueChange","minDate","maxDate","placeholder","disabled","locale","enableClear","displayFormat","className","enableYearNavigation","weekStartsOn","disabledDates"]),[g,w]=Jie(i,o),x=e.useMemo((()=>{const e=[];return u&&e.push({before:u}),l&&e.push({after:l}),[...e,...null!=b?b:[]]}),[u,l,b]),k=g?nae(g,void 0,d,h):s,O=Ka(null!==(r=null!=g?g:l)&&void 0!==r?r:lae),j=f&&!c;return e.createElement(xre,Object.assign({ref:n,as:"div",className:M8("relative w-full min-w-[10rem] text-tremor-default","focus:ring-2 focus:ring-tremor-brand-muted dark:focus:ring-dark-tremor-brand-muted",v)},y),e.createElement(xre.Button,{disabled:c,className:M8("w-full outline-none text-left whitespace-nowrap truncate focus:ring-2 transition duration-100 rounded-tremor-default flex flex-nowrap border pl-3 py-2","border-tremor-border shadow-tremor-input text-tremor-content-emphasis focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:text-dark-tremor-content-emphasis dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",j?"pr-8":"pr-4",aae(uae(g),c))},e.createElement(poe,{className:M8(Qie("calendarIcon"),"flex-none shrink-0 h-5 w-5 mr-2 -ml-0.5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle"),"aria-hidden":"true"}),e.createElement("p",{className:"truncate"},k)),j&&g?e.createElement("button",{type:"button",className:M8("absolute outline-none inset-y-0 right-0 flex items-center transition duration-100 mr-4"),onClick:e=>{e.preventDefault(),null==a||a(void 0),w(void 0)}},e.createElement(moe,{className:M8("flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,e.createElement(voe,{className:"absolute z-10 min-w-min left-0",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},e.createElement(xre.Panel,{className:M8("divide-y overflow-y-auto outline-none rounded-tremor-default p-3 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},(({close:t})=>e.createElement(Zie,{showOutsideDays:!0,mode:"single",defaultMonth:O,selected:g,weekStartsOn:m,onSelect:e=>{null==a||a(e),w(e),t()},locale:d,disabled:x,enableYearNavigation:p})))))}));sae.displayName="DatePicker";const cae=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))},dae=I8("Select"),fae=e.forwardRef(((t,n)=>{const{defaultValue:r="",value:o,onValueChange:i,placeholder:a="Select...",disabled:u=!1,icon:l,enableClear:s=!1,required:c,children:d,name:f,error:h=!1,errorMessage:v,className:p,id:m}=t,b=Ar(t,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),y=e.useRef(null),g=e.Children.toArray(d),[w,x]=Jie(r,o),k=l,O=e.useMemo((()=>oae(e.Children.toArray(d).filter(e.isValidElement))),[d]);return e.createElement("div",{className:M8("w-full min-w-[10rem] relative text-tremor-default")},e.createElement("select",{title:"select-hidden",required:c,className:M8("h-full w-full absolute left-0 top-0 z-0 opacity-0"),value:w,onChange:e=>{e.preventDefault()},name:f,disabled:u,id:m,onFocus:()=>{const e=y.current;e&&e.focus()}},e.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},a),g.map((t=>{const n=t.props.value,r=t.props.children;return e.createElement("option",{className:"hidden",key:n,value:n},r)}))),e.createElement(nre,Object.assign({as:"div",ref:n,defaultValue:w,value:w,onChange:e=>{null==i||i(e),x(e)},disabled:u,className:M8("w-full min-w-[10rem] relative text-tremor-default",p),id:m},b),(({value:t})=>{var n;return e.createElement(e.Fragment,null,e.createElement(nre.Button,{ref:y,className:M8("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",k?"pl-10":"pl-3",aae(uae(t),u,h))},k&&e.createElement("span",{className:M8("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},e.createElement(k,{className:M8(dae("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),e.createElement("span",{className:"w-[90%] block truncate"},t&&null!==(n=O.get(t))&&void 0!==n?n:a),e.createElement("span",{className:M8("absolute inset-y-0 right-0 flex items-center mr-3")},e.createElement(cae,{className:M8(dae("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),s&&w?e.createElement("button",{type:"button",className:M8("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),x(""),null==i||i("")}},e.createElement(moe,{className:M8(dae("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,e.createElement(voe,{className:"absolute z-10 w-full",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},e.createElement(nre.Options,{className:M8("divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] left-0 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},d)))})),h&&v?e.createElement("p",{className:M8("errorMessage","text-sm text-rose-500 mt-1")},v):null)}));fae.displayName="Select";const hae=I8("SelectItem"),vae=e.forwardRef(((t,n)=>{const{value:r,icon:o,className:i,children:a}=t,u=Ar(t,["value","icon","className","children"]),l=o;return e.createElement(nre.Option,Object.assign({className:M8(hae("root"),"flex justify-start items-center cursor-default text-tremor-default px-2.5 py-2.5","ui-active:bg-tremor-background-muted ui-active:text-tremor-content-strong ui-selected:text-tremor-content-strong ui-selected:bg-tremor-background-muted text-tremor-content-emphasis","dark:ui-active:bg-dark-tremor-background-muted dark:ui-active:text-dark-tremor-content-strong dark:ui-selected:text-dark-tremor-content-strong dark:ui-selected:bg-dark-tremor-background-muted dark:text-dark-tremor-content-emphasis",i),ref:n,key:r,value:r},u),l&&e.createElement(l,{className:M8(hae("icon"),"flex-none w-5 h-5 mr-1.5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}),e.createElement("span",{className:"whitespace-nowrap truncate"},null!=a?a:r))}));vae.displayName="SelectItem";const pae=ol(),mae=e.forwardRef(((t,n)=>{var r,o;const{value:i,defaultValue:a,onValueChange:u,enableSelect:l=!0,minDate:s,maxDate:c,placeholder:d="Select range",selectPlaceholder:f="Select range",disabled:h=!1,locale:v=Fu,enableClear:p=!0,displayFormat:m,children:b,className:y,enableYearNavigation:g=!1,weekStartsOn:w=0,disabledDates:x}=t,k=Ar(t,["value","defaultValue","onValueChange","enableSelect","minDate","maxDate","placeholder","selectPlaceholder","disabled","locale","enableClear","displayFormat","children","className","enableYearNavigation","weekStartsOn","disabledDates"]),[O,j]=Jie(a,i),[S,N]=e.useState(!1),[M,C]=e.useState(!1),A=e.useMemo((()=>{const e=[];return s&&e.push({before:s}),c&&e.push({after:c}),[...e,...null!=x?x:[]]}),[s,c,x]),T=e.useMemo((()=>{const t=new Map;return b?e.Children.forEach(b,(e=>{var n;t.set(e.props.value,{text:null!==(n=rae(e))&&void 0!==n?n:e.props.value,from:e.props.from,to:e.props.to})})):tae.forEach((e=>{t.set(e.value,{text:e.text,from:e.from,to:pae})})),t}),[b]),E=e.useMemo((()=>{if(b)return oae(b);const e=new Map;return tae.forEach((t=>e.set(t.value,t.text))),e}),[b]),D=(null==O?void 0:O.selectValue)||"",P=((e,t,n,r)=>{var o;if(n&&(e=null===(o=r.get(n))||void 0===o?void 0:o.from),e)return La(e&&!t?e:za([e,t]))})(null==O?void 0:O.from,s,D,T),I=((e,t,n,r)=>{var o,i;if(n&&(e=La(null!==(i=null===(o=r.get(n))||void 0===o?void 0:o.to)&&void 0!==i?i:ol())),e)return La(e&&!t?e:$a([e,t]))})(null==O?void 0:O.to,c,D,T),L=P||I?nae(P,I,v,m):d,_=Ka(null!==(o=null!==(r=null!=I?I:P)&&void 0!==r?r:c)&&void 0!==o?o:pae),F=p&&!h;return e.createElement("div",Object.assign({ref:n,className:M8("w-full min-w-[10rem] relative flex justify-between text-tremor-default max-w-sm shadow-tremor-input dark:shadow-dark-tremor-input rounded-tremor-default",y)},k),e.createElement(xre,{as:"div",className:M8("w-full",l?"rounded-l-tremor-default":"rounded-tremor-default",S&&"ring-2 ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted z-10")},e.createElement("div",{className:"relative w-full"},e.createElement(xre.Button,{onFocus:()=>N(!0),onBlur:()=>N(!1),disabled:h,className:M8("w-full outline-none text-left whitespace-nowrap truncate focus:ring-2 transition duration-100 rounded-l-tremor-default flex flex-nowrap border pl-3 py-2","rounded-l-tremor-default border-tremor-border text-tremor-content-emphasis focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:text-dark-tremor-content-emphasis dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",l?"rounded-l-tremor-default":"rounded-tremor-default",F?"pr-8":"pr-4",aae(uae(P||I),h))},e.createElement(poe,{className:M8(eae("calendarIcon"),"flex-none shrink-0 h-5 w-5 -ml-0.5 mr-2","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle"),"aria-hidden":"true"}),e.createElement("p",{className:"truncate"},L)),F&&P?e.createElement("button",{type:"button",className:M8("absolute outline-none inset-y-0 right-0 flex items-center transition duration-100 mr-4"),onClick:e=>{e.preventDefault(),null==u||u({}),j({})}},e.createElement(moe,{className:M8(eae("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null),e.createElement(voe,{className:"absolute z-10 min-w-min left-0",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},e.createElement(xre.Panel,{focus:!0,className:M8("divide-y overflow-y-auto outline-none rounded-tremor-default p-3 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},e.createElement(Zie,Object.assign({mode:"range",showOutsideDays:!0,defaultMonth:_,selected:{from:P,to:I},onSelect:e=>{null==u||u({from:null==e?void 0:e.from,to:null==e?void 0:e.to}),j({from:null==e?void 0:e.from,to:null==e?void 0:e.to})},locale:v,disabled:A,enableYearNavigation:g,classNames:{day_range_middle:M8("!rounded-none aria-selected:!bg-tremor-background-subtle aria-selected:dark:!bg-dark-tremor-background-subtle aria-selected:!text-tremor-content aria-selected:dark:!bg-dark-tremor-background-subtle"),day_range_start:"rounded-r-none rounded-l-tremor-small aria-selected:text-tremor-brand-inverted dark:aria-selected:text-dark-tremor-brand-inverted",day_range_end:"rounded-l-none rounded-r-tremor-small aria-selected:text-tremor-brand-inverted dark:aria-selected:text-dark-tremor-brand-inverted"},weekStartsOn:w},t))))),l&&e.createElement(nre,{as:"div",className:M8("w-48 -ml-px rounded-r-tremor-default",M&&"ring-2 ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted z-10"),value:D,onChange:e=>{const{from:t,to:n}=T.get(e),r=null!=n?n:pae;null==u||u({from:t,to:r,selectValue:e}),j({from:t,to:r,selectValue:e})},disabled:h},(({value:t})=>{var n;return e.createElement(e.Fragment,null,e.createElement(nre.Button,{onFocus:()=>C(!0),onBlur:()=>C(!1),className:M8("w-full outline-none text-left whitespace-nowrap truncate rounded-r-tremor-default transition duration-100 border px-4 py-2","border-tremor-border text-tremor-content-emphasis focus:border-tremor-brand-subtle","dark:border-dark-tremor-border dark:text-dark-tremor-content-emphasis dark:focus:border-dark-tremor-brand-subtle",aae(uae(t),h))},t&&null!==(n=E.get(t))&&void 0!==n?n:f),e.createElement(voe,{className:"absolute z-10 w-full inset-x-0 right-0",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},e.createElement(nre.Options,{className:M8("divide-y overflow-y-auto outline-none border my-1","shadow-tremor-dropdown bg-tremor-background border-tremor-border divide-tremor-border rounded-tremor-default","dark:shadow-dark-tremor-dropdown dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border")},null!=b?b:tae.map((t=>e.createElement(vae,{key:t.value,value:t.value},t.text))))))})))}));mae.displayName="DateRangePicker";const bae=e.forwardRef(((t,n)=>{const{value:r,className:o,children:i}=t,a=Ar(t,["value","className","children"]);return e.createElement(vae,Object.assign({ref:n,className:o,value:r},a),null!=i?i:r)}));bae.displayName="DateRangePickerItem";const yae=e.createContext(c8),gae=e.createContext(0),wae=e.createContext(void 0),xae=e.createContext({selectedValue:void 0,handleValueChange:void 0}),kae=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z"}))},Oae=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},n),e.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))},jae=I8("MultiSelect"),Sae=e.forwardRef(((t,n)=>{const{defaultValue:r=[],value:o,onValueChange:i,placeholder:a="Select...",placeholderSearch:u="Search",disabled:l=!1,icon:s,children:c,className:d,required:f,name:h,error:v=!1,errorMessage:p,id:m}=t,b=Ar(t,["defaultValue","value","onValueChange","placeholder","placeholderSearch","disabled","icon","children","className","required","name","error","errorMessage","id"]),y=e.useRef(null),g=s,[w,x]=Jie(r,o),{reactElementChildren:k,optionsAvailable:O}=e.useMemo((()=>{const t=e.Children.toArray(c).filter(e.isValidElement);return{reactElementChildren:t,optionsAvailable:iae("",t)}}),[c]),[j,S]=e.useState(""),N=(null!=w?w:[]).length>0,M=e.useMemo((()=>j?iae(j,k):O),[j,k,O]),C=()=>{S("")};return e.createElement("div",{className:M8("w-full min-w-[10rem] relative text-tremor-default")},e.createElement("select",{title:"multi-select-hidden",required:f,className:M8("h-full w-full absolute left-0 top-0 z-0 opacity-0"),value:w,onChange:e=>{e.preventDefault()},name:h,disabled:l,multiple:!0,id:m,onFocus:()=>{const e=y.current;e&&e.focus()}},e.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},a),M.map((t=>{const n=t.props.value,r=t.props.children;return e.createElement("option",{className:"hidden",key:n,value:n},r)}))),e.createElement(nre,Object.assign({as:"div",ref:n,defaultValue:w,value:w,onChange:e=>{null==i||i(e),x(e)},disabled:l,className:M8("w-full min-w-[10rem] relative text-tremor-default",d),id:m,multiple:!0},b),(({value:t})=>e.createElement(e.Fragment,null,e.createElement(nre.Button,{className:M8("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-1.5","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",g?"pl-11 -ml-0.5":"pl-3",aae(t.length>0,l,v)),ref:y},g&&e.createElement("span",{className:M8("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},e.createElement(g,{className:M8(jae("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),e.createElement("div",{className:"h-6 flex items-center"},t.length>0?e.createElement("div",{className:"flex flex-nowrap overflow-x-scroll [&::-webkit-scrollbar]:hidden [scrollbar-width:none] gap-x-1 mr-5 -ml-1.5 relative"},O.filter((e=>t.includes(e.props.value))).map(((n,r)=>{var o;return e.createElement("div",{key:r,className:M8("max-w-[100px] lg:max-w-[200px] flex justify-center items-center pl-2 pr-1.5 py-1 font-medium","rounded-tremor-small","bg-tremor-background-muted dark:bg-dark-tremor-background-muted","bg-tremor-background-subtle dark:bg-dark-tremor-background-subtle","text-tremor-content-default dark:text-dark-tremor-content-default","text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis")},e.createElement("div",{className:"text-xs truncate "},null!==(o=n.props.children)&&void 0!==o?o:n.props.value),e.createElement("div",{onClick:e=>{e.preventDefault();const r=t.filter((e=>e!==n.props.value));null==i||i(r),x(r)}},e.createElement(Oae,{className:M8(jae("clearIconItem"),"cursor-pointer rounded-tremor-full w-3.5 h-3.5 ml-2","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle dark:hover:text-tremor-content")})))}))):e.createElement("span",null,a)),e.createElement("span",{className:M8("absolute inset-y-0 right-0 flex items-center mr-2.5")},e.createElement(cae,{className:M8(jae("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),N&&!l?e.createElement("button",{type:"button",className:M8("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),x([]),null==i||i([])}},e.createElement(moe,{className:M8(jae("clearIconAllItems"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,e.createElement(voe,{className:"absolute z-10 w-full",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},e.createElement(nre.Options,{className:M8("divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] left-0 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},e.createElement("div",{className:M8("flex items-center w-full px-2.5","bg-tremor-background-muted","dark:bg-dark-tremor-background-muted")},e.createElement("span",null,e.createElement(kae,{className:M8("flex-none w-4 h-4 mr-2","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),e.createElement("input",{name:"search",type:"input",autoComplete:"off",placeholder:u,className:M8("w-full focus:outline-none focus:ring-none bg-transparent text-tremor-default py-2","text-tremor-content-emphasis","dark:text-dark-tremor-content-subtle"),onKeyDown:e=>{"Space"===e.code&&""!==e.target.value&&e.stopPropagation()},onChange:e=>S(e.target.value),value:j})),e.createElement(xae.Provider,Object.assign({},{onBlur:{handleResetSearch:C}},{value:{selectedValue:t}}),M)))))),v&&p?e.createElement("p",{className:M8("errorMessage","text-sm text-rose-500 mt-1")},p):null)}));Sae.displayName="MultiSelect";const Nae=I8("MultiSelectItem"),Mae=e.forwardRef(((t,n)=>{const{value:r,className:o,children:i}=t,a=Ar(t,["value","className","children"]),{selectedValue:u}=e.useContext(xae),l=((e,t)=>{for(let n=0;n<t.length;n++)if(t[n]===e)return!0;return!1})(r,u);return e.createElement(nre.Option,Object.assign({className:M8(Nae("root"),"flex justify-start items-center cursor-default text-tremor-default p-2.5","ui-active:bg-tremor-background-muted ui-active:text-tremor-content-strong ui-selected:text-tremor-content-strong text-tremor-content-emphasis","dark:ui-active:bg-dark-tremor-background-muted dark:ui-active:text-dark-tremor-content-strong dark:ui-selected:text-dark-tremor-content-strong dark:ui-selected:bg-dark-tremor-background-muted dark:text-dark-tremor-content-emphasis",o),ref:n,key:r,value:r},a),e.createElement("input",{type:"checkbox",className:M8(Nae("checkbox"),"flex-none focus:ring-none focus:outline-none cursor-pointer mr-2.5","accent-tremor-brand","dark:accent-dark-tremor-brand"),checked:l,readOnly:!0}),e.createElement("span",{className:"whitespace-nowrap truncate"},null!=i?i:r))}));Mae.displayName="MultiSelectItem";const Cae=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),e.createElement("path",{d:"M12 4v16m8-8H4"}))},Aae=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),e.createElement("path",{d:"M20 12H4"}))},Tae=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 15V17H13V15H11ZM11 7V13H13V7H11Z"}))},Eae=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12ZM12.0003 17C14.7617 17 17.0003 14.7614 17.0003 12C17.0003 9.23858 14.7617 7 12.0003 7C9.23884 7 7.00026 9.23858 7.00026 12C7.00026 14.7614 9.23884 17 12.0003 17ZM12.0003 15C10.3434 15 9.00026 13.6569 9.00026 12C9.00026 10.3431 10.3434 9 12.0003 9C13.6571 9 15.0003 10.3431 15.0003 12C15.0003 13.6569 13.6571 15 12.0003 15Z"}))},Dae=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M4.52047 5.93457L1.39366 2.80777L2.80788 1.39355L22.6069 21.1925L21.1927 22.6068L17.8827 19.2968C16.1814 20.3755 14.1638 21.0002 12.0003 21.0002C6.60812 21.0002 2.12215 17.1204 1.18164 12.0002C1.61832 9.62282 2.81932 7.5129 4.52047 5.93457ZM14.7577 16.1718L13.2937 14.7078C12.902 14.8952 12.4634 15.0002 12.0003 15.0002C10.3434 15.0002 9.00026 13.657 9.00026 12.0002C9.00026 11.537 9.10522 11.0984 9.29263 10.7067L7.82866 9.24277C7.30514 10.0332 7.00026 10.9811 7.00026 12.0002C7.00026 14.7616 9.23884 17.0002 12.0003 17.0002C13.0193 17.0002 13.9672 16.6953 14.7577 16.1718ZM7.97446 3.76015C9.22127 3.26959 10.5793 3.00016 12.0003 3.00016C17.3924 3.00016 21.8784 6.87992 22.8189 12.0002C22.5067 13.6998 21.8038 15.2628 20.8068 16.5925L16.947 12.7327C16.9821 12.4936 17.0003 12.249 17.0003 12.0002C17.0003 9.23873 14.7617 7.00016 12.0003 7.00016C11.7514 7.00016 11.5068 7.01833 11.2677 7.05343L7.97446 3.76015Z"}))},Pae=e.forwardRef(((t,n)=>{const{value:r,defaultValue:o,type:i,placeholder:a="Type...",icon:u,error:l=!1,errorMessage:s,disabled:c=!1,stepper:d,makeInputClassName:f,className:h,onChange:v,onValueChange:p,autoFocus:m}=t,b=Ar(t,["value","defaultValue","type","placeholder","icon","error","errorMessage","disabled","stepper","makeInputClassName","className","onChange","onValueChange","autoFocus"]),[y,g]=e.useState(m||!1),[w,x]=e.useState(!1),k=e.useCallback((()=>x(!w)),[w,x]),O=u,j=e.useRef(null),S=uae(r||o);return e.useEffect((()=>{const e=()=>g(!0),t=()=>g(!1),n=j.current;return n&&(n.addEventListener("focus",e),n.addEventListener("blur",t),m&&n.focus()),()=>{n&&(n.removeEventListener("focus",e),n.removeEventListener("blur",t))}}),[m]),e.createElement(e.Fragment,null,e.createElement("div",{className:M8(f("root"),"relative w-full flex items-center min-w-[10rem] outline-none rounded-tremor-default transition duration-100 border","shadow-tremor-input","dark:shadow-dark-tremor-input",aae(S,c,l),y&&M8("ring-2","border-tremor-brand-subtle ring-tremor-brand-muted","dark:border-dark-tremor-brand-subtle dark:ring-dark-tremor-brand-muted"),h)},O?e.createElement(O,{className:M8(f("icon"),"shrink-0 h-5 w-5 ml-2.5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}):null,e.createElement("input",Object.assign({ref:P8([j,n]),defaultValue:o,value:r,type:w?"text":i,className:M8(f("input"),"w-full focus:outline-none focus:ring-0 border-none bg-transparent text-tremor-default rounded-tremor-default transition duration-100 py-2","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",O?"pl-2":"pl-3",l?"pr-3":"pr-4",c?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content"),placeholder:a,disabled:c,"data-testid":"base-input",onChange:e=>{null==v||v(e),null==p||p(e.target.value)}},b)),"password"!==i||c?null:e.createElement("button",{className:M8(f("toggleButton"),"mr-2"),type:"button",onClick:()=>k(),"aria-label":w?"Hide password":"Show Password"},w?e.createElement(Dae,{className:M8("flex-none h-5 w-5 transition","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle hover:dark:text-dark-tremor-content"),"aria-hidden":!0}):e.createElement(Eae,{className:M8("flex-none h-5 w-5 transition","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle hover:dark:text-dark-tremor-content"),"aria-hidden":!0})),l?e.createElement(Tae,{className:M8(f("errorIcon"),"text-red-500 shrink-0 w-5 h-5 mr-2.5")}):null,null!=d?d:null),l&&s?e.createElement("p",{className:M8(f("errorMessage"),"text-sm text-red-500 mt-1")},s):null)}));Pae.displayName="BaseInput";const Iae="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",Lae="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",_ae=e.forwardRef(((t,n)=>{const{onSubmit:r,enableStepper:o=!0,disabled:i,onValueChange:a,onChange:u}=t,l=Ar(t,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),s=e.useRef(null),[c,d]=e.useState(!1),f=e.useCallback((()=>{d(!0)}),[]),h=e.useCallback((()=>{d(!1)}),[]),[v,p]=e.useState(!1),m=e.useCallback((()=>{p(!0)}),[]),b=e.useCallback((()=>{p(!1)}),[]);return e.createElement(Pae,Object.assign({type:"number",ref:P8([s,n]),disabled:i,makeInputClassName:I8("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){const e=null===(t=s.current)||void 0===t?void 0:t.value;null==r||r(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&f(),"ArrowUp"===e.key&&m()},onKeyUp:e=>{"ArrowDown"===e.key&&h(),"ArrowUp"===e.key&&b()},onChange:e=>{i||(null==a||a(parseFloat(e.target.value)),null==u||u(e))},stepper:o?e.createElement("div",{className:M8("flex justify-center align-middle")},e.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;i||(null===(e=s.current)||void 0===e||e.stepDown(),null===(t=s.current)||void 0===t||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:M8(!i&&Lae,Iae,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},e.createElement(Aae,{"data-testid":"step-down",className:(c?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),e.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;i||(null===(e=s.current)||void 0===e||e.stepUp(),null===(t=s.current)||void 0===t||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:M8(!i&&Lae,Iae,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},e.createElement(Cae,{"data-testid":"step-up",className:(v?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},l))}));_ae.displayName="NumberInput";const Fae=I8("SearchSelect"),Rae=I8("SearchSelect"),Bae=e.forwardRef(((t,n)=>{const{defaultValue:r="",searchValue:o,onSearchValueChange:i,value:a,onValueChange:u,placeholder:l="Select...",disabled:s=!1,icon:c,enableClear:d=!0,name:f,required:h,error:v=!1,errorMessage:p,children:m,className:b,id:y}=t,g=Ar(t,["defaultValue","searchValue","onSearchValueChange","value","onValueChange","placeholder","disabled","icon","enableClear","name","required","error","errorMessage","children","className","id"]),w=e.useRef(null),[x,k]=Jie("",o),[O,j]=Jie(r,a),S=c,{reactElementChildren:N,valueToNameMapping:M}=e.useMemo((()=>{const t=e.Children.toArray(m).filter(e.isValidElement);return{reactElementChildren:t,valueToNameMapping:oae(t)}}),[m]),C=e.useMemo((()=>iae(null!=x?x:"",N)),[x,N]);return e.createElement("div",{className:M8("w-full min-w-[10rem] relative text-tremor-default")},e.createElement("select",{title:"search-select-hidden",required:h,className:M8("h-full w-full absolute left-0 top-0 z-0 opacity-0"),value:O,onChange:e=>{e.preventDefault()},name:f,disabled:s,id:y,onFocus:()=>{const e=w.current;e&&e.click()}},e.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},l),C.map((t=>{const n=t.props.value,r=t.props.children;return e.createElement("option",{className:"hidden",key:n,value:n},r)}))),e.createElement(hte,Object.assign({as:"div",ref:n,defaultValue:O,value:O,onChange:e=>{null==u||u(e),j(e)},disabled:s,className:M8("w-full min-w-[10rem] relative text-tremor-default",b),id:y},g),(({value:t})=>e.createElement(e.Fragment,null,e.createElement(hte.Button,{ref:w,className:"w-full"},S&&e.createElement("span",{className:M8("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},e.createElement(S,{className:M8(Fae("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),e.createElement(hte.Input,{className:M8("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 text-tremor-default pr-14 border py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",S?"pl-10":"pl-3",s?"placeholder:text-tremor-content-subtle dark:placeholder:text-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-tremor-content",aae(uae(t),s)),placeholder:l,onChange:e=>{null==i||i(e.target.value),k(e.target.value)},displayValue:e=>{var t;return null!==(t=M.get(e))&&void 0!==t?t:""}}),e.createElement("div",{className:M8("absolute inset-y-0 right-0 flex items-center pr-2.5")},e.createElement(cae,{className:M8(Fae("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),d&&O?e.createElement("button",{type:"button",className:M8("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),j(""),k(""),null==u||u(""),null==i||i("")}},e.createElement(moe,{className:M8(Rae("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,C.length>0&&e.createElement(voe,{className:"absolute z-10 w-full",enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},e.createElement(hte.Options,{className:M8("divide-y overflow-y-auto outline-none rounded-tremor-default text-tremor-default max-h-[228px] left-0 border my-1","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},C))))),v&&p?e.createElement("p",{className:M8("errorMessage","text-sm text-rose-500 mt-1")},p):null)}));Bae.displayName="SearchSelect";const zae=I8("SearchSelectItem"),$ae=e.forwardRef(((t,n)=>{const{value:r,icon:o,className:i,children:a}=t,u=Ar(t,["value","icon","className","children"]),l=o;return e.createElement(hte.Option,Object.assign({className:M8(zae("root"),"flex justify-start items-center cursor-default text-tremor-default p-2.5","ui-active:bg-tremor-background-muted ui-active:text-tremor-content-strong ui-selected:text-tremor-content-strong ui-selected:bg-tremor-background-muted text-tremor-content-emphasis","dark:ui-active:bg-dark-tremor-background-muted dark:ui-active:text-dark-tremor-content-strong dark:ui-selected:text-dark-tremor-content-strong dark:ui-selected:bg-dark-tremor-background-muted dark:text-dark-tremor-content-emphasis",i),ref:n,key:r,value:r},u),l&&e.createElement(l,{className:M8(zae("icon"),"flex-none h-5 w-5 mr-3","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}),e.createElement("span",{className:"whitespace-nowrap truncate"},null!=a?a:r))}));$ae.displayName="SearchSelectItem";const Wae=I8("Switch"),Vae=e.forwardRef(((t,n)=>{const{checked:r,defaultChecked:o=!1,onChange:i,color:a,name:u,error:l,errorMessage:s,disabled:c,required:d,tooltip:f,id:h}=t,v=Ar(t,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),p=(e=>({bgColor:e?L8(e,m8).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:e?L8(e,w8).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}))(a),[m,b]=Jie(o,r),[y,g]=e.useState(!1),{tooltipProps:w,getReferenceProps:x}=H9(300);return e.createElement("div",{className:"flex flex-row items-center justify-start"},e.createElement(q9,Object.assign({text:f},w)),e.createElement("div",Object.assign({ref:P8([n,w.refs.setReference]),className:M8(Wae("root"),"flex flex-row relative h-5")},v,x),e.createElement("input",{type:"checkbox",className:M8(Wae("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:u,required:d,checked:m,onChange:e=>{e.preventDefault()}}),e.createElement(Tre,{checked:m,onChange:e=>{b(e),null==i||i(e)},disabled:c,className:M8(Wae("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",c?"cursor-not-allowed":""),onFocus:()=>g(!0),onBlur:()=>g(!1),id:h},e.createElement("span",{className:M8(Wae("sr-only"),"sr-only")},"Switch ",m?"on":"off"),e.createElement("span",{"aria-hidden":"true",className:M8(Wae("background"),m?p.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),e.createElement("span",{"aria-hidden":"true",className:M8(Wae("round"),m?M8(p.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",y?M8("ring-2",p.ringColor):"")}))),l&&s?e.createElement("p",{className:M8(Wae("errorMessage"),"text-sm text-red-500 mt-1 ")},s):null)}));Vae.displayName="Switch";const Uae=I8("TabList"),Hae=e.createContext("line"),qae={line:M8("flex border-b space-x-4","border-tremor-border","dark:border-dark-tremor-border"),solid:M8("inline-flex p-0.5 rounded-tremor-default space-x-1.5","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle")},Kae=e.forwardRef(((t,n)=>{const{color:r,variant:o="line",children:i,className:a}=t,u=Ar(t,["color","variant","children","className"]);return e.createElement(Zre.List,Object.assign({ref:n,className:M8(Uae("root"),"justify-start overflow-x-clip",qae[o],a)},u),e.createElement(Hae.Provider,{value:o},e.createElement(yae.Provider,{value:r},i)))}));Kae.displayName="TabList";const Gae=I8("Tab");function Yae(e,t){switch(e){case"line":return M8("ui-selected:border-b-2 hover:border-b-2 border-transparent transition duration-100 -mb-px px-2 py-2","hover:border-tremor-content hover:text-tremor-content-emphasis text-tremor-content","dark:hover:border-dark-tremor-content-emphasis dark:hover:text-dark-tremor-content-emphasis dark:text-dark-tremor-content",t?L8(t,y8).selectBorderColor:"ui-selected:border-tremor-brand dark:ui-selected:border-dark-tremor-brand");case"solid":return M8("border-transparent border rounded-tremor-small px-2.5 py-1","ui-selected:border-tremor-border ui-selected:bg-tremor-background ui-selected:shadow-tremor-input hover:text-tremor-content-emphasis ui-selected:text-tremor-brand","dark:ui-selected:border-dark-tremor-border dark:ui-selected:bg-dark-tremor-background dark:ui-selected:shadow-dark-tremor-input dark:hover:text-dark-tremor-content-emphasis dark:ui-selected:text-dark-tremor-brand",t?L8(t,O8).selectTextColor:"text-tremor-content dark:text-dark-tremor-content")}}const Xae=e.forwardRef(((t,n)=>{const{icon:r,className:o,children:i}=t,a=Ar(t,["icon","className","children"]),u=e.useContext(Hae),l=e.useContext(yae),s=r;return e.createElement(Zre,Object.assign({ref:n,className:M8(Gae("root"),"flex whitespace-nowrap truncate max-w-xs outline-none focus:ring-0 text-tremor-default transition duration-100",l?L8(l,O8).selectTextColor:"solid"===u?"ui-selected:text-tremor-content-emphasis dark:ui-selected:text-dark-tremor-content-emphasis":"ui-selected:text-tremor-brand dark:ui-selected:text-dark-tremor-brand",Yae(u,l),o)},a),s?e.createElement(s,{className:M8(Gae("icon"),"flex-none h-5 w-5",i?"mr-2":"")}):null,i?e.createElement("span",null,i):null)}));Xae.displayName="Tab";const Zae=I8("TabGroup"),Qae=e.forwardRef(((t,n)=>{const{defaultIndex:r,index:o,onIndexChange:i,children:a,className:u}=t,l=Ar(t,["defaultIndex","index","onIndexChange","children","className"]);return e.createElement(Zre.Group,Object.assign({as:"div",ref:n,defaultIndex:r,selectedIndex:o,onChange:i,className:M8(Zae("root"),"w-full",u)},l),a)}));Qae.displayName="TabGroup";const Jae=I8("TabPanel"),eue=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]),{selectedValue:a}=e.useContext(xae),u=a===e.useContext(gae);return e.createElement("div",Object.assign({ref:n,className:M8(Jae("root"),"w-full mt-2",u?"":"hidden",o),"aria-selected":u?"true":"false"},i),r)}));eue.displayName="TabPanel";const tue=I8("TabPanels"),nue=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement(Zre.Panels,Object.assign({as:"div",ref:n,className:M8(tue("root"),"w-full",o)},i),(({selectedIndex:t})=>e.createElement(xae.Provider,{value:{selectedValue:t}},e.Children.map(r,((t,n)=>e.createElement(gae.Provider,{value:n},t))))))}));nue.displayName="TabPanels";const rue=I8("Textarea"),oue=e.forwardRef(((t,n)=>{const{value:r,defaultValue:o="",placeholder:i="Type...",error:a=!1,errorMessage:u,disabled:l=!1,className:s,onChange:c,onValueChange:d}=t,f=Ar(t,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange"]),[h,v]=Jie(o,r),p=e.useRef(null),m=uae(h);return e.createElement(e.Fragment,null,e.createElement("textarea",Object.assign({ref:P8([p,n]),value:h,placeholder:i,disabled:l,className:M8(rue("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",aae(m,l,a),l?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",s),"data-testid":"text-area",onChange:e=>{null==c||c(e),v(e.target.value),null==d||d(e.target.value)}},f)),a&&u?e.createElement("p",{className:M8(rue("errorMessage"),"text-sm text-red-500 mt-1")},u):null)}));oue.displayName="Textarea";const iue=I8("TextInput"),aue=e.forwardRef(((t,n)=>{const{type:r="text"}=t,o=Ar(t,["type"]);return e.createElement(Pae,Object.assign({ref:n,type:r,makeInputClassName:iue},o))}));aue.displayName="TextInput";const uue=I8("Accordion"),lue=e.createContext({isOpen:!1}),sue=e.forwardRef(((t,n)=>{var r;const{defaultOpen:o=!1,children:i,className:a}=t,u=Ar(t,["defaultOpen","children","className"]),l=null!==(r=e.useContext(wae))&&void 0!==r?r:M8("rounded-tremor-default border");return e.createElement(Ine,Object.assign({as:"div",ref:n,className:M8(uue("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",l,a),defaultOpen:o},u),(({open:t})=>e.createElement(lue.Provider,{value:{isOpen:t}},i)))}));sue.displayName="Accordion";const cue=I8("AccordionBody"),due=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement(Ine.Panel,Object.assign({ref:n,className:M8(cue("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",o)},i),r)}));due.displayName="AccordionBody";const fue=t=>{var n=Ar(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),e.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"}))},hue=I8("AccordionHeader"),vue=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]),{isOpen:a}=e.useContext(lue);return e.createElement(Ine.Button,Object.assign({ref:n,className:M8(hue("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",o)},i),e.createElement("div",{className:M8(hue("children"),"flex flex-1 text-inherit mr-4")},r),e.createElement("div",null,e.createElement(fue,{className:M8(hue("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",a?"transition-all":"transition-all -rotate-180")})))}));vue.displayName="AccordionHeader";const pue=I8("AccordionList"),mue=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]),a=e.Children.count(r);return e.createElement("div",Object.assign({ref:n,className:M8(pue("root"),"rounded-tremor-default","shadow-tremor-card","dark:shadow-dark-tremor-card",o)},i),e.Children.map(r,((t,n)=>0===n?e.createElement(wae.Provider,{value:M8("rounded-t-tremor-default border")},e.cloneElement(t)):n===a-1?e.createElement(wae.Provider,{value:M8("rounded-b-tremor-default border-l border-r border-b")},e.cloneElement(t)):e.createElement(wae.Provider,{value:M8("border-l border-r border-b")},e.cloneElement(t)))))}));mue.displayName="AccordionList";const bue=I8("Card"),yue=e=>{if(!e)return"";switch(e){case h8.Left:return"border-l-4";case v8:return"border-t-4";case h8.Right:return"border-r-4";case p8:return"border-b-4";default:return""}},gue=e.forwardRef(((t,n)=>{const{decoration:r="",decorationColor:o,children:i,className:a}=t,u=Ar(t,["decoration","decorationColor","children","className"]);return e.createElement("div",Object.assign({ref:n,className:M8(bue("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",o?L8(o,y8).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",yue(r),a)},u),i)}));gue.displayName="Card";const wue=I8("Divider"),xue=e.forwardRef(((t,n)=>{const{className:r,children:o}=t,i=Ar(t,["className","children"]);return e.createElement("div",Object.assign({ref:n,className:M8(wue("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",r)},i),o?e.createElement(e.Fragment,null,e.createElement("div",{className:M8("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),e.createElement("div",{className:M8("text-inherit whitespace-nowrap")},o),e.createElement("div",{className:M8("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):e.createElement("div",{className:M8("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))}));xue.displayName="Divider";const kue={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},Oue={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},jue={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},Sue={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},Nue={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},Mue={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},Cue={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},Aue={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"},Tue=I8("Col"),Eue=e.forwardRef(((t,n)=>{const{numColSpan:r=1,numColSpanSm:o,numColSpanMd:i,numColSpanLg:a,children:u,className:l}=t,s=Ar(t,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),c=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return e.createElement("div",Object.assign({ref:n,className:M8(Tue("root"),(()=>{const e=c(r,Nue),t=c(o,Mue),n=c(i,Cue),u=c(a,Aue);return M8(e,t,n,u)})(),l)},s),u)}));Eue.displayName="Col";const Due=I8("Grid"),Pue=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",Iue=e.forwardRef(((t,n)=>{const{numItems:r=1,numItemsSm:o,numItemsMd:i,numItemsLg:a,children:u,className:l}=t,s=Ar(t,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),c=Pue(r,kue),d=Pue(o,Oue),f=Pue(i,jue),h=Pue(a,Sue),v=M8(c,d,f,h);return e.createElement("div",Object.assign({ref:n,className:M8(Due("root"),"grid",v,l)},s),u)}));Iue.displayName="Grid";const Lue=I8("dialog"),_ue=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement(voe,{as:e.Fragment,appear:!0,show:t.open},e.createElement(bne,Object.assign({as:"div",ref:n},i,{className:M8(Lue("root"),"relative z-50",o)}),e.createElement(voe.Child,{as:e.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"},e.createElement("div",{className:M8("fixed inset-0 bg-slate-950/30 dark:bg-slate-950/50 transition-opacity")})),e.createElement("div",{className:"fixed inset-0 overflow-y-auto w-screen"},e.createElement("div",{className:"flex min-h-full items-center justify-center p-4"},r))))}));_ue.displayName="Dialog";const Fue=I8("dialog"),Rue=e.forwardRef(((t,n)=>{var r;const{children:o,className:i}=t,a=Ar(t,["children","className"]),u=null!==(r=e.useContext(wae))&&void 0!==r?r:M8("rounded-tremor-default p-6");return e.createElement(voe.Child,{as:e.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95"},e.createElement(bne.Panel,Object.assign({ref:n,className:M8(Fue("panel"),"w-full max-w-lg overflow-hidden text-left ring-1 shadow-tremor transition-all transform","bg-tremor-background text-tremor-content ring-tremor-ring","dark:bg-dark-tremor-background dark:text-dark-tremor-content dark:ring-dark-tremor-ring",u,i)},a),o))}));Rue.displayName="DialogPanel";const Bue=I8("List"),zue=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement("ul",Object.assign({ref:n,className:M8(Bue("root"),"w-full divide-y","divide-tremor-border text-tremor-content","dark:divide-dark-tremor-border dark:text-dark-tremor-content",o)},i),r)}));zue.displayName="List";const $ue=I8("ListItem"),Wue=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("li",Object.assign({ref:n,className:M8($ue("root"),"w-full flex justify-between items-center text-tremor-default py-2",o)},i),r))}));Wue.displayName="ListItem";const Vue=I8("Table"),Uue=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement("div",{className:M8(Vue("root"),"overflow-auto",o)},e.createElement("table",Object.assign({ref:n,className:M8(Vue("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},i),r))}));Uue.displayName="Table";const Hue=I8("TableBody"),que=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("tbody",Object.assign({ref:n,className:M8(Hue("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",o)},i),r))}));que.displayName="TableBody";const Kue=I8("TableCell"),Gue=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("td",Object.assign({ref:n,className:M8(Kue("root"),"align-middle whitespace-nowrap text-left p-4",o)},i),r))}));Gue.displayName="TableCell";const Yue=I8("TableFoot"),Xue=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement("tfoot",Object.assign({ref:n,className:M8(Yue("root"),"text-left font-medium border-t-[1px] ","text-tremor-content border-tremor-border","dark:text-dark-tremor-content dark:border-dark-tremor-border",o)},i),r)}));Xue.displayName="TableFoot";const Zue=I8("TableFooterCell"),Que=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("th",Object.assign({ref:n,className:M8(Zue("root"),"top-0 px-4 py-3.5","text-tremor-content font-medium","dark:text-dark-tremor-content",o)},i),r))}));Que.displayName="TableFooterCell";const Jue=I8("TableHead"),ele=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("thead",Object.assign({ref:n,className:M8(Jue("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",o)},i),r))}));ele.displayName="TableHead";const tle=I8("TableHeaderCell"),nle=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("th",Object.assign({ref:n,className:M8(tle("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",o)},i),r))}));nle.displayName="TableHeaderCell";const rle=I8("TableRow"),ole=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("tr",Object.assign({ref:n,className:M8(rle("row"),o)},i),r))}));ole.displayName="TableRow";const ile=e.forwardRef(((t,n)=>{const{data:r=[],categories:o=[],index:i,colors:a=N8,stack:u=!1,relative:l=!1,animationDuration:s=900,showAnimation:c=!1,noDataText:d,autoMinValue:f=!1,minValue:h,maxValue:v,className:p}=t,m=Ar(t,["data","categories","index","colors","stack","relative","animationDuration","showAnimation","noDataText","autoMinValue","minValue","maxValue","className"]),b=J8(o,a),y=e9(f,h,v);return e.createElement("div",Object.assign({ref:n,className:M8("w-28 h-12",p)},m),e.createElement(KV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(t8,{data:r,stackOffset:l?"expand":"none",margin:{top:0,left:-1.5,right:-1.5,bottom:0}},e.createElement(n6,{hide:!0,domain:y}),e.createElement(e6,{hide:!0,dataKey:i}),o.map((t=>{var n;return e.createElement(h5,{className:M8(L8(null!==(n=b.get(t))&&void 0!==n?n:a8,m8).fillColor),key:t,name:t,type:"linear",stackId:u||l?"a":void 0,dataKey:t,fill:"",isAnimationActive:c,animationDuration:s})}))):e.createElement(Q8,{noDataText:d})))}));ile.displayName="SparkBarChart";const ale=e.forwardRef(((t,n)=>{const{data:r=[],categories:o=[],index:i,colors:a=N8,animationDuration:u=900,showAnimation:l=!1,curveType:s="linear",connectNulls:c=!1,noDataText:d,autoMinValue:f=!1,minValue:h,maxValue:v,className:p}=t,m=Ar(t,["data","categories","index","colors","animationDuration","showAnimation","curveType","connectNulls","noDataText","autoMinValue","minValue","maxValue","className"]),b=J8(o,a),y=e9(f,h,v);return e.createElement("div",Object.assign({ref:n,className:M8("w-28 h-12",p)},m),e.createElement(KV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(e8,{data:r,margin:{top:1,left:1,right:1,bottom:1}},e.createElement(n6,{hide:!0,domain:y}),e.createElement(e6,{hide:!0,dataKey:i}),o.map((t=>{var n;return e.createElement(y4,{className:M8(L8(null!==(n=b.get(t))&&void 0!==n?n:a8,O8).strokeColor),strokeOpacity:1,dot:!1,key:t,name:t,type:s,dataKey:t,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:l,animationDuration:u,connectNulls:c})}))):e.createElement(Q8,{noDataText:d})))}));ale.displayName="SparkLineChart";const ule=e.forwardRef(((t,n)=>{const{data:r=[],categories:o=[],index:i,stack:a=!1,colors:u=N8,showAnimation:l=!1,animationDuration:s=900,showGradient:c=!0,curveType:d="linear",connectNulls:f=!1,noDataText:h,autoMinValue:v=!1,minValue:p,maxValue:m,className:b}=t,y=Ar(t,["data","categories","index","stack","colors","showAnimation","animationDuration","showGradient","curveType","connectNulls","noDataText","autoMinValue","minValue","maxValue","className"]),g=J8(o,u),w=e9(v,p,m);return e.createElement("div",Object.assign({ref:n,className:M8("w-28 h-12",b)},y),e.createElement(KV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(o8,{data:r,margin:{top:1,left:1,right:1,bottom:1}},e.createElement(n6,{hide:!0,domain:w}),e.createElement(e6,{hide:!0,dataKey:i}),o.map((t=>{var n,r;return e.createElement("defs",{key:t},c?e.createElement("linearGradient",{className:L8(null!==(n=g.get(t))&&void 0!==n?n:a8,O8).textColor,id:g.get(t),x1:"0",y1:"0",x2:"0",y2:"1"},e.createElement("stop",{offset:"5%",stopColor:"currentColor",stopOpacity:.4}),e.createElement("stop",{offset:"95%",stopColor:"currentColor",stopOpacity:0})):e.createElement("linearGradient",{className:L8(null!==(r=g.get(t))&&void 0!==r?r:a8,O8).textColor,id:g.get(t),x1:"0",y1:"0",x2:"0",y2:"1"},e.createElement("stop",{stopColor:"currentColor",stopOpacity:.3})))})),o.map((t=>{var n;return e.createElement(I4,{className:L8(null!==(n=g.get(t))&&void 0!==n?n:a8,O8).strokeColor,strokeOpacity:1,dot:!1,key:t,name:t,type:d,dataKey:t,stroke:"",fill:`url(#${g.get(t)})`,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:l,animationDuration:s,stackId:a?"a":void 0,connectNulls:f})}))):e.createElement(Q8,{noDataText:h})))}));ule.displayName="AreaChart";const lle=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement("b",Object.assign({ref:n,className:M8("text-inherit font-bold",o)},i),r)}));lle.displayName="Bold";const sle=I8("Callout"),cle=e.forwardRef(((t,n)=>{const{title:r,icon:o,color:i,className:a,children:u}=t,l=Ar(t,["title","icon","color","className","children"]),s=o;return e.createElement("div",Object.assign({ref:n,className:M8(sle("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",i?M8(L8(i,m8).bgColor,L8(i,g8).borderColor,L8(i,S8).textColor,"dark:bg-opacity-10 bg-opacity-10"):M8("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),a)},l),e.createElement("div",{className:M8(sle("header"),"flex items-start")},s?e.createElement(s,{className:M8(sle("icon"),"flex-none h-5 w-5 mr-1.5")}):null,e.createElement("h4",{className:M8(sle("title"),"font-semibold")},r)),e.createElement("p",{className:M8(sle("body"),"overflow-y-auto",u?"mt-2":"")},u))}));cle.displayName="Callout";const dle=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Ar(t,["children","className"]);return e.createElement("i",Object.assign({ref:n,className:M8("italic text-inherit",o)},i),r)}));dle.displayName="Italic";const fle=e.forwardRef(((t,n)=>{const{color:r,children:o,className:i}=t,a=Ar(t,["color","children","className"]);return e.createElement("p",Object.assign({ref:n,className:M8("font-semibold text-tremor-metric",r?L8(r,S8).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",i)},a),o)}));fle.displayName="Metric";const hle=e.forwardRef(((t,n)=>{const{color:r,children:o,className:i}=t,a=Ar(t,["color","children","className"]);return e.createElement("p",Object.assign({ref:n,className:M8(r?L8(r,k8).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",i)},a),o)}));hle.displayName="Subtitle";const vle=e.forwardRef(((t,n)=>{const{color:r,children:o,className:i}=t,a=Ar(t,["color","children","className"]);return e.createElement("p",Object.assign({ref:n,className:M8("font-medium text-tremor-title",r?L8(r,S8).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",i)},a),o)}));vle.displayName="Title";const ple=I8("BarList");function mle(t,n){const{data:r=[],color:o,valueFormatter:i=E8,showAnimation:a=!1,onValueChange:u,className:l}=t,s=Ar(t,["data","color","valueFormatter","showAnimation","onValueChange","className"]),c=(e=>{let t=-1/0;return e.forEach((e=>{t=Math.max(t,e)})),e.map((e=>0===e?0:Math.max(e/t*100,1)))})(r.map((e=>e.value)));return e.createElement("div",Object.assign({ref:n,className:M8(ple("root"),"flex justify-between space-x-6",l)},s),e.createElement("div",{className:M8(ple("bars"),"relative w-full")},r.map(((t,n)=>{var i,l,s;const d=t.icon;return e.createElement("div",{key:null!==(i=t.key)&&void 0!==i?i:t.name,className:M8(ple("bar"),"flex items-center rounded-tremor-small bg-opacity-30","h-9",t.color||o?L8(null!==(l=t.color)&&void 0!==l?l:o,m8).bgColor:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle dark:bg-opacity-30",n===r.length-1?"mb-0":"mb-2"),style:{width:`${c[n]}%`,transition:a?"all 1s":""}},e.createElement("div",{className:M8("absolute max-w-full flex left-2",u?"cursor-pointer":""),onClick:()=>{null==u||u(t)}},d?e.createElement(d,{className:M8(ple("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,t.href?e.createElement("a",{href:t.href,target:null!==(s=t.target)&&void 0!==s?s:"_blank",rel:"noreferrer",className:M8(ple("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default",u?"cursor-pointer":"","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onClick:()=>{null==u||u(t)}},t.name):e.createElement("p",{className:M8(ple("barText"),"whitespace-nowrap truncate text-tremor-default",u?"cursor-pointer":"","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onClick:()=>{null==u||u(t)}},t.name)))}))),e.createElement("div",{className:"text-right min-w-min"},r.map(((t,n)=>{var o;return e.createElement("div",{key:null!==(o=t.key)&&void 0!==o?o:t.name,className:M8(ple("labelWrapper"),"flex justify-end items-center","h-9",n===r.length-1?"mb-0":"mb-2")},e.createElement("p",{className:M8(ple("labelText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},i(t.value)))}))))}mle.displayName="BarList",e.forwardRef(mle);const ble=I8("CategoryBar"),yle=({values:t})=>{const n=D8(t);let r=0,o=0;return e.createElement("div",{className:M8(ble("labels"),"relative flex w-full text-tremor-default h-5 mb-2","text-tremor-content","dark:text-dark-tremor-content")},t.slice(0,t.length).map(((t,i)=>{r+=t;const a=(t>=.1*n||o>=.09*n)&&n-r>=.15*n&&r>=.1*n;return o=a?0:o+=t,e.createElement("div",{key:`item-${i}`,className:"flex items-center justify-end",style:{width:`${t}%`}},e.createElement("span",{className:M8(a?"block":"hidden","left-1/2 translate-x-1/2")},r))})),e.createElement("div",{className:M8("absolute bottom-0 flex items-center left-0")},"0"),e.createElement("div",{className:M8("absolute bottom-0 flex items-center right-0")},n))},gle=e.forwardRef(((t,n)=>{const{values:r=[],colors:o=N8,markerValue:i,showLabels:a=!0,tooltip:u,showAnimation:l=!1,className:s}=t,c=Ar(t,["values","colors","markerValue","showLabels","tooltip","showAnimation","className"]),d=((e,t,n)=>{if(void 0===e)return"";let r=0;for(let o=0;o<t.length;o++){const i=t[o],a=L8(n[o],m8).bgColor;if(r+=i,r>=e)return a}return""})(i,r,o),{tooltipProps:f,getReferenceProps:h}=H9();return e.createElement(e.Fragment,null,e.createElement(q9,Object.assign({text:u},f)),e.createElement("div",Object.assign({ref:n,className:M8(ble("root"),s)},c),a?e.createElement(yle,{values:r}):null,e.createElement("div",{className:M8(ble("barWrapper"),"relative w-full flex items-center h-2")},e.createElement("div",{className:M8("flex-1 flex items-center h-full overflow-hidden rounded-tremor-full")},r.map(((t,n)=>{var r;const i=null!==(r=o[n])&&void 0!==r?r:"gray";return e.createElement("div",{key:`item-${n}`,className:M8(ble("categoryBar"),"h-full",L8(i,m8).bgColor),style:{width:`${t}%`}})}))),void 0!==i?e.createElement("div",Object.assign({ref:f.refs.setReference,className:M8(ble("markerWrapper"),"absolute right-1/2 -translate-x-1/2 w-5"),style:{left:`${i}%`,transition:l?"all 1s":""}},h),e.createElement("div",{className:M8(ble("marker"),"ring-2 mx-auto rounded-tremor-full h-4 w-1","ring-tremor-brand-inverted","dark:ring-dark-tremor-brand-inverted",d)})):null)))}));gle.displayName="CategoryBar";const wle={[i8.Increase]:{bgColor:L8(s8,m8).bgColor},[i8.ModerateIncrease]:{bgColor:L8(s8,m8).bgColor},[i8.Decrease]:{bgColor:L8(d8,m8).bgColor},[i8.ModerateDecrease]:{bgColor:L8(d8,m8).bgColor},[i8.Unchanged]:{bgColor:L8(l8,m8).bgColor}},xle=I8("DeltaBar"),kle=e.forwardRef(((t,n)=>{const{value:r,isIncreasePositive:o=!0,showAnimation:i=!1,className:a,tooltip:u}=t,l=Ar(t,["value","isIncreasePositive","showAnimation","className","tooltip"]),s=T8((e=>e>=0?i8.Increase:i8.Decrease)(r),o),{tooltipProps:c,getReferenceProps:d}=H9();return e.createElement(e.Fragment,null,e.createElement(q9,Object.assign({text:u},c)),e.createElement("div",Object.assign({ref:n,className:M8(xle("root"),"relative flex items-center w-full rounded-tremor-full h-2","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle",a)},l),e.createElement("div",{className:"flex justify-end h-full w-1/2"},r<0?e.createElement("div",Object.assign({ref:c.refs.setReference,className:M8(xle("negativeDeltaBar"),"rounded-l-tremor-full",wle[s].bgColor),style:{width:`${Math.abs(r)}%`,transition:i?"all 1s":""}},d)):null),e.createElement("div",{className:M8(xle("separator"),"ring-2 z-10 rounded-tremor-full h-4 w-1","ring-tremor-brand-inverted bg-tremor-background-emphasis","dark:ring-dark-tremor-brand-inverted dark:bg-dark-tremor-background-emphasis")}),e.createElement("div",{className:M8(xle("positiveDeltaBarWrapper"),"flex justify-start h-full w-1/2")},r>=0?e.createElement("div",Object.assign({ref:c.refs.setReference,className:M8(xle("positiveDeltaBar"),"rounded-r-tremor-full",wle[s].bgColor),style:{width:`${Math.abs(r)}%`,transition:i?"all 1s":""}},d)):null)))}));kle.displayName="DeltaBar";const Ole=I8("MarkerBar"),jle=e.forwardRef(((t,n)=>{const{value:r,minValue:o,maxValue:i,markerTooltip:a,rangeTooltip:u,showAnimation:l=!1,color:s,className:c}=t,d=Ar(t,["value","minValue","maxValue","markerTooltip","rangeTooltip","showAnimation","color","className"]),{tooltipProps:f,getReferenceProps:h}=H9(),{tooltipProps:v,getReferenceProps:p}=H9();return e.createElement("div",Object.assign({ref:n,className:M8(Ole("root"),"relative flex items-center w-full rounded-tremor-full h-2","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle",c)},d),void 0!==o&&void 0!==i?e.createElement(e.Fragment,null,e.createElement(q9,Object.assign({text:u},v)),e.createElement("div",Object.assign({ref:v.refs.setReference,className:M8(Ole("rangeBar"),"absolute h-full rounded-tremor-full","bg-tremor-content-subtle","dark:bg-dark-tremor-content-subtle"),style:{left:`${o}%`,width:i-o+"%",transition:l?"all 1s":""}},p))):null,e.createElement(q9,Object.assign({text:a},f)),e.createElement("div",Object.assign({ref:f.refs.setReference,className:M8(Ole("markerWrapper"),"absolute right-1/2 -translate-x-1/2 w-5"),style:{left:`${r}%`,transition:l?"all 1s":""}},h),e.createElement("div",{className:M8(Ole("marker"),"ring-2 mx-auto rounded-tremor-full h-4 w-1","ring-tremor-brand-inverted","dark:ring-dark-tremor-brand-inverted",s?L8(s,m8).bgColor:"dark:bg-dark-tremor-brand bg-tremor-brand")})))}));jle.displayName="MarkerBar";const Sle=I8("ProgressBar"),Nle=e.forwardRef(((t,n)=>{const{value:r,label:o,color:i,tooltip:a,showAnimation:u=!1,className:l}=t,s=Ar(t,["value","label","color","tooltip","showAnimation","className"]),{tooltipProps:c,getReferenceProps:d}=H9();return e.createElement(e.Fragment,null,e.createElement(q9,Object.assign({text:a},c)),e.createElement("div",Object.assign({ref:n,className:M8(Sle("root"),"flex items-center w-full",l)},s),e.createElement("div",Object.assign({ref:c.refs.setReference,className:M8(Sle("progressBarWrapper"),"relative flex items-center w-full rounded-tremor-full bg-opacity-20 h-2",i?L8(i,m8).bgColor:"bg-tremor-brand-muted/50 dark:bg-dark-tremor-brand-muted")},d),e.createElement("div",{className:M8(Sle("progressBar"),"flex-col h-full rounded-tremor-full",i?L8(i,m8).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand"),style:{width:`${r}%`,transition:u?"all 1s":""}})),o?e.createElement("div",{className:M8(Sle("labelWrapper"),"w-16 truncate text-right ml-2","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.createElement("p",{className:M8(Sle("label"),"shrink-0 whitespace-nowrap truncate text-tremor-default")},o)):null))}));Nle.displayName="ProgressBar";const Mle=I8("ProgressBar"),Cle={xs:{radius:15,strokeWidth:3},sm:{radius:19,strokeWidth:4},md:{radius:32,strokeWidth:6},lg:{radius:52,strokeWidth:8},xl:{radius:80,strokeWidth:10}},Ale=e.forwardRef(((t,n)=>{const{value:r,size:o="md",className:i,showAnimation:a=!0,color:u,tooltip:l,radius:s,strokeWidth:c,children:d}=t,f=Ar(t,["value","size","className","showAnimation","color","tooltip","radius","strokeWidth","children"]),h=void 0===(v=r)?0:v>100?100:v;var v;const p=null!=s?s:Cle[o].radius,m=null!=c?c:Cle[o].strokeWidth,b=p-m/2,y=2*b*Math.PI,g=y-h/100*y,{tooltipProps:w,getReferenceProps:x}=H9();return e.createElement(e.Fragment,null,e.createElement(q9,Object.assign({text:l},w)),e.createElement("div",Object.assign({ref:n,className:M8(Mle("root"),"flex flex-col items-center justify-center",i)},f),e.createElement("svg",Object.assign({ref:w.refs.setReference,width:2*p,height:2*p,viewBox:`0 0 ${2*p} ${2*p}`,className:"transform -rotate-90"},x),e.createElement("circle",{r:b,cx:p,cy:p,strokeWidth:m,fill:"transparent",stroke:"",strokeLinecap:"round",className:M8("transition-colors ease-linear",u?`${L8(u,m8).strokeColor} opacity-20 dark:opacity-25`:"stroke-tremor-brand-muted/50 dark:stroke-dark-tremor-brand-muted")}),h>=0?e.createElement("circle",{r:b,cx:p,cy:p,strokeWidth:m,strokeDasharray:y+" "+y,strokeDashoffset:g,fill:"transparent",stroke:"",strokeLinecap:"round",className:M8("transition-colors ease-linear",u?L8(u,m8).strokeColor:"stroke-tremor-brand dark:stroke-dark-tremor-brand",a?"transition-all duration-300 ease-in-out":"")}):null),e.createElement("div",{className:M8("absolute flex")},d)))}));Ale.displayName="ProgressCircle";const Tle=I8("Tracker"),Ele=e.forwardRef(((t,n)=>{const{color:r,tooltip:o}=t,i=Ar(t,["color","tooltip"]),{tooltipProps:a,getReferenceProps:u}=H9();return e.createElement("div",Object.assign({ref:P8([n,a.refs.setReference]),className:M8(Tle("trackingBlock"),"w-full h-full rounded-[1px] first:rounded-l-[4px] last:rounded-r-[4px]",L8(null!=r?r:"gray",m8).bgColor)},i,u),e.createElement(q9,Object.assign({text:o},a)))}));Ele.displayName="TrackerBlock";const Dle=e.forwardRef(((t,n)=>{const{data:r=[],className:o}=t,i=Ar(t,["data","className"]);return e.createElement("div",Object.assign({ref:n,className:M8(Tle("root"),"h-10 flex items-center space-x-0.5",o)},i),r.map(((t,n)=>{var r;return e.createElement(Ele,{key:null!==(r=t.key)&&void 0!==r?r:n,color:t.color,tooltip:t.tooltip})})))}));function Ple(...e){return Oe(T(e))}Dle.displayName="Tracker";var Ile=async({clientKey:e})=>{try{return e?await(await fetch("https://api.percyx.com/v1/auth/jwt/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientKey:e})})).json():void 0}catch(Ode){return void console.error("Error requesting token:",Ode)}},Lle=P("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),_le=r.forwardRef((({className:e,variant:t,size:n,asChild:o=!1,...i},a)=>r.createElement(o?j:"button",{className:Ple(Lle({variant:t,size:n,className:e})),ref:a,...i})));_le.displayName="Button";var Fle=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:Ple("rounded-xl border bg-card text-card-foreground shadow",e),...t})));Fle.displayName="Card";var Rle=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:Ple("flex flex-col space-y-1.5 p-6",e),...t})));Rle.displayName="CardHeader";var Ble=r.forwardRef((({className:e,...t},n)=>r.createElement("h3",{ref:n,className:Ple("font-semibold leading-none tracking-tight",e),...t})));Ble.displayName="CardTitle";var zle=r.forwardRef((({className:e,...t},n)=>r.createElement("p",{ref:n,className:Ple("text-sm text-muted-foreground",e),...t})));zle.displayName="CardDescription";var $le=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:Ple("p-6 pt-0",e),...t})));$le.displayName="CardContent";var Wle=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:Ple("flex items-center p-6 pt-0",e),...t})));Wle.displayName="CardFooter";var Vle=r.forwardRef((({className:e,...t},n)=>r.createElement(_e,{ref:n,className:Ple("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t})));Vle.displayName=_e.displayName;var Ule=r.forwardRef((({className:e,...t},n)=>r.createElement(Fe,{ref:n,className:Ple("aspect-square h-full w-full",e),...t})));Ule.displayName=Fe.displayName;var Hle=r.forwardRef((({className:e,...t},n)=>r.createElement(Re,{ref:n,className:Ple("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t})));Hle.displayName=Re.displayName;var qle=P("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Kle({className:e,variant:t,...n}){return r.createElement("div",{className:Ple(qle({variant:t}),e),...n})}var Gle=r.forwardRef((({className:e,value:t,...n},o)=>r.createElement(Ze,{ref:o,className:Ple("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n},r.createElement(Qe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}}))));Gle.displayName=Ze.displayName;var Yle=r.forwardRef((({className:e,sideOffset:t=4,...n},o)=>r.createElement(vr,{ref:o,sideOffset:t,className:Ple("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})));Yle.displayName=vr.displayName;var Xle=({className:e,...t})=>r.createElement(qo,{className:Ple(e),...t});Xle.displayName=qo.displayName;var Zle=r.forwardRef((({className:e,...t},n)=>r.createElement(Ko,{className:Ple("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n})));Zle.displayName=Ko.displayName;var Qle=P("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Jle=r.forwardRef((({side:e="right",className:t,children:n,...o},i)=>r.createElement(Xle,null,r.createElement(Zle,null),r.createElement(Go,{ref:i,className:Ple(Qle({side:e}),t),...o},n,r.createElement(Zo,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},r.createElement(li,{className:"h-4 w-4"}),r.createElement("span",{className:"sr-only"},"Close"))))));Jle.displayName=Go.displayName;var ese=r.forwardRef((({className:e,...t},n)=>r.createElement(Yo,{ref:n,className:Ple("text-lg font-semibold text-foreground",e),...t})));ese.displayName=Yo.displayName;var tse=r.forwardRef((({className:e,...t},n)=>r.createElement(Xo,{ref:n,className:Ple("text-sm text-muted-foreground",e),...t})));tse.displayName=Xo.displayName;var nse=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{className:"w-full overflow-auto"},r.createElement("table",{ref:n,className:Ple("w-full caption-bottom text-sm",e),...t}))));nse.displayName="Table";var rse=r.forwardRef((({className:e,...t},n)=>r.createElement("thead",{ref:n,className:Ple("[&_tr]:border-b",e),...t})));rse.displayName="TableHeader";var ose=r.forwardRef((({className:e,...t},n)=>r.createElement("tbody",{ref:n,className:Ple("[&_tr:last-child]:border-0",e),...t})));ose.displayName="TableBody";var ise=r.forwardRef((({className:e,...t},n)=>r.createElement("tfoot",{ref:n,className:Ple("bg-primary font-medium text-primary-foreground",e),...t})));ise.displayName="TableFooter";var ase=r.forwardRef((({className:e,...t},n)=>r.createElement("tr",{ref:n,className:Ple("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})));ase.displayName="TableRow";var use=r.forwardRef((({className:e,...t},n)=>r.createElement("th",{ref:n,className:Ple("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})));use.displayName="TableHead";var lse=r.forwardRef((({className:e,...t},n)=>r.createElement("td",{ref:n,className:Ple("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})));lse.displayName="TableCell";var sse=r.forwardRef((({className:e,...t},n)=>r.createElement("caption",{ref:n,className:Ple("mt-4 text-sm text-muted-foreground",e),...t})));sse.displayName="TableCaption";var cse=r.forwardRef((({className:e,...t},n)=>r.createElement(Qi,{ref:n,className:Ple("border-b",e),...t})));cse.displayName="AccordionItem";var dse=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Ji,{className:"flex"},r.createElement(ea,{ref:o,className:Ple("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n},t,r.createElement(oi,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})))));dse.displayName=ea.displayName;var fse=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(ta,{ref:o,className:Ple("overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...n},r.createElement("div",{className:"pb-4 pt-0"},t))));fse.displayName=ta.displayName;var hse=P("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),vse=r.forwardRef((({className:e,variant:t,...n},o)=>r.createElement("div",{ref:o,role:"alert",className:Ple(hse({variant:t}),e),...n})));vse.displayName="Alert";var pse=r.forwardRef((({className:e,...t},n)=>r.createElement("h5",{ref:n,className:Ple("mb-1 font-medium leading-none tracking-tight",e),...t})));pse.displayName="AlertTitle";var mse=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:Ple("text-sm [&_p]:leading-relaxed",e),...t})));mse.displayName="AlertDescription";var bse=va,yse=pa,gse=({className:e,...t})=>r.createElement(ma,{className:Ple(e),...t});gse.displayName=ma.displayName;var wse=r.forwardRef((({className:e,...t},n)=>r.createElement(ba,{className:Ple("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n})));wse.displayName=ba.displayName;var xse=r.forwardRef((({className:e,...t},n)=>r.createElement(gse,null,r.createElement(wse,null),r.createElement(ya,{ref:n,className:Ple("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...t}))));xse.displayName=ya.displayName;var kse=({className:e,...t})=>r.createElement("div",{className:Ple("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});kse.displayName="AlertDialogFooter";var Ose=r.forwardRef((({className:e,...t},n)=>r.createElement(xa,{ref:n,className:Ple("text-lg font-semibold",e),...t})));Ose.displayName=xa.displayName;var jse=r.forwardRef((({className:e,...t},n)=>r.createElement(ka,{ref:n,className:Ple("text-sm text-muted-foreground",e),...t})));jse.displayName=ka.displayName;var Sse=r.forwardRef((({className:e,...t},n)=>r.createElement(ga,{ref:n,className:Ple(Lle(),e),...t})));Sse.displayName=ga.displayName;var Nse=r.forwardRef((({className:e,...t},n)=>r.createElement(wa,{ref:n,className:Ple(Lle({variant:"outline"}),"mt-2 sm:mt-0",e),...t})));Nse.displayName=wa.displayName;var Mse=r.forwardRef((({className:e,...t},n)=>r.createElement(wl,{ref:n,className:Ple("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t},r.createElement(xl,{className:Ple("flex items-center justify-center text-current")},r.createElement(ni,{className:"h-4 w-4"})))));Mse.displayName=wl.displayName;var Cse=({className:e,...t})=>r.createElement(qo,{className:Ple(e),...t});Cse.displayName=qo.displayName;var Ase=r.forwardRef((({className:e,...t},n)=>r.createElement(Ko,{ref:n,className:Ple("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})));Ase.displayName=Ko.displayName;var Tse=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Cse,null,r.createElement(Ase,null),r.createElement(Go,{ref:o,className:Ple("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...n},t,r.createElement(Zo,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},r.createElement(li,{className:"h-4 w-4"}),r.createElement("span",{className:"sr-only"},"Close"))))));Tse.displayName=Go.displayName;var Ese=r.forwardRef((({className:e,...t},n)=>r.createElement(Yo,{ref:n,className:Ple("text-lg font-semibold leading-none tracking-tight",e),...t})));Ese.displayName=Yo.displayName;var Dse=r.forwardRef((({className:e,...t},n)=>r.createElement(Xo,{ref:n,className:Ple("text-sm text-muted-foreground",e),...t})));Dse.displayName=Xo.displayName;var Pse=r.forwardRef((({className:e,...t},n)=>r.createElement(Ac,{ref:n,className:Ple("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));Pse.displayName=Ac.displayName;var Ise=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},r.createElement(fi,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),r.createElement(Ac.Input,{ref:n,className:Ple("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t}))));Ise.displayName=Ac.Input.displayName;var Lse=r.forwardRef((({className:e,...t},n)=>r.createElement(Ac.List,{ref:n,className:Ple("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));Lse.displayName=Ac.List.displayName;var _se=r.forwardRef(((e,t)=>r.createElement(Ac.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));_se.displayName=Ac.Empty.displayName;var Fse=r.forwardRef((({className:e,...t},n)=>r.createElement(Ac.Group,{ref:n,className:Ple("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));Fse.displayName=Ac.Group.displayName;var Rse=r.forwardRef((({className:e,...t},n)=>r.createElement(Ac.Separator,{ref:n,className:Ple("-mx-1 h-px bg-border",e),...t})));Rse.displayName=Ac.Separator.displayName;var Bse=r.forwardRef((({className:e,...t},n)=>r.createElement(Ac.Item,{ref:n,className:Ple("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t})));Bse.displayName=Ac.Item.displayName;var zse=r.forwardRef((({className:e,inset:t,children:n,...o},i)=>r.createElement(jf,{ref:i,className:Ple("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...o},n,r.createElement(ai,{className:"ml-auto h-4 w-4"}))));zse.displayName=jf.displayName;var $se=r.forwardRef((({className:e,...t},n)=>r.createElement(Sf,{ref:n,className:Ple("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));$se.displayName=Sf.displayName;var Wse=r.forwardRef((({className:e,...t},n)=>r.createElement(mf,null,r.createElement(bf,{ref:n,className:Ple("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}))));Wse.displayName=bf.displayName;var Vse=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(gf,{ref:o,className:Ple("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n})));Vse.displayName=gf.displayName;var Use=r.forwardRef((({className:e,children:t,checked:n,...o},i)=>r.createElement(wf,{ref:i,className:Ple("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...o},r.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},r.createElement(kf,null,r.createElement(ni,{className:"h-4 w-4"}))),t)));Use.displayName=wf.displayName;var Hse=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(xf,{ref:o,className:Ple("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n},r.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},r.createElement(kf,null,r.createElement(ci,{className:"h-4 w-4 fill-current"}))),t)));Hse.displayName=xf.displayName;var qse=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(yf,{ref:o,className:Ple("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n})));qse.displayName=yf.displayName;var Kse=r.forwardRef((({className:e,...t},n)=>r.createElement(Of,{ref:n,className:Ple("-mx-1 my-1 h-px bg-border",e),...t})));Kse.displayName=Of.displayName;var Gse=r.forwardRef((({className:e,inset:t,children:n,...o},i)=>r.createElement(zf,{ref:i,className:Ple("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...o},n,r.createElement(ai,{className:"ml-auto h-4 w-4"}))));Gse.displayName=zf.displayName;var Yse=r.forwardRef((({className:e,...t},n)=>r.createElement($f,{ref:n,className:Ple("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));Yse.displayName=$f.displayName;var Xse=r.forwardRef((({className:e,sideOffset:t=4,...n},o)=>r.createElement(Df,null,r.createElement(Pf,{ref:o,sideOffset:t,className:Ple("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}))));Xse.displayName=Pf.displayName;var Zse=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(Lf,{ref:o,className:Ple("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n})));Zse.displayName=Lf.displayName;var Qse=r.forwardRef((({className:e,children:t,checked:n,...o},i)=>r.createElement(_f,{ref:i,className:Ple("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...o},r.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},r.createElement(Rf,null,r.createElement(ni,{className:"h-4 w-4"}))),t)));Qse.displayName=_f.displayName;var Jse=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Ff,{ref:o,className:Ple("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n},r.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},r.createElement(Rf,null,r.createElement(ci,{className:"h-4 w-4 fill-current"}))),t)));Jse.displayName=Ff.displayName;var ece=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(If,{ref:o,className:Ple("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n})));ece.displayName=If.displayName;var tce=r.forwardRef((({className:e,...t},n)=>r.createElement(Bf,{ref:n,className:Ple("-mx-1 my-1 h-px bg-muted",e),...t})));tce.displayName=Bf.displayName;var nce=P("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),rce=r.forwardRef((({className:e,...t},n)=>r.createElement(Vf,{ref:n,className:Ple(nce(),e),...t})));rce.displayName=Vf.displayName;var oce=r.createContext({}),ice=()=>{let t=r.useContext(oce),n=r.useContext(ace),{getFieldState:o,formState:i}=e.useContext(Wf),a=o(t.name,i);if(!t)throw new Error("useFormField should be used within <FormField>");let{id:u}=n;return{id:u,name:t.name,formItemId:`${u}-form-item`,formDescriptionId:`${u}-form-item-description`,formMessageId:`${u}-form-item-message`,...a}},ace=r.createContext({}),uce=r.forwardRef((({className:e,...t},n)=>{let o=r.useId();return r.createElement(ace.Provider,{value:{id:o}},r.createElement("div",{ref:n,className:Ple("space-y-2",e),...t}))}));uce.displayName="FormItem";var lce=r.forwardRef((({className:e,...t},n)=>{let{error:o,formItemId:i}=ice();return r.createElement(rce,{ref:n,className:Ple(o&&"text-destructive",e),htmlFor:i,...t})}));lce.displayName="FormLabel";var sce=r.forwardRef((({...e},t)=>{let{error:n,formItemId:o,formDescriptionId:i,formMessageId:a}=ice();return r.createElement(j,{ref:t,id:o,"aria-describedby":n?`${i} ${a}`:`${i}`,"aria-invalid":!!n,...e})}));sce.displayName="FormControl";var cce=r.forwardRef((({className:e,...t},n)=>{let{formDescriptionId:o}=ice();return r.createElement("p",{ref:n,id:o,className:Ple("text-[0.8rem] text-muted-foreground",e),...t})}));cce.displayName="FormDescription";var dce=r.forwardRef((({className:e,children:t,...n},o)=>{let{error:i,formMessageId:a}=ice(),u=i?String(i?.message):t;return u?r.createElement("p",{ref:o,id:a,className:Ple("text-[0.8rem] font-medium text-destructive",e),...n},u):null}));dce.displayName="FormMessage";var fce=r.forwardRef((({className:e,type:t,...n},o)=>r.createElement("input",{type:t,className:Ple("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...n})));fce.displayName="Input";var hce=r.forwardRef((({className:e,...t},n)=>r.createElement(uh,{ref:n,className:Ple("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",e),...t})));hce.displayName=uh.displayName;var vce=r.forwardRef((({className:e,...t},n)=>r.createElement(lh,{ref:n,className:Ple("flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),...t})));vce.displayName=lh.displayName;var pce=r.forwardRef((({className:e,inset:t,children:n,...o},i)=>r.createElement(bh,{ref:i,className:Ple("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...o},n,r.createElement(ai,{className:"ml-auto h-4 w-4"}))));pce.displayName=bh.displayName;var mce=r.forwardRef((({className:e,...t},n)=>r.createElement(yh,{ref:n,className:Ple("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));mce.displayName=yh.displayName;var bce=r.forwardRef((({className:e,align:t="start",alignOffset:n=-4,sideOffset:o=8,...i},a)=>r.createElement(sh,null,r.createElement(ch,{ref:a,align:t,alignOffset:n,sideOffset:o,className:Ple("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i}))));bce.displayName=ch.displayName;var yce=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(fh,{ref:o,className:Ple("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n})));yce.displayName=fh.displayName;var gce=r.forwardRef((({className:e,children:t,checked:n,...o},i)=>r.createElement(hh,{ref:i,className:Ple("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...o},r.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},r.createElement(ph,null,r.createElement(ni,{className:"h-4 w-4"}))),t)));gce.displayName=hh.displayName;var wce=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(vh,{ref:o,className:Ple("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n},r.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},r.createElement(ph,null,r.createElement(ci,{className:"h-4 w-4 fill-current"}))),t)));wce.displayName=vh.displayName;var xce=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(dh,{ref:o,className:Ple("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n})));xce.displayName=dh.displayName;var kce=r.forwardRef((({className:e,...t},n)=>r.createElement(mh,{ref:n,className:Ple("-mx-1 my-1 h-px bg-muted",e),...t})));kce.displayName=mh.displayName;var Oce=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(iv,{ref:o,className:Ple("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n},t,r.createElement(Cce,null))));Oce.displayName=iv.displayName;var jce=r.forwardRef((({className:e,...t},n)=>r.createElement(av,{ref:n,className:Ple("group flex flex-1 list-none items-center justify-center space-x-1",e),...t})));jce.displayName=av.displayName;var Sce=P("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Nce=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(uv,{ref:o,className:Ple(Sce(),"group",e),...n},t," ",r.createElement(oi,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"}))));Nce.displayName=uv.displayName;var Mce=r.forwardRef((({className:e,...t},n)=>r.createElement(sv,{ref:n,className:Ple("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t})));Mce.displayName=sv.displayName;var Cce=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{className:Ple("absolute left-0 top-full flex justify-center")},r.createElement(cv,{className:Ple("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:n,...t}))));Cce.displayName=cv.displayName;var Ace=r.forwardRef((({className:e,...t},n)=>r.createElement(lv,{ref:n,className:Ple("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t},r.createElement("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"}))));Ace.displayName=lv.displayName;var Tce=r.forwardRef((({className:e,align:t="center",sideOffset:n=4,...o},i)=>r.createElement(Sv,null,r.createElement(Nv,{ref:i,align:t,sideOffset:n,className:Ple("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}))));Tce.displayName=Nv.displayName;var Ece=r.forwardRef((({className:e,...t},n)=>r.createElement(Hv,{className:Ple("grid gap-2",e),...t,ref:n})));Ece.displayName=Hv.displayName;var Dce=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(qv,{ref:o,className:Ple("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...n},r.createElement(Kv,{className:"flex items-center justify-center"},r.createElement(ni,{className:"h-3.5 w-3.5 fill-primary"})))));Dce.displayName=qv.displayName;var Pce=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Cp,{ref:o,className:Ple("relative overflow-hidden",e),...n},r.createElement(Ap,{className:"h-full w-full rounded-[inherit]"},t),r.createElement(Ice,null),r.createElement(Tp,null))));Pce.displayName=Cp.displayName;var Ice=r.forwardRef((({className:e,orientation:t="vertical",...n},o)=>r.createElement(rp,{ref:o,orientation:t,className:Ple("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n},r.createElement(vp,{className:"relative flex-1 rounded-full bg-border"}))));Ice.displayName=rp.displayName;var Lce=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(bm,{ref:o,className:Ple("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...n},t,r.createElement(ym,{asChild:!0},r.createElement(ei,{className:"h-4 w-4 opacity-50"})))));Lce.displayName=bm.displayName;var _ce=r.forwardRef((({className:e,children:t,position:n="popper",...o},i)=>r.createElement(gm,null,r.createElement(wm,{ref:i,className:Ple("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o},r.createElement(xm,{className:Ple("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t)))));_ce.displayName=wm.displayName;var Fce=r.forwardRef((({className:e,...t},n)=>r.createElement(km,{ref:n,className:Ple("px-2 py-1.5 text-sm font-semibold",e),...t})));Fce.displayName=km.displayName;var Rce=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Om,{ref:o,className:Ple("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n},r.createElement("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},r.createElement(Sm,null,r.createElement(ni,{className:"h-4 w-4"}))),r.createElement(jm,null,t))));Rce.displayName=Om.displayName;var Bce=r.forwardRef((({className:e,...t},n)=>r.createElement(Nm,{ref:n,className:Ple("-mx-1 my-1 h-px bg-muted",e),...t})));Bce.displayName=Nm.displayName;var zce=r.forwardRef((({className:e,orientation:t="horizontal",decorative:n=!0,...o},i)=>r.createElement(Em,{ref:i,decorative:n,orientation:t,className:Ple("shrink-0 bg-border","horizontal"===t?"h-[1px] w-full":"h-full w-[1px]",e),...o})));zce.displayName=Em.displayName;var $ce=r.forwardRef((({className:e,...t},n)=>r.createElement(ob,{ref:n,className:Ple("relative flex w-full touch-none select-none items-center",e),...t},r.createElement(ib,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20"},r.createElement(ab,{className:"absolute h-full bg-primary"})),r.createElement(ub,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"}))));$ce.displayName=ob.displayName;var Wce=r.forwardRef((({className:e,...t},n)=>r.createElement(mb,{className:Ple("peer inline-flex h-[20px] w-[36px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n},r.createElement(bb,{className:Ple("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")}))));Wce.displayName=mb.displayName;var Vce=r.forwardRef((({className:e,...t},n)=>r.createElement(Mb,{ref:n,className:Ple("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t})));Vce.displayName=Mb.displayName;var Uce=r.forwardRef((({className:e,...t},n)=>r.createElement(Cb,{ref:n,className:Ple("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t})));Uce.displayName=Cb.displayName;var Hce=r.forwardRef((({className:e,...t},n)=>r.createElement(Ab,{ref:n,className:Ple("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));Hce.displayName=Ab.displayName;var qce=r.forwardRef((({className:e,...t},n)=>r.createElement("textarea",{className:Ple("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t})));qce.displayName="Textarea";var Kce=r.forwardRef((({className:e,...t},n)=>r.createElement(iy,{ref:n,className:Ple("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t})));Kce.displayName=iy.displayName;var Gce=P("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Yce=r.forwardRef((({className:e,variant:t,...n},o)=>r.createElement(ay,{ref:o,className:Ple(Gce({variant:t}),e),...n})));Yce.displayName=ay.displayName;var Xce=r.forwardRef((({className:e,...t},n)=>r.createElement(sy,{ref:n,className:Ple("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t})));Xce.displayName=sy.displayName;var Zce=r.forwardRef((({className:e,...t},n)=>r.createElement(cy,{ref:n,className:Ple("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t},r.createElement(li,{className:"h-4 w-4"}))));Zce.displayName=cy.displayName;var Qce=r.forwardRef((({className:e,...t},n)=>r.createElement(uy,{ref:n,className:Ple("text-sm font-semibold [&+div]:text-xs",e),...t})));Qce.displayName=uy.displayName;var Jce=r.forwardRef((({className:e,...t},n)=>r.createElement(ly,{ref:n,className:Ple("text-sm opacity-90",e),...t})));Jce.displayName=ly.displayName;var ede=P("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-3",sm:"h-8 px-2",lg:"h-10 px-3"}},defaultVariants:{variant:"default",size:"default"}}),tde=r.forwardRef((({className:e,variant:t,size:n,...o},i)=>r.createElement(dy,{ref:i,className:Ple(ede({variant:t,size:n,className:e})),...o})));function nde({className:e}){return r.createElement("svg",{className:Ple("-ml-1 mr-3 h-5 w-5 animate-spin text-white",e),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},r.createElement("circle",{className:Ple("stroke-brand-400 opacity-25"),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.createElement("path",{className:Ple("fill-brand-500 dark:fill-brand-900 opacity-75"),fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}))}tde.displayName=dy.displayName,nde.displayName="Spinner";var rde=(e=>(e.buyer="buyer",e.seller="seller",e.buyerSeller="buyer-seller",e.broker="broker",e))(rde||{}),ode=class{};ode.ESTIMATES_ENDPOINT_URL="https://api.liberty.percyai.io/property/v1/estimates",ode.ESTIMATED_VALUES_HEADER_TITLE="Estimated Values",ode.ESTIMATED_VALUES_DIALOG_TITLE="How estimated values work",ode.ESTIMATED_VALUES_DIALOG_DESCRIPTION="The values generated here are based on automated computer modeling from public records and may not represent the true value of the home.",ode.ESTIMATED_VALUES_BUTTON_DESCRIPTION="Contact Mortgage Consultant",ode.FORM_TITLE="Learn more about my options",ode.FORM_DESCRIPTION="Get more insights on how your property valuation",ode.FORM_FIRST_NAME_LABEL="First Name *",ode.FORM_FIRST_NAME_PLACEHOLDER="Enter First Name",ode.FORM_EMAIL_ADDRESS_LABEL="Email Address *",ode.FORM_EMAIL_ADDRESS_PLACEHOLDER="Enter Email Adress",ode.FORM_LAST_NAME_LABEL="Last Name *",ode.FORM_LAST_NAME_PLACEHOLDER="Enter Last Name",ode.FORM_PHONE_NUMBER_LABEL="Phone Number *",ode.FORM_PHONE_NUMBER_PLACEHOLDER="Enter Phone Number",ode.FORM_USER_TYPE_LABEL="I am: *",ode.FORM_USER_TYPE_PLACEHOLDER="Please tell us who you are.",ode.FORM_AGENT_CHECK_BOX_DESCRIPTION="Are you currently working with a",ode.FORM_AGENT_CHECK_BOX_AGENT_TYPE="Agent",ode.FORM_AGENT_CHECK_BOX_BROKERAGE_NAME="Percy Realty",ode.FORM_AGENT_NAME_PLACEHOLDER="Enter Agent's Name",ode.FORM_ACTION_BUTTOM="Submit",ode.FIRST_NAME_REQUIRED_VALIDATION_MESSAGE="First Name is required.",ode.EMAIL_ADDRESS_REQUIRED_VALIDATION_MESSAGE="Email address is required.",ode.EMAIL_ADDRESS_FORMAT_VALIDATION_MESSAGE="Email address format is wrong.",ode.LAST_NAME_REQUIRED_VALIDATION_MESSAGE="Last Name is required.",ode.PHONE_NUMBER_REQUIRED_VALIDATION_MESSAGE="Phone Number is required.",ode.PHONE_NUMBER_FORMAT_VALIDATION_MESSAGE="Phone Number format is wrong.",ode.IAM_REQUIRED_VALIDATION_MESSAGE="Please select an option.",ode.HOME_ADDRESS_REQUIRED_VALIDATION_MESSAGE="Home Address is required.",ode.ON_ERROR_OCCURRED="An error occurred while submitting the form. Please try again.",ode.BUYER="A Buyer",ode.SELLER="A Seller",ode.BUYER_SELLER="A Buyer and Seller",ode.BROKER="A Broker/Agent",ode.PERIOD_1="Immediately",ode.PERIOD_2="1 to 3 Months",ode.PERIOD_3="3 to 6 Months",ode.PERIOD_4="6 to 12 Months",ode.PERIOD_5="12+ Months",ode.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL="Message",ode.DYNAMIC_VALUES_BUYER_MESSAGE_PLACEHOLDER="Hello, I am interested in learning more about this property.",ode.DYNAMIC_VALUES_BROKER_MESSAGE_PLACEHOLDER="Hello, I am interested in learning more about this buyer.",ode.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_LABEL="Home Address *",ode.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_PLACEHOLDER="Enter Home Address",ode.DYNAMIC_VALUES_SELLER_APROXIMATE_VALUE_LABEL="Property's Approximate Value",ode.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_LABEL="Time Frame for Selling",ode.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_PLACEHOLDER="Please select a time frame",ode.sellerBuyerSharedContent=[{label:ode.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_LABEL,type:"text",placeholder:ode.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_PLACEHOLDER},{label:ode.DYNAMIC_VALUES_SELLER_APROXIMATE_VALUE_LABEL,type:"number",placeholder:""},{label:ode.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_LABEL,type:"select",placeholder:ode.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_PLACEHOLDER}],ode.DYNAMIC_VALUES={buyer:[{label:ode.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL,type:"textarea",placeholder:ode.DYNAMIC_VALUES_BUYER_MESSAGE_PLACEHOLDER}],seller:ode.sellerBuyerSharedContent,"buyer-seller":ode.sellerBuyerSharedContent,broker:[{label:ode.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL,type:"textarea",placeholder:ode.DYNAMIC_VALUES_BROKER_MESSAGE_PLACEHOLDER}]};var ide=ode,ade=Bg(rde,{required_error:ide.IAM_REQUIRED_VALIDATION_MESSAGE});Rg({firstName:Lg().min(2,{message:ide.FIRST_NAME_REQUIRED_VALIDATION_MESSAGE}),emailAdress:Lg({required_error:ide.EMAIL_ADDRESS_REQUIRED_VALIDATION_MESSAGE}).email({message:ide.EMAIL_ADDRESS_FORMAT_VALIDATION_MESSAGE}),lastName:Lg().min(2,{message:ide.LAST_NAME_REQUIRED_VALIDATION_MESSAGE}),phoneNumber:Lg().min(2,{message:ide.PHONE_NUMBER_REQUIRED_VALIDATION_MESSAGE}),iam:ade,agent:_g().optional(),agentName:Lg().optional(),dynamicValues:Fg(Rg({homeAddress:Lg().min(2,{message:ide.HOME_ADDRESS_REQUIRED_VALIDATION_MESSAGE}).optional(),value:Lg().optional()})).optional()});var ude=class{static EQUITY_MORTGAGE_DETAILS_BANNER_DESCRIPTION(e,t,n,r,o){return`Public records show a ${e} year loan at ${t} for ${n} from ${r}, giving you an estimated loan balance of ${o}. All calculations on this report are based on these numbers, so we want to make sure we get this right!`}static HOW_CALCULATE_INFORMATION_DESCRIPTION(e,t,n,r){return`These numbers are all based on your ${n} year loan at ${e} for ${t} from ${r}.`}static PAY_LITTLE_EXTRA_DESCRIPTION(e,t,n,r){return`Based on your ${e} year loan at ${t} for ${n} from ${r}`}static PAY_LITTLE_EXTRA_EARLIER_MESSAGE(e){return`You would also be done with the loan and no longer making payments ${e} earlier!`}static REFINANCE_OPTIONS_LONG_TERM_MESSAGE(e){return`Long term ${e}`}static REFINANCE_OPTIONS_PAYMENT_PER_MONTH_DESCRIPTION(e,t){return`Payment may go ${e} by ${t}/mo`}static USING_YOUR_EQUITY_SUBTITLE(e){return`With your ${e} in equity, you could afford to`}static USING_EQUITY_BUY_NEW_HOME_DIALOG_HEADLINE(e,t){return`Using ${e} of your estimated equity, you could make a 20% down payment on a new house worth around ${t}.`}static USING_EQUITY_MONTHLY_PRINCIPAL_INTEREST(e,t){return`Your new monthly principal and interest payment on a 30-year mortgage at ${e} APR is estimated at ${t}/mo`}static USING_EQUITY_REMINDER(e,t){return`Reminder: You'll pay ${e}-${t} in fees and commissions when you sell your current home. This cost varies by agent, location, and company.`}static USING_EQUITY_SELL_CASH_HEADLINE(e){return`Are you ready to cash in on your equity? You could sell your home and pocket around ${e}.`}static USING_EQUITY_INVESMENT_PROPERTY_HEADLINE(e,t){return`You could use around ${e} of your equity as a 30% down payment on an investment home worth ${t}.`}static USING_EQUITY_EMERGENCY_FUND_DESCRIPTION_1(e,t){return`With your ${e} in equity, you could have about ${t} to work with depending on market rates, your current financial situation, home occupancy status, and refi goals. (And, it is smart to leave at least 25% of your equity in your home.)`}};function lde({children:e}){return r.createElement("div",{className:Ple("flex justify-center w-full")},e)}function sde({trigger:e,content:t,title:n,asChild:o=!1,actionButtomLabel:i=ude.ACTION_OK_BUTTON_LABEL}){return r.createElement(bse,null,r.createElement(yse,{asChild:o},e),r.createElement(xse,{className:Ple("flex flex-col gap-2 p-6","h-screen lg:h-auto md:h-auto overflow-y-auto")},n&&r.createElement(Ose,null,n),t,r.createElement(kse,null,r.createElement(Sse,null,i))))}function cde({title:e,infoTitle:t,icon:n,infoDescription:o,titleDescription:i,showInfo:a=!0,showIconBackground:u=!0}){let l=r.cloneElement(n,{className:"w-6 h-6"});return r.createElement("div",{className:Ple("flex flex-col items-start")},r.createElement("div",{className:Ple("flex flex-row items-center gap-1")},r.createElement("div",{className:Ple("flex flex-col items-center rounded-[100px] p-2",u?"bg-slate-50":"")},l),r.createElement("h3",{className:Ple("font-semibold leading-8 text-xl md:text-2xl lg:text-2xl text-gray-700")},e),a&&r.createElement(sde,{asChild:!0,title:t,trigger:r.createElement(py,{className:Ple("w-5 h-5 text-gray-400")}),content:o})),i&&r.createElement("p",{className:Ple("text-gray-400 ml-[50px] text-xs md:text-sm lg:text-sm")},i))}function dde({icon:e,infoDescription:t,title:n,titleDescription:o,infoTitle:i,actions:a,showInfo:u=!0,showActions:l=!1,showIconBackground:s=!0}){return r.createElement("div",{className:Ple("flex flex-col md:flex-row lg:flex-row justify-between items-stretch py-3 shadow-sm pr-1 ")},r.createElement(cde,{title:n,titleDescription:o,infoTitle:i,icon:e,infoDescription:t,showInfo:u,showIconBackground:s}),l&&a&&a)}function fde(){let[t,n]=r.useState(),o=function(t){const n=e.useCallback((()=>{if("undefined"==typeof window)return null;try{const e=window.localStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return console.warn(`Error reading localStorage key “${t}”:`,e),null}}),[t]),[r,o]=e.useState(n);e.useEffect((()=>{o(n())}),[]);const i=e.useCallback((e=>{(null==e?void 0:e.key)&&e.key!==t||o(n())}),[t,n]);return zg("storage",i),zg("local-storage",i),r}("selectedAddress");return r.useEffect((()=>{if(o&&o.latlng){let e=o.latlng.split("&").map((e=>e.split("=")[1])),t=parseFloat(e[1]),r=parseFloat(e[2]);n({lat:t,lng:r})}}),[o?.latlng]),{address:o,location:t}}ude.ACTION_OK_BUTTON_LABEL="OK",ude.DESCRIPTION_YEARS_LABEL="Years",ude.YEAR=" year",ude.PLURAL="s ",ude.AND=" and ",ude.MONTH=" month",ude.RATE=" rate",ude.HOME_GUIDE_URL="https://homeguide.com/costs/home-addition-cost",ude.HOME_GUIDE="homeguide.com 2020",ude.EL_ISSA="El Issa, 2019",ude.EL_ISSA_URL="https://www.nerdwallet.com/blog/average-credit-card-debt-household/",ude.TICAS="TICAS, Student Debt and the Class of 2018",ude.TICAS_URL="https://ticas.org/wp-content/uploads/2019/09/classof2018.pdf",ude.NO_DATA_AVAILABLE_LABEL="No Data Available",ude.ACTION_BUTTON_BEST_OPTION_LABEL="Which option is best for me?",ude.LEARN_MORE_LABEL="Learn more about this",ude.EDIT_DETAILS_LABEL="Edit Details",ude.WHY_PAY_MORE_LABEL="Why Pay More?",ude.EARLY_LOAN_LABEL="Early Loan Payoff Information",ude.ASK_AGENT_LABEL="Ask an Agent",ude.CONFIGURATION_ERROR_LABEL="Configuration Error",ude.CONFIGURATION_ERROR_KEY_EXPIRED_LABEL="Key is expired",ude.EQUITY_MORTGAGE_DETAILS_HEADER_TITLE="Equity In Your Home",ude.EQUITY_MORTGAGE_DETAILS_DESCRIPTION="Equity is your home's worth to you!",ude.EQUITY_MORTGAGE_DETAILS_ALL_GOOD_BUTTON="All Good",ude.EQUITY_MORTGAGE_DETAILS_BANNER_TITLE="Verify Your Mortgage Details",ude.EQUITY_MORTGAGE_DETAILS_TITLE="Estimated Equity Today",ude.EQUITY_MORTGAGE_DETAILS_HOW_CALCULATED="How is this calculated?",ude.EQUITY_MORTGAGE_DETAILS_DISCLAIMER="Disclaimer",ude.EDIT_MORTGAGE_DETAILS_FORM_TITLE="Edit Mortgage Info",ude.EDIT_MORTGAGE_DETAILS_LOAN_START_DATE_LABEL="Loan Start Date",ude.EDIT_MORTGAGE_DETAILS_LOAN_TERM_LABEL="Loan Term",ude.EDIT_MORTGAGE_DETAILS_INTEREST_RATE_LABEL="Interest Rate",ude.EDIT_MORTGAGE_DETAILS_ORIGINAL_LOAN_AMOUNT_LABEL="Original Loan Amount",ude.EDIT_MORTGAGE_DETAILS_BALANCE_LABEL="Estimated Mortgage Balance",ude.EDIT_MORTGAGE_DETAILS_DISCLAIMER_TEXT="This message is for information purposes only and is not an advertisement to extend customer credit as defined by Section 12 CFR 1026.2 Regulation Z. Program rates, terms, and conditions are subject to change at any time. All examples of potential mortgage products above are estimates for illustration purposes only. All programs and mortgage products are subject to borrower income, credit, and property approval. Not all borrowers will qualify. This is not an offer for extension of credit or a commitment to lend. Home valuations are estimates purchased from a third-party data provider. Actual appraised value at the time of a transaction may vary. Equal Housing Lender. Interest rates used are based on a reasonably current index and margin from the Freddie Mac Primary Mortgage Market Survey.",ude.HOW_CALCULATE_TITLE="How Is My Net Worth Calculated?",ude.HOW_CALCULATE_DESCRIPTION='Your net worth ("equity") is made up of two things.',ude.HOW_CALCULATE_HOME_VALUE_LABEL="Home Value",ude.HOW_CALCULATE_LOAN_BALANCE_LABEL="Loan Balance",ude.HOW_CALCULATE_YOUR_NET_WORTH_LABEL="Your Net Worth",ude.HOW_CALCULATE_INFORMATION_SUBTITLE="Where does this information come from?",ude.HOW_CALCULATE_NOTE_DESCRIPTION="Note: Only the first lien mortgage and resale are used to calculate the balance of your loan.",ude.PAY_LITTLE_EXTRA_HEADER_TITLE="Pay A Little Extra",ude.PAY_LITTLE_EXTRA_SUBTITLE="How much more can you pay per month?",ude.PAY_LITTLE_EXTRA_CALCULATION_IF_YOU_PAY="If you pay just ",ude.PAY_LITTLE_EXTRA_CALCULATION_MORE=" more each month, you could save",ude.PAY_LITTLE_EXTRA_CALCULATION_DESCRIPTION="in interest over the rest of your loan",ude.PAY_LITTLE_EXTRA_INFO_DESCRIPTION="You would also be done with the loan and no longer making payments 10 years and 2 months earlier!",ude.PAY_LITTLE_EXTRA_PAYING_EXTRA="Paying extra can be an easy way to save.",ude.PAY_LITTLE_EXTRA_PAYING_EXTRA_DESCRIPTION="Your mortgage payment is typically defined as your principal and interest payment. When you pay extra on your principal balance, you can reduce the amount of your loan and save money on interest.",ude.PAY_LITTLE_EXTRA_PAYING_EXTRA_BEST_PART="The best part is that there's no paperwork, fees or headaches.",ude.PAY_LITTLE_EXTRA_PAYING_EXTRA_IMPORTANT_TIP="*Important Tip* ",ude.PAY_LITTLE_EXTRA_PAYING_EXTRA_IMPORTANT_TIP_DESCRIPTION="contact your mortgage servicer to indicate your extra payment is for principal reduction (to ensure it is not accidentally applied to an extra payment, extra interest, or towards escrow).",ude.PAY_LITTLE_EXTRA_LENGTH_LOAN_REMAIN_MESSAGE="The length of your loan would remain unchanged with this extra payment.",ude.CONTACT_AGENT_TITLE="We Might Have The Perferct Buyer For Your Home",ude.CONTACT_AGENT_DESCRIPTION="Click the button and we'll look though our buyer database for you.",ude.REFINANCE_OPTIONS_HEADER_TITLE="Refinance Options",ude.REFINANCE_OPTIONS_HEADER_SUBTITLE="With a refinance of your loan, you could save",ude.REFINANCE_OPTIONS_LEARN_MORE_DESCRIPTION='\n All loans are subject to credit approval. Interest rates are subject to\n change daily and without notice. Current interest rates shown are\n indicative of market conditions and individual qualifications and will\n vary upon your lock-in period, loan type, credit score, purpose and loan\n to value. Rates can come directly from our lender partners or our\n agreement with <a href="https://www2.optimalblue.com/obmmi/" target="_blank" rel="noopener noreferrer">OBMMI™</a> ("Optimal Blue Mortgage Market Indices"). These\n indices leverage data from Optimal Blue PPE lock requests (approximately\n 35% of all locks nationwide) aggregated on a daily basis and updated\n nightly with the previous day\'s locks. Contact a loan officer for the\n most up-to-date rates with specific loan quote details, and check\n current market.\n ',ude.REFINANCE_OPTIONS_FIFTEEN_YEAR_FIXED_LABEL="15 Year Fixed",ude.REFINANCE_OPTIONS_THIRTY_YEAR_FIXED_LABEL="30 Year Fixed",ude.REFINANCE_OPTIONS_NO_SAVINGS_MESSAGE="No net loss or savings",ude.REFINANCE_OPTIONS_LOSS_LABEL="loss",ude.REFINANCE_OPTIONS_SAVINGS_LABEL="savings",ude.REFINANCE_OPTIONS_PAYMENTS_NOCHANGE_MESSAGE="Payment will not change",ude.REFINANCE_OPTIONS_NO_CHANGE_LABEL="No Change",ude.REFINANCE_OPTIONS_GO_UP_LABEL="Go Up",ude.REFINANCE_OPTIONS_GO_DOWN_LABEL="Go Down",ude.REFINANCE_OPTIONS_UP_LABEL="up",ude.REFINANCE_OPTIONS_DOWN_LABEL="down",ude.USING_YOUR_EQUITY_HEADER_TITLE="Using Your Equity",ude.USING_EQUITY_BUY_NEW_HOME="Buy a new home",ude.USING_EQUITY_GET_MORE_SQUARE_FOOTAGE="Get more square footage, a larger yard, or switch neighborhoods - you have options!",ude.USING_EQUITY_SELL_CASH_DESCRIPTION_1="You may be exempt from capital gains taxes if you've owned and lived in the home for at least two out of the last five years.",ude.USING_EQUITY_SELL_CASH_DESCRIPTION_2="Up to $250,000 in profit may be tax-free for unmarried individuals and up to $500,000 for married couples.",ude.USING_EQUITY_SELL_CASH_DESCRIPTION_3="You could also downsize into a cheaper home using a portion of your equity and save the rest.",ude.USING_EQUITY_CONSULT_TAX_ADVISOR="Always consult a professional tax advisor to understand implications for your specific situation.",ude.USING_EQUITY_RENTAL_INCOME="Possibly use rental income to cover some or all of your new mortgage payment.",ude.USING_EQUITY_EXPENSES_DEDUCTED="Consult your professional tax advisor to see if expenses related to this property can be deducted.",ude.USING_EQUITY_LANDLORD="Consider if you have time to be a landlord (or if you should hire a property manager).",ude.USING_EQUITY_CONSULT_A_LOAN_OFFICER="Consult a loan officer",ude.USING_EQUITY_BUY_INVESMENT_PROPERTY="Buy an investment property",ude.USING_EQUITY_INVESMENT_PROPERTY="Investment Property",ude.USING_EQUITY_SELL_CASH="Sell & pocket cash",ude.USING_EQUITY_HOME_IMPROVEMENTS="Make home improvements",ude.USING_EQUITY_LIVABLE_SPACE="Add more livable space",ude.USING_EQUITY_EMERGENCY_FUND="Create emergency fund",ude.USING_EQUITY_CREDIT_CARD_DEBT="Eliminate credit card debt",ude.USING_EQUITY_VACATION="Splurge on a dream vacation",ude.USING_EQUITY_STUDENT_LOANS="Pay down student loans",ude.USING_EQUITY_HOME_INPROVEMENTS_HEADLINE="Renovations can make us happier in the place we call home and using equity is a great way to let your home pay for its own improvements. To ensure you're choosing a project that will yield a return on investment, consult a loan officer or real estate expert.",ude.USING_EQUITY_HOME_INPROVEMENTS_TAX_DEDUCTIBLE="Equity used for home improvements is still tax-deductible in many cases. (Always consult a professional tax advisor)",ude.USING_EQUITY_HOME_INPROVEMENTS_GARAGE_DOOR="The highest value improvements are garage door replacement (and other curb appeal projects), minor kitchen remodels, and universal bathroom remodels.",ude.USING_EQUITY_HOME_INPROVEMENTS_GARAGE_SUNROOM="The lowest value improvements are sunroom, swimming pools, and bathroom additions.",ude.USING_EQUITY_HOME_INPROVEMENTS_GARAGE_SOURCE="Source: HGTV.",ude.USING_EQUITY_EMERGENCY_FUND_HEADLINE="During uncertain times, you still have some things within your control. Having access to 6-12 months of living expenses can prepare you for whatever happens next. ",ude.USING_EQUITY_EMERGENCY_FUND_DESCRIPTION_2="A cash-out refi or second loan can give you easy access to cash for when you need it most.",ude.USING_EQUITY_EMERGENCY_FUND_DESCRIPTION_3="Make sure to stay disciplined and only use the money for true emergencies.",ude.USING_EQUITY_LIVABLE_SPACE_HEADLINE="The average cost to build a home addition or add a room is $48,000, with most homeowners spending between $22,500 and $74,000.",ude.USING_EQUITY_LIVABLE_SPACE_DESCRIPTION_1='"The majority of additions add value and offer a 50% return on investment." ',ude.USING_EQUITY_LIVABLE_SPACE_DESCRIPTION_2="If local ordinances allow it could be used as a rental.",ude.USING_EQUITY_LIVABLE_SPACE_DESCRIPTION_3="Qualifies as a home improvement so equity interest is tax-deductible.",ude.USING_EQUITY_STUDENT_LOANS_HEADLINE="Borrowers from the Class of 2018 owed an average of $29,200, a 2 percent increase from the average of $28,650 in 2017. Using equity to pay off your loans could be an option as long as you understand the associated risks. ",ude.USING_EQUITY_STUDENT_LOANS_DESCRIPTION_1="Home equity rates are often (but not always) less than student loans.",ude.USING_EQUITY_STUDENT_LOANS_DESCRIPTION_2="Paying off student loans is a great way to establish credit history.",ude.USING_EQUITY_STUDENT_LOANS_DESCRIPTION_3="Equity lines and loans use your house as collateral and may disqualify you from many student debt forgiveness or cancellation programs.",ude.USING_EQUITY_CREDIT_DEBT_HEADLINE="The average U.S. household with revolving credit card debt has an estimated balance of $6,849 as of September 2019 [2], costing an average of $1,162 in annual interest [3]. ",ude.USING_EQUITY_CREDIT_DEBT_DESCRIPTION_1="Home equity rates are often substantially lower than those on credit cards",ude.USING_EQUITY_CREDIT_DEBT_DESCRIPTION_2="You can consolidate multiple high-interest balances into a single monthly payment and potentially improve your monthly cash flow.",ude.USING_EQUITY_CREDIT_DEBT_DESCRIPTION_3="Be disciplined and create a short-term plan to pay off this debt because your house is used as collateral.",ude.USING_EQUITY_VACATION_HEADLINE="Using home equity on your dream vacation is not a wise financial decision. Focus your home equity on wealth building activities or paying down debt. If you really want that dream vacation to the Maldives, plan ahead and put some savings aside each month. Try these options instead:",ude.LOAN_AMOUNT_CANNOT_EXCEED="The remaining loan amount cannot exceed the initial loan principal.",ude.VALUE_GREATER_THAN_ZERO="The value must be greater than 0.",ude.EXCELENT_INVESTMENT="Excellent Investment",ude.MODERATE_INVESTMENT="Moderate Investment",ude.POOR_INVESTMENT="Poor Investment",ude.EXCELENT_INVESTMENT_DESCRIPTION="High potential, recommended for consideration.",ude.MODERATE_INVESTMENT_DESCRIPTION="Average potential, consider with caution.",ude.POOR_INVESTMENT_DESCRIPTION="Low potential, strongly advised to avoid.";var hde=function({apiKey:e,mapOptions:t,geoJsonLayerInput:n,markers:o,markersIcon:i,markerEvents:a}){let u=r.useRef(null),[l,s]=r.useState(null),[c,d]=r.useState(null),[f,h]=r.useState(null),[v,p]=r.useState(!1);r.useEffect((()=>(u.current&&new qg({apiKey:e??"AIzaSyASLd0x2iEVZpo9r0NBC8beqN_YRFRm_dM"}).importLibrary("maps").then((()=>{t.center||(t.center={lat:39.8283,lng:-98.5795}),u.current&&m(u.current,t)})),()=>{c&&clearInterval(c)})),[]);let m=(e,t)=>{s(new google.maps.Map(e,{zoomControlOptions:{position:23},...t})),n&&w(n),b(o),p(!0)},b=(e,t,n)=>{if(!l||!e)return;let r=new google.maps.LatLngBounds;e.forEach(((e,t)=>{r.extend(new google.maps.LatLng(e.lat,e.lng));let n=new google.maps.Marker({position:{lat:e.lat,lng:e.lng},map:l,icon:e.icon??i,label:e.label});a&&a(t,n)})),l.setCenter(r.getCenter()),l.setZoom(t??3),n&&new google.maps.Marker({position:r.getCenter(),map:l,icon:n})},y=r.useCallback((async({coordinates:e})=>{if(!l||!e)return!1;let t=new google.maps.StreetViewService;return new Promise((n=>{t.getPanorama({location:e},((e,t)=>{n(t===google.maps.StreetViewStatus.OK)}))}))}),[l]),g=e=>{l&&(l.setStreetView(e),(()=>{let e=l?.getStreetView();if(!e)return;let t=setInterval((()=>{let t=e.getPov();e.setPov({heading:t.heading+.7,pitch:t.pitch})}),70);d(t)})(),h(e))},w=({center:e,geoJson:t})=>{if(!l||!t)return;e&&(l.setCenter(e),new google.maps.Marker({position:e,map:l}));let n=new google.maps.Data;n.addGeoJson(t),n.setStyle((e=>({fillColor:e.getProperty("color")??"#FFFFCC",strokeWeight:1,fillOpacity:.5,strokeColor:"white"}))),n.setMap(l)};return{mapRef:u,setGeojson:w,setMarkers:b,setPanorama:async(e,t)=>{if(l)if(await y({coordinates:e})){if(f)return void f.setPosition(e);let n=((e,t)=>new google.maps.StreetViewPanorama(u.current,{position:e,disableDefaultUI:!0,pov:{heading:t?.heading??34,pitch:t?.pitch??10}}))(e,t);g(n)}else(e=>{l&&(l.setStreetView(null),l.setMapTypeId(google.maps.MapTypeId.SATELLITE),l.setCenter(e),l.setZoom(18),h(null))})(e)},zoomHandler:(e,t)=>{l&&(l.setCenter(e),l.setZoom(t))},isMapReady:v}},vde=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#686868"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{lightness:"-22"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{saturation:"11"},{lightness:"-51"}]},{featureType:"road.highway",elementType:"labels.text",stylers:[{saturation:"3"},{lightness:"-56"},{weight:"2.20"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{lightness:"-52"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{weight:"6.13"}]},{featureType:"road.highway",elementType:"labels.icon",stylers:[{lightness:"-10"},{gamma:"0.94"},{weight:"1.24"},{saturation:"-100"},{visibility:"off"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{lightness:"-16"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{saturation:"-41"},{lightness:"-41"}]},{featureType:"road.arterial",elementType:"labels.text.stroke",stylers:[{weight:"5.46"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{weight:"0.72"},{lightness:"-16"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{lightness:"-37"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#b7e4f4"},{visibility:"on"}]}];function pde({message:e=ude.NO_DATA_AVAILABLE_LABEL,mapHeight:t="420px"}){let n="text-gray-500";return r.createElement("div",{className:"absolute top-0 left-0 w-full h-full rounded-lg flex flex-col justify-center items-center",style:{maxHeight:t,height:t,backgroundColor:"rgb(255 255 255 / 0.6)"}},r.createElement(by,{strokeWidth:.4,size:96,className:Ple(n)}),r.createElement("p",{className:Ple(n)},e))}var mde=["#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"];function bde(){return r.createElement("div",{className:Ple("absolute top-4 left-4 bg-white bg-opacity-70 p-2 shadow-lg flex flex-col")},r.createElement("div",{className:Ple("flex justify-between")},r.createElement("div",{className:Ple("text-left text-xs")},"Active"),r.createElement("div",{className:Ple("text-right text-xs")},"Very Active")),r.createElement("div",{className:Ple("flex flex-col items-center space-y-2")},r.createElement("div",{className:Ple("flex")},mde.map(((e,t)=>r.createElement("div",{key:t,className:Ple("w-4 h-4"),style:{backgroundColor:e}}))))))}Vu(al(new Date,1),"yyyy-MM-dd"),Vu(al(new Date,1),"yyyy-MM-dd");var yde=e=>null!=e&&"object"==typeof e&&Number.isFinite(e.lat)&&Number.isFinite(e.lng);TF.createCustomEqual((e=>({areObjectsEqual:(e,t)=>yde(e)||e instanceof google.maps.LatLng||yde(t)||t instanceof google.maps.LatLng?new google.maps.LatLng(e).equals(new google.maps.LatLng(t)):TF.deepEqual(e,t)}))),r.forwardRef((({linkTextColor:e="text-gray-500",icon:t,text:n},o)=>r.createElement("div",{ref:o,className:Ple("flex flex-row items-center gap-2")},t&&r.cloneElement(t,{className:Ple("h-4 w-4",e,t.props.className)}),r.createElement("p",{className:Ple("text-sm hover:cursor-pointer",e)},n))));var gde=(e=>(e[e.listingOpportunities=0]="listingOpportunities",e[e.listingWins=1]="listingWins",e[e.listingClosed=2]="listingClosed",e[e.lostOpportunities=3]="lostOpportunities",e))(gde||{});function wde(e,t){if(0===e.length)return{};if(!t)return{"":e};let n={};return e.forEach((e=>{let r=e[t]||"";n[r]||(n[r]=[]),n[r].push(e)})),n}var xde=r.forwardRef((({className:e,...t},n)=>_c((e=>0===e.filtered.count))?r.createElement("div",{ref:n,className:Ple("py-6 text-center text-sm",e),"cmdk-empty":"",role:"presentation",...t}):null));xde.displayName="CommandEmpty";var kde=r.forwardRef((({value:e,onChange:t,placeholder:n,defaultOptions:o=[],options:i,delay:a,onSearch:u,loadingIndicator:l,emptyIndicator:s,maxSelected:c=Number.MAX_SAFE_INTEGER,onMaxSelected:d,hidePlaceholderWhenSelected:f,disabled:h,groupBy:v,className:p,badgeClassName:m,selectFirstItem:b=!0,creatable:y=!1,triggerSearchOnFocus:g=!1,enableClear:w=!0,isLoading:x=!1,commandProps:k,inputProps:O},j)=>{let S=r.useRef(null),[N,M]=r.useState(!1),[C,A]=r.useState(!1),[T,E]=r.useState(e||[]),[D,P]=r.useState(wde(o,v)),[I,L]=r.useState(""),_=function(e,t){let[n,o]=r.useState(e);return r.useEffect((()=>{let n=setTimeout((()=>o(e)),t||500);return()=>{clearTimeout(n)}}),[e,t]),n}(I,a||500);r.useImperativeHandle(j,(()=>({selectedValue:[...T],input:S.current})),[T]);let F=r.useCallback((e=>{let n=T.filter((t=>t.value!==e.value));E(n),t?.(n)}),[T]),R=r.useCallback((e=>{let t=S.current;t&&(("Delete"===e.key||"Backspace"===e.key)&&""===t.value&&T.length>0&&F(T[T.length-1]),"Escape"===e.key&&t.blur())}),[T]);r.useEffect((()=>{e&&E(e)}),[e]),r.useEffect((()=>{if(!i||u)return;let e=wde(i||[],v);JSON.stringify(e)!==JSON.stringify(D)&&P(e)}),[o,i,v,u,D]),r.useEffect((()=>{let e=async()=>{A(!0);let e=await(u?.(_));P(wde(e||[],v)),A(!1)};(async()=>{!u||!N||(g&&await e(),_&&await e())})()}),[_,N]);let B=r.useCallback((()=>{if(s)return u&&!y&&0===Object.keys(D).length?r.createElement(Bse,{value:"-",disabled:!0},s):r.createElement(xde,null,s)}),[y,s,u,D]),z=r.useMemo((()=>function(e,t){let n=JSON.parse(JSON.stringify(e));for(let[r,o]of Object.entries(n))n[r]=o.filter((e=>!t.find((t=>t.value===e.value))));return n}(D,T)),[D,T]),$=r.useCallback((()=>k?.filter?k.filter:y?(e,t)=>e.toLowerCase().includes(t.toLowerCase())?1:-1:void 0),[y,k?.filter]);return r.createElement(Pse,{...k,onKeyDown:e=>{R(e),k?.onKeyDown?.(e)},className:Ple("overflow-visible bg-transparent",k?.className),shouldFilter:void 0!==k?.shouldFilter?k.shouldFilter:!u,filter:$()},r.createElement("div",{className:Ple("group rounded-md border border-input px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 space-x-3",p)},r.createElement("div",{className:"flex flex-wrap gap-1"},T.map((e=>r.createElement(Kle,{key:e.value,className:Ple("data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground","data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground",m),"data-fixed":e.fixed,"data-disabled":h},e.label,r.createElement("button",{className:Ple("ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",(h||e.fixed)&&"hidden"),onKeyDown:t=>{"Enter"===t.key&&F(e)},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:()=>F(e)},r.createElement(yy,{className:Ple(` ${w?"h-3 w-3 text-muted-foreground hover:text-foreground":"hidden"} `)}))))),r.createElement("div",{className:"flex flex-row items-center justify-center gap-1 static"},x&&r.createElement(nde,{className:"h-4 text-gray-800 m-0 "}),r.createElement(Ac.Input,{...O,ref:S,value:I,disabled:h,onValueChange:e=>{L(e),O?.onValueChange?.(e)},onBlur:e=>{M(!1),O?.onBlur?.(e)},onFocus:e=>{M(!0),g&&u?.(_),O?.onFocus?.(e)},placeholder:f&&0!==T.length?"":n,className:Ple("ml-2 flex-1 bg-transparent outline-none placeholder:text-muted-foreground",O?.className)})))),r.createElement("div",{className:"relative mt-2"},N&&r.createElement(Lse,{className:"absolute top-0 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in"},C?r.createElement(r.Fragment,null,l):r.createElement(r.Fragment,null,B(),(()=>{if(!y)return;let e=r.createElement(Bse,{value:I,className:"cursor-pointer",onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:e=>{if(T.length>=c)return void d?.(T.length);L("");let n=[...T,{value:e,label:e}];E(n),t?.(n)}},`Create "${I}"`);return!u&&I.length>0||u&&_.length>0&&!C?e:void 0})(),!b&&r.createElement(Bse,{value:"-",className:"hidden"}),Object.entries(z).map((([e,n])=>r.createElement(Fse,{key:e,heading:e,className:"h-full overflow-auto"},r.createElement(r.Fragment,null,n.map((e=>r.createElement(Bse,{key:e.value,value:e.value,disabled:e.disable,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:()=>{if(T.length>=c){if(1===c){L(""),E([]);let n=[e];E(n),t?.(n)}return void d?.(T.length)}L("");let n=[...T,e];E(n),t?.(n)},className:Ple("cursor-pointer",e.disable&&"cursor-default text-muted-foreground")},e.label)))))))))))}));kde.displayName="MultipleSelector";var Ode=function(e,t={}){return function(e,t,n){var r,o,i;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]);const u=(Array.isArray(t.props)?t.props.slice():Object.keys(t.props)).filter((e=>"container"!==e)),l={},s={},m={};for(const a of u){l[a]=Array.isArray(t.props)?"string":t.props[a];const e=p(a);s[a]=e,m[e]=a}class b extends HTMLElement{constructor(){super(),a(this,r,!0),a(this,o),a(this,i,{}),a(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[v].container=this.container;for(const e of u){const t=s[e],n=this.getAttribute(t),r=l[e],o=c[r];n&&null!=o&&o.parse&&(this[v][e]=o.parse(n,this))}}static get observedAttributes(){return Object.keys(m)}connectedCallback(){this[f]=!0,this[d]()}disconnectedCallback(){this[f]=!1,this[h]&&n.unmount(this[h])}attributeChangedCallback(e,t,n){const r=m[e],o=l[r],i=c[o];r in l&&null!=i&&i.parse&&(this[v][r]=i.parse(n,this),this[d]())}[(r=f,o=h,i=v,d)](){this[f]&&(this[h]?n.update(this[h],this[v]):this[h]=n.mount(this.container,e,this[v]))}}for(const a of u){const e=s[a],t=l[a];Object.defineProperty(b.prototype,a,{enumerable:!0,configurable:!0,get(){return this[v][a]},set(n){this[v][a]=n;const r=c[t];if(null!=r&&r.stringify){const t=r.stringify(n);this.getAttribute(e)!==t&&this.setAttribute(e,t)}}})}return b}(e,t,{mount:y,update:g,unmount:w})}((function({zipcode:e,url:t="https://api.liberty.percyai.io/location/v1/heatmap",zoomLevel:n=10,zoomControl:o=!0,googleApiKey:i,clientKey:a,apiKey:u,height:l="420px"}){let[s,c]=r.useState(!1),{request:d,isLoading:f,tokens:h,isExternal:v}=(({clientKey:e,apiKey:t,loadingInitialState:n="loading"})=>{let[o,i]=r.useState(void 0),[a,u]=r.useState(void 0),[l,s]=r.useState((()=>"loading"===n)),c=!!e;r.useEffect((()=>{!o?.token&&e&&async function(){let t=await Ile({clientKey:e});i(t)}()}),[o]);let d=r.useCallback((async n=>{let{url:r,requestInit:a}=n,{headers:l,...d}=a??{},f=o,h={"Content-Type":"application/json",...f?.token&&{Authorization:`Bearer ${f?.token}`},...t&&{"x-api-key":t},...l};s(!0),u(!1);try{if(c&&!o?.token||!c&&!t)return;!o?.token&&e&&(f=await Ile({clientKey:e}),i(f));let n=await(await fetch(r,{headers:h,...d})).json();return s(!1),n}catch(g){return void(g instanceof DOMException&&"AbortError"===g.name?(console.log(`The request was aborted by the user: ${r}`),s(!0)):(console.error(`Error requesting: ${r}`,g),s(!1)))}}),[o,e,t]);return{isLoading:l,tokens:o,request:d,isExternal:c}})({clientKey:a,apiKey:u}),{address:p}=fde(),m=e||p?.zipcode,b=((e,t)=>e?.config?e.config.find((e=>e.name===t)):{})(h?.meta,"color"),y=r.useMemo((()=>({zoom:n,draggable:!1,scrollwheel:!1,fullscreenControl:!1,gestureHandling:"none",zoomControl:o,styles:vde,disableDefaultUI:!0})),[n,o]),{mapRef:g,setGeojson:w,isMapReady:x}=hde({mapOptions:y,apiKey:i});return r.useEffect((()=>{!async function(){if(m?.length&&t.length&&x){let e=new URL(t);e.searchParams.set("zipcode",m),b?.value&&e.searchParams.set("colors",b?.value);try{let t=await d({url:e.toString()});(!v&&!t?.data||h&&v&&!t?.data)&&c(!0),t?.data&&w(t.data)}catch(ule){console.error("Error fetching heatmap data:",ule)}}}()}),[a,u,h,x,m]),r.createElement("div",{className:Ple("flex flex-col bg-white w-full")},r.createElement(dde,{title:"Heat Map",infoDescription:"The best way to visualize the distribution of data in a geographical area.",infoTitle:"Heat Map",icon:r.createElement(my,null)}),r.createElement(lde,null,r.createElement("div",{className:Ple("w-full justify-center m-3 lg:m-8 md:m-8")},r.createElement("div",{className:Ple("relative rounded-lg overflow-hidden w-full",{"animate-pulse rounded-lg bg-primary/10":f}),style:{maxHeight:l,height:l}},r.createElement("div",{ref:g,className:Ple("w-full h-full")}),r.createElement(bde,null),s&&r.createElement(pde,null)))))}),{props:{zipcode:"string",url:"string",zoomLevel:"number",zoomControl:"boolean",googleApiKey:"string",clientKey:"string",apiKey:"string"}});customElements&&customElements.define("heat-map",Ode)}));
|
|
19
|
-
//# sourceMappingURL=heatmap.min.js.map
|