@percy.ai/heatmap 0.0.2 → 0.0.4

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.
@@ -1,4 +1,4 @@
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 o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o=n(e),r=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 s={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}},c={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)},u={string:{stringify:e=>e,parse:e=>e},number:s,boolean:{stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},function:l,json:c},d=Symbol.for("r2wc.render"),f=Symbol.for("r2wc.connected"),p=Symbol.for("r2wc.context"),m=Symbol.for("r2wc.props");function h(e=""){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}var v,g=t;function b(t,n,o){const r=v(t),i=e.createElement(n,o);return r.render(i),{root:r,ReactComponent:n}}function w({root:t,ReactComponent:n},o){const r=e.createElement(n,o);t.render(r)}function x({root:e}){e.unmount()}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},y.apply(this,arguments)}function N(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function C(...t){return e.useCallback(N(...t),t)}v=g.createRoot,g.hydrateRoot;const k=e.forwardRef(((t,n)=>{const{children:o,...r}=t,i=e.Children.toArray(o),a=i.find(S);if(a){const t=a.props.children,o=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(_,y({},r,{ref:n}),e.isValidElement(t)?e.cloneElement(t,void 0,o):null)}return e.createElement(_,y({},r,{ref:n}),o)}));k.displayName="Slot";const _=e.forwardRef(((t,n)=>{const{children:o,...r}=t;return e.isValidElement(o)?e.cloneElement(o,{...A(r,o.props),ref:n?N(n,o.ref):o.ref}):e.Children.count(o)>1?e.Children.only(null):null}));_.displayName="SlotClone";const M=({children:t})=>e.createElement(e.Fragment,null,t);function S(t){return e.isValidElement(t)&&t.type===M}function A(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...e)=>{i(...e),r(...e)}:r&&(n[o]=r):"style"===o?n[o]={...r,...i}:"className"===o&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function O(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=O(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function D(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=O(e))&&(o&&(o+=" "),o+=t);return o}const P=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,E=D,T=(e,t)=>n=>{var o;if(null==(null==t?void 0:t.variants))return E(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:r,defaultVariants:i}=t,a=Object.keys(r).map((e=>{const t=null==n?void 0:n[e],o=null==i?void 0:i[e];if(null===t)return null;const a=P(t)||P(o);return r[e][a]})),s=n&&Object.entries(n).reduce(((e,t)=>{let[n,o]=t;return void 0===o||(e[n]=o),e}),{}),l=null==t||null===(o=t.compoundVariants)||void 0===o?void 0:o.reduce(((e,t)=>{let{class:n,className:o,...r}=t;return Object.entries(r).every((e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...s}[t]):{...i,...s}[t]===n}))?[...e,n,o]:e}),[]);return E(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)};function I(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=R(e))&&(o&&(o+=" "),o+=t);return o}function R(e){if("string"==typeof e)return e;for(var t,n="",o=0;o<e.length;o++)e[o]&&(t=R(e[o]))&&(n&&(n+=" "),n+=t);return n}var F="-";function z(e){var t=function(e){var t=e.theme,n=e.prefix,o={nextPart:new Map,validators:[]},r=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],o=e[1];return[t+n,o]}))):e}))]}))}(Object.entries(e.classGroups),n);return r.forEach((function(e){var n=e[0];j(e[1],o,n,t)})),o}(e),n=e.conflictingClassGroups,o=e.conflictingClassGroupModifiers,r=void 0===o?{}:o;return{getClassGroupId:function(e){var n=e.split(F);return""===n[0]&&1!==n.length&&n.shift(),$(n,t)||function(e){if(L.test(e)){var t=L.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}(e)},getConflictingClassGroupIds:function(e,t){var o=n[e]||[];return t&&r[e]?[].concat(o,r[e]):o}}}function $(e,t){if(0===e.length)return t.classGroupId;var n=e[0],o=t.nextPart.get(n),r=o?$(e.slice(1),o):void 0;if(r)return r;if(0!==t.validators.length){var i=e.join(F);return t.validators.find((function(e){return(0,e.validator)(i)}))?.classGroupId}}var L=/^\[(.+)\]$/;function j(e,t,n,o){e.forEach((function(e){if("string"!=typeof e){if("function"==typeof e)return e.isThemeGetter?void j(e(o),t,n,o):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((function(e){var r=e[0];j(e[1],U(t,r),n,o)}))}else{(""===e?t:U(t,e)).classGroupId=n}}))}function U(e,t){var n=e;return t.split(F).forEach((function(e){n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n}function B(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,o=new Map;function r(r,i){n.set(r,i),++t>e&&(t=0,o=n,n=new Map)}return{get:function(e){var t=n.get(e);return void 0!==t?t:void 0!==(t=o.get(e))?(r(e,t),t):void 0},set:function(e,t){n.has(e)?n.set(e,t):r(e,t)}}}var K="!";function Z(e){var t=e.separator||":",n=1===t.length,o=t[0],r=t.length;return function(e){for(var i,a=[],s=0,l=0,c=0;c<e.length;c++){var u=e[c];if(0===s){if(u===o&&(n||e.slice(c,c+r)===t)){a.push(e.slice(l,c)),l=c+r;continue}if("/"===u){i=c;continue}}"["===u?s++:"]"===u&&s--}var d=0===a.length?e:e.substring(l),f=d.startsWith(K);return{modifiers:a,hasImportantModifier:f,baseClassName:f?d.substring(1):d,maybePostfixModifierPosition:i&&i>l?i-l:void 0}}}var V=/\s+/;function H(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o,r,i,a=function(e){var n=t[0],l=t.slice(1).reduce((function(e,t){return t(e)}),n());return o=function(e){return{cache:B(e.cacheSize),splitModifiers:Z(e),...z(e)}}(l),r=o.cache.get,i=o.cache.set,a=s,s(e)};function s(e){var t=r(e);if(t)return t;var n=function(e,t){var n=t.splitModifiers,o=t.getClassGroupId,r=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(V).map((function(e){var t=n(e),r=t.modifiers,i=t.hasImportantModifier,a=t.baseClassName,s=t.maybePostfixModifierPosition,l=o(s?a.substring(0,s):a),c=Boolean(s);if(!l){if(!s)return{isTailwindClass:!1,originalClassName:e};if(!(l=o(a)))return{isTailwindClass:!1,originalClassName:e};c=!1}var u=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}(r).join(":");return{isTailwindClass:!0,modifierId:i?u+K:u,classGroupId:l,originalClassName:e,hasPostfixModifier:c}})).reverse().filter((function(e){if(!e.isTailwindClass)return!0;var t=e.modifierId,n=e.classGroupId,o=e.hasPostfixModifier,a=t+n;return!i.has(a)&&(i.add(a),r(n,o).forEach((function(e){return i.add(t+e)})),!0)})).reverse().map((function(e){return e.originalClassName})).join(" ")}(e,o);return i(e,n),n}return function(){return a(I.apply(null,arguments))}}function W(e){var t=function(t){return t[e]||[]};return t.isThemeGetter=!0,t}var q=/^\[(?:([a-z-]+):)?(.+)\]$/i,G=/^\d+\/\d+$/,X=new Set(["px","full","screen"]),Y=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,J=/\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$/,Q=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function ee(e){return ae(e)||X.has(e)||G.test(e)||te(e)}function te(e){return pe(e,"length",me)}function ne(e){return pe(e,"size",he)}function oe(e){return pe(e,"position",he)}function re(e){return pe(e,"url",ve)}function ie(e){return pe(e,"number",ae)}function ae(e){return!Number.isNaN(Number(e))}function se(e){return e.endsWith("%")&&ae(e.slice(0,-1))}function le(e){return ge(e)||pe(e,"number",ge)}function ce(e){return q.test(e)}function ue(){return!0}function de(e){return Y.test(e)}function fe(e){return pe(e,"",be)}function pe(e,t,n){var o=q.exec(e);return!!o&&(o[1]?o[1]===t:n(o[2]))}function me(e){return J.test(e)}function he(){return!1}function ve(e){return e.startsWith("url(")}function ge(e){return Number.isInteger(Number(e))}function be(e){return Q.test(e)}function we(){var e=W("colors"),t=W("spacing"),n=W("blur"),o=W("brightness"),r=W("borderColor"),i=W("borderRadius"),a=W("borderSpacing"),s=W("borderWidth"),l=W("contrast"),c=W("grayscale"),u=W("hueRotate"),d=W("invert"),f=W("gap"),p=W("gradientColorStops"),m=W("gradientColorStopPositions"),h=W("inset"),v=W("margin"),g=W("opacity"),b=W("padding"),w=W("saturate"),x=W("scale"),y=W("sepia"),N=W("skew"),C=W("space"),k=W("translate"),_=function(){return["auto",ce,t]},M=function(){return[ce,t]},S=function(){return["",ee]},A=function(){return["auto",ae,ce]},O=function(){return["","0",ce]},D=function(){return[ae,ie]},P=function(){return[ae,ce]};return{cacheSize:500,theme:{colors:[ue],spacing:[ee],blur:["none","",de,ce],brightness:D(),borderColor:[e],borderRadius:["none","","full",de,ce],borderSpacing:M(),borderWidth:S(),contrast:D(),grayscale:O(),hueRotate:P(),invert:O(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[se,te],inset:_(),margin:_(),opacity:D(),padding:M(),saturate:D(),scale:D(),sepia:O(),skew:P(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",ce]}],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"],[ce])}],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:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",le]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ce]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",le]}],"grid-cols":[{"grid-cols":[ue]}],"col-start-end":[{col:["auto",{span:["full",le]},ce]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[ue]}],"row-start-end":[{row:["auto",{span:[le]},ce]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ce]}],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:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",ce,t]}],"min-w":[{"min-w":["min","max","fit",ce,ee]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[de]},de,ce]}],h:[{h:[ce,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",ce,ee]}],"max-h":[{"max-h":[ce,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:[ue]}],"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",ce]}],"line-clamp":[{"line-clamp":["none",ae,ie]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ce,ee]}],"list-image":[{"list-image":["none",ce]}],"list-style-type":[{list:["none","disc","decimal",ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"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",ce,ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce]}],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",ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[oe])}],"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"]},re]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],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:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[].concat(["solid","dashed","dotted","double","none"],["hidden"])}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:[""].concat(["solid","dashed","dotted","double","none"])}],"outline-offset":[{"outline-offset":[ce,ee]}],"outline-w":[{outline:[ee]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:S()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[ee]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",de,fe]}],"shadow-color":[{shadow:[ue]}],opacity:[{opacity:[g]}],"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:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",de,ce]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[y]}],"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",ce]}],duration:[{duration:P()}],ease:[{ease:["linear","in","out","in-out",ce]}],delay:[{delay:P()}],animate:[{animate:["none","spin","ping","pulse","bounce",ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[le,ce]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ce]}],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",ce]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",ce]}],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 xe=H(we);function ye(t,n=[]){let o=[];const r=()=>{const n=o.map((t=>e.createContext(t)));return function(o){const r=(null==o?void 0:o[t])||n;return e.useMemo((()=>({[`__scope${t}`]:{...o,[t]:r}})),[o,r])}};return r.scopeName=t,[function(n,r){const i=e.createContext(r),a=o.length;function s(n){const{scope:o,children:r,...s}=n,l=(null==o?void 0:o[t][a])||i,c=e.useMemo((()=>s),Object.values(s));return e.createElement(l.Provider,{value:c},r)}return o=[...o,r],s.displayName=n+"Provider",[s,function(o,s){const l=(null==s?void 0:s[t][a])||i,c=e.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${o}\` must be used within \`${n}\``)}]},Ne(r,...n)]}function Ne(...t){const n=t[0];if(1===t.length)return n;const o=()=>{const o=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const r=o.reduce(((e,{useScope:n,scopeName:o})=>({...e,...n(t)[`__scope${o}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:r})),[r])}};return o.scopeName=n.scopeName,o}function Ce(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 ke=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{};function _e(){return _e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_e.apply(this,arguments)}const Me=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const o=e.forwardRef(((t,o)=>{const{asChild:r,...i}=t,a=r?k:n;return e.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.createElement(a,_e({},i,{ref:o}))}));return o.displayName=`Primitive.${n}`,{...t,[n]:o}}),{});function Se(e,n){e&&t.flushSync((()=>e.dispatchEvent(n)))}const Ae="Avatar",[Oe,De]=ye(Ae),[Pe,Ee]=Oe(Ae);const Te=e.forwardRef(((t,n)=>{const{t:o,...r}=t,[i,a]=e.useState("idle");return e.createElement(Pe,{scope:o,imageLoadingStatus:i,onImageLoadingStatusChange:a},e.createElement(Me.span,y({},r,{ref:n})))})),Ie=e.forwardRef(((t,n)=>{const{t:o,src:r,onLoadingStatusChange:i=(()=>{}),...a}=t,s=Ee("AvatarImage",o),l=function(t){const[n,o]=e.useState("idle");return e.useEffect((()=>{if(!t)return void o("error");let e=!0;const n=new window.Image,r=t=>()=>{e&&o(t)};return o("loading"),n.onload=r("loaded"),n.onerror=r("error"),n.src=t,()=>{e=!1}}),[t]),n}(r),c=Ce((e=>{i(e),s.onImageLoadingStatusChange(e)}));return ke((()=>{"idle"!==l&&c(l)}),[l,c]),"loaded"===l?e.createElement(Me.img,y({},a,{ref:n,src:r})):null})),Re=e.forwardRef(((t,n)=>{const{t:o,delayMs:r,...i}=t,a=Ee("AvatarFallback",o),[s,l]=e.useState(void 0===r);return e.useEffect((()=>{if(void 0!==r){const e=window.setTimeout((()=>l(!0)),r);return()=>window.clearTimeout(e)}}),[r]),s&&"loaded"!==a.imageLoadingStatus?e.createElement(Me.span,y({},i,{ref:n})):null})),Fe="Progress",ze=100,[$e,Le]=ye(Fe),[je,Ue]=$e(Fe),Be=e.forwardRef(((t,n)=>{const{o,value:r,max:i,getValueLabel:a=Ke,...s}=t,l=He(i)?i:ze,c=We(r,l)?r:null,u=Ve(c)?a(c,l):void 0;return e.createElement(je,{scope:o,value:c,max:l},e.createElement(Me.div,y({"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Ve(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ze(c,l),"data-value":null!=c?c:void 0,"data-max":l},s,{ref:n})))}));Be.propTypes={max(e,t,n){const o=e[t],r=String(o);return o&&!He(o)?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\`.`}(r,n)):null},value(e,t,n){const o=e[t],r=String(o),i=He(e.max)?e.max:ze;return null==o||We(o,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\`.`}(r,n))}};function Ke(e,t){return`${Math.round(e/t*100)}%`}function Ze(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Ve(e){return"number"==typeof e}function He(e){return Ve(e)&&!isNaN(e)&&e>0}function We(e,t){return Ve(e)&&!isNaN(e)&&e<=t&&e>=0}const qe=Be,Ge=e.forwardRef(((t,n)=>{var o;const{o:r,...i}=t,a=Ue("ProgressIndicator",r);return e.createElement(Me.div,y({"data-state":Ze(a.value,a.max),"data-value":null!==(o=a.value)&&void 0!==o?o:void 0,"data-max":a.max},i,{ref:n}))}));function Xe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(null==e||e(o),!1===n||!o.defaultPrevented)return null==t?void 0:t(o)}}const Ye="dismissableLayer.update",Je="dismissableLayer.pointerDownOutside",Qe="dismissableLayer.focusOutside";let et;const tt=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nt=e.forwardRef(((t,n)=>{var o;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=t,d=e.useContext(tt),[f,p]=e.useState(null),m=null!==(o=null==f?void 0:f.ownerDocument)&&void 0!==o?o:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,h]=e.useState({}),v=C(n,(e=>p(e))),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(b),x=f?g.indexOf(f):-1,y=d.layersWithOutsidePointerEventsDisabled.size>0,N=x>=w,k=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const o=Ce(t),r=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!r.current){const a={originalEvent:e};function t(){rt(Je,o,a,{discrete:!0})}"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}r.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,o]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...d.branches].some((e=>e.contains(t)));N&&!n&&(null==a||a(e),null==l||l(e),e.defaultPrevented||null==c||c())}),m),_=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const o=Ce(t),r=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!r.current){rt(Qe,o,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...d.branches].some((e=>e.contains(t)))||(null==s||s(e),null==l||l(e),e.defaultPrevented||null==c||c())}),m);return function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const o=Ce(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&o(e)};return n.addEventListener("keydown",e),()=>n.removeEventListener("keydown",e)}),[o,n])}((e=>{x===d.layers.size-1&&(null==i||i(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),m),e.useEffect((()=>{if(f)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(et=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),ot(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=et)}}),[f,m,r,d]),e.useEffect((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),ot())}),[f,d]),e.useEffect((()=>{const e=()=>h({});return document.addEventListener(Ye,e),()=>document.removeEventListener(Ye,e)}),[]),e.createElement(Me.div,_e({},u,{ref:v,style:{pointerEvents:y?N?"auto":"none":void 0,...t.style},onFocusCapture:Xe(t.onFocusCapture,_.onFocusCapture),onBlurCapture:Xe(t.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Xe(t.onPointerDownCapture,k.onPointerDownCapture)}))}));function ot(){const e=new CustomEvent(Ye);document.dispatchEvent(e)}function rt(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Se(r,i):r.dispatchEvent(i)}const it=nt,at=e.forwardRef(((t,n)=>{const o=e.useContext(tt),r=e.useRef(null),i=C(n,r);return e.useEffect((()=>{const e=r.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}}),[o.branches]),e.createElement(Me.div,_e({},t,{ref:i}))})),st=o["useId".toString()]||(()=>{});let lt=0;function ct(e){const[t,n]=o.useState(st());return ke((()=>{e||n((e=>null!=e?e:String(lt++)))}),[e]),e||(t?`radix-${t}`:"")}const ut=["top","right","bottom","left"],dt=Math.min,ft=Math.max,pt=Math.round,mt=Math.floor,ht=e=>({x:e,y:e}),vt={left:"right",right:"left",bottom:"top",top:"bottom"},gt={start:"end",end:"start"};function bt(e,t,n){return ft(e,dt(t,n))}function wt(e,t){return"function"==typeof e?e(t):e}function xt(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function Nt(e){return"x"===e?"y":"x"}function Ct(e){return"y"===e?"height":"width"}function kt(e){return["top","bottom"].includes(xt(e))?"y":"x"}function _t(e){return Nt(kt(e))}function Mt(e){return e.replace(/start|end/g,(e=>gt[e]))}function St(e){return e.replace(/left|right|bottom|top/g,(e=>vt[e]))}function At(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 Ot(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Dt(e,t,n){let{reference:o,floating:r}=e;const i=kt(t),a=_t(t),s=Ct(a),l=xt(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[s]/2-r[s]/2;let p;switch(l){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(yt(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function Pt(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=wt(t,e),m=At(p),h=s[f?"floating"===d?"reference":"floating":d],v=Ot(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===d?{...a.floating,x:o,y:r}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=Ot(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:b,strategy:l}):g);return{top:(v.top-x.top+m.top)/w.y,bottom:(x.bottom-v.bottom+m.bottom)/w.y,left:(v.left-x.left+m.left)/w.x,right:(x.right-v.right+m.right)/w.x}}const Et=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:s}=t,{element:l,padding:c=0}=wt(e,t)||{};if(null==l)return{};const u=At(c),d={x:n,y:o},f=_t(r),p=Ct(f),m=await a.getDimensions(l),h="y"===f,v=h?"top":"left",g=h?"bottom":"right",b=h?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[f]-d[f]-i.floating[p],x=d[f]-i.reference[f],y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l));let N=y?y[b]:0;N&&await(null==a.isElement?void 0:a.isElement(y))||(N=s.floating[b]||i.floating[p]);const C=w/2-x/2,k=N/2-m[p]/2-1,_=dt(u[v],k),M=dt(u[g],k),S=_,A=N-m[p]-M,O=N/2-m[p]/2+C,D=bt(S,O,A),P=null!=yt(r)&&O!=D&&i.reference[p]/2-(O<S?_:M)-m[p]/2<0?O<S?S-O:A-O:0;return{[f]:d[f]-P,data:{[f]:D,centerOffset:O-D+P}}}}),Tt=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:r,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...h}=wt(e,t),v=xt(o),g=xt(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(l.floating)),w=d||(g||!m?[St(a)]:function(e){const t=St(e);return[Mt(e),t,Mt(t)]}(a));d||"none"===p||w.push(...function(e,t,n,o){const r=yt(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:a;default:return[]}}(xt(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(Mt)))),i}(a,m,p,b));const x=[a,...w],y=await Pt(t,h),N=[];let C=(null==(n=r.flip)?void 0:n.overflows)||[];if(c&&N.push(y[v]),u){const e=function(e,t,n){void 0===n&&(n=!1);const o=yt(e),r=_t(e),i=Ct(r);let a="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=St(a)),[a,St(a)]}(o,i,b);N.push(y[e[0]],y[e[1]])}if(C=[...C,{placement:o,overflows:N}],!N.every((e=>e<=0))){var k,_;const e=((null==(k=r.flip)?void 0:k.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(_=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:_.placement;if(!n)switch(f){case"bestFit":{var M;const e=null==(M=C.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:M[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}};function It(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 ut.some((t=>e[t]>=0))}const Ft=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=wt(e,t);switch(o){case"referenceHidden":{const e=It(await Pt(t,{...r,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Rt(e)}}}case"escaped":{const e=It(await Pt(t,{...r,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:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=xt(n),s=yt(n),l="y"===kt(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=wt(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}},$t=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=wt(e,t),c={x:n,y:o},u=await Pt(t,l),d=kt(xt(r)),f=Nt(d);let p=c[f],m=c[d];if(i){const e="y"===f?"bottom":"right";p=bt(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";m=bt(m+u["y"===d?"top":"left"],m,m-u[e])}const h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-o}}}}},Lt=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=wt(e,t),u={x:n,y:o},d=kt(r),f=Nt(d);let p=u[f],m=u[d];const h=wt(s,t),v="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+v.mainAxis,n=i.reference[f]+i.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var g,b;const e="y"===f?"width":"height",t=["top","left"].includes(xt(r)),n=i.reference[d]-i.floating[e]+(t&&(null==(g=a.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),o=i.reference[d]+i.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[d])||0)-(t?v.crossAxis:0);m<n?m=n:m>o&&(m=o)}return{[f]:p,[d]:m}}}},jt=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:i}=t,{apply:a=(()=>{}),...s}=wt(e,t),l=await Pt(t,s),c=xt(n),u=yt(n),d="y"===kt(n),{width:f,height:p}=o.floating;let m,h;"top"===c||"bottom"===c?(m=c,h=u===(await(null==r.isRTL?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(h=c,m="end"===u?"top":"bottom");const v=p-l[m],g=f-l[h],b=!t.middlewareData.shift;let w=v,x=g;if(d){const e=f-l.left-l.right;x=u||b?dt(g,e):e}else{const e=p-l.top-l.bottom;w=u||b?dt(v,e):e}if(b&&!u){const e=ft(l.left,0),t=ft(l.right,0),n=ft(l.top,0),o=ft(l.bottom,0);d?x=f-2*(0!==e||0!==t?e+t:ft(l.left,l.right)):w=p-2*(0!==n||0!==o?n+o:ft(l.top,l.bottom))}await a({...t,availableWidth:x,availableHeight:w});const y=await r.getDimensions(i.floating);return f!==y.width||p!==y.height?{reset:{rects:!0}}:{}}}};function Ut(e){return Zt(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Kt(e){var t;return null==(t=(Zt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Zt(e){return e instanceof Node||e instanceof Bt(e).Node}function Vt(e){return e instanceof Element||e instanceof Bt(e).Element}function Ht(e){return e instanceof HTMLElement||e instanceof Bt(e).HTMLElement}function Wt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot)}function qt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function Gt(e){return["table","td","th"].includes(Ut(e))}function Xt(e){const t=Yt(),n=Qt(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 Yt(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Jt(e){return["html","body","#document"].includes(Ut(e))}function Qt(e){return Bt(e).getComputedStyle(e)}function en(e){return Vt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function tn(e){if("html"===Ut(e))return e;const t=e.assignedSlot||e.parentNode||Wt(e)&&e.host||Kt(e);return Wt(t)?t.host:t}function nn(e){const t=tn(e);return Jt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ht(t)&&qt(t)?t:nn(t)}function on(e,t){var n;void 0===t&&(t=[]);const o=nn(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=Bt(o);return r?t.concat(i,i.visualViewport||[],qt(o)?o:[]):t.concat(o,on(o))}function rn(e){const t=Qt(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Ht(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=pt(n)!==i||pt(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function an(e){return Vt(e)?e:e.contextElement}function sn(e){const t=an(e);if(!Ht(t))return ht(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=rn(t);let a=(i?pt(n.width):n.width)/o,s=(i?pt(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ln=ht(0);function cn(e){const t=Bt(e);return Yt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ln}function un(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=an(e);let a=ht(1);t&&(o?Vt(o)&&(a=sn(o)):a=sn(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Bt(e))&&t}(i,n,o)?cn(i):ht(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,u=r.width/a.x,d=r.height/a.y;if(i){const e=Bt(i),t=o&&Vt(o)?Bt(o):o;let n=e.frameElement;for(;n&&o&&t!==e;){const e=sn(n),t=n.getBoundingClientRect(),o=Qt(n),r=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=r,c+=i,n=Bt(n).frameElement}}return Ot({width:u,height:d,x:l,y:c})}function dn(e){return un(Kt(e)).left+en(e).scrollLeft}function fn(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=Bt(e),o=Kt(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const e=Yt();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)o=function(e){const t=Kt(e),n=en(e),o=e.ownerDocument.body,r=ft(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=ft(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+dn(e);const s=-n.scrollTop;return"rtl"===Qt(o).direction&&(a+=ft(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}(Kt(e));else if(Vt(t))o=function(e,t){const n=un(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Ht(e)?sn(e):ht(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=cn(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return Ot(o)}function pn(e,t){const n=tn(e);return!(n===t||!Vt(n)||Jt(n))&&("fixed"===Qt(n).position||pn(n,t))}function mn(e,t,n){const o=Ht(t),r=Kt(t),i="fixed"===n,a=un(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ht(0);if(o||!o&&!i)if(("body"!==Ut(t)||qt(r))&&(s=en(t)),o){const e=un(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else r&&(l.x=dn(r));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function hn(e,t){return Ht(e)&&"fixed"!==Qt(e).position?t?t(e):e.offsetParent:null}function vn(e,t){const n=Bt(e);if(!Ht(e))return n;let o=hn(e,t);for(;o&&Gt(o)&&"static"===Qt(o).position;)o=hn(o,t);return o&&("html"===Ut(o)||"body"===Ut(o)&&"static"===Qt(o).position&&!Xt(o))?n:o||function(e){let t=tn(e);for(;Ht(t)&&!Jt(t);){if(Xt(t))return t;t=tn(t)}return null}(e)||n}const gn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=Ht(n),i=Kt(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=ht(1);const l=ht(0);if((r||!r&&"fixed"!==o)&&(("body"!==Ut(n)||qt(i))&&(a=en(n)),Ht(n))){const e=un(n);s=sn(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},getDocumentElement:Kt,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=on(e).filter((e=>Vt(e)&&"body"!==Ut(e))),r=null;const i="fixed"===Qt(e).position;let a=i?tn(e):e;for(;Vt(a)&&!Jt(a);){const t=Qt(a),n=Xt(a);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||qt(a)&&!n&&pn(e,a))?o=o.filter((e=>e!==a)):r=t,a=tn(a)}return t.set(e,o),o}(t,this._c):[].concat(n),o],a=i[0],s=i.reduce(((e,n)=>{const o=fn(t,n,r);return e.top=ft(o.top,e.top),e.right=dt(o.right,e.right),e.bottom=dt(o.bottom,e.bottom),e.left=ft(o.left,e.left),e}),fn(t,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:vn,getElementRects:async function(e){let{reference:t,floating:n,strategy:o}=e;const r=this.getOffsetParent||vn,i=this.getDimensions;return{reference:mn(t,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return rn(e)},getScale:sn,isElement:Vt,isRTL:function(e){return"rtl"===Qt(e).direction}};function bn(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=an(e),u=r||i?[...c?on(c):[],...on(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,o=null;const r=Kt(e);function i(){clearTimeout(n),o&&o.disconnect(),o=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p={rootMargin:-mt(u)+"px "+-mt(r.clientWidth-(c+d))+"px "+-mt(r.clientHeight-(u+f))+"px "+-mt(c)+"px",threshold:ft(0,dt(1,l))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==l){if(!m)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}m=!1}try{o=new IntersectionObserver(h,{...p,root:r.ownerDocument})}catch(v){o=new IntersectionObserver(h,p)}o.observe(e)}(!0),i}(c,n):null;let f,p=-1,m=null;a&&(m=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{m&&m.observe(t)}))),n()})),c&&!l&&m.observe(c),m.observe(t));let h=l?un(e):null;return l&&function t(){const o=un(e);!h||o.x===h.x&&o.y===h.y&&o.width===h.width&&o.height===h.height||n();h=o,f=requestAnimationFrame(t)}(),n(),()=>{u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),m&&m.disconnect(),m=null,l&&cancelAnimationFrame(f)}}const wn=(e,t,n)=>{const o=new Map,r={platform:gn,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=Dt(c,o,l),f=o,p={},m=0;for(let h=0;h<s.length;h++){const{name:n,fn:i}=s[h],{x:v,y:g,data:b,reset:w}=await i({x:u,y:d,initialPlacement:o,placement:f,strategy:r,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=g?g:d,p={...p,[n]:{...p[n],...b}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:r}):w.rects),({x:u,y:d}=Dt(c,f,l))),h=-1)}return{x:u,y:d,placement:f,strategy:r,middlewareData:p}})(e,t,{...r,platform:i})},xn=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:o}="function"==typeof e?e(t):e;return n&&(r=n,{}.hasOwnProperty.call(r,"current"))?null!=n.current?Et({element:n.current,padding:o}).fn(t):{}:n?Et({element:n,padding:o}).fn(t):{};var r}});var yn="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Nn(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,o,r;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;0!=o--;)if(!Nn(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;0!=o--;){const n=r[o];if(("_owner"!==n||!e.$$typeof)&&!Nn(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Cn(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function kn(e,t){const n=Cn(e);return Math.round(t*n)/n}function _n(e){const t=o.useRef(e);return yn((()=>{t.current=e})),t}function Mn(t){const[n,o]=e.useState(void 0);return ke((()=>{if(t){o({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 r,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=t.offsetWidth,i=t.offsetHeight;o({width:r,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}o(void 0)}),[t]),n}const Sn="Popper",[An,On]=ye(Sn),[Dn,Pn]=An(Sn),En=e.forwardRef(((t,n)=>{const{i:o,virtualRef:r,...i}=t,a=Pn("PopperAnchor",o),s=e.useRef(null),l=C(n,s);return e.useEffect((()=>{a.onAnchorChange((null==r?void 0:r.current)||s.current)})),r?null:e.createElement(Me.div,_e({},i,{ref:l}))})),Tn="PopperContent",[In,Rn]=An(Tn),Fn=e.forwardRef(((t,n)=>{var i,a,s,l,c,u,d,f;const{i:p,side:m="bottom",sideOffset:h=0,align:v="center",alignOffset:g=0,arrowPadding:b=0,collisionBoundary:w=[],collisionPadding:x=0,sticky:y="partial",hideWhenDetached:N=!1,avoidCollisions:k=!0,onPlaced:_,...M}=t,S=Pn(Tn,p),[A,O]=e.useState(null),D=C(n,(e=>O(e))),[P,E]=e.useState(null),T=Mn(P),I=null!==(i=null==T?void 0:T.width)&&void 0!==i?i:0,R=null!==(a=null==T?void 0:T.height)&&void 0!==a?a:0,F=m+("center"!==v?"-"+v:""),z="number"==typeof x?x:{top:0,right:0,bottom:0,left:0,...x},$=Array.isArray(w)?w:[w],L=$.length>0,j={padding:z,boundary:$.filter(zn),altBoundary:L},{refs:U,floatingStyles:B,placement:K,isPositioned:Z,middlewareData:V}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:a,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=o.useState(i);Nn(m,i)||h(i);const[v,g]=o.useState(null),[b,w]=o.useState(null),x=o.useCallback((e=>{e!=k.current&&(k.current=e,g(e))}),[g]),y=o.useCallback((e=>{e!==_.current&&(_.current=e,w(e))}),[w]),N=s||v,C=l||b,k=o.useRef(null),_=o.useRef(null),M=o.useRef(f),S=_n(u),A=_n(a),O=o.useCallback((()=>{if(!k.current||!_.current)return;const e={placement:t,strategy:n,middleware:m};A.current&&(e.platform=A.current),wn(k.current,_.current,e).then((e=>{const t={...e,isPositioned:!0};D.current&&!Nn(M.current,t)&&(M.current=t,r.flushSync((()=>{p(t)})))}))}),[m,t,n,A]);yn((()=>{!1===d&&M.current.isPositioned&&(M.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const D=o.useRef(!1);yn((()=>(D.current=!0,()=>{D.current=!1})),[]),yn((()=>{if(N&&(k.current=N),C&&(_.current=C),N&&C){if(S.current)return S.current(N,C,O);O()}}),[N,C,O,S]);const P=o.useMemo((()=>({reference:k,floating:_,setReference:x,setFloating:y})),[x,y]),E=o.useMemo((()=>({reference:N,floating:C})),[N,C]),T=o.useMemo((()=>{const e={position:n,left:0,top:0};if(!E.floating)return e;const t=kn(E.floating,f.x),o=kn(E.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+o+"px)",...Cn(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:o}}),[n,c,E.floating,f.x,f.y]);return o.useMemo((()=>({...f,update:O,refs:P,elements:E,floatingStyles:T})),[f,O,P,E,T])}({strategy:"fixed",placement:F,whileElementsMounted:bn,elements:{reference:S.anchor},middleware:[zt({mainAxis:h+R,alignmentAxis:g}),k&&$t({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?Lt():void 0,...j}),k&&Tt({...j}),jt({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:o})=>{const{width:r,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${o}px`),a.setProperty("--radix-popper-anchor-width",`${r}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),P&&xn({element:P,padding:b}),$n({arrowWidth:I,arrowHeight:R}),N&&Ft({strategy:"referenceHidden"})]}),[H,W]=Ln(K),q=Ce(_);ke((()=>{Z&&(null==q||q())}),[Z,q]);const G=null===(s=V.arrow)||void 0===s?void 0:s.x,X=null===(l=V.arrow)||void 0===l?void 0:l.y,Y=0!==(null===(c=V.arrow)||void 0===c?void 0:c.centerOffset),[J,Q]=e.useState();return ke((()=>{A&&Q(window.getComputedStyle(A).zIndex)}),[A]),e.createElement("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:Z?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(u=V.transformOrigin)||void 0===u?void 0:u.x,null===(d=V.transformOrigin)||void 0===d?void 0:d.y].join(" ")},dir:t.dir},e.createElement(In,{scope:p,placedSide:H,onArrowChange:E,arrowX:G,arrowY:X,shouldHideArrow:Y},e.createElement(Me.div,_e({"data-side":H,"data-align":W},M,{ref:D,style:{...M.style,animation:Z?void 0:"none",opacity:null!==(f=V.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,o,r,i,a;const{placement:s,rects:l,middlewareData:c}=t,u=0!==(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,m]=Ln(s),h={start:"0%",center:"50%",end:"100%"}[m],v=(null!==(o=null===(r=c.arrow)||void 0===r?void 0:r.x)&&void 0!==o?o:0)+d/2,g=(null!==(i=null===(a=c.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let b="",w="";return"bottom"===p?(b=u?h:`${v}px`,w=-f+"px"):"top"===p?(b=u?h:`${v}px`,w=`${l.floating.height+f}px`):"right"===p?(b=-f+"px",w=u?h:`${g}px`):"left"===p&&(b=`${l.floating.width+f}px`,w=u?h:`${g}px`),{data:{x:b,y:w}}}});function Ln(e){const[t,n="center"]=e.split("-");return[t,n]}const jn=En,Un=Fn,Bn=e.forwardRef(((n,o)=>{var r;const{container:i=(null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body),...a}=n;return i?t.createPortal(e.createElement(Me.div,_e({},a,{ref:o})),i):null}));const Kn=n=>{const{present:o,children:r}=n,i=function(n){const[o,r]=e.useState(),i=e.useRef({}),a=e.useRef(n),s=e.useRef("none"),l=n?"mounted":"unmounted",[c,u]=function(t,n){return e.useReducer(((e,t)=>{const o=n[e][t];return null!=o?o:e}),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=Zn(i.current);s.current="mounted"===c?e:"none"}),[c]),ke((()=>{const e=i.current,t=a.current;if(t!==n){const o=s.current,r=Zn(e);if(n)u("MOUNT");else if("none"===r||"none"===(null==e?void 0:e.display))u("UNMOUNT");else{u(t&&o!==r?"ANIMATION_OUT":"UNMOUNT")}a.current=n}}),[n,u]),ke((()=>{if(o){const e=e=>{const n=Zn(i.current).includes(e.animationName);e.target===o&&n&&t.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===o&&(s.current=Zn(i.current))};return o.addEventListener("animationstart",n),o.addEventListener("animationcancel",e),o.addEventListener("animationend",e),()=>{o.removeEventListener("animationstart",n),o.removeEventListener("animationcancel",e),o.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[o,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:e.useCallback((e=>{e&&(i.current=getComputedStyle(e)),r(e)}),[])}}(o),a="function"==typeof r?r({present:i.isPresent}):e.Children.only(r),s=C(i.ref,a.ref);return"function"==typeof r||i.isPresent?e.cloneElement(a,{ref:s}):null};function Zn(e){return(null==e?void 0:e.animationName)||"none"}function Vn({prop:t,defaultProp:n,onChange:o=(()=>{})}){const[r,i]=function({defaultProp:t,onChange:n}){const o=e.useState(t),[r]=o,i=e.useRef(r),a=Ce(n);return e.useEffect((()=>{i.current!==r&&(a(r),i.current=r)}),[r,i,a]),o}({defaultProp:n,onChange:o}),a=void 0!==t,s=a?t:r,l=Ce(o);return[s,e.useCallback((e=>{if(a){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else i(e)}),[a,t,i,l])]}Kn.displayName="Presence";const Hn=e.forwardRef(((t,n)=>e.createElement(Me.span,_e({},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}})))),Wn=Hn,[qn,Gn]=ye("Tooltip",[On]),Xn=On(),Yn="tooltip.open",[Jn,Qn]=qn("TooltipProvider"),eo="Tooltip",[to,no]=qn(eo),[oo,ro]=qn("TooltipPortal",{forceMount:void 0}),io="TooltipContent",ao=e.forwardRef(((t,n)=>{const o=ro(io,t.l),{forceMount:r=o.forceMount,side:i="top",...a}=t,s=no(io,t.l);return e.createElement(Kn,{present:r||s.open},s.disableHoverableContent?e.createElement(uo,y({side:i},a,{ref:n})):e.createElement(so,y({side:i},a,{ref:n})))})),so=e.forwardRef(((t,n)=>{const o=no(io,t.l),r=Qn(io,t.l),i=e.useRef(null),a=C(n,i),[s,l]=e.useState(null),{trigger:c,onClose:u}=o,d=i.current,{onPointerInTransitChange:f}=r,p=e.useCallback((()=>{l(null),f(!1)}),[f]),m=e.useCallback(((e,t)=>{const n=e.currentTarget,o={x:e.clientX,y:e.clientY},r=function(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return o}(o,function(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}(o,n.getBoundingClientRect())),i=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 o=0;o<e.length;o++){const n=e[o];for(;t.length>=2;){const e=t[t.length-1],o=t[t.length-2];if(!((e.x-o.x)*(n.y-o.y)>=(e.y-o.y)*(n.x-o.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const t=e[o];for(;n.length>=2;){const e=n[n.length-1],o=n[n.length-2];if(!((e.x-o.x)*(t.y-o.y)>=(e.y-o.y)*(t.x-o.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)}([...r,...function(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}(t.getBoundingClientRect())]);l(i),f(!0)}),[f]);return e.useEffect((()=>()=>p()),[p]),e.useEffect((()=>{if(c&&d){const e=e=>m(e,d),t=e=>m(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[c,d,m,p]),e.useEffect((()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},o=(null==c?void 0:c.contains(t))||(null==d?void 0:d.contains(t)),r=!function(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const e=t[i].x,s=t[i].y,l=t[a].x,c=t[a].y;s>o!=c>o&&n<(l-e)*(o-s)/(c-s)+e&&(r=!r)}return r}(n,s);o?p():r&&(p(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,d,s,u,p]),e.createElement(uo,y({},t,{ref:a}))})),[lo,co]=qn(eo,{isInside:!1}),uo=e.forwardRef(((t,n)=>{const{l:o,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=t,c=no(io,o),u=Xn(o),{onClose:d}=c;return e.useEffect((()=>(document.addEventListener(Yn,d),()=>document.removeEventListener(Yn,d))),[d]),e.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(c.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,d]),e.createElement(nt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d},e.createElement(Un,y({"data-state":c.stateAttribute},u,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(M,null,r),e.createElement(lo,{scope:o,isInside:!0},e.createElement(Wn,{id:c.contentId,role:"tooltip"},i||r))))}));const fo=ao,po="focusScope.autoFocusOnMount",mo="focusScope.autoFocusOnUnmount",ho={bubbles:!1,cancelable:!0},vo=e.forwardRef(((t,n)=>{const{loop:o=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[l,c]=e.useState(null),u=Ce(i),d=Ce(a),f=e.useRef(null),p=C(n,(e=>c(e))),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(r){function e(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:xo(f.current,{select:!0})}function t(e){if(m.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||xo(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)||xo(l))}document.addEventListener("focusin",e),document.addEventListener("focusout",t);const o=new MutationObserver(n);return l&&o.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),o.disconnect()}}}),[r,l,m.paused]),e.useEffect((()=>{if(l){yo.add(m);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(po,ho);l.addEventListener(po,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(xo(o,{select:t}),document.activeElement!==n)return}((e=go(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&xo(l))}return()=>{l.removeEventListener(po,u),setTimeout((()=>{const e=new CustomEvent(mo,ho);l.addEventListener(mo,d),l.dispatchEvent(e),e.defaultPrevented||xo(null!=t?t:document.body,{select:!0}),l.removeEventListener(mo,d),yo.remove(m)}),0)}}var e}),[l,u,d,m]);const h=e.useCallback((e=>{if(!o&&!r)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,i]=function(e){const t=go(e),n=bo(t,e),o=bo(t.reverse(),e);return[n,o]}(t);r&&i?e.shiftKey||n!==i?e.shiftKey&&n===r&&(e.preventDefault(),o&&xo(i,{select:!0})):(e.preventDefault(),o&&xo(r,{select:!0})):n===t&&e.preventDefault()}}),[o,r,m.paused]);return e.createElement(Me.div,_e({tabIndex:-1},s,{ref:p,onKeyDown:h}))}));function go(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 bo(e,t){for(const n of e)if(!wo(n,{upTo:t}))return n}function wo(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 xo(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 yo=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=No(e,t),e.unshift(t)},remove(t){var n;e=No(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function No(e,t){const n=[...e],o=n.indexOf(t);return-1!==o&&n.splice(o,1),n}let Co=0;function ko(){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:_o()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:_o()),Co++,()=>{1===Co&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Co--}}),[])}function _o(){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 Mo=function(){return Mo=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},Mo.apply(this,arguments)};function So(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}function Ao(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var Oo="right-scroll-bar-position",Do="width-before-scroll-bar";function Po(t,n){return o=n||null,r=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:o,callback:r,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=r,i.facade;var o,r,i}function Eo(e){return e}function To(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Eo);var n=[],o=!1,r={read:function(){if(o)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 r=t(e,o);return n.push(r),function(){n=n.filter((function(e){return e!==r}))}},assignSyncMedium:function(e){for(o=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){o=!0;var t=[];if(n.length){var r=n;n=[],r.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 r}(null);return t.options=Mo({async:!0,ssr:!1},e),t}var Io=function(e){var t=e.sideCar,n=So(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return o.createElement(r,Mo({},n))};function Ro(e,t){return e.useMedium(t),Io}Io.isSideCarExport=!0;var Fo=To(),zo=function(){},$o=o.forwardRef((function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:zo,onWheelCapture:zo,onTouchMoveCapture:zo}),i=r[0],a=r[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,h=e.inert,v=e.allowPinchZoom,g=e.as,b=void 0===g?"div":g,w=So(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=p,y=Po([n,t]),N=Mo(Mo({},w),i);return o.createElement(o.Fragment,null,d&&o.createElement(x,{sideCar:Fo,removeScrollBar:u,shards:f,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!v,lockRef:n}),s?o.cloneElement(o.Children.only(l),Mo(Mo({},N),{ref:y})):o.createElement(b,Mo({},N,{className:c,ref:y}),l))}));$o.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$o.classNames={fullWidth:Do,zeroRight:Oo};function Lo(){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 jo=function(){var e=0,t=null;return{add:function(n){var o,r;0==e&&(t=Lo())&&(r=n,(o=t).styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Uo=function(){var e,t=(e=jo(),function(t,n){o.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,o=e.dynamic;return t(n,o),null}},Bo={left:0,top:0,right:0,gap:0},Ko=function(e){return parseInt(e||"",10)||0},Zo=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Bo;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],o=t["padding"===e?"paddingTop":"marginTop"],r=t["padding"===e?"paddingRight":"marginRight"];return[Ko(n),Ko(o),Ko(r)]}(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Vo=Uo(),Ho=function(e,t,n,o){var r=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(o,";\n padding-right: ").concat(s,"px ").concat(o,";\n }\n body {\n overflow: hidden ").concat(o,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(o,";"),"margin"===n&&"\n padding-left: ".concat(r,"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(s,"px ").concat(o,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Oo," {\n right: ").concat(s,"px ").concat(o,";\n }\n \n .").concat(Do," {\n margin-right: ").concat(s,"px ").concat(o,";\n }\n \n .").concat(Oo," .").concat(Oo," {\n right: 0 ").concat(o,";\n }\n \n .").concat(Do," .").concat(Do," {\n margin-right: 0 ").concat(o,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Wo=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r,a=o.useMemo((function(){return Zo(i)}),[i]);return o.createElement(Vo,{styles:Ho(a,!t,i,n?"":"!important")})},qo=!1;if("undefined"!=typeof window)try{var Go=Object.defineProperty({},"passive",{get:function(){return qo=!0,!0}});window.addEventListener("test",Go,Go),window.removeEventListener("test",Go,Go)}catch(Mx){qo=!1}var Xo=!!qo&&{passive:!1},Yo=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])},Jo=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Qo(e,n)){var o=er(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Qo=function(e,t){return"v"===e?function(e){return Yo(e,"overflowY")}(t):function(e){return Yo(e,"overflowX")}(t)},er=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},tr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nr=function(e){return[e.deltaX,e.deltaY]},or=function(e){return e&&"current"in e?e.current:e},rr=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ir=0,ar=[];var sr=Ro(Fo,(function(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(ir++)[0],a=o.useState((function(){return Uo()}))[0],s=o.useRef(e);o.useEffect((function(){s.current=e}),[e]),o.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=Ao([e.lockRef.current],(e.shards||[]).map(or),!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=o.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var o,i=tr(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=Jo(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=Jo(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,o,r){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*o,s=n.target,l=t.contains(s),c=!1,u=a>0,d=0,f=0;do{var p=er(e,s),m=p[0],h=p[1]-p[2]-i*m;(m||h)&&Qo(e,s)&&(d+=h,f+=m),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(r&&0===d||!r&&a>d)||!u&&(r&&0===f||!r&&-a>f))&&(c=!0),c}(p,t,e,"h"===p?l:c,!0)}),[]),c=o.useCallback((function(e){var n=e;if(ar.length&&ar[ar.length-1]===a){var o="deltaY"in n?nr(n):tr(n),r=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,o)}))[0];if(r&&r.should)n.cancelable&&n.preventDefault();else if(!r){var i=(s.current.shards||[]).map(or).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?l(n,i[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=o.useCallback((function(e,n,o,r){var i={name:e,delta:n,target:o,should:r};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=o.useCallback((function(e){n.current=tr(e),r.current=void 0}),[]),f=o.useCallback((function(t){u(t.type,nr(t),t.target,l(t,e.lockRef.current))}),[]),p=o.useCallback((function(t){u(t.type,tr(t),t.target,l(t,e.lockRef.current))}),[]);o.useEffect((function(){return ar.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Xo),document.addEventListener("touchmove",c,Xo),document.addEventListener("touchstart",d,Xo),function(){ar=ar.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,Xo),document.removeEventListener("touchmove",c,Xo),document.removeEventListener("touchstart",d,Xo)}}),[]);var m=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(a,{styles:rr(i)}):null,m?o.createElement(Wo,{gapMode:"margin"}):null)})),lr=o.forwardRef((function(e,t){return o.createElement($o,Mo({},e,{ref:t,sideCar:sr}))}));lr.classNames=$o.classNames;var cr=lr,ur=new WeakMap,dr=new WeakMap,fr={},pr=0,mr=function(e){return e&&(e.host||mr(e.parentNode))},hr=function(e,t,n,o){var r=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=mr(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]);fr[n]||(fr[n]=new WeakMap);var i=fr[n],a=[],s=new Set,l=new Set(r),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};r.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else{var t=e.getAttribute(o),r=null!==t&&"false"!==t,l=(ur.get(e)||0)+1,c=(i.get(e)||0)+1;ur.set(e,l),i.set(e,c),a.push(e),1===l&&r&&dr.set(e,!0),1===c&&e.setAttribute(n,"true"),r||e.setAttribute(o,"true")}}))};return u(t),s.clear(),pr++,function(){a.forEach((function(e){var t=ur.get(e)-1,r=i.get(e)-1;ur.set(e,t),i.set(e,r),t||(dr.has(e)||e.removeAttribute(o),dr.delete(e)),r||e.removeAttribute(n)})),--pr||(ur=new WeakMap,ur=new WeakMap,dr=new WeakMap,fr={})}},vr=function(e,t,n){void 0===n&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),hr(o,r,n,"aria-hidden")):function(){return null}};const gr="Dialog",[br,wr]=ye(gr),[xr,yr]=br(gr),Nr=e.forwardRef(((t,n)=>{const{u:o,...r}=t,i=yr("DialogTrigger",o),a=C(n,i.triggerRef);return e.createElement(Me.button,y({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":$r(i.open)},r,{ref:a,onClick:Xe(t.onClick,i.onOpenToggle)}))})),Cr="DialogPortal",[kr,_r]=br(Cr,{forceMount:void 0}),Mr="DialogOverlay",Sr=e.forwardRef(((t,n)=>{const o=_r(Mr,t.u),{forceMount:r=o.forceMount,...i}=t,a=yr(Mr,t.u);return a.modal?e.createElement(Kn,{present:r||a.open},e.createElement(Ar,y({},i,{ref:n}))):null})),Ar=e.forwardRef(((t,n)=>{const{u:o,...r}=t,i=yr(Mr,o);return e.createElement(cr,{as:k,allowPinchZoom:!0,shards:[i.contentRef]},e.createElement(Me.div,y({"data-state":$r(i.open)},r,{ref:n,style:{pointerEvents:"auto",...r.style}})))})),Or="DialogContent",Dr=e.forwardRef(((t,n)=>{const o=_r(Or,t.u),{forceMount:r=o.forceMount,...i}=t,a=yr(Or,t.u);return e.createElement(Kn,{present:r||a.open},a.modal?e.createElement(Pr,y({},i,{ref:n})):e.createElement(Er,y({},i,{ref:n})))})),Pr=e.forwardRef(((t,n)=>{const o=yr(Or,t.u),r=e.useRef(null),i=C(n,o.contentRef,r);return e.useEffect((()=>{const e=r.current;if(e)return vr(e)}),[]),e.createElement(Tr,y({},t,{ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xe(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=o.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Xe(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Xe(t.onFocusOutside,(e=>e.preventDefault()))}))})),Er=e.forwardRef(((t,n)=>{const o=yr(Or,t.u),r=e.useRef(!1),i=e.useRef(!1);return e.createElement(Tr,y({},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)||(r.current||null===(a=o.triggerRef.current)||void 0===a||a.focus(),e.preventDefault());r.current=!1,i.current=!1},onInteractOutside:e=>{var n,a;null===(n=t.onInteractOutside)||void 0===n||n.call(t,e),e.defaultPrevented||(r.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const s=e.target;(null===(a=o.triggerRef.current)||void 0===a?void 0:a.contains(s))&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}}))})),Tr=e.forwardRef(((t,n)=>{const{u:o,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=yr(Or,o),c=C(n,e.useRef(null));return ko(),e.createElement(e.Fragment,null,e.createElement(vo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a},e.createElement(nt,y({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":$r(l.open)},s,{ref:c,onDismiss:()=>l.onOpenChange(!1)}))),!1)})),Ir="DialogTitle",Rr=e.forwardRef(((t,n)=>{const{u:o,...r}=t,i=yr(Ir,o);return e.createElement(Me.h2,y({id:i.titleId},r,{ref:n}))})),Fr=e.forwardRef(((t,n)=>{const{u:o,...r}=t,i=yr("DialogDescription",o);return e.createElement(Me.p,y({id:i.descriptionId},r,{ref:n}))})),zr=e.forwardRef(((t,n)=>{const{u:o,...r}=t,i=yr("DialogClose",o);return e.createElement(Me.button,y({type:"button"},r,{ref:n,onClick:Xe(t.onClick,(()=>i.onOpenChange(!1)))}))}));function $r(e){return e?"open":"closed"}const[Lr,jr]=function(t,n){const o=e.createContext(n);function r(t){const{children:n,...r}=t,i=e.useMemo((()=>r),Object.values(r));return e.createElement(o.Provider,{value:i},n)}return r.displayName=t+"Provider",[r,function(r){const i=e.useContext(o);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${r}\` must be used within \`${t}\``)}]}("DialogTitleWarning",{contentName:Or,titleName:Ir,docsSlug:"dialog"}),Ur=t=>{const{u:n,children:o,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[u=!1,d]=Vn({prop:r,defaultProp:i,onChange:a});return e.createElement(xr,{scope:n,triggerRef:l,contentRef:c,contentId:ct(),titleId:ct(),descriptionId:ct(),open:u,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:s},o)},Br=Nr,Kr=t=>{const{u:n,forceMount:o,children:r,container:i}=t,a=yr(Cr,n);return e.createElement(kr,{scope:n,forceMount:o},e.Children.map(r,(t=>e.createElement(Kn,{present:o||a.open},e.createElement(Bn,{asChild:!0,container:i},t)))))},Zr=Sr,Vr=Dr,Hr=Rr,Wr=Fr,qr=zr;function Gr(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}var Xr=["color"],Yr=e.forwardRef((function(t,n){var o=t.color,r=void 0===o?"currentColor":o,i=Gr(t,Xr);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:r,fillRule:"evenodd",clipRule:"evenodd"}))})),Jr=["color"],Qr=e.forwardRef((function(t,n){var o=t.color,r=void 0===o?"currentColor":o,i=Gr(t,Jr);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:r,fillRule:"evenodd",clipRule:"evenodd"}))})),ei=["color"],ti=e.forwardRef((function(t,n){var o=t.color,r=void 0===o?"currentColor":o,i=Gr(t,ei);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:r,fillRule:"evenodd",clipRule:"evenodd"}))})),ni=["color"],oi=e.forwardRef((function(t,n){var o=t.color,r=void 0===o?"currentColor":o,i=Gr(t,ni);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:r,fillRule:"evenodd",clipRule:"evenodd"}))})),ri=["color"],ii=e.forwardRef((function(t,n){var o=t.color,r=void 0===o?"currentColor":o,i=Gr(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:"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:r,fillRule:"evenodd",clipRule:"evenodd"}))})),ai=["color"],si=e.forwardRef((function(t,n){var o=t.color,r=void 0===o?"currentColor":o,i=Gr(t,ai);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:r}))})),li=["color"],ci=e.forwardRef((function(t,n){var o=t.color,r=void 0===o?"currentColor":o,i=Gr(t,li);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:r,fillRule:"evenodd",clipRule:"evenodd"}))}));function ui(t){const n=t+"CollectionProvider",[o,r]=ye(n),[i,a]=o(n,{collectionRef:{current:null},itemMap:new Map}),s=t+"CollectionSlot",l=t+"CollectionItemSlot",c="data-radix-collection-item";return[{Provider:t=>{const{scope:n,children:o}=t,r=e.useRef(null),a=e.useRef(new Map).current;return e.createElement(i,{scope:n,itemMap:a,collectionRef:r},o)},Slot:e.forwardRef(((t,n)=>{const{scope:o,children:r}=t,i=C(n,a(s,o).collectionRef);return e.createElement(k,{ref:i},r)})),ItemSlot:e.forwardRef(((t,n)=>{const{scope:o,children:r,...i}=t,s=e.useRef(null),u=C(n,s),d=a(l,o);return e.useEffect((()=>(d.itemMap.set(s,{ref:s,...i}),()=>{d.itemMap.delete(s)}))),e.createElement(k,{[c]:"",ref:u},r)}))},function(n){const o=a(t+"CollectionConsumer",n),r=e.useCallback((()=>{const e=o.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${c}]`)),n=Array.from(o.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return n}),[o.collectionRef,o.itemMap]);return r},r]}const di="Collapsible",[fi,pi]=ye(di),[mi,hi]=fi(di),vi=e.forwardRef(((t,n)=>{const{g:o,open:r,defaultOpen:i,disabled:a,onOpenChange:s,...l}=t,[c=!1,u]=Vn({prop:r,defaultProp:i,onChange:s});return e.createElement(mi,{scope:o,disabled:a,contentId:ct(),open:c,onOpenToggle:e.useCallback((()=>u((e=>!e))),[u])},e.createElement(Me.div,_e({"data-state":yi(c),"data-disabled":a?"":void 0},l,{ref:n})))})),gi=e.forwardRef(((t,n)=>{const{g:o,...r}=t,i=hi("CollapsibleTrigger",o);return e.createElement(Me.button,_e({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":yi(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:n,onClick:Xe(t.onClick,i.onOpenToggle)}))})),bi="CollapsibleContent",wi=e.forwardRef(((t,n)=>{const{forceMount:o,...r}=t,i=hi(bi,t.g);return e.createElement(Kn,{present:o||i.open},(({present:t})=>e.createElement(xi,_e({},r,{ref:n,present:t}))))})),xi=e.forwardRef(((t,n)=>{const{g:o,present:r,children:i,...a}=t,s=hi(bi,o),[l,c]=e.useState(r),u=e.useRef(null),d=C(n,u),f=e.useRef(0),p=f.current,m=e.useRef(0),h=m.current,v=s.open||l,g=e.useRef(v),b=e.useRef();return e.useEffect((()=>{const e=requestAnimationFrame((()=>g.current=!1));return()=>cancelAnimationFrame(e)}),[]),ke((()=>{const e=u.current;if(e){b.current=b.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,m.current=t.width,g.current||(e.style.transitionDuration=b.current.transitionDuration,e.style.animationName=b.current.animationName),c(r)}}),[s.open,r]),e.createElement(Me.div,_e({"data-state":yi(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v},a,{ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...t.style}}),v&&i)}));function yi(e){return e?"open":"closed"}const Ni=vi,Ci=gi,ki=wi,_i=e.createContext(void 0);function Mi(t){const n=e.useContext(_i);return t||n||"ltr"}const Si="Accordion",Ai=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Oi,Di,Pi]=ui(Si),[Ei,Ti]=ye(Si,[Pi,pi]),Ii=pi();e.forwardRef(((t,n)=>{const{type:o,...r}=t,i=r,a=r;return e.createElement(Oi.Provider,{scope:t.N},"multiple"===o?e.createElement(ji,y({},a,{ref:n})):e.createElement(Li,y({},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,Fi]=Ei(Si),[zi,$i]=Ei(Si,{collapsible:!1}),Li=e.forwardRef(((t,n)=>{const{value:o,defaultValue:r,onValueChange:i=(()=>{}),collapsible:a=!1,...s}=t,[l,c]=Vn({prop:o,defaultProp:r,onChange:i});return e.createElement(Ri,{scope:t.N,value:l?[l]:[],onItemOpen:c,onItemClose:e.useCallback((()=>a&&c("")),[a,c])},e.createElement(zi,{scope:t.N,collapsible:a},e.createElement(Ki,y({},s,{ref:n}))))})),ji=e.forwardRef(((t,n)=>{const{value:o,defaultValue:r,onValueChange:i=(()=>{}),...a}=t,[s=[],l]=Vn({prop:o,defaultProp:r,onChange:i}),c=e.useCallback((e=>l(((t=[])=>[...t,e]))),[l]),u=e.useCallback((e=>l(((t=[])=>t.filter((t=>t!==e))))),[l]);return e.createElement(Ri,{scope:t.N,value:s,onItemOpen:c,onItemClose:u},e.createElement(zi,{scope:t.N,collapsible:!0},e.createElement(Ki,y({},a,{ref:n}))))})),[Ui,Bi]=Ei(Si),Ki=e.forwardRef(((t,n)=>{const{N:o,disabled:r,dir:i,orientation:a="vertical",...s}=t,l=C(e.useRef(null),n),c=Di(o),u="ltr"===Mi(i),d=Xe(t.onKeyDown,(e=>{var t;if(!Ai.includes(e.key))return;const n=e.target,o=c().filter((e=>{var t;return!(null!==(t=e.ref.current)&&void 0!==t&&t.disabled)})),r=o.findIndex((e=>e.ref.current===n)),i=o.length;if(-1===r)return;e.preventDefault();let s=r;const l=i-1,d=()=>{s=r+1,s>l&&(s=0)},f=()=>{s=r-1,s<0&&(s=l)};switch(e.key){case"Home":s=0;break;case"End":s=l;break;case"ArrowRight":"horizontal"===a&&(u?d():f());break;case"ArrowDown":"vertical"===a&&d();break;case"ArrowLeft":"horizontal"===a&&(u?f():d());break;case"ArrowUp":"vertical"===a&&f()}null===(t=o[s%i].ref.current)||void 0===t||t.focus()}));return e.createElement(Ui,{scope:o,disabled:r,direction:i,orientation:a},e.createElement(Oi.Slot,{scope:o},e.createElement(Me.div,y({},s,{"data-orientation":a,ref:l,onKeyDown:r?void 0:d}))))})),Zi="AccordionItem",[Vi,Hi]=Ei(Zi),Wi="AccordionTrigger";function qi(e){return e?"open":"closed"}const Gi=e.forwardRef(((t,n)=>{const{N:o,value:r,...i}=t,a=Bi(Zi,o),s=Fi(Zi,o),l=Ii(o),c=ct(),u=r&&s.value.includes(r)||!1,d=a.disabled||t.disabled;return e.createElement(Vi,{scope:o,open:u,disabled:d,triggerId:c},e.createElement(Ni,y({"data-orientation":a.orientation,"data-state":qi(u)},l,i,{ref:n,disabled:d,open:u,onOpenChange:e=>{e?s.onItemOpen(r):s.onItemClose(r)}})))})),Xi=e.forwardRef(((t,n)=>{const{N:o,...r}=t,i=Bi(Si,o),a=Hi("AccordionHeader",o);return e.createElement(Me.h3,y({"data-orientation":i.orientation,"data-state":qi(a.open),"data-disabled":a.disabled?"":void 0},r,{ref:n}))})),Yi=e.forwardRef(((t,n)=>{const{N:o,...r}=t,i=Bi(Si,o),a=Hi(Wi,o),s=$i(Wi,o),l=Ii(o);return e.createElement(Oi.ItemSlot,{scope:o},e.createElement(Ci,y({"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId},l,r,{ref:n})))})),Ji=e.forwardRef(((t,n)=>{const{N:o,...r}=t,i=Bi(Si,o),a=Hi("AccordionContent",o),s=Ii(o);return e.createElement(ki,y({role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation},s,r,{ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}}))})),[Qi,ea]=ye("AlertDialog",[wr]),ta=wr(),na=e.forwardRef(((t,n)=>{const{C:o,...r}=t,i=ta(o);return e.createElement(Br,y({},i,r,{ref:n}))})),oa=e.forwardRef(((t,n)=>{const{C:o,...r}=t,i=ta(o);return e.createElement(Zr,y({},i,r,{ref:n}))})),ra="AlertDialogContent",[ia,aa]=Qi(ra),sa=e.forwardRef(((t,n)=>{const{C:o,children:r,...i}=t,a=ta(o),s=C(n,e.useRef(null)),l=e.useRef(null);return e.createElement(Lr,{contentName:ra,titleName:la,docsSlug:"alert-dialog"},e.createElement(ia,{scope:o,cancelRef:l},e.createElement(Vr,y({role:"alertdialog"},a,i,{ref:s,onOpenAutoFocus:Xe(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(M,null,r),!1)))})),la="AlertDialogTitle",ca=e.forwardRef(((t,n)=>{const{C:o,...r}=t,i=ta(o);return e.createElement(Hr,y({},i,r,{ref:n}))})),ua=e.forwardRef(((t,n)=>{const{C:o,...r}=t,i=ta(o);return e.createElement(Wr,y({},i,r,{ref:n}))})),da=t=>{const{C:n,...o}=t,r=ta(n);return e.createElement(Ur,y({},r,o,{modal:!0}))},fa=na,pa=t=>{const{C:n,...o}=t,r=ta(n);return e.createElement(Kr,y({},r,o))},ma=oa,ha=sa,va=e.forwardRef(((t,n)=>{const{C:o,...r}=t,i=ta(o);return e.createElement(qr,y({},i,r,{ref:n}))})),ga=e.forwardRef(((t,n)=>{const{C:o,...r}=t,{cancelRef:i}=aa("AlertDialogCancel",o),a=ta(o),s=C(n,i);return e.createElement(qr,y({},a,r,{ref:s}))})),ba=ca,wa=ua;var xa,ya=function(){return ya=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ya.apply(this,arguments)},Na=e.createContext(void 0);function Ca(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 o=function(){var t=e.useContext(Na);if(!t)throw new Error("useDayPicker must be used within a DayPickerProvider.");return t}(),r=o.classNames,i=o.styles,a=[r.button_reset,r.button];t.className&&a.push(t.className);var s=a.join(" "),l=ya(ya({},i.button_reset),i.button);return t.style&&Object.assign(l,t.style),e.createElement("button",ya({},t,{ref:n,type:"button",className:s,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"}(xa||(xa={})),xa.Selected,xa.Disabled,xa.Hidden,xa.Today,xa.RangeEnd,xa.RangeMiddle,xa.RangeStart,xa.Outside,e.createContext(void 0),e.createContext(void 0),e.createContext(void 0);const ka="Checkbox",[_a,Ma]=ye(ka),[Sa,Aa]=_a(ka),Oa=e.forwardRef(((t,n)=>{const{k:o,name:r,checked:i,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:u,...d}=t,[f,p]=e.useState(null),m=C(n,(e=>p(e))),h=e.useRef(!1),v=!f||Boolean(f.closest("form")),[g=!1,b]=Vn({prop:i,defaultProp:a,onChange:u}),w=e.useRef(g);return e.useEffect((()=>{const e=null==f?void 0:f.form;if(e){const t=()=>b(w.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,b]),e.createElement(Sa,{scope:o,state:g,disabled:l},e.createElement(Me.button,y({type:"button",role:"checkbox","aria-checked":Pa(g)?"mixed":g,"aria-required":s,"data-state":Ea(g),"data-disabled":l?"":void 0,disabled:l,value:c},d,{ref:m,onKeyDown:Xe(t.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:Xe(t.onClick,(e=>{b((e=>!!Pa(e)||!e)),v&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),v&&e.createElement(Da,{control:f,bubbles:!h.current,name:r,value:c,checked:g,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))})),Da=t=>{const{control:n,checked:o,bubbles:r=!0,...i}=t,a=e.useRef(null),s=Ca(o),l=Mn(n);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==o&&n){const t=new Event("click",{bubbles:r});e.indeterminate=Pa(o),n.call(e,!Pa(o)&&o),e.dispatchEvent(t)}}),[s,o,r]),e.createElement("input",y({type:"checkbox","aria-hidden":!0,defaultChecked:!Pa(o)&&o},i,{tabIndex:-1,ref:a,style:{...t.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Pa(e){return"indeterminate"===e}function Ea(e){return Pa(e)?"indeterminate":e?"checked":"unchecked"}const Ta=Oa,Ia=e.forwardRef(((t,n)=>{const{k:o,forceMount:r,...i}=t,a=Aa("CheckboxIndicator",o);return e.createElement(Kn,{present:r||Pa(a.state)||!0===a.state},e.createElement(Me.span,y({"data-state":Ea(a.state),"data-disabled":a.disabled?"":void 0},i,{ref:n,style:{pointerEvents:"none",...t.style}})))}));function Ra(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(null==e||e(o),!1===n||!o.defaultPrevented)return null==t?void 0:t(o)}}function Fa(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function za(...t){return e.useCallback(Fa(...t),t)}function $a(...t){const n=t[0];if(1===t.length)return n;const o=()=>{const o=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const r=o.reduce(((e,{useScope:n,scopeName:o})=>({...e,...n(t)[`__scope${o}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:r})),[r])}};return o.scopeName=n.scopeName,o}const La=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{},ja=o["useId".toString()]||(()=>{});let Ua=0;function Ba(e){const[t,n]=o.useState(ja());return La((()=>{e||n((e=>null!=e?e:String(Ua++)))}),[e]),e||(t?`radix-${t}`:"")}function Ka(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 Za({prop:t,defaultProp:n,onChange:o=(()=>{})}){const[r,i]=function({defaultProp:t,onChange:n}){const o=e.useState(t),[r]=o,i=e.useRef(r),a=Ka(n);return e.useEffect((()=>{i.current!==r&&(a(r),i.current=r)}),[r,i,a]),o}({defaultProp:n,onChange:o}),a=void 0!==t,s=a?t:r,l=Ka(o);return[s,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 Va=e.forwardRef(((t,n)=>{const{children:o,...r}=t,i=e.Children.toArray(o),a=i.find(qa);if(a){const t=a.props.children,o=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(Ha,_e({},r,{ref:n}),e.isValidElement(t)?e.cloneElement(t,void 0,o):null)}return e.createElement(Ha,_e({},r,{ref:n}),o)}));Va.displayName="Slot";const Ha=e.forwardRef(((t,n)=>{const{children:o,...r}=t;return e.isValidElement(o)?e.cloneElement(o,{...Ga(r,o.props),ref:Fa(n,o.ref)}):e.Children.count(o)>1?e.Children.only(null):null}));Ha.displayName="SlotClone";const Wa=({children:t})=>e.createElement(e.Fragment,null,t);function qa(t){return e.isValidElement(t)&&t.type===Wa}function Ga(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?n[o]=(...e)=>{null==i||i(...e),null==r||r(...e)}:"style"===o?n[o]={...r,...i}:"className"===o&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}const Xa=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const o=e.forwardRef(((t,o)=>{const{asChild:r,...i}=t,a=r?Va:n;return e.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.createElement(a,_e({},i,{ref:o}))}));return o.displayName=`Primitive.${n}`,{...t,[n]:o}}),{});const Ya="dismissableLayer.update",Ja="dismissableLayer.pointerDownOutside",Qa="dismissableLayer.focusOutside";let es;const ts=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ns=e.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=t,u=e.useContext(ts),[d,f]=e.useState(null),[,p]=e.useState({}),m=za(n,(e=>f(e))),h=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(v),b=d?h.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=b>=g,y=function(t){const n=Ka(t),o=e.useRef(!1),r=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){const i={originalEvent:e};function t(){rs(Ja,n,i,{discrete:!0})}"touch"===e.pointerType?(document.removeEventListener("click",r.current),r.current=t,document.addEventListener("click",r.current,{once:!0})):t()}o.current=!1},t=window.setTimeout((()=>{document.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),document.removeEventListener("pointerdown",e),document.removeEventListener("click",r.current)}}),[n]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));x&&!n&&(null==i||i(e),null==s||s(e),e.defaultPrevented||null==l||l())})),N=function(t){const n=Ka(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){rs(Qa,n,{originalEvent:e},{discrete:!1})}};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)}),[n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(null==a||a(e),null==s||s(e),e.defaultPrevented||null==l||l())}));return function(t){const n=Ka(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n])}((e=>{b===u.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))})),e.useEffect((()=>{if(d)return o&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(es=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),os(),()=>{o&&1===u.layersWithOutsidePointerEventsDisabled.size&&(document.body.style.pointerEvents=es)}}),[d,o,u]),e.useEffect((()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),os())}),[d,u]),e.useEffect((()=>{const e=()=>p({});return document.addEventListener(Ya,e),()=>document.removeEventListener(Ya,e)}),[]),e.createElement(Xa.div,_e({},c,{ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:Ra(t.onFocusCapture,N.onFocusCapture),onBlurCapture:Ra(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Ra(t.onPointerDownCapture,y.onPointerDownCapture)}))}));function os(){const e=new CustomEvent(Ya);document.dispatchEvent(e)}function rs(e,n,o,{discrete:r}){const i=o.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});n&&i.addEventListener(e,n,{once:!0}),r?function(e,n){e&&t.flushSync((()=>e.dispatchEvent(n)))}(i,a):i.dispatchEvent(a)}const is="focusScope.autoFocusOnMount",as="focusScope.autoFocusOnUnmount",ss={bubbles:!1,cancelable:!0},ls=e.forwardRef(((t,n)=>{const{loop:o=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[l,c]=e.useState(null),u=Ka(i),d=Ka(a),f=e.useRef(null),p=za(n,(e=>c(e))),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(r){function e(e){if(m.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:fs(f.current,{select:!0})}function t(e){!m.paused&&l&&(l.contains(e.relatedTarget)||fs(f.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}}),[r,l,m.paused]),e.useEffect((()=>{if(l){ps.add(m);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(is,ss);l.addEventListener(is,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(fs(o,{select:t}),document.activeElement!==n)return}((e=cs(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&fs(l))}return()=>{l.removeEventListener(is,u),setTimeout((()=>{const e=new CustomEvent(as,ss);l.addEventListener(as,d),l.dispatchEvent(e),e.defaultPrevented||fs(null!=t?t:document.body,{select:!0}),l.removeEventListener(as,d),ps.remove(m)}),0)}}var e}),[l,u,d,m]);const h=e.useCallback((e=>{if(!o&&!r)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,i]=function(e){const t=cs(e),n=us(t,e),o=us(t.reverse(),e);return[n,o]}(t);r&&i?e.shiftKey||n!==i?e.shiftKey&&n===r&&(e.preventDefault(),o&&fs(i,{select:!0})):(e.preventDefault(),o&&fs(r,{select:!0})):n===t&&e.preventDefault()}}),[o,r,m.paused]);return e.createElement(Xa.div,_e({tabIndex:-1},s,{ref:p,onKeyDown:h}))}));function cs(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 us(e,t){for(const n of e)if(!ds(n,{upTo:t}))return n}function ds(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 fs(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 ps=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=ms(e,t),e.unshift(t)},remove(t){var n;e=ms(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function ms(e,t){const n=[...e],o=n.indexOf(t);return-1!==o&&n.splice(o,1),n}const hs=e.forwardRef(((n,o)=>{var r;const{container:i=(null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body),...a}=n;return i?t.createPortal(e.createElement(Xa.div,_e({},a,{ref:o})),i):null}));const vs=n=>{const{present:o,children:r}=n,i=function(n){const[o,r]=e.useState(),i=e.useRef({}),a=e.useRef(n),s=e.useRef("none"),l=n?"mounted":"unmounted",[c,u]=function(t,n){return e.useReducer(((e,t)=>{const o=n[e][t];return null!=o?o:e}),t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=gs(i.current);s.current="mounted"===c?e:"none"}),[c]),La((()=>{const e=i.current,t=a.current;if(t!==n){const o=s.current,r=gs(e);if(n)u("MOUNT");else if("none"===r||"none"===(null==e?void 0:e.display))u("UNMOUNT");else{u(t&&o!==r?"ANIMATION_OUT":"UNMOUNT")}a.current=n}}),[n,u]),La((()=>{if(o){const e=e=>{const n=gs(i.current).includes(e.animationName);e.target===o&&n&&t.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===o&&(s.current=gs(i.current))};return o.addEventListener("animationstart",n),o.addEventListener("animationcancel",e),o.addEventListener("animationend",e),()=>{o.removeEventListener("animationstart",n),o.removeEventListener("animationcancel",e),o.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[o,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:e.useCallback((e=>{e&&(i.current=getComputedStyle(e)),r(e)}),[])}}(o),a="function"==typeof r?r({present:i.isPresent}):e.Children.only(r),s=za(i.ref,a.ref);return"function"==typeof r||i.isPresent?e.cloneElement(a,{ref:s}):null};function gs(e){return(null==e?void 0:e.animationName)||"none"}vs.displayName="Presence";let bs=0;function ws(){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 xs=To(),ys=function(){},Ns=o.forwardRef((function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:ys,onWheelCapture:ys,onTouchMoveCapture:ys}),i=r[0],a=r[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,h=e.inert,v=e.allowPinchZoom,g=e.as,b=void 0===g?"div":g,w=So(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=p,y=Po([n,t]),N=Mo(Mo({},w),i);return o.createElement(o.Fragment,null,d&&o.createElement(x,{sideCar:xs,removeScrollBar:u,shards:f,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!v,lockRef:n}),s?o.cloneElement(o.Children.only(l),Mo(Mo({},N),{ref:y})):o.createElement(b,Mo({},N,{className:c,ref:y}),l))}));Ns.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ns.classNames={fullWidth:Do,zeroRight:Oo};var Cs=!1;if("undefined"!=typeof window)try{var ks=Object.defineProperty({},"passive",{get:function(){return Cs=!0,!0}});window.addEventListener("test",ks,ks),window.removeEventListener("test",ks,ks)}catch(Mx){Cs=!1}var _s=!!Cs&&{passive:!1},Ms=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Ss(e,n)){var o=As(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Ss=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)},As=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},Os=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ds=function(e){return[e.deltaX,e.deltaY]},Ps=function(e){return e&&"current"in e?e.current:e},Es=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Ts=0,Is=[];var Rs=Ro(xs,(function(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(Ts++)[0],a=o.useState((function(){return Uo()}))[0],s=o.useRef(e);o.useEffect((function(){s.current=e}),[e]),o.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=Ao([e.lockRef.current],(e.shards||[]).map(Ps),!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=o.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var o,i=Os(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=Ms(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=Ms(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,o,r){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*o,s=n.target,l=t.contains(s),c=!1,u=a>0,d=0,f=0;do{var p=As(e,s),m=p[0],h=p[1]-p[2]-i*m;(m||h)&&Ss(e,s)&&(d+=h,f+=m),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(r&&0===d||!r&&a>d)||!u&&(r&&0===f||!r&&-a>f))&&(c=!0),c}(p,t,e,"h"===p?l:c,!0)}),[]),c=o.useCallback((function(e){var n=e;if(Is.length&&Is[Is.length-1]===a){var o="deltaY"in n?Ds(n):Os(n),r=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,o)}))[0];if(r&&r.should)n.preventDefault();else if(!r){var i=(s.current.shards||[]).map(Ps).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?l(n,i[0]):!s.current.noIsolation)&&n.preventDefault()}}}),[]),u=o.useCallback((function(e,n,o,r){var i={name:e,delta:n,target:o,should:r};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=o.useCallback((function(e){n.current=Os(e),r.current=void 0}),[]),f=o.useCallback((function(t){u(t.type,Ds(t),t.target,l(t,e.lockRef.current))}),[]),p=o.useCallback((function(t){u(t.type,Os(t),t.target,l(t,e.lockRef.current))}),[]);o.useEffect((function(){return Is.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,_s),document.addEventListener("touchmove",c,_s),document.addEventListener("touchstart",d,_s),function(){Is=Is.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,_s),document.removeEventListener("touchmove",c,_s),document.removeEventListener("touchstart",d,_s)}}),[]);var m=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(a,{styles:Es(i)}):null,m?o.createElement(Wo,{gapMode:"margin"}):null)})),Fs=o.forwardRef((function(e,t){return o.createElement(Ns,Mo({},e,{ref:t,sideCar:Rs}))}));Fs.classNames=Ns.classNames;var zs=Fs;const $s="Dialog",[Ls,js]=function(t,n=[]){let o=[];const r=()=>{const n=o.map((t=>e.createContext(t)));return function(o){const r=(null==o?void 0:o[t])||n;return e.useMemo((()=>({[`__scope${t}`]:{...o,[t]:r}})),[o,r])}};return r.scopeName=t,[function(n,r){const i=e.createContext(r),a=o.length;function s(n){const{scope:o,children:r,...s}=n,l=(null==o?void 0:o[t][a])||i,c=e.useMemo((()=>s),Object.values(s));return e.createElement(l.Provider,{value:c},r)}return o=[...o,r],s.displayName=n+"Provider",[s,function(o,s){const l=(null==s?void 0:s[t][a])||i,c=e.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${o}\` must be used within \`${n}\``)}]},$a(r,...n)]}($s),[Us,Bs]=Ls($s),Ks="DialogPortal",[Zs,Vs]=Ls(Ks,{forceMount:void 0}),Hs="DialogOverlay",Ws=e.forwardRef(((t,n)=>{const o=Vs(Hs,t.u),{forceMount:r=o.forceMount,...i}=t,a=Bs(Hs,t.u);return a.modal?e.createElement(vs,{present:r||a.open},e.createElement(qs,_e({},i,{ref:n}))):null})),qs=e.forwardRef(((t,n)=>{const{u:o,...r}=t,i=Bs(Hs,o);return e.createElement(zs,{as:Va,allowPinchZoom:!0,shards:[i.contentRef]},e.createElement(Xa.div,_e({"data-state":el(i.open)},r,{ref:n,style:{pointerEvents:"auto",...r.style}})))})),Gs="DialogContent",Xs=e.forwardRef(((t,n)=>{const o=Vs(Gs,t.u),{forceMount:r=o.forceMount,...i}=t,a=Bs(Gs,t.u);return e.createElement(vs,{present:r||a.open},a.modal?e.createElement(Ys,_e({},i,{ref:n})):e.createElement(Js,_e({},i,{ref:n})))})),Ys=e.forwardRef(((t,n)=>{const o=Bs(Gs,t.u),r=e.useRef(null),i=za(n,o.contentRef,r);return e.useEffect((()=>{const e=r.current;if(e)return vr(e)}),[]),e.createElement(Qs,_e({},t,{ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ra(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=o.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Ra(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Ra(t.onFocusOutside,(e=>e.preventDefault()))}))})),Js=e.forwardRef(((t,n)=>{const o=Bs(Gs,t.u),r=e.useRef(!1);return e.createElement(Qs,_e({},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)||(r.current||null===(i=o.triggerRef.current)||void 0===i||i.focus(),e.preventDefault());r.current=!1},onInteractOutside:e=>{var n,i;null===(n=t.onInteractOutside)||void 0===n||n.call(t,e),e.defaultPrevented||(r.current=!0);const a=e.target;(null===(i=o.triggerRef.current)||void 0===i?void 0:i.contains(a))&&e.preventDefault()}}))})),Qs=e.forwardRef(((t,n)=>{const{u:o,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=Bs(Gs,o),c=za(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:ws()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:ws()),bs++,()=>{1===bs&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),bs--}}),[]),e.createElement(e.Fragment,null,e.createElement(ls,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a},e.createElement(ns,_e({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":el(l.open)},s,{ref:c,onDismiss:()=>l.onOpenChange(!1)}))),!1)}));function el(e){return e?"open":"closed"}const tl=t=>{const{u:n,children:o,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[u=!1,d]=Za({prop:r,defaultProp:i,onChange:a});return e.createElement(Us,{scope:n,triggerRef:l,contentRef:c,contentId:Ba(),titleId:Ba(),descriptionId:Ba(),open:u,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:s},o)},nl=t=>{const{u:n,forceMount:o,children:r,container:i}=t,a=Bs(Ks,n);return e.createElement(Zs,{scope:n,forceMount:o},e.Children.map(r,(t=>e.createElement(vs,{present:o||a.open},e.createElement(hs,{asChild:!0,container:i},t)))))},ol=Ws,rl=Xs;function il(e){return e&&e._&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var al=1,sl=.9,ll=.3,cl=.1,ul=0,dl=.999,fl=.9999,pl=.99,ml=/[\\\/\-_+.# \t"@\[\(\{&]/,hl=/[\\\/\-_+.# \t"@\[\(\{&]/g;function vl(e,t,n,o,r,i){if(i===t.length)return r===e.length?al:pl;for(var a,s,l,c=o.charAt(i),u=n.indexOf(c,r),d=0;u>=0;)(a=vl(e,t,n,o,u+1,i+1))>d&&(u===r?a*=al:ml.test(e.charAt(u-1))?(a*=sl,(l=e.slice(r,u-1).match(hl))&&r>0&&(a*=Math.pow(dl,l.length))):ml.test(e.slice(r,u-1))?(a*=ul,r>0&&(a*=Math.pow(dl,u-r))):(a*=ll,r>0&&(a*=Math.pow(dl,u-r))),e.charAt(u)!==t.charAt(i)&&(a*=fl)),a<cl&&n.charAt(u-1)===o.charAt(i+1)&&n.charAt(u-1)!==o.charAt(i)&&(s=vl(e,t,n,o,u+1,i+2))*cl>a&&(a=s*cl),a>d&&(d=a),u=n.indexOf(c,u+1);return d}var gl=il((function(e,t){return vl(e,t,e.toLowerCase(),t.toLowerCase(),0,0)})),bl='[cmdk-group=""]',wl='[cmdk-group-items=""]',xl='[cmdk-item=""]',yl=`${xl}:not([aria-disabled="true"])`,Nl="cmdk-item-select",Cl="data-value",kl=(e,t)=>gl(e,t),_l=o.createContext(void 0),Ml=()=>o.useContext(_l),Sl=o.createContext(void 0),Al=()=>o.useContext(Sl),Ol=o.createContext(void 0),Dl=o.forwardRef(((e,t)=>{let n=o.useRef(null),r=Zl((()=>({search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}}))),i=Zl((()=>new Set)),a=Zl((()=>new Map)),s=Zl((()=>new Map)),l=Zl((()=>new Set)),c=Bl(e),{label:u,children:d,value:f,onValueChange:p,filter:m,shouldFilter:h,...v}=e,g=o.useId(),b=o.useId(),w=o.useId(),x=ql();Kl((()=>{if(void 0!==f){let e=f.trim().toLowerCase();r.current.value=e,x(6,S),y.emit()}}),[f]);let y=o.useMemo((()=>({subscribe:e=>(l.current.add(e),()=>l.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var o,i,a;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)M(),k(),x(1,_);else if("value"===e){if(void 0!==(null==(o=c.current)?void 0:o.value))return void(null==(a=(i=c.current).onValueChange)||a.call(i,t));n||x(5,S)}y.emit()}},emit:()=>{l.current.forEach((e=>e()))}})),[]),N=o.useMemo((()=>({value:(e,t)=>{t!==s.current.get(e)&&(s.current.set(e,t),r.current.filtered.items.set(e,C(t)),x(2,(()=>{k(),y.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]))),x(3,(()=>{M(),k(),r.current.value||_(),y.emit()})),()=>{s.current.delete(e),i.current.delete(e),r.current.filtered.items.delete(e),x(4,(()=>{M(),_(),y.emit()}))}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{s.current.delete(e),a.current.delete(e)}),filter:()=>c.current.shouldFilter,label:u||e["aria-label"],listId:g,inputId:w,labelId:b})),[]);function C(e){var t;let n=(null==(t=c.current)?void 0:t.filter)??kl;return e?n(e,r.current.search):0}function k(){if(!n.current||!r.current.search||!1===c.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach((n=>{let o=a.current.get(n),r=0;o.forEach((t=>{let n=e.get(t);r=Math.max(n,r)})),t.push([n,r])}));let o=n.current.querySelector('[cmdk-list-sizer=""]');O().sort(((t,n)=>{let o=t.getAttribute(Cl),r=n.getAttribute(Cl);return(e.get(r)??0)-(e.get(o)??0)})).forEach((e=>{let t=e.closest(wl);t?t.appendChild(e.parentElement===t?e:e.closest(`${wl} > *`)):o.appendChild(e.parentElement===o?e:e.closest(`${wl} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=n.current.querySelector(`${bl}[${Cl}="${e[0]}"]`);null==t||t.parentElement.appendChild(t)}))}function _(){let e=O().find((e=>!e.ariaDisabled)),t=null==e?void 0:e.getAttribute(Cl);y.setState("value",t||void 0)}function M(){if(!r.current.search||!1===c.current.shouldFilter)return void(r.current.filtered.count=i.current.size);r.current.filtered.groups=new Set;let e=0;for(let t of i.current){let n=C(s.current.get(t));r.current.filtered.items.set(t,n),n>0&&e++}for(let[t,n]of a.current)for(let e of n)if(r.current.filtered.items.get(e)>0){r.current.filtered.groups.add(t);break}r.current.filtered.count=e}function S(){var e,t,n;let o=A();o&&((null==(e=o.parentElement)?void 0:e.firstChild)===o&&(null==(n=null==(t=o.closest(bl))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),o.scrollIntoView({block:"nearest"}))}function A(){return n.current.querySelector(`${xl}[aria-selected="true"]`)}function O(){return Array.from(n.current.querySelectorAll(yl))}function D(e){let t=O()[e];t&&y.setState("value",t.getAttribute(Cl))}function P(e){var t;let n=A(),o=O(),r=o.findIndex((e=>e===n)),i=o[r+e];null!=(t=c.current)&&t.loop&&(i=r+e<0?o[o.length-1]:r+e===o.length?o[0]:o[r+e]),i&&y.setState("value",i.getAttribute(Cl))}function E(e){let t,n=A(),o=null==n?void 0:n.closest(bl);for(;o&&!t;)o=e>0?jl(o,bl):Ul(o,bl),t=null==o?void 0:o.querySelector(yl);t?y.setState("value",t.getAttribute(Cl)):P(e)}let T=()=>D(O().length-1),I=e=>{e.preventDefault(),e.metaKey?T():e.altKey?E(1):P(1)},R=e=>{e.preventDefault(),e.metaKey?D(0):e.altKey?E(-1):P(-1)};return o.createElement("div",{ref:Vl([n,t]),...v,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=v.onKeyDown)||t.call(v,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&&R(e);break;case"ArrowUp":R(e);break;case"Home":e.preventDefault(),D(0);break;case"End":e.preventDefault(),T();break;case"Enter":{e.preventDefault();let t=A();if(t){let e=new Event(Nl);t.dispatchEvent(e)}}}}},o.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:Gl},u),o.createElement(Sl.Provider,{value:y},o.createElement(_l.Provider,{value:N},d)))})),Pl=o.forwardRef(((e,t)=>{let n=o.useId(),r=o.useRef(null),i=o.useContext(Ol),a=Ml(),s=Bl(e);Kl((()=>a.item(n,i)),[]);let l=Wl(n,r,[e.value,e.children,r]),c=Al(),u=Hl((e=>e.value&&e.value===l.current)),d=Hl((e=>!1===a.filter()||(!e.search||e.filtered.items.get(n)>0)));function f(){var e,t;null==(t=(e=s.current).onSelect)||t.call(e,l.current)}if(o.useEffect((()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(Nl,f),()=>t.removeEventListener(Nl,f)}),[d,e.onSelect,e.disabled]),!d)return null;let{disabled:p,value:m,onSelect:h,...v}=e;return o.createElement("div",{ref:Vl([r,t]),...v,"cmdk-item":"",role:"option","aria-disabled":p||void 0,"aria-selected":u||void 0,"data-selected":u||void 0,onPointerMove:p?void 0:function(){c.setState("value",l.current,!0)},onClick:p?void 0:f},e.children)})),El=o.forwardRef(((e,t)=>{let{heading:n,children:r,...i}=e,a=o.useId(),s=o.useRef(null),l=o.useRef(null),c=o.useId(),u=Ml(),d=Hl((e=>!1===u.filter()||(!e.search||e.filtered.groups.has(a))));Kl((()=>u.group(a)),[]),Wl(a,s,[e.value,e.heading,l]);let f=o.createElement(Ol.Provider,{value:a},r);return o.createElement("div",{ref:Vl([s,t]),...i,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&o.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),o.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},f))})),Tl=o.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,i=o.useRef(null),a=Hl((e=>!e.search));return n||a?o.createElement("div",{ref:Vl([i,t]),...r,"cmdk-separator":"",role:"separator"}):null})),Il=o.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,i=null!=e.value,a=Al(),s=Hl((e=>e.search)),l=Ml();return o.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),o.createElement("input",{ref:t,...r,"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:s,onChange:e=>{i||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),Rl=o.forwardRef(((e,t)=>{let{children:n,...r}=e,i=o.useRef(null),a=o.useRef(null),s=Ml();return o.useEffect((()=>{if(a.current&&i.current){let e,t=a.current,n=i.current,o=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.getBoundingClientRect().height;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return o.observe(t),()=>{cancelAnimationFrame(e),o.unobserve(t)}}}),[]),o.createElement("div",{ref:Vl([i,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:s.listId,"aria-labelledby":s.inputId},o.createElement("div",{ref:a,"cmdk-list-sizer":""},n))})),Fl=o.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,container:i,...a}=e;return o.createElement(tl,{open:n,onOpenChange:r},o.createElement(nl,{container:i},o.createElement(ol,{"cmdk-overlay":""}),o.createElement(rl,{"aria-label":e.label,"cmdk-dialog":""},o.createElement(Dl,{ref:t,...a}))))})),zl=o.forwardRef(((e,t)=>{let n=o.useRef(!0),r=Hl((e=>0===e.filtered.count));return o.useEffect((()=>{n.current=!1}),[]),n.current||!r?null:o.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})})),$l=o.forwardRef(((e,t)=>{let{progress:n,children:r,...i}=e;return o.createElement("div",{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},o.createElement("div",{"aria-hidden":!0},r))})),Ll=Object.assign(Dl,{List:Rl,Item:Pl,Input:Il,Group:El,Separator:Tl,Dialog:Fl,Empty:zl,Loading:$l});function jl(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Ul(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Bl(e){let t=o.useRef(e);return Kl((()=>{t.current=e})),t}var Kl=typeof window>"u"?o.useEffect:o.useLayoutEffect;function Zl(e){let t=o.useRef();return void 0===t.current&&(t.current=e()),t}function Vl(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function Hl(e){let t=Al(),n=()=>e(t.snapshot());return o.useSyncExternalStore(t.subscribe,n,n)}function Wl(e,t,n){let r=o.useRef(),i=Ml();return Kl((()=>{var o;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==(o=t.current)||o.setAttribute(Cl,a),r.current=a})),r}var ql=()=>{let[e,t]=o.useState(),n=Zl((()=>new Map));return Kl((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,o)=>{n.current.set(e,o),t({})}},Gl={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Xl="rovingFocusGroup.onEntryFocus",Yl={bubbles:!1,cancelable:!0},Jl="RovingFocusGroup",[Ql,ec,tc]=ui(Jl),[nc,oc]=ye(Jl,[tc]),[rc,ic]=nc(Jl),ac=e.forwardRef(((t,n)=>e.createElement(Ql.Provider,{scope:t.M},e.createElement(Ql.Slot,{scope:t.M},e.createElement(sc,_e({},t,{ref:n})))))),sc=e.forwardRef(((t,n)=>{const{M:o,orientation:r,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=t,f=e.useRef(null),p=C(n,f),m=Mi(a),[h=null,v]=Vn({prop:s,defaultProp:l,onChange:c}),[g,b]=e.useState(!1),w=Ce(u),x=ec(o),y=e.useRef(!1),[N,k]=e.useState(0);return e.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(Xl,w),()=>e.removeEventListener(Xl,w)}),[w]),e.createElement(rc,{scope:o,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:e.useCallback((e=>v(e)),[v]),onItemShiftTab:e.useCallback((()=>b(!0)),[]),onFocusableItemAdd:e.useCallback((()=>k((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>k((e=>e-1))),[])},e.createElement(Me.div,_e({tabIndex:g||0===N?-1:0,"data-orientation":r},d,{ref:p,style:{outline:"none",...t.style},onMouseDown:Xe(t.onMouseDown,(()=>{y.current=!0})),onFocus:Xe(t.onFocus,(e=>{const t=!y.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(Xl,Yl);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));uc([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}y.current=!1})),onBlur:Xe(t.onBlur,(()=>b(!1)))})))})),lc=e.forwardRef(((t,n)=>{const{M:o,focusable:r=!0,active:i=!1,tabStopId:a,...s}=t,l=ct(),c=a||l,u=ic("RovingFocusGroupItem",o),d=u.currentTabStopId===c,f=ec(o),{onFocusableItemAdd:p,onFocusableItemRemove:m}=u;return e.useEffect((()=>{if(r)return p(),()=>m()}),[r,p,m]),e.createElement(Ql.ItemSlot,{scope:o,id:c,focusable:r,active:i},e.createElement(Me.span,_e({tabIndex:d?0:-1,"data-orientation":u.orientation},s,{ref:n,onMouseDown:Xe(t.onMouseDown,(e=>{r?u.onItemFocus(c):e.preventDefault()})),onFocus:Xe(t.onFocus,(()=>u.onItemFocus(c))),onKeyDown:Xe(t.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const o=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(o)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(o)?void 0:cc[o]}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault();let r=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();const i=r.indexOf(e.currentTarget);r=u.loop?(o=i+1,(n=r).map(((e,t)=>n[(o+t)%n.length]))):r.slice(i+1)}setTimeout((()=>uc(r)))}var n,o}))})))})),cc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function uc(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const dc=ac,fc=lc,pc=["Enter"," "],mc=["ArrowUp","PageDown","End"],hc=["ArrowDown","PageUp","Home",...mc],vc={ltr:[...pc,"ArrowRight"],rtl:[...pc,"ArrowLeft"]},gc={ltr:["ArrowLeft"],rtl:["ArrowRight"]},bc="Menu",[wc,xc,yc]=ui(bc),[Nc,Cc]=ye(bc,[yc,On,oc]),kc=On(),_c=oc(),[Mc,Sc]=Nc(bc),[Ac,Oc]=Nc(bc),Dc=e.forwardRef(((t,n)=>{const{S:o,...r}=t,i=kc(o);return e.createElement(jn,_e({},i,r,{ref:n}))})),Pc="MenuPortal",[Ec,Tc]=Nc(Pc,{forceMount:void 0}),Ic="MenuContent",[Rc,Fc]=Nc(Ic),zc=e.forwardRef(((t,n)=>{const o=Tc(Ic,t.S),{forceMount:r=o.forceMount,...i}=t,a=Sc(Ic,t.S),s=Oc(Ic,t.S);return e.createElement(wc.Provider,{scope:t.S},e.createElement(Kn,{present:r||a.open},e.createElement(wc.Slot,{scope:t.S},s.modal?e.createElement($c,_e({},i,{ref:n})):e.createElement(Lc,_e({},i,{ref:n})))))})),$c=e.forwardRef(((t,n)=>{const o=Sc(Ic,t.S),r=e.useRef(null),i=C(n,r);return e.useEffect((()=>{const e=r.current;if(e)return vr(e)}),[]),e.createElement(jc,_e({},t,{ref:i,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:Xe(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)}))})),Lc=e.forwardRef(((t,n)=>{const o=Sc(Ic,t.S);return e.createElement(jc,_e({},t,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)}))})),jc=e.forwardRef(((t,n)=>{const{S:o,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:h,...v}=t,g=Sc(Ic,o),b=Oc(Ic,o),w=kc(o),x=_c(o),y=xc(o),[N,_]=e.useState(null),M=e.useRef(null),S=C(n,M,g.onContentChange),A=e.useRef(0),O=e.useRef(""),D=e.useRef(0),P=e.useRef(null),E=e.useRef("right"),T=e.useRef(0),I=h?cr:e.Fragment,R=h?{as:k,allowPinchZoom:!0}:void 0,F=e=>{var t,n;const o=O.current+e,r=y().filter((e=>!e.disabled)),i=document.activeElement,a=null===(t=r.find((e=>e.ref.current===i)))||void 0===t?void 0:t.textValue,s=function(e,t,n){const o=t.length>1&&Array.from(t).every((e=>e===t[0])),r=o?t[0]:t,i=n?e.indexOf(n):-1;let a=(s=e,l=Math.max(i,0),s.map(((e,t)=>s[(l+t)%s.length])));var s,l;1===r.length&&(a=a.filter((e=>e!==n)));const c=a.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return c!==n?c:void 0}(r.map((e=>e.textValue)),o,a),l=null===(n=r.find((e=>e.textValue===s)))||void 0===n?void 0:n.ref.current;!function e(t){O.current=t,window.clearTimeout(A.current),""!==t&&(A.current=window.setTimeout((()=>e("")),1e3))}(o),l&&setTimeout((()=>l.focus()))};e.useEffect((()=>()=>window.clearTimeout(A.current)),[]),ko();const z=e.useCallback((e=>{var t,n;return E.current===(null===(t=P.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:o}=e;let r=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const e=t[i].x,s=t[i].y,l=t[a].x,c=t[a].y;s>o!=c>o&&n<(l-e)*(o-s)/(c-s)+e&&(r=!r)}return r}(n,t)}(e,null===(n=P.current)||void 0===n?void 0:n.area)}),[]);return e.createElement(Rc,{scope:o,searchRef:O,onItemEnter:e.useCallback((e=>{z(e)&&e.preventDefault()}),[z]),onItemLeave:e.useCallback((e=>{var t;z(e)||(null===(t=M.current)||void 0===t||t.focus(),_(null))}),[z]),onTriggerLeave:e.useCallback((e=>{z(e)&&e.preventDefault()}),[z]),pointerGraceTimerRef:D,onPointerGraceIntentChange:e.useCallback((e=>{P.current=e}),[])},e.createElement(I,R,e.createElement(vo,{asChild:!0,trapped:i,onMountAutoFocus:Xe(a,(e=>{var t;e.preventDefault(),null===(t=M.current)||void 0===t||t.focus()})),onUnmountAutoFocus:s},e.createElement(nt,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m},e.createElement(dc,_e({asChild:!0},x,{dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:_,onEntryFocus:Xe(c,(e=>{b.isUsingKeyboardRef.current||e.preventDefault()}))}),e.createElement(Un,_e({role:"menu","aria-orientation":"vertical","data-state":ru(g.open),"data-radix-menu-content":"",dir:b.dir},w,v,{ref:S,style:{outline:"none",...v.style},onKeyDown:Xe(v.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,o=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&o&&F(e.key));const r=M.current;if(e.target!==r)return;if(!hc.includes(e.key))return;e.preventDefault();const i=y().filter((e=>!e.disabled)).map((e=>e.ref.current));mc.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:Xe(t.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(A.current),O.current="")})),onPointerMove:Xe(t.onPointerMove,su((e=>{const t=e.target,n=T.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>T.current?"right":"left";E.current=t,T.current=e.clientX}})))})))))))})),Uc=e.forwardRef(((t,n)=>{const{S:o,...r}=t;return e.createElement(Me.div,_e({},r,{ref:n}))})),Bc="MenuItem",Kc="menu.itemSelect",Zc=e.forwardRef(((t,n)=>{const{disabled:o=!1,onSelect:r,...i}=t,a=e.useRef(null),s=Oc(Bc,t.S),l=Fc(Bc,t.S),c=C(n,a),u=e.useRef(!1);return e.createElement(Vc,_e({},i,{ref:c,disabled:o,onClick:Xe(t.onClick,(()=>{const e=a.current;if(!o&&e){const t=new CustomEvent(Kc,{bubbles:!0,cancelable:!0});e.addEventListener(Kc,(e=>null==r?void 0:r(e)),{once:!0}),Se(e,t),t.defaultPrevented?u.current=!1:s.onClose()}})),onPointerDown:e=>{var n;null===(n=t.onPointerDown)||void 0===n||n.call(t,e),u.current=!0},onPointerUp:Xe(t.onPointerUp,(e=>{var t;u.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:Xe(t.onKeyDown,(e=>{const t=""!==l.searchRef.current;o||t&&" "===e.key||pc.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),Vc=e.forwardRef(((t,n)=>{const{S:o,disabled:r=!1,textValue:i,...a}=t,s=Fc(Bc,o),l=_c(o),c=e.useRef(null),u=C(n,c),[d,f]=e.useState(!1),[p,m]=e.useState("");return e.useEffect((()=>{const e=c.current;var t;e&&m((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),e.createElement(wc.ItemSlot,{scope:o,disabled:r,textValue:null!=i?i:p},e.createElement(fc,_e({asChild:!0},l,{focusable:!r}),e.createElement(Me.div,_e({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},a,{ref:u,onPointerMove:Xe(t.onPointerMove,su((e=>{if(r)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus()}}))),onPointerLeave:Xe(t.onPointerLeave,su((e=>s.onItemLeave(e)))),onFocus:Xe(t.onFocus,(()=>f(!0))),onBlur:Xe(t.onBlur,(()=>f(!1)))}))))})),Hc=e.forwardRef(((t,n)=>{const{checked:o=!1,onCheckedChange:r,...i}=t;return e.createElement(Yc,{scope:t.S,checked:o},e.createElement(Zc,_e({role:"menuitemcheckbox","aria-checked":iu(o)?"mixed":o},i,{ref:n,"data-state":au(o),onSelect:Xe(i.onSelect,(()=>null==r?void 0:r(!!iu(o)||!o)),{checkForDefaultPrevented:!1})})))})),[Wc,qc]=Nc("MenuRadioGroup",{value:void 0,onValueChange:()=>{}}),Gc=e.forwardRef(((t,n)=>{const{value:o,...r}=t,i=qc("MenuRadioItem",t.S),a=o===i.value;return e.createElement(Yc,{scope:t.S,checked:a},e.createElement(Zc,_e({role:"menuitemradio","aria-checked":a},r,{ref:n,"data-state":au(a),onSelect:Xe(r.onSelect,(()=>{var e;return null===(e=i.onValueChange)||void 0===e?void 0:e.call(i,o)}),{checkForDefaultPrevented:!1})})))})),Xc="MenuItemIndicator",[Yc,Jc]=Nc(Xc,{checked:!1}),Qc=e.forwardRef(((t,n)=>{const{S:o,forceMount:r,...i}=t,a=Jc(Xc,o);return e.createElement(Kn,{present:r||iu(a.checked)||!0===a.checked},e.createElement(Me.span,_e({},i,{ref:n,"data-state":au(a.checked)})))})),eu=e.forwardRef(((t,n)=>{const{S:o,...r}=t;return e.createElement(Me.div,_e({role:"separator","aria-orientation":"horizontal"},r,{ref:n}))})),[tu,nu]=Nc("MenuSub"),ou="MenuSubTrigger";function ru(e){return e?"open":"closed"}function iu(e){return"indeterminate"===e}function au(e){return iu(e)?"indeterminate":e?"checked":"unchecked"}function su(e){return t=>"mouse"===t.pointerType?e(t):void 0}const lu=Dc,cu=t=>{const{S:n,forceMount:o,children:r,container:i}=t,a=Sc(Pc,n);return e.createElement(Ec,{scope:n,forceMount:o},e.createElement(Kn,{present:o||a.open},e.createElement(Bn,{asChild:!0,container:i},r)))},uu=zc,du=Uc,fu=Zc,pu=Hc,mu=Gc,hu=Qc,vu=eu,gu=e.forwardRef(((t,n)=>{const o=Sc(ou,t.S),r=Oc(ou,t.S),i=nu(ou,t.S),a=Fc(ou,t.S),s=e.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={S:t.S},d=e.useCallback((()=>{s.current&&window.clearTimeout(s.current),s.current=null}),[]);return e.useEffect((()=>d),[d]),e.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}}),[l,c]),e.createElement(Dc,_e({asChild:!0},u),e.createElement(Vc,_e({id:i.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":i.contentId,"data-state":ru(o.open)},t,{ref:N(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(),o.open||o.onOpenChange(!0))},onPointerMove:Xe(t.onPointerMove,su((e=>{a.onItemEnter(e),e.defaultPrevented||t.disabled||o.open||s.current||(a.onPointerGraceIntentChange(null),s.current=window.setTimeout((()=>{o.onOpenChange(!0),d()}),100))}))),onPointerLeave:Xe(t.onPointerLeave,su((e=>{var t;d();const n=null===(t=o.content)||void 0===t?void 0:t.getBoundingClientRect();if(n){var r;const t=null===(r=o.content)||void 0===r?void 0:r.dataset.side,i="right"===t,s=i?-5:5,c=n[i?"left":"right"],u=n[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+s,y:e.clientY},{x:c,y:n.top},{x:u,y:n.top},{x:u,y:n.bottom},{x:c,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:Xe(t.onKeyDown,(e=>{const n=""!==a.searchRef.current;var i;t.disabled||n&&" "===e.key||vc[r.dir].includes(e.key)&&(o.onOpenChange(!0),null===(i=o.content)||void 0===i||i.focus(),e.preventDefault())}))})))})),bu=e.forwardRef(((t,n)=>{const o=Tc(Ic,t.S),{forceMount:r=o.forceMount,...i}=t,a=Sc(Ic,t.S),s=Oc(Ic,t.S),l=nu("MenuSubContent",t.S),c=e.useRef(null),u=C(n,c);return e.createElement(wc.Provider,{scope:t.S},e.createElement(Kn,{present:r||a.open},e.createElement(wc.Slot,{scope:t.S},e.createElement(jc,_e({id:l.contentId,"aria-labelledby":l.triggerId},i,{ref:u,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;s.isUsingKeyboardRef.current&&(null===(t=c.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Xe(t.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:Xe(t.onEscapeKeyDown,(e=>{s.onClose(),e.preventDefault()})),onKeyDown:Xe(t.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=gc[s.dir].includes(e.key);var o;t&&n&&(a.onOpenChange(!1),null===(o=l.trigger)||void 0===o||o.focus(),e.preventDefault())}))})))))})),wu="ContextMenu",[xu,yu]=ye(wu,[Cc]),Nu=Cc(),[Cu,ku]=xu(wu),_u=t=>{const{A:n,...o}=t,r=Nu(n);return e.createElement(cu,y({},r,o))},Mu=e.forwardRef(((t,n)=>{const{A:o,...r}=t,i=ku("ContextMenuContent",o),a=Nu(o),s=e.useRef(!1);return e.createElement(uu,y({},a,r,{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&&s.current&&e.preventDefault(),s.current=!1},onInteractOutside:e=>{var n;null===(n=t.onInteractOutside)||void 0===n||n.call(t,e),e.defaultPrevented||i.modal||(s.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)"}}))})),Su=e.forwardRef(((t,n)=>{const{A:o,...r}=t,i=Nu(o);return e.createElement(du,y({},i,r,{ref:n}))})),Au=e.forwardRef(((t,n)=>{const{A:o,...r}=t,i=Nu(o);return e.createElement(fu,y({},i,r,{ref:n}))})),Ou=e.forwardRef(((t,n)=>{const{A:o,...r}=t,i=Nu(o);return e.createElement(pu,y({},i,r,{ref:n}))})),Du=e.forwardRef(((t,n)=>{const{A:o,...r}=t,i=Nu(o);return e.createElement(mu,y({},i,r,{ref:n}))})),Pu=e.forwardRef(((t,n)=>{const{A:o,...r}=t,i=Nu(o);return e.createElement(hu,y({},i,r,{ref:n}))})),Eu=e.forwardRef(((t,n)=>{const{A:o,...r}=t,i=Nu(o);return e.createElement(vu,y({},i,r,{ref:n}))})),Tu=e.forwardRef(((t,n)=>{const{A:o,...r}=t,i=Nu(o);return e.createElement(gu,y({},i,r,{ref:n}))})),Iu=e.forwardRef(((t,n)=>{const{A:o,...r}=t,i=Nu(o);return e.createElement(bu,y({},i,r,{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)"}}))})),Ru="DropdownMenu",[Fu,zu]=ye(Ru,[Cc]),$u=Cc(),[Lu,ju]=Fu(Ru),Uu=t=>{const{O:n,...o}=t,r=$u(n);return e.createElement(cu,y({},r,o))},Bu=e.forwardRef(((t,n)=>{const{O:o,...r}=t,i=ju("DropdownMenuContent",o),a=$u(o),s=e.useRef(!1);return e.createElement(uu,y({id:i.contentId,"aria-labelledby":i.triggerId},a,r,{ref:n,onCloseAutoFocus:Xe(t.onCloseAutoFocus,(e=>{var t;s.current||null===(t=i.triggerRef.current)||void 0===t||t.focus(),s.current=!1,e.preventDefault()})),onInteractOutside:Xe(t.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,o=2===t.button||n;i.modal&&!o||(s.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)"}}))})),Ku=e.forwardRef(((t,n)=>{const{O:o,...r}=t,i=$u(o);return e.createElement(du,y({},i,r,{ref:n}))})),Zu=e.forwardRef(((t,n)=>{const{O:o,...r}=t,i=$u(o);return e.createElement(fu,y({},i,r,{ref:n}))})),Vu=e.forwardRef(((t,n)=>{const{O:o,...r}=t,i=$u(o);return e.createElement(pu,y({},i,r,{ref:n}))})),Hu=e.forwardRef(((t,n)=>{const{O:o,...r}=t,i=$u(o);return e.createElement(mu,y({},i,r,{ref:n}))})),Wu=e.forwardRef(((t,n)=>{const{O:o,...r}=t,i=$u(o);return e.createElement(hu,y({},i,r,{ref:n}))})),qu=e.forwardRef(((t,n)=>{const{O:o,...r}=t,i=$u(o);return e.createElement(vu,y({},i,r,{ref:n}))})),Gu=e.forwardRef(((t,n)=>{const{O:o,...r}=t,i=$u(o);return e.createElement(gu,y({},i,r,{ref:n}))})),Xu=e.forwardRef(((t,n)=>{const{O:o,...r}=t,i=$u(o);return e.createElement(bu,y({},i,r,{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)"}}))})),Yu=e.createContext(null),Ju=e.forwardRef(((t,n)=>e.createElement(Me.label,y({},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()}})))),Qu="Menubar",[ed,td,nd]=ui(Qu),[od,rd]=ye(Qu,[nd,oc]),id=Cc(),ad=oc(),[sd,ld]=od(Qu),cd=e.forwardRef(((t,n)=>{const{D:o,value:r,onValueChange:i,defaultValue:a,loop:s=!0,dir:l,...c}=t,u=Mi(l),d=ad(o),[f="",p]=Vn({prop:r,onChange:i,defaultProp:a}),[m,h]=e.useState(null);return e.createElement(sd,{scope:o,value:f,onMenuOpen:e.useCallback((e=>{p(e),h(e)}),[p]),onMenuClose:e.useCallback((()=>p("")),[p]),onMenuToggle:e.useCallback((e=>{p((t=>Boolean(t)?"":e)),h(e)}),[p]),dir:u,loop:s},e.createElement(ed.Provider,{scope:o},e.createElement(ed.Slot,{scope:o},e.createElement(dc,y({asChild:!0},d,{orientation:"horizontal",loop:s,dir:u,currentTabStopId:m,onCurrentTabStopIdChange:h}),e.createElement(Me.div,y({role:"menubar"},c,{ref:n}))))))})),[ud,dd]=od("MenubarMenu"),fd="MenubarTrigger",pd=e.forwardRef(((t,n)=>{const{D:o,disabled:r=!1,...i}=t,a=ad(o),s=id(o),l=ld(fd,o),c=dd(fd,o),u=e.useRef(null),d=C(n,u,c.triggerRef),[f,p]=e.useState(!1),m=l.value===c.value;return e.createElement(ed.ItemSlot,{scope:o,value:c.value,disabled:r},e.createElement(fc,y({asChild:!0},a,{focusable:!r,tabStopId:c.value}),e.createElement(lu,y({asChild:!0},s),e.createElement(Me.button,y({type:"button",role:"menuitem",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?c.contentId:void 0,"data-highlighted":f?"":void 0,"data-state":m?"open":"closed","data-disabled":r?"":void 0,disabled:r},i,{ref:d,onPointerDown:Xe(t.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(l.onMenuOpen(c.value),m||e.preventDefault())})),onPointerEnter:Xe(t.onPointerEnter,(()=>{var e;Boolean(l.value)&&!m&&(l.onMenuOpen(c.value),null===(e=u.current)||void 0===e||e.focus())})),onKeyDown:Xe(t.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&l.onMenuToggle(c.value),"ArrowDown"===e.key&&l.onMenuOpen(c.value),["Enter"," ","ArrowDown"].includes(e.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,e.preventDefault()))})),onFocus:Xe(t.onFocus,(()=>p(!0))),onBlur:Xe(t.onBlur,(()=>p(!1)))})))))})),md="MenubarContent",hd=e.forwardRef(((t,n)=>{const{D:o,align:r="start",...i}=t,a=id(o),s=ld(md,o),l=dd(md,o),c=td(o),u=e.useRef(!1);return e.createElement(uu,y({id:l.contentId,"aria-labelledby":l.triggerId,"data-radix-menubar-content":""},a,i,{ref:n,align:r,onCloseAutoFocus:Xe(t.onCloseAutoFocus,(e=>{var t;Boolean(s.value)||u.current||(null===(t=l.triggerRef.current)||void 0===t||t.focus());u.current=!1,e.preventDefault()})),onFocusOutside:Xe(t.onFocusOutside,(e=>{const t=e.target;c().some((e=>{var n;return null===(n=e.ref.current)||void 0===n?void 0:n.contains(t)}))&&e.preventDefault()})),onInteractOutside:Xe(t.onInteractOutside,(()=>{u.current=!0})),onEntryFocus:e=>{l.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:Xe(t.onKeyDown,(e=>{if(["ArrowRight","ArrowLeft"].includes(e.key)){const o=e.target,r=o.hasAttribute("data-radix-menubar-subtrigger"),i=o.closest("[data-radix-menubar-content]")!==e.currentTarget,a=("rtl"===s.dir?"ArrowRight":"ArrowLeft")===e.key;if(!a&&r)return;if(i&&a)return;let u=c().filter((e=>!e.disabled)).map((e=>e.value));a&&u.reverse();const d=u.indexOf(l.value);u=s.loop?(n=d+1,(t=u).map(((e,o)=>t[(n+o)%t.length]))):u.slice(d+1);const[f]=u;f&&s.onMenuOpen(f)}var t,n}),{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 vd=cd,gd=pd,bd=t=>{const{D:n,...o}=t,r=id(n);return e.createElement(cu,y({},r,o))},wd=hd,xd=e.forwardRef(((t,n)=>{const{D:o,...r}=t,i=id(o);return e.createElement(du,y({},i,r,{ref:n}))})),yd=e.forwardRef(((t,n)=>{const{D:o,...r}=t,i=id(o);return e.createElement(fu,y({},i,r,{ref:n}))})),Nd=e.forwardRef(((t,n)=>{const{D:o,...r}=t,i=id(o);return e.createElement(pu,y({},i,r,{ref:n}))})),Cd=e.forwardRef(((t,n)=>{const{D:o,...r}=t,i=id(o);return e.createElement(mu,y({},i,r,{ref:n}))})),kd=e.forwardRef(((t,n)=>{const{D:o,...r}=t,i=id(o);return e.createElement(hu,y({},i,r,{ref:n}))})),_d=e.forwardRef(((t,n)=>{const{D:o,...r}=t,i=id(o);return e.createElement(vu,y({},i,r,{ref:n}))})),Md=e.forwardRef(((t,n)=>{const{D:o,...r}=t,i=id(o);return e.createElement(gu,y({"data-radix-menubar-subtrigger":""},i,r,{ref:n}))})),Sd=e.forwardRef(((t,n)=>{const{D:o,...r}=t,i=id(o);return e.createElement(bu,y({},i,{"data-radix-menubar-content":""},r,{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)"}}))})),Ad="NavigationMenu",[Od,Dd,Pd]=ui(Ad),[Ed,Td,Id]=ui(Ad),[Rd,Fd]=ye(Ad,[Pd,Id]),[zd,$d]=Rd(Ad),[Ld,jd]=Rd(Ad),Ud=e.forwardRef(((t,n)=>{const{P:o,value:r,onValueChange:i,defaultValue:a,delayDuration:s=200,skipDelayDuration:l=300,orientation:c="horizontal",dir:u,...d}=t,[f,p]=e.useState(null),m=C(n,(e=>p(e))),h=Mi(u),v=e.useRef(0),g=e.useRef(0),b=e.useRef(0),[w,x]=e.useState(!0),[N="",k]=Vn({prop:r,onChange:e=>{const t=l>0;""!==e?(window.clearTimeout(b.current),t&&x(!1)):(window.clearTimeout(b.current),b.current=window.setTimeout((()=>x(!0)),l)),null==i||i(e)},defaultProp:a}),_=e.useCallback((()=>{window.clearTimeout(g.current),g.current=window.setTimeout((()=>k("")),150)}),[k]),M=e.useCallback((e=>{window.clearTimeout(g.current),k(e)}),[k]),S=e.useCallback((e=>{N===e?window.clearTimeout(g.current):v.current=window.setTimeout((()=>{window.clearTimeout(g.current),k(e)}),s)}),[N,k,s]);return e.useEffect((()=>()=>{window.clearTimeout(v.current),window.clearTimeout(g.current),window.clearTimeout(b.current)}),[]),e.createElement(Bd,{scope:o,isRootMenu:!0,value:N,dir:h,orientation:c,rootNavigationMenu:f,onTriggerEnter:e=>{window.clearTimeout(v.current),w?S(e):M(e)},onTriggerLeave:()=>{window.clearTimeout(v.current),_()},onContentEnter:()=>window.clearTimeout(g.current),onContentLeave:_,onItemSelect:e=>{k((t=>t===e?"":e))},onItemDismiss:()=>k("")},e.createElement(Me.nav,y({"aria-label":"Main","data-orientation":c,dir:h},d,{ref:m})))})),Bd=t=>{const{scope:n,isRootMenu:o,rootNavigationMenu:r,dir:i,orientation:a,children:s,value:l,onItemSelect:c,onItemDismiss:u,onTriggerEnter:d,onTriggerLeave:f,onContentEnter:p,onContentLeave:m}=t,[h,v]=e.useState(null),[g,b]=e.useState(new Map),[w,x]=e.useState(null);return e.createElement(zd,{scope:n,isRootMenu:o,rootNavigationMenu:r,value:l,previousValue:Ca(l),baseId:ct(),dir:i,orientation:a,viewport:h,onViewportChange:v,indicatorTrack:w,onIndicatorTrackChange:x,onTriggerEnter:Ce(d),onTriggerLeave:Ce(f),onContentEnter:Ce(p),onContentLeave:Ce(m),onItemSelect:Ce(c),onItemDismiss:Ce(u),onViewportContentChange:e.useCallback(((e,t)=>{b((n=>(n.set(e,t),new Map(n))))}),[]),onViewportContentRemove:e.useCallback((e=>{b((t=>t.has(e)?(t.delete(e),new Map(t)):t))}),[])},e.createElement(Od.Provider,{scope:n},e.createElement(Ld,{scope:n,items:g},s)))},Kd=e.forwardRef(((t,n)=>{const{P:o,...r}=t,i=$d("NavigationMenuList",o),a=e.createElement(Me.ul,y({"data-orientation":i.orientation},r,{ref:n}));return e.createElement(Me.div,{style:{position:"relative"},ref:i.onIndicatorTrackChange},e.createElement(Od.Slot,{scope:o},i.isRootMenu?e.createElement(af,{asChild:!0},a):a))})),[Zd,Vd]=Rd("NavigationMenuItem"),Hd="NavigationMenuTrigger",Wd=e.forwardRef(((t,n)=>{const{P:o,disabled:r,...i}=t,a=$d(Hd,t.P),s=Vd(Hd,t.P),l=e.useRef(null),c=C(l,s.triggerRef,n),u=ff(a.baseId,s.value),d=pf(a.baseId,s.value),f=e.useRef(!1),p=e.useRef(!1),m=s.value===a.value;return e.createElement(e.Fragment,null,e.createElement(Od.ItemSlot,{scope:o,value:s.value},e.createElement(lf,{asChild:!0},e.createElement(Me.button,y({id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":df(m),"aria-expanded":m,"aria-controls":d},i,{ref:c,onPointerEnter:Xe(t.onPointerEnter,(()=>{p.current=!1,s.wasEscapeCloseRef.current=!1})),onPointerMove:Xe(t.onPointerMove,mf((()=>{r||p.current||s.wasEscapeCloseRef.current||f.current||(a.onTriggerEnter(s.value),f.current=!0)}))),onPointerLeave:Xe(t.onPointerLeave,mf((()=>{r||(a.onTriggerLeave(),f.current=!1)}))),onClick:Xe(t.onClick,(()=>{a.onItemSelect(s.value),p.current=m})),onKeyDown:Xe(t.onKeyDown,(e=>{const t={horizontal:"ArrowDown",vertical:"rtl"===a.dir?"ArrowLeft":"ArrowRight"}[a.orientation];m&&e.key===t&&(s.onEntryKeyDown(),e.preventDefault())}))})))),m&&e.createElement(e.Fragment,null,e.createElement(Wn,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:e=>{const t=s.contentRef.current,n=e.relatedTarget,o=n===l.current,r=null==t?void 0:t.contains(n);!o&&r||s.onFocusProxyEnter(o?"start":"end")}}),a.viewport&&e.createElement("span",{"aria-owns":d})))})),qd="NavigationMenuIndicator",Gd=e.forwardRef(((n,o)=>{const{forceMount:r,...i}=n,a=$d(qd,n.P),s=Boolean(a.value);return a.indicatorTrack?t.createPortal(e.createElement(Kn,{present:r||s},e.createElement(Xd,y({},i,{ref:o}))),a.indicatorTrack):null})),Xd=e.forwardRef(((t,n)=>{const{P:o,...r}=t,i=$d(qd,o),a=Dd(o),[s,l]=e.useState(null),[c,u]=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 p=()=>{s&&u({size:d?s.offsetWidth:s.offsetHeight,offset:d?s.offsetLeft:s.offsetTop})};return uf(s,p),uf(i.indicatorTrack,p),c?e.createElement(Me.div,y({"aria-hidden":!0,"data-state":f?"visible":"hidden","data-orientation":i.orientation},r,{ref:n,style:{position:"absolute",...d?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...r.style}})):null})),Yd="NavigationMenuContent",Jd=e.forwardRef(((t,n)=>{const{forceMount:o,...r}=t,i=$d(Yd,t.P),a=Vd(Yd,t.P),s=C(a.contentRef,n),l=a.value===i.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return i.viewport?e.createElement(Qd,y({forceMount:o},c,{ref:s})):e.createElement(Kn,{present:o||l},e.createElement(tf,y({"data-state":df(l)},c,{ref:s,onPointerEnter:Xe(t.onPointerEnter,i.onContentEnter),onPointerLeave:Xe(t.onPointerLeave,mf(i.onContentLeave)),style:{pointerEvents:!l&&i.isRootMenu?"none":void 0,...c.style}})))})),Qd=e.forwardRef(((e,t)=>{const n=$d(Yd,e.P),{onViewportContentChange:o,onViewportContentRemove:r}=n;return ke((()=>{o(e.value,{ref:t,...e})}),[e,t,o]),ke((()=>()=>r(e.value)),[e.value,r]),null})),ef="navigationMenu.rootContentDismiss",tf=e.forwardRef(((t,n)=>{const{P:o,value:r,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:l,onContentFocusOutside:c,...u}=t,d=$d(Yd,o),f=e.useRef(null),p=C(f,n),m=ff(d.baseId,r),h=pf(d.baseId,r),v=Dd(o),g=e.useRef(null),{onItemDismiss:b}=d;e.useEffect((()=>{const e=f.current;if(d.isRootMenu&&e){const t=()=>{var t;b(),l(),e.contains(document.activeElement)&&(null===(t=i.current)||void 0===t||t.focus())};return e.addEventListener(ef,t),()=>e.removeEventListener(ef,t)}}),[d.isRootMenu,t.value,i,b,l]);const w=e.useMemo((()=>{const e=v().map((e=>e.value));"rtl"===d.dir&&e.reverse();const t=e.indexOf(d.value),n=e.indexOf(d.previousValue),o=r===d.value,i=n===e.indexOf(r);if(!o&&!i)return g.current;const a=(()=>{if(t!==n){if(o&&-1!==n)return t>n?"from-end":"from-start";if(i&&-1!==t)return t>n?"to-start":"to-end"}return null})();return g.current=a,a}),[d.previousValue,d.value,d.dir,v,r]);return e.createElement(af,{asChild:!0},e.createElement(nt,y({id:h,"aria-labelledby":m,"data-motion":w,"data-orientation":d.orientation},u,{ref:p,onDismiss:()=>{var e;const t=new Event(ef,{bubbles:!0,cancelable:!0});null===(e=f.current)||void 0===e||e.dispatchEvent(t)},onFocusOutside:Xe(t.onFocusOutside,(e=>{var t;c();const n=e.target;null!==(t=d.rootNavigationMenu)&&void 0!==t&&t.contains(n)&&e.preventDefault()})),onPointerDownOutside:Xe(t.onPointerDownOutside,(e=>{var t;const n=e.target,o=v().some((e=>{var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(n)})),r=d.isRootMenu&&(null===(t=d.viewport)||void 0===t?void 0:t.contains(n));(o||r||!d.isRootMenu)&&e.preventDefault()})),onKeyDown:Xe(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),o=document.activeElement,r=t.findIndex((e=>e===o));var n;if(cf(e.shiftKey?t.slice(0,r).reverse():t.slice(r+1,t.length)))e.preventDefault();else null===(n=a.current)||void 0===n||n.focus()}})),onEscapeKeyDown:Xe(t.onEscapeKeyDown,(e=>{s.current=!0}))})))})),nf="NavigationMenuViewport",of=e.forwardRef(((t,n)=>{const{forceMount:o,...r}=t,i=$d(nf,t.P),a=Boolean(i.value);return e.createElement(Kn,{present:o||a},e.createElement(rf,y({},r,{ref:n})))})),rf=e.forwardRef(((t,n)=>{const{P:o,children:r,...i}=t,a=$d(nf,o),s=C(n,a.onViewportChange),l=jd(Yd,t.P),[c,u]=e.useState(null),[d,f]=e.useState(null),p=c?(null==c?void 0:c.width)+"px":void 0,m=c?(null==c?void 0:c.height)+"px":void 0,h=Boolean(a.value),v=h?a.value:a.previousValue;return uf(d,(()=>{d&&u({width:d.offsetWidth,height:d.offsetHeight})})),e.createElement(Me.div,y({"data-state":df(h),"data-orientation":a.orientation},i,{ref:s,style:{pointerEvents:!h&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":p,"--radix-navigation-menu-viewport-height":m,...i.style},onPointerEnter:Xe(t.onPointerEnter,a.onContentEnter),onPointerLeave:Xe(t.onPointerLeave,mf(a.onContentLeave))}),Array.from(l.items).map((([t,{ref:n,forceMount:o,...r}])=>{const i=v===t;return e.createElement(Kn,{key:t,present:o||i},e.createElement(tf,y({},r,{ref:N(n,(e=>{i&&e&&f(e)}))})))})))})),af=e.forwardRef(((t,n)=>{const{P:o,...r}=t,i=$d("FocusGroup",o);return e.createElement(Ed.Provider,{scope:o},e.createElement(Ed.Slot,{scope:o},e.createElement(Me.div,y({dir:i.dir},r,{ref:n}))))})),sf=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],lf=e.forwardRef(((t,n)=>{const{P:o,...r}=t,i=Td(o),a=$d("FocusGroupItem",o);return e.createElement(Ed.ItemSlot,{scope:o},e.createElement(Me.button,y({},r,{ref:n,onKeyDown:Xe(t.onKeyDown,(e=>{if(["Home","End",...sf].includes(e.key)){let t=i().map((e=>e.ref.current));if(["rtl"===a.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),sf.includes(e.key)){const n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout((()=>cf(t))),e.preventDefault()}}))})))}));function cf(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}function uf(e,t){const n=Ce(t);ke((()=>{let t=0;if(e){const o=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return o.observe(e),()=>{window.cancelAnimationFrame(t),o.unobserve(e)}}}),[e,n])}function df(e){return e?"open":"closed"}function ff(e,t){return`${e}-trigger-${t}`}function pf(e,t){return`${e}-content-${t}`}function mf(e){return t=>"mouse"===t.pointerType?e(t):void 0}const hf=Ud,vf=Kd,gf=Wd,bf=Gd,wf=Jd,xf=of,yf="Popover",[Nf,Cf]=ye(yf,[On]),kf=On(),[_f,Mf]=Nf(yf),Sf="PopoverPortal",[Af,Of]=Nf(Sf,{forceMount:void 0}),Df="PopoverContent",Pf=e.forwardRef(((t,n)=>{const o=Of(Df,t.T),{forceMount:r=o.forceMount,...i}=t,a=Mf(Df,t.T);return e.createElement(Kn,{present:r||a.open},a.modal?e.createElement(Ef,y({},i,{ref:n})):e.createElement(Tf,y({},i,{ref:n})))})),Ef=e.forwardRef(((t,n)=>{const o=Mf(Df,t.T),r=e.useRef(null),i=C(n,r),a=e.useRef(!1);return e.useEffect((()=>{const e=r.current;if(e)return vr(e)}),[]),e.createElement(cr,{as:k,allowPinchZoom:!0},e.createElement(If,y({},t,{ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xe(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),a.current||null===(t=o.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Xe(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,o=2===t.button||n;a.current=o}),{checkForDefaultPrevented:!1}),onFocusOutside:Xe(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),Tf=e.forwardRef(((t,n)=>{const o=Mf(Df,t.T),r=e.useRef(!1),i=e.useRef(!1);return e.createElement(If,y({},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)||(r.current||null===(a=o.triggerRef.current)||void 0===a||a.focus(),e.preventDefault());r.current=!1,i.current=!1},onInteractOutside:e=>{var n,a;null===(n=t.onInteractOutside)||void 0===n||n.call(t,e),e.defaultPrevented||(r.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const s=e.target;(null===(a=o.triggerRef.current)||void 0===a?void 0:a.contains(s))&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}}))})),If=e.forwardRef(((t,n)=>{const{T:o,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=t,p=Mf(Df,o),m=kf(o);return ko(),e.createElement(vo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a},e.createElement(nt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1)},e.createElement(Un,y({"data-state":(h=p.open,h?"open":"closed"),role:"dialog",id:p.contentId},m,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 h}));const Rf=t=>{const{T:n,forceMount:o,children:r,container:i}=t,a=Mf(Sf,n);return e.createElement(Af,{scope:n,forceMount:o},e.createElement(Kn,{present:o||a.open},e.createElement(Bn,{asChild:!0,container:i},r)))},Ff=Pf,zf="Radio",[$f,Lf]=ye(zf),[jf,Uf]=$f(zf),Bf=e.forwardRef(((t,n)=>{const{I:o,name:r,checked:i=!1,required:a,disabled:s,value:l="on",onCheck:c,...u}=t,[d,f]=e.useState(null),p=C(n,(e=>f(e))),m=e.useRef(!1),h=!d||Boolean(d.closest("form"));return e.createElement(jf,{scope:o,checked:i,disabled:s},e.createElement(Me.button,y({type:"button",role:"radio","aria-checked":i,"data-state":Vf(i),"data-disabled":s?"":void 0,disabled:s,value:l},u,{ref:p,onClick:Xe(t.onClick,(e=>{i||null==c||c(),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&e.createElement(Zf,{control:d,bubbles:!m.current,name:r,value:l,checked:i,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))})),Kf=e.forwardRef(((t,n)=>{const{I:o,forceMount:r,...i}=t,a=Uf("RadioIndicator",o);return e.createElement(Kn,{present:r||a.checked},e.createElement(Me.span,y({"data-state":Vf(a.checked),"data-disabled":a.disabled?"":void 0},i,{ref:n})))})),Zf=t=>{const{control:n,checked:o,bubbles:r=!0,...i}=t,a=e.useRef(null),s=Ca(o),l=Mn(n);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==o&&n){const t=new Event("click",{bubbles:r});n.call(e,o),e.dispatchEvent(t)}}),[s,o,r]),e.createElement("input",y({type:"radio","aria-hidden":!0,defaultChecked:o},i,{tabIndex:-1,ref:a,style:{...t.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Vf(e){return e?"checked":"unchecked"}const Hf=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Wf="RadioGroup",[qf,Gf]=ye(Wf,[oc,Lf]),Xf=oc(),Yf=Lf(),[Jf,Qf]=qf(Wf),ep=e.forwardRef(((t,n)=>{const{R:o,name:r,defaultValue:i,value:a,required:s=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...p}=t,m=Xf(o),h=Mi(u),[v,g]=Vn({prop:a,defaultProp:i,onChange:f});return e.createElement(Jf,{scope:o,name:r,required:s,disabled:l,value:v,onValueChange:g},e.createElement(dc,y({asChild:!0},m,{orientation:c,dir:h,loop:d}),e.createElement(Me.div,y({role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":l?"":void 0,dir:h},p,{ref:n}))))})),tp=e.forwardRef(((t,n)=>{const{R:o,disabled:r,...i}=t,a=Qf("RadioGroupItem",o),s=a.disabled||r,l=Xf(o),c=Yf(o),u=e.useRef(null),d=C(n,u),f=a.value===i.value,p=e.useRef(!1);return e.useEffect((()=>{const e=e=>{Hf.includes(e.key)&&(p.current=!0)},t=()=>p.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),e.createElement(fc,y({asChild:!0},l,{focusable:!s,active:f}),e.createElement(Bf,y({disabled:s,required:a.required,checked:f},c,i,{name:a.name,ref:d,onCheck:()=>a.onValueChange(i.value),onKeyDown:Xe((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:Xe(i.onFocus,(()=>{var e;p.current&&(null===(e=u.current)||void 0===e||e.click())}))})))})),np=e.forwardRef(((t,n)=>{const{R:o,...r}=t,i=Yf(o);return e.createElement(Kf,y({},i,r,{ref:n}))}));function op(e,[t,n]){return Math.min(n,Math.max(t,e))}const rp="ScrollArea",[ip,ap]=ye(rp),[sp,lp]=ip(rp),cp=e.forwardRef(((t,n)=>{const{F:o,type:r="hover",dir:i,scrollHideDelay:a=600,...s}=t,[l,c]=e.useState(null),[u,d]=e.useState(null),[f,p]=e.useState(null),[m,h]=e.useState(null),[v,g]=e.useState(null),[b,w]=e.useState(0),[x,N]=e.useState(0),[k,_]=e.useState(!1),[M,S]=e.useState(!1),A=C(n,(e=>c(e))),O=Mi(i);return e.createElement(sp,{scope:o,type:r,dir:O,scrollHideDelay:a,scrollArea:l,viewport:u,onViewportChange:d,content:f,onContentChange:p,scrollbarX:m,onScrollbarXChange:h,scrollbarXEnabled:k,onScrollbarXEnabledChange:_,scrollbarY:v,onScrollbarYChange:g,scrollbarYEnabled:M,onScrollbarYEnabledChange:S,onCornerWidthChange:w,onCornerHeightChange:N},e.createElement(Me.div,y({dir:O},s,{ref:A,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":x+"px",...t.style}})))})),up=e.forwardRef(((t,n)=>{const{F:o,children:r,...i}=t,a=lp("ScrollAreaViewport",o),s=C(n,e.useRef(null),a.onViewportChange);return e.createElement(e.Fragment,null,e.createElement("style",{dangerouslySetInnerHTML:{L:"[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(Me.div,y({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...t.style}}),e.createElement("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"}},r)))})),dp="ScrollAreaScrollbar",fp=e.forwardRef(((t,n)=>{const{forceMount:o,...r}=t,i=lp(dp,t.F),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=i,l="horizontal"===t.orientation;return e.useEffect((()=>(l?a(!0):s(!0),()=>{l?a(!1):s(!1)})),[l,a,s]),"hover"===i.type?e.createElement(pp,y({},r,{ref:n,forceMount:o})):"scroll"===i.type?e.createElement(mp,y({},r,{ref:n,forceMount:o})):"auto"===i.type?e.createElement(hp,y({},r,{ref:n,forceMount:o})):"always"===i.type?e.createElement(vp,y({},r,{ref:n})):null})),pp=e.forwardRef(((t,n)=>{const{forceMount:o,...r}=t,i=lp(dp,t.F),[a,s]=e.useState(!1);return e.useEffect((()=>{const e=i.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),s(!0)},o=()=>{t=window.setTimeout((()=>s(!1)),i.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",o),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",o)}}}),[i.scrollArea,i.scrollHideDelay]),e.createElement(Kn,{present:o||a},e.createElement(hp,y({"data-state":a?"visible":"hidden"},r,{ref:n})))})),mp=e.forwardRef(((t,n)=>{const{forceMount:o,...r}=t,i=lp(dp,t.F),a="horizontal"===t.orientation,s=Rp((()=>c("SCROLL_END")),100),[l,c]=(u="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}),u));var u,d;return e.useEffect((()=>{if("idle"===l){const e=window.setTimeout((()=>c("HIDE")),i.scrollHideDelay);return()=>window.clearTimeout(e)}}),[l,i.scrollHideDelay,c]),e.useEffect((()=>{const e=i.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t];const o=()=>{const o=e[t];n!==o&&(c("SCROLL"),s()),n=o};return e.addEventListener("scroll",o),()=>e.removeEventListener("scroll",o)}}),[i.viewport,a,c,s]),e.createElement(Kn,{present:o||"hidden"!==l},e.createElement(vp,y({"data-state":"hidden"===l?"hidden":"visible"},r,{ref:n,onPointerEnter:Xe(t.onPointerEnter,(()=>c("POINTER_ENTER"))),onPointerLeave:Xe(t.onPointerLeave,(()=>c("POINTER_LEAVE")))})))})),hp=e.forwardRef(((t,n)=>{const o=lp(dp,t.F),{forceMount:r,...i}=t,[a,s]=e.useState(!1),l="horizontal"===t.orientation,c=Rp((()=>{if(o.viewport){const e=o.viewport.offsetWidth<o.viewport.scrollWidth,t=o.viewport.offsetHeight<o.viewport.scrollHeight;s(l?e:t)}}),10);return Fp(o.viewport,c),Fp(o.content,c),e.createElement(Kn,{present:r||a},e.createElement(vp,y({"data-state":a?"visible":"hidden"},i,{ref:n})))})),vp=e.forwardRef(((t,n)=>{const{orientation:o="vertical",...r}=t,i=lp(dp,t.F),a=e.useRef(null),s=e.useRef(0),[l,c]=e.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Op(l.viewport,l.content),d={...r,sizes:l,onSizesChange:c,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:e=>s.current=e};function f(e,t){return function(e,t,n,o="ltr"){const r=Dp(n),i=r/2,a=t||i,s=r-a,l=n.scrollbar.paddingStart+a,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d="ltr"===o?[0,u]:[-1*u,0];return Ep([l,c],d)(e)}(e,s.current,l,t)}return"horizontal"===o?e.createElement(gp,y({},d,{ref:n,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=Pp(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"===o?e.createElement(bp,y({},d,{ref:n,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=Pp(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})),gp=e.forwardRef(((t,n)=>{const{sizes:o,onSizesChange:r,...i}=t,a=lp(dp,t.F),[s,l]=e.useState(),c=e.useRef(null),u=C(n,c,a.onScrollbarXChange);return e.useEffect((()=>{c.current&&l(getComputedStyle(c.current))}),[c]),e.createElement(yp,y({"data-orientation":"horizontal"},i,{ref:u,sizes:o,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":Dp(o)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.x),onDragScroll:e=>t.onDragScroll(e.x),onWheelScroll:(e,n)=>{if(a.viewport){const o=a.viewport.scrollLeft+e.deltaX;t.onWheelScroll(o),Tp(o,n)&&e.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Ap(s.paddingLeft),paddingEnd:Ap(s.paddingRight)}})}}))})),bp=e.forwardRef(((t,n)=>{const{sizes:o,onSizesChange:r,...i}=t,a=lp(dp,t.F),[s,l]=e.useState(),c=e.useRef(null),u=C(n,c,a.onScrollbarYChange);return e.useEffect((()=>{c.current&&l(getComputedStyle(c.current))}),[c]),e.createElement(yp,y({"data-orientation":"vertical"},i,{ref:u,sizes:o,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":Dp(o)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.y),onDragScroll:e=>t.onDragScroll(e.y),onWheelScroll:(e,n)=>{if(a.viewport){const o=a.viewport.scrollTop+e.deltaY;t.onWheelScroll(o),Tp(o,n)&&e.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Ap(s.paddingTop),paddingEnd:Ap(s.paddingBottom)}})}}))})),[wp,xp]=ip(dp),yp=e.forwardRef(((t,n)=>{const{F:o,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...p}=t,m=lp(dp,o),[h,v]=e.useState(null),g=C(n,(e=>v(e))),b=e.useRef(null),w=e.useRef(""),x=m.viewport,N=r.content-r.viewport,k=Ce(d),_=Ce(c),M=Rp(f,10);function S(e){if(b.current){const t=e.clientX-b.current.left,n=e.clientY-b.current.top;u({x:t,y:n})}}return e.useEffect((()=>{const e=e=>{const t=e.target;(null==h?void 0:h.contains(t))&&k(e,N)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[x,h,N,k]),e.useEffect(_,[r,_]),Fp(h,M),Fp(m.content,M),e.createElement(wp,{scope:o,scrollbar:h,hasThumb:i,onThumbChange:Ce(a),onThumbPointerUp:Ce(s),onThumbPositionChange:_,onThumbPointerDown:Ce(l)},e.createElement(Me.div,y({},p,{ref:g,style:{position:"absolute",...p.style},onPointerDown:Xe(t.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),b.current=h.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S(e)}})),onPointerMove:Xe(t.onPointerMove,S),onPointerUp:Xe(t.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=w.current,b.current=null}))})))})),Np="ScrollAreaThumb",Cp=e.forwardRef(((t,n)=>{const{forceMount:o,...r}=t,i=xp(Np,t.F);return e.createElement(Kn,{present:o||i.hasThumb},e.createElement(kp,y({ref:n},r)))})),kp=e.forwardRef(((t,n)=>{const{F:o,style:r,...i}=t,a=lp(Np,o),s=xp(Np,o),{onThumbPositionChange:l}=s,c=C(n,(e=>s.onThumbChange(e))),u=e.useRef(),d=Rp((()=>{u.current&&(u.current(),u.current=void 0)}),100);return e.useEffect((()=>{const e=a.viewport;if(e){const t=()=>{if(d(),!u.current){const t=Ip(e,l);u.current=t,l()}};return l(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[a.viewport,d,l]),e.createElement(Me.div,y({"data-state":s.hasThumb?"visible":"hidden"},i,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Xe(t.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,o=e.clientY-t.top;s.onThumbPointerDown({x:n,y:o})})),onPointerUp:Xe(t.onPointerUp,s.onThumbPointerUp)}))})),_p="ScrollAreaCorner",Mp=e.forwardRef(((t,n)=>{const o=lp(_p,t.F),r=Boolean(o.scrollbarX&&o.scrollbarY);return"scroll"!==o.type&&r?e.createElement(Sp,y({},t,{ref:n})):null})),Sp=e.forwardRef(((t,n)=>{const{F:o,...r}=t,i=lp(_p,o),[a,s]=e.useState(0),[l,c]=e.useState(0),u=Boolean(a&&l);return Fp(i.scrollbarX,(()=>{var e;const t=(null===(e=i.scrollbarX)||void 0===e?void 0:e.offsetHeight)||0;i.onCornerHeightChange(t),c(t)})),Fp(i.scrollbarY,(()=>{var e;const t=(null===(e=i.scrollbarY)||void 0===e?void 0:e.offsetWidth)||0;i.onCornerWidthChange(t),s(t)})),u?e.createElement(Me.div,y({},r,{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 Ap(e){return e?parseInt(e,10):0}function Op(e,t){const n=e/t;return isNaN(n)?0:n}function Dp(e){const t=Op(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-n)*t;return Math.max(o,18)}function Pp(e,t,n="ltr"){const o=Dp(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-r,a=t.content-t.viewport,s=i-o,l=op(e,"ltr"===n?[0,a]:[-1*a,0]);return Ep([0,a],[0,s])(l)}function Ep(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function Tp(e,t){return e>0&&e<t}const Ip=(e,t=(()=>{}))=>{let n={left:e.scrollLeft,top:e.scrollTop},o=0;return function r(){const i={left:e.scrollLeft,top:e.scrollTop},a=n.left!==i.left,s=n.top!==i.top;(a||s)&&t(),n=i,o=window.requestAnimationFrame(r)}(),()=>window.cancelAnimationFrame(o)};function Rp(t,n){const o=Ce(t),r=e.useRef(0);return e.useEffect((()=>()=>window.clearTimeout(r.current)),[]),e.useCallback((()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,n)}),[o,n])}function Fp(e,t){const n=Ce(t);ke((()=>{let t=0;if(e){const o=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return o.observe(e),()=>{window.cancelAnimationFrame(t),o.unobserve(e)}}}),[e,n])}const zp=cp,$p=up,Lp=Mp,jp=[" ","Enter","ArrowUp","ArrowDown"],Up=[" ","Enter"],Bp="Select",[Kp,Zp,Vp]=ui(Bp),[Hp,Wp]=ye(Bp,[Vp,On]),qp=On(),[Gp,Xp]=Hp(Bp),[Yp,Jp]=Hp(Bp),Qp=e.forwardRef(((t,n)=>{const{j:o,disabled:r=!1,...i}=t,a=qp(o),s=Xp("SelectTrigger",o),l=s.disabled||r,c=C(n,s.onTriggerChange),u=Zp(o),[d,f,p]=km((e=>{const t=u().filter((e=>!e.disabled)),n=t.find((e=>e.value===s.value)),o=_m(t,e,n);void 0!==o&&s.onValueChange(o.value)})),m=()=>{l||(s.onOpenChange(!0),p())};return e.createElement(jn,y({asChild:!0},a),e.createElement(Me.button,y({type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":void 0===s.value?"":void 0},i,{ref:c,onClick:Xe(i.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:Xe(i.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(m(),s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:Xe(i.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||jp.includes(e.key)&&(m(),e.preventDefault())}))})))})),em=e.forwardRef(((t,n)=>{const{j:o,children:r,...i}=t;return e.createElement(Me.span,y({"aria-hidden":!0},i,{ref:n}),r||"▼")})),tm="SelectContent",nm=e.forwardRef(((n,o)=>{const r=Xp(tm,n.j),[i,a]=e.useState();if(ke((()=>{a(new DocumentFragment)}),[]),!r.open){const o=i;return o?t.createPortal(e.createElement(rm,{scope:n.j},e.createElement(Kp.Slot,{scope:n.j},e.createElement("div",null,n.children))),o):null}return e.createElement(am,y({},n,{ref:o}))})),om=10,[rm,im]=Hp(tm),am=e.forwardRef(((t,n)=>{const{j:o,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:v,avoidCollisions:g,...b}=t,w=Xp(tm,o),[x,N]=e.useState(null),[_,M]=e.useState(null),S=C(n,(e=>N(e))),[A,O]=e.useState(null),[D,P]=e.useState(null),E=Zp(o),[T,I]=e.useState(!1),R=e.useRef(!1);e.useEffect((()=>{if(x)return vr(x)}),[x]),ko();const F=e.useCallback((e=>{const[t,...n]=E().map((e=>e.ref.current)),[o]=n.slice(-1),r=document.activeElement;for(const i of e){if(i===r)return;if(null==i||i.scrollIntoView({block:"nearest"}),i===t&&_&&(_.scrollTop=0),i===o&&_&&(_.scrollTop=_.scrollHeight),null==i||i.focus(),document.activeElement!==r)return}}),[E,_]),z=e.useCallback((()=>F([A,x])),[F,A,x]);e.useEffect((()=>{T&&z()}),[T,z]);const{onOpenChange:$,triggerPointerDownPosRef:L}=w;e.useEffect((()=>{if(x){let e={x:0,y:0};const t=t=>{var n,o,r,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(o=L.current)||void 0===o?void 0:o.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(r=null===(i=L.current)||void 0===i?void 0:i.y)&&void 0!==r?r:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||$(!1),document.removeEventListener("pointermove",t),L.current=null};return null!==L.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[x,$,L]),e.useEffect((()=>{const e=()=>$(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[$]);const[j,U]=km((e=>{const t=E().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),o=_m(t,e,n);o&&setTimeout((()=>o.ref.current.focus()))})),B=e.useCallback(((e,t,n)=>{const o=!R.current&&!n;(void 0!==w.value&&w.value===t||o)&&(O(e),o&&(R.current=!0))}),[w.value]),K=e.useCallback((()=>null==x?void 0:x.focus()),[x]),Z=e.useCallback(((e,t,n)=>{const o=!R.current&&!n;(void 0!==w.value&&w.value===t||o)&&P(e)}),[w.value]),V="popper"===r?lm:sm,H=V===lm?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:v,avoidCollisions:g}:{};return e.createElement(rm,{scope:o,content:x,viewport:_,onViewportChange:M,itemRefCallback:B,selectedItem:A,onItemLeave:K,itemTextRefCallback:Z,focusSelectedItem:z,selectedItemText:D,position:r,isPositioned:T,searchRef:j},e.createElement(cr,{as:k,allowPinchZoom:!0},e.createElement(vo,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Xe(i,(e=>{var t;null===(t=w.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},e.createElement(nt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1)},e.createElement(V,y({role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault()},b,H,{onPlaced:()=>I(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Xe(b.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=E().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,o=t.indexOf(n);t=t.slice(o+1)}setTimeout((()=>F(t))),e.preventDefault()}}))}))))))})),sm=e.forwardRef(((t,n)=>{const{j:o,onPlaced:r,...i}=t,a=Xp(tm,o),s=im(tm,o),[l,c]=e.useState(null),[u,d]=e.useState(null),f=C(n,(e=>d(e))),p=Zp(o),m=e.useRef(!1),h=e.useRef(!0),{viewport:v,selectedItem:g,selectedItemText:b,focusSelectedItem:w}=s,x=e.useCallback((()=>{if(a.trigger&&a.valueNode&&l&&u&&v&&g&&b){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=b.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,i=n.left-r,a=e.left-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-om,d=op(i,[om,u-c]);l.style.minWidth=s+"px",l.style.left=d+"px"}else{const r=t.right-o.right,i=window.innerWidth-n.right-r,a=window.innerWidth-e.right-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-om,d=op(i,[om,u-c]);l.style.minWidth=s+"px",l.style.right=d+"px"}const i=p(),s=window.innerHeight-2*om,c=v.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),w=parseInt(d.borderBottomWidth,10),x=f+h+c+parseInt(d.paddingBottom,10)+w,y=Math.min(5*g.offsetHeight,x),N=window.getComputedStyle(v),C=parseInt(N.paddingTop,10),k=parseInt(N.paddingBottom,10),_=e.top+e.height/2-om,M=s-_,S=g.offsetHeight/2,A=f+h+(g.offsetTop+S),O=x-A;if(A<=_){const e=g===i[i.length-1].ref.current;l.style.bottom="0px";const t=u.clientHeight-v.offsetTop-v.offsetHeight,n=A+Math.max(M,S+(e?k:0)+t+w);l.style.height=n+"px"}else{const e=g===i[0].ref.current;l.style.top="0px";const t=Math.max(_,f+v.offsetTop+(e?C:0)+S)+O;l.style.height=t+"px",v.scrollTop=A-_+v.offsetTop}l.style.margin=`${om}px 0`,l.style.minHeight=y+"px",l.style.maxHeight=s+"px",null==r||r(),requestAnimationFrame((()=>m.current=!0))}}),[p,a.trigger,a.valueNode,l,u,v,g,b,a.dir,r]);ke((()=>x()),[x]);const[N,k]=e.useState();ke((()=>{u&&k(window.getComputedStyle(u).zIndex)}),[u]);const _=e.useCallback((e=>{e&&!0===h.current&&(x(),null==w||w(),h.current=!1)}),[x,w]);return e.createElement(cm,{scope:o,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:_},e.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N}},e.createElement(Me.div,y({},i,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))})),lm=e.forwardRef(((t,n)=>{const{j:o,align:r="start",collisionPadding:i=om,...a}=t,s=qp(o);return e.createElement(Un,y({},s,a,{ref:n,align:r,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)"}}))})),[cm,um]=Hp(tm,{}),dm="SelectViewport",fm=e.forwardRef(((t,n)=>{const{j:o,...r}=t,i=im(dm,o),a=um(dm,o),s=C(n,i.onViewportChange),l=e.useRef(0);return e.createElement(e.Fragment,null,e.createElement("style",{dangerouslySetInnerHTML:{L:"[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(Kp.Slot,{scope:o},e.createElement(Me.div,y({"data-radix-select-viewport":"",role:"presentation"},r,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Xe(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:o}=a;if(null!=o&&o.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const o=window.innerHeight-2*om,r=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(r,i);if(a<o){const r=a+e,i=Math.min(o,r),s=r-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))}))))})),[pm,mm]=Hp("SelectGroup"),hm=e.forwardRef(((t,n)=>{const{j:o,...r}=t,i=mm("SelectLabel",o);return e.createElement(Me.div,y({id:i.id},r,{ref:n}))})),vm="SelectItem",[gm,bm]=Hp(vm),wm=e.forwardRef(((t,n)=>{const{j:o,value:r,disabled:i=!1,textValue:a,...s}=t,l=Xp(vm,o),c=im(vm,o),u=l.value===r,[d,f]=e.useState(null!=a?a:""),[p,m]=e.useState(!1),h=C(n,(e=>{var t;return null===(t=c.itemRefCallback)||void 0===t?void 0:t.call(c,e,r,i)})),v=ct(),g=()=>{i||(l.onValueChange(r),l.onOpenChange(!1))};return e.createElement(gm,{scope:o,value:r,disabled:i,textId:v,isSelected:u,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(Kp.ItemSlot,{scope:o,value:r,disabled:i,textValue:d},e.createElement(Me.div,y({role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},s,{ref:h,onFocus:Xe(s.onFocus,(()=>m(!0))),onBlur:Xe(s.onBlur,(()=>m(!1))),onPointerUp:Xe(s.onPointerUp,g),onPointerMove:Xe(s.onPointerMove,(e=>{var t;i?null===(t=c.onItemLeave)||void 0===t||t.call(c):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Xe(s.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=c.onItemLeave)||void 0===t||t.call(c))})),onKeyDown:Xe(s.onKeyDown,(e=>{var t;""!==(null===(t=c.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(Up.includes(e.key)&&g()," "===e.key&&e.preventDefault())}))}))))})),xm="SelectItemText",ym=e.forwardRef(((n,o)=>{const{j:r,className:i,style:a,...s}=n,l=Xp(xm,r),c=im(xm,r),u=bm(xm,r),d=Jp(xm,r),[f,p]=e.useState(null),m=C(o,(e=>p(e)),u.onItemTextChange,(e=>{var t;return null===(t=c.itemTextRefCallback)||void 0===t?void 0:t.call(c,e,u.value,u.disabled)})),h=null==f?void 0:f.textContent,v=e.useMemo((()=>e.createElement("option",{key:u.value,value:u.value,disabled:u.disabled},h)),[u.disabled,u.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=d;return ke((()=>(g(v),()=>b(v))),[g,b,v]),e.createElement(e.Fragment,null,e.createElement(Me.span,y({id:u.textId},s,{ref:m})),u.isSelected&&l.valueNode&&!l.valueNodeHasChildren?t.createPortal(s.children,l.valueNode):null)})),Nm=e.forwardRef(((t,n)=>{const{j:o,...r}=t;return bm("SelectItemIndicator",o).isSelected?e.createElement(Me.span,y({"aria-hidden":!0},r,{ref:n})):null})),Cm=e.forwardRef(((t,n)=>{const{j:o,...r}=t;return e.createElement(Me.div,y({"aria-hidden":!0},r,{ref:n}))}));function km(t){const n=Ce(t),o=e.useRef(""),r=e.useRef(0),i=e.useCallback((e=>{const t=o.current+e;n(t),function e(t){o.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(t)}),[n]),a=e.useCallback((()=>{o.current="",window.clearTimeout(r.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[o,i,a]}function _m(e,t,n){const o=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,r=n?e.indexOf(n):-1;let i=(a=e,s=Math.max(r,0),a.map(((e,t)=>a[(s+t)%a.length])));var a,s;1===o.length&&(i=i.filter((e=>e!==n)));const l=i.find((e=>e.textValue.toLowerCase().startsWith(o.toLowerCase())));return l!==n?l:void 0}e.forwardRef(((t,n)=>{const{value:o,...r}=t,i=e.useRef(null),a=C(n,i),s=Ca(o);return e.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(s!==o&&n){const t=new Event("change",{bubbles:!0});n.call(e,o),e.dispatchEvent(t)}}),[s,o]),e.createElement(Hn,{asChild:!0},e.createElement("select",y({},r,{ref:a,defaultValue:o})))})).displayName="BubbleSelect";const Mm=Qp,Sm=em,Am=t=>e.createElement(Bn,y({asChild:!0},t)),Om=nm,Dm=fm,Pm=hm,Em=wm,Tm=ym,Im=Nm,Rm=Cm,Fm="horizontal",zm=["horizontal","vertical"],$m=e.forwardRef(((t,n)=>{const{decorative:o,orientation:r=Fm,...i}=t,a=Lm(r)?r:Fm,s=o?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return e.createElement(Me.div,y({"data-orientation":a},s,i,{ref:n}))}));function Lm(e){return zm.includes(e)}$m.propTypes={orientation(e,t,n){const o=e[t],r=String(o);return o&&!Lm(o)?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 \`${Fm}\`.`}(r,n)):null}};const jm=$m,Um=["PageUp","PageDown"],Bm=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Km={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Zm="Slider",[Vm,Hm,Wm]=ui(Zm),[qm,Gm]=ye(Zm,[Wm]),[Xm,Ym]=qm(Zm),Jm=e.forwardRef(((t,n)=>{const{name:o,min:r=0,max:i=100,step:a=1,orientation:s="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:d,onValueChange:f=(()=>{}),onValueCommit:p=(()=>{}),inverted:m=!1,...h}=t,[v,g]=e.useState(null),b=C(n,(e=>g(e))),w=e.useRef(new Set),x=e.useRef(0),N="horizontal"===s,k=!v||Boolean(v.closest("form")),_=N?th:nh,[M=[],S]=Vn({prop:d,defaultProp:u,onChange:e=>{var t;null===(t=[...w.current][x.current])||void 0===t||t.focus(),f(e)}}),A=e.useRef(M);function O(e,t,{commit:n}={commit:!1}){const o=function(e){return(String(e).split(".")[1]||"").length}(a),s=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-r)/a)*a+r,o),l=op(s,[r,i]);S(((e=[])=>{const o=function(e=[],t,n){const o=[...e];return o[n]=t,o.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}(o,c*a)){x.current=o.indexOf(l);const t=String(o)!==String(e);return t&&n&&p(o),t?o:e}return e}))}return e.createElement(Xm,{scope:t.U,disabled:l,min:r,max:i,valueIndexToChangeRef:x,thumbs:w.current,values:M,orientation:s},e.createElement(Vm.Provider,{scope:t.U},e.createElement(Vm.Slot,{scope:t.U},e.createElement(_,y({"aria-disabled":l,"data-disabled":l?"":void 0},h,{ref:b,onPointerDown:Xe(h.onPointerDown,(()=>{l||(A.current=M)})),min:r,max:i,inverted:m,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))),o=Math.min(...n);return n.indexOf(o)}(M,e);O(e,t)},onSlideMove:l?void 0:function(e){O(e,x.current)},onSlideEnd:l?void 0:function(){const e=A.current[x.current];M[x.current]!==e&&p(M)},onHomeKeyDown:()=>!l&&O(r,0,{commit:!0}),onEndKeyDown:()=>!l&&O(i,M.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=Um.includes(e.key)||e.shiftKey&&Bm.includes(e.key)?10:1,o=x.current;O(M[o]+a*n*t,o,{commit:!0})}}})))),k&&M.map(((t,n)=>e.createElement(uh,{key:n,name:o?o+(M.length>1?"[]":""):void 0,value:t}))))})),[Qm,eh]=qm(Zm,{startEdge:"left",endEdge:"right",size:"width",direction:1}),th=e.forwardRef(((t,n)=>{const{min:o,max:r,dir:i,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=t,[f,p]=e.useState(null),m=C(n,(e=>p(e))),h=e.useRef(),v=Mi(i),g="ltr"===v,b=g&&!a||!g&&a;function w(e){const t=h.current||f.getBoundingClientRect(),n=fh([0,t.width],b?[o,r]:[r,o]);return h.current=t,n(e-t.left)}return e.createElement(Qm,{scope:t.U,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width"},e.createElement(oh,y({dir:v,"data-orientation":"horizontal"},d,{ref:m,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=w(e.clientX);null==s||s(t)},onSlideMove:e=>{const t=w(e.clientX);null==l||l(t)},onSlideEnd:()=>{h.current=void 0,null==c||c()},onStepKeyDown:e=>{const t=Km[b?"from-left":"from-right"].includes(e.key);null==u||u({event:e,direction:t?-1:1})}})))})),nh=e.forwardRef(((t,n)=>{const{min:o,max:r,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=t,d=e.useRef(null),f=C(n,d),p=e.useRef(),m=!i;function h(e){const t=p.current||d.current.getBoundingClientRect(),n=fh([0,t.height],m?[r,o]:[o,r]);return p.current=t,n(e-t.top)}return e.createElement(Qm,{scope:t.U,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1},e.createElement(oh,y({"data-orientation":"vertical"},u,{ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=h(e.clientY);null==a||a(t)},onSlideMove:e=>{const t=h(e.clientY);null==s||s(t)},onSlideEnd:()=>{p.current=void 0,null==l||l()},onStepKeyDown:e=>{const t=Km[m?"from-bottom":"from-top"].includes(e.key);null==c||c({event:e,direction:t?-1:1})}})))})),oh=e.forwardRef(((t,n)=>{const{U:o,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:c,...u}=t,d=Ym(Zm,o);return e.createElement(Me.span,y({},u,{ref:n,onKeyDown:Xe(t.onKeyDown,(e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):Um.concat(Bm).includes(e.key)&&(c(e),e.preventDefault())})),onPointerDown:Xe(t.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),d.thumbs.has(t)?t.focus():r(e)})),onPointerMove:Xe(t.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)})),onPointerUp:Xe(t.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))}))}))})),rh=e.forwardRef(((t,n)=>{const{U:o,...r}=t,i=Ym("SliderTrack",o);return e.createElement(Me.span,y({"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation},r,{ref:n}))})),ih="SliderRange",ah=e.forwardRef(((t,n)=>{const{U:o,...r}=t,i=Ym(ih,o),a=eh(ih,o),s=C(n,e.useRef(null)),l=i.values.length,c=i.values.map((e=>dh(e,i.min,i.max))),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return e.createElement(Me.span,y({"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0},r,{ref:s,style:{...t.style,[a.startEdge]:u+"%",[a.endEdge]:d+"%"}}))})),sh="SliderThumb",lh=e.forwardRef(((t,n)=>{const o=Hm(t.U),[r,i]=e.useState(null),a=C(n,(e=>i(e))),s=e.useMemo((()=>r?o().findIndex((e=>e.ref.current===r)):-1),[o,r]);return e.createElement(ch,y({},t,{ref:a,index:s}))})),ch=e.forwardRef(((t,n)=>{const{U:o,index:r,...i}=t,a=Ym(sh,o),s=eh(sh,o),[l,c]=e.useState(null),u=C(n,(e=>c(e))),d=Mn(l),f=a.values[r],p=void 0===f?0:dh(f,a.min,a.max),m=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(r,a.values.length),h=null==d?void 0:d[s.size],v=h?function(e,t,n){const o=e/2,r=fh([0,50],[0,o]);return(o-r(t)*n)*n}(h,p,s.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",[s.startEdge]:`calc(${p}% + ${v}px)`}},e.createElement(Vm.ItemSlot,{scope:t.U},e.createElement(Me.span,y({role:"slider","aria-label":t["aria-label"]||m,"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:u,style:void 0===f?{display:"none"}:t.style,onFocus:Xe(t.onFocus,(()=>{a.valueIndexToChangeRef.current=r}))}))))})),uh=t=>{const{value:n,...o}=t,r=e.useRef(null),i=Ca(n);return e.useEffect((()=>{const e=r.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&o){const t=new Event("input",{bubbles:!0});o.call(e,n),e.dispatchEvent(t)}}),[i,n]),e.createElement("input",y({style:{display:"none"}},o,{ref:r,defaultValue:n}))};function dh(e,t,n){return op(100/(n-t)*(e-t),[0,100])}function fh(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}const ph=Jm,mh=rh,hh=ah,vh=lh,gh="Switch",[bh,wh]=ye(gh),[xh,yh]=bh(gh),Nh=e.forwardRef(((t,n)=>{const{B:o,name:r,checked:i,defaultChecked:a,required:s,disabled:l,value:c="on",onCheckedChange:u,...d}=t,[f,p]=e.useState(null),m=C(n,(e=>p(e))),h=e.useRef(!1),v=!f||Boolean(f.closest("form")),[g=!1,b]=Vn({prop:i,defaultProp:a,onChange:u});return e.createElement(xh,{scope:o,checked:g,disabled:l},e.createElement(Me.button,y({type:"button",role:"switch","aria-checked":g,"aria-required":s,"data-state":kh(g),"data-disabled":l?"":void 0,disabled:l,value:c},d,{ref:m,onClick:Xe(t.onClick,(e=>{b((e=>!e)),v&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),v&&e.createElement(Ch,{control:f,bubbles:!h.current,name:r,value:c,checked:g,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))})),Ch=t=>{const{control:n,checked:o,bubbles:r=!0,...i}=t,a=e.useRef(null),s=Ca(o),l=Mn(n);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==o&&n){const t=new Event("click",{bubbles:r});n.call(e,o),e.dispatchEvent(t)}}),[s,o,r]),e.createElement("input",y({type:"checkbox","aria-hidden":!0,defaultChecked:o},i,{tabIndex:-1,ref:a,style:{...t.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function kh(e){return e?"checked":"unchecked"}const _h=Nh,Mh=e.forwardRef(((t,n)=>{const{B:o,...r}=t,i=yh("SwitchThumb",o);return e.createElement(Me.span,y({"data-state":kh(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:n}))})),Sh="Tabs",[Ah,Oh]=ye(Sh,[oc]),Dh=oc(),[Ph,Eh]=Ah(Sh);function Th(e,t){return`${e}-trigger-${t}`}function Ih(e,t){return`${e}-content-${t}`}const Rh=e.forwardRef(((t,n)=>{const{K:o,loop:r=!0,...i}=t,a=Eh("TabsList",o),s=Dh(o);return e.createElement(dc,y({asChild:!0},s,{orientation:a.orientation,dir:a.dir,loop:r}),e.createElement(Me.div,y({role:"tablist","aria-orientation":a.orientation},i,{ref:n})))})),Fh=e.forwardRef(((t,n)=>{const{K:o,value:r,disabled:i=!1,...a}=t,s=Eh("TabsTrigger",o),l=Dh(o),c=Th(s.baseId,r),u=Ih(s.baseId,r),d=r===s.value;return e.createElement(fc,y({asChild:!0},l,{focusable:!i,active:d}),e.createElement(Me.button,y({type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c},a,{ref:n,onMouseDown:Xe(t.onMouseDown,(e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(r)})),onKeyDown:Xe(t.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(r)})),onFocus:Xe(t.onFocus,(()=>{const e="manual"!==s.activationMode;d||i||!e||s.onValueChange(r)}))})))})),zh=e.forwardRef(((t,n)=>{const{K:o,value:r,forceMount:i,children:a,...s}=t,l=Eh("TabsContent",o),c=Th(l.baseId,r),u=Ih(l.baseId,r),d=r===l.value,f=e.useRef(d);return e.useEffect((()=>{const e=requestAnimationFrame((()=>f.current=!1));return()=>cancelAnimationFrame(e)}),[]),e.createElement(Kn,{present:i||d},(({present:o})=>e.createElement(Me.div,y({"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!o,id:u,tabIndex:0},s,{ref:n,style:{...t.style,animationDuration:f.current?"0s":void 0}}),o&&a)))})),$h="ToastProvider",[Lh,jh,Uh]=ui("Toast"),[Bh,Kh]=ye("Toast",[Uh]),[Zh,Vh]=Bh($h),Hh=["F8"],Wh="toast.viewportPause",qh="toast.viewportResume",Gh=e.forwardRef(((t,n)=>{const{Z:o,hotkey:r=Hh,label:i="Notifications ({hotkey})",...a}=t,s=Vh("ToastViewport",o),l=jh(o),c=e.useRef(null),u=e.useRef(null),d=e.useRef(null),f=e.useRef(null),p=C(n,f,s.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=s.toastCount>0;e.useEffect((()=>{const e=e=>{var t;r.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)}),[r]),e.useEffect((()=>{const e=c.current,t=f.current;if(h&&e&&t){const n=()=>{if(!s.isClosePausedRef.current){const e=new CustomEvent(Wh);t.dispatchEvent(e),s.isClosePausedRef.current=!0}},o=()=>{if(s.isClosePausedRef.current){const e=new CustomEvent(qh);t.dispatchEvent(e),s.isClosePausedRef.current=!1}},r=t=>{!e.contains(t.relatedTarget)&&o()},i=()=>{e.contains(document.activeElement)||o()};return e.addEventListener("focusin",n),e.addEventListener("focusout",r),e.addEventListener("pointermove",n),e.addEventListener("pointerleave",i),window.addEventListener("blur",n),window.addEventListener("focus",o),()=>{e.removeEventListener("focusin",n),e.removeEventListener("focusout",r),e.removeEventListener("pointermove",n),e.removeEventListener("pointerleave",i),window.removeEventListener("blur",n),window.removeEventListener("focus",o)}}}),[h,s.isClosePausedRef]);const v=e.useCallback((({tabbingDirection:e})=>{const t=l().map((t=>{const n=t.ref.current,o=[n,...dv(n)];return"forwards"===e?o:o.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 o;if(t.target===e&&a)return void(null===(o=u.current)||void 0===o||o.focus());const s=v({tabbingDirection:a?"backwards":"forwards"}),l=s.findIndex((e=>e===n));var r,i;if(fv(s.slice(l+1)))t.preventDefault();else a?null===(r=u.current)||void 0===r||r.focus():null===(i=d.current)||void 0===i||i.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}}),[l,v]),e.createElement(at,{ref:c,role:"region","aria-label":i.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:h?void 0:"none"}},h&&e.createElement(Xh,{ref:u,onFocusFromOutsideViewport:()=>{fv(v({tabbingDirection:"forwards"}))}}),e.createElement(Lh.Slot,{scope:o},e.createElement(Me.ol,y({tabIndex:-1},a,{ref:p}))),h&&e.createElement(Xh,{ref:d,onFocusFromOutsideViewport:()=>{fv(v({tabbingDirection:"backwards"}))}}))})),Xh=e.forwardRef(((t,n)=>{const{Z:o,onFocusFromOutsideViewport:r,...i}=t,a=Vh("ToastFocusProxy",o);return e.createElement(Hn,y({"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))&&r()}}))})),Yh="Toast",Jh=e.forwardRef(((t,n)=>{const{forceMount:o,open:r,defaultOpen:i,onOpenChange:a,...s}=t,[l=!0,c]=Vn({prop:r,defaultProp:i,onChange:a});return e.createElement(Kn,{present:o||l},e.createElement(tv,y({open:l},s,{ref:n,onClose:()=>c(!1),onPause:Ce(t.onPause),onResume:Ce(t.onResume),onSwipeStart:Xe(t.onSwipeStart,(e=>{e.currentTarget.setAttribute("data-swipe","start")})),onSwipeMove:Xe(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:Xe(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:Xe(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`),c(!1)}))})))})),[Qh,ev]=Bh(Yh,{onClose(){}}),tv=e.forwardRef(((n,o)=>{const{Z:r,type:i="foreground",duration:a,open:s,onClose:l,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:m,onSwipeEnd:h,...v}=n,g=Vh(Yh,r),[b,w]=e.useState(null),x=C(o,(e=>w(e))),N=e.useRef(null),k=e.useRef(null),_=a||g.duration,M=e.useRef(0),S=e.useRef(_),A=e.useRef(0),{onToastAdd:O,onToastRemove:D}=g,P=Ce((()=>{var e;(null==b?void 0:b.contains(document.activeElement))&&(null===(e=g.viewport)||void 0===e||e.focus()),l()})),E=e.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout(A.current),M.current=(new Date).getTime(),A.current=window.setTimeout(P,e))}),[P]);e.useEffect((()=>{const e=g.viewport;if(e){const t=()=>{E(S.current),null==d||d()},n=()=>{const e=(new Date).getTime()-M.current;S.current=S.current-e,window.clearTimeout(A.current),null==u||u()};return e.addEventListener(Wh,n),e.addEventListener(qh,t),()=>{e.removeEventListener(Wh,n),e.removeEventListener(qh,t)}}}),[g.viewport,_,u,d,E]),e.useEffect((()=>{s&&!g.isClosePausedRef.current&&E(_)}),[s,_,g.isClosePausedRef,E]),e.useEffect((()=>(O(),()=>D())),[O,D]);const T=e.useMemo((()=>b?lv(b):null),[b]);return g.viewport?e.createElement(e.Fragment,null,T&&e.createElement(nv,{Z:r,role:"status","aria-live":"foreground"===i?"assertive":"polite","aria-atomic":!0},T),e.createElement(Qh,{scope:r,onClose:P},t.createPortal(e.createElement(Lh.ItemSlot,{scope:r},e.createElement(it,{asChild:!0,onEscapeKeyDown:Xe(c,(()=>{g.isFocusedToastEscapeKeyDownRef.current||P(),g.isFocusedToastEscapeKeyDownRef.current=!1}))},e.createElement(Me.li,y({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":g.swipeDirection},v,{ref:x,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:Xe(n.onKeyDown,(e=>{"Escape"===e.key&&(null==c||c(e.nativeEvent),e.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,P()))})),onPointerDown:Xe(n.onPointerDown,(e=>{0===e.button&&(N.current={x:e.clientX,y:e.clientY})})),onPointerMove:Xe(n.onPointerMove,(e=>{if(!N.current)return;const t=e.clientX-N.current.x,n=e.clientY-N.current.y,o=Boolean(k.current),r=["left","right"].includes(g.swipeDirection),i=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,a=r?i(0,t):0,s=r?0:i(0,n),l="touch"===e.pointerType?10:2,c={x:a,y:s},u={originalEvent:e,delta:c};o?(k.current=c,cv("toast.swipeMove",p,u,{discrete:!1})):uv(c,g.swipeDirection,l)?(k.current=c,cv("toast.swipeStart",f,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(n)>l)&&(N.current=null)})),onPointerUp:Xe(n.onPointerUp,(e=>{const t=k.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),k.current=null,N.current=null,t){const n=e.currentTarget,o={originalEvent:e,delta:t};uv(t,g.swipeDirection,g.swipeThreshold)?cv("toast.swipeEnd",h,o,{discrete:!0}):cv("toast.swipeCancel",m,o,{discrete:!0}),n.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})))),g.viewport))):null}));tv.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){return new Error(`Invalid prop \`type\` supplied to \`${Yh}\`. Expected \`foreground | background\`.`)}return null}};const nv=t=>{const{Z:n,children:o,...r}=t,i=Vh(Yh,n),[a,s]=e.useState(!1),[l,c]=e.useState(!1);return function(e=(()=>{})){const t=Ce(e);ke((()=>{let e=0,n=0;return e=window.requestAnimationFrame((()=>n=window.requestAnimationFrame(t))),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}}),[t])}((()=>s(!0))),e.useEffect((()=>{const e=window.setTimeout((()=>c(!0)),1e3);return()=>window.clearTimeout(e)}),[]),l?null:e.createElement(Bn,{asChild:!0},e.createElement(Hn,r,a&&e.createElement(e.Fragment,null,i.label," ",o)))},ov=e.forwardRef(((t,n)=>{const{Z:o,...r}=t;return e.createElement(Me.div,y({},r,{ref:n}))})),rv=e.forwardRef(((t,n)=>{const{Z:o,...r}=t;return e.createElement(Me.div,y({},r,{ref:n}))})),iv=e.forwardRef(((t,n)=>{const{altText:o,...r}=t;return o?e.createElement(sv,{altText:o,asChild:!0},e.createElement(av,y({},r,{ref:n}))):null}));iv.propTypes={altText:e=>e.altText?null:new Error("Missing prop `altText` expected on `ToastAction`")};const av=e.forwardRef(((t,n)=>{const{Z:o,...r}=t,i=ev("ToastClose",o);return e.createElement(sv,{asChild:!0},e.createElement(Me.button,y({type:"button"},r,{ref:n,onClick:Xe(t.onClick,i.onClose)})))})),sv=e.forwardRef(((t,n)=>{const{Z:o,altText:r,...i}=t;return e.createElement(Me.div,y({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},i,{ref:n}))}));function lv(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,o=""===e.dataset.radixToastAnnounceExclude;if(!n)if(o){const n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...lv(e))}})),t}function cv(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Se(r,i):r.dispatchEvent(i)}const uv=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),i=o>r;return"left"===t||"right"===t?i&&o>n:!i&&r>n};function dv(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 fv(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}const pv=Gh,mv=Jh,hv=ov,vv=rv,gv=iv,bv=av,wv=e.forwardRef(((t,n)=>{const{pressed:o,defaultPressed:r=!1,onPressedChange:i,...a}=t,[s=!1,l]=Vn({prop:o,onChange:i,defaultProp:r});return e.createElement(Me.button,y({type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":t.disabled?"":void 0},a,{ref:n,onClick:Xe(t.onClick,(()=>{t.disabled||l(!s)}))}))}));var xv={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 yv=(t,n)=>{const o=e.forwardRef((({color:o="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:a,children:s,...l},c)=>{return e.createElement("svg",{ref:c,...xv,width:r,height:r,stroke:o,strokeWidth:a?24*Number(i)/Number(r):i,className:`lucide lucide-${u=t,u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,...l},[...n.map((([t,n])=>e.createElement(t,n))),...(Array.isArray(s)?s:[s])||[]]);var u}));return o.displayName=`${t}`,o},Nv=yv("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),Cv=yv("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"}]]);var kv,_v;!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]])),o={};for(const e of n)o[e]=t[e];return e.objectValues(o)},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}(kv||(kv={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(_v||(_v={}));const Mv=kv.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Sv=e=>{switch(typeof e){case"undefined":return Mv.undefined;case"string":return Mv.string;case"number":return isNaN(e)?Mv.nan:Mv.number;case"boolean":return Mv.boolean;case"function":return Mv.function;case"bigint":return Mv.bigint;case"symbol":return Mv.symbol;case"object":return Array.isArray(e)?Mv.array:null===e?Mv.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?Mv.promise:"undefined"!=typeof Map&&e instanceof Map?Mv.map:"undefined"!=typeof Set&&e instanceof Set?Mv.set:"undefined"!=typeof Date&&e instanceof Date?Mv.date:Mv.object;default:return Mv.unknown}},Av=kv.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 Ov 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:[]},o=e=>{for(const r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(o);else if("invalid_return_type"===r.code)o(r.returnTypeError);else if("invalid_arguments"===r.code)o(r.argumentsError);else if(0===r.path.length)n._errors.push(t(r));else{let e=n,o=0;for(;o<r.path.length;){const n=r.path[o];o===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],o++}}};return o(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,kv.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},n=[];for(const o of this.issues)o.path.length>0?(t[o.path[0]]=t[o.path[0]]||[],t[o.path[0]].push(e(o))):n.push(e(o));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Ov.create=e=>new Ov(e);const Dv=(e,t)=>{let n;switch(e.code){case Av.invalid_type:n=e.received===Mv.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Av.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,kv.jsonStringifyReplacer)}`;break;case Av.unrecognized_keys:n=`Unrecognized key(s) in object: ${kv.joinValues(e.keys,", ")}`;break;case Av.invalid_union:n="Invalid input";break;case Av.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${kv.joinValues(e.options)}`;break;case Av.invalid_enum_value:n=`Invalid enum value. Expected ${kv.joinValues(e.options)}, received '${e.received}'`;break;case Av.invalid_arguments:n="Invalid function arguments";break;case Av.invalid_return_type:n="Invalid function return type";break;case Av.invalid_date:n="Invalid date";break;case Av.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}"`:kv.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Av.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 Av.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 Av.custom:n="Invalid input";break;case Av.invalid_intersection_types:n="Intersection results could not be merged";break;case Av.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Av.not_finite:n="Number must be finite";break;default:n=t.defaultError,kv.assertNever(e)}return{message:n}};let Pv=Dv;function Ev(){return Pv}const Tv=e=>{const{data:t,path:n,errorMaps:o,issueData:r}=e,i=[...n,...r.path||[]],a={...r,path:i};let s="";const l=o.filter((e=>!!e)).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...r,path:i,message:r.message||s}};function Iv(e,t){const n=Tv({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Ev(),Dv].filter((e=>!!e))});e.common.issues.push(n)}class Rv{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 o of t){if("aborted"===o.status)return Fv;"dirty"===o.status&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const o of t)n.push({key:await o.key,value:await o.value});return Rv.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const o of t){const{key:t,value:r}=o;if("aborted"===t.status)return Fv;if("aborted"===r.status)return Fv;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),(void 0!==r.value||o.alwaysSet)&&(n[t.value]=r.value)}return{status:e.value,value:n}}}const Fv=Object.freeze({status:"aborted"}),zv=e=>({status:"valid",value:e}),$v=e=>"aborted"===e.status,Lv=e=>"dirty"===e.status,jv=e=>"valid"===e.status,Uv=e=>"undefined"!=typeof Promise&&e instanceof Promise;var Bv;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(Bv||(Bv={}));class Kv{constructor(e,t,n,o){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=o}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 Zv=(e,t)=>{if(jv(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 Ov(e.common.issues);return this._error=t,this._error}}};function Vv(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:o,description:r}=e;if(t&&(n||o))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:r};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=o?o:t.defaultError}:{message:null!=n?n:t.defaultError},description:r}}class Hv{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.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Sv(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Sv(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Rv,ctx:{common:e.parent.common,data:e.data,parsedType:Sv(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Uv(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 o={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:Sv(e)},r=this._parseSync({data:e,path:o.path,parent:o});return Zv(o,r)}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:Sv(e)},o=this._parse({data:e,path:n.path,parent:n}),r=await(Uv(o)?o:Promise.resolve(o));return Zv(n,r)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,o)=>{const r=e(t),i=()=>o.addIssue({code:Av.custom,...n(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then((e=>!!e||(i(),!1))):!!r||(i(),!1)}))}refinement(e,t){return this._refinement(((n,o)=>!!e(n)||(o.addIssue("function"==typeof t?t(n,o):t),!1)))}_refinement(e){return new Og({schema:this,typeName:zg.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Dg.create(this,this._def)}nullable(){return Pg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return mg.create(this,this._def)}promise(){return Ag.create(this,this._def)}or(e){return gg.create([this,e],this._def)}and(e){return wg.create(this,e,this._def)}transform(e){return new Og({...Vv(this._def),schema:this,typeName:zg.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Eg({...Vv(this._def),innerType:this,defaultValue:t,typeName:zg.ZodDefault})}brand(){return new Rg({typeName:zg.ZodBranded,type:this,...Vv(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Tg({...Vv(this._def),innerType:this,catchValue:t,typeName:zg.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Fg.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Wv=/^c[^\s-]{8,}$/i,qv=/^[a-z][a-z0-9]*$/,Gv=/[0-9A-HJKMNP-TV-Z]{26}/,Xv=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,Yv=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((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}))\])|(\[IPv6:(([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})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,Jv=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,Qv=/^(((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}))$/,eg=/^(([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})))$/;class tg extends Hv{constructor(){super(...arguments),this._regex=(e,t,n)=>this.refinement((t=>e.test(t)),{validation:t,code:Av.invalid_string,...Bv.errToObj(n)}),this.nonempty=e=>this.min(1,Bv.errToObj(e)),this.trim=()=>new tg({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new tg({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new tg({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==Mv.string){const t=this._getOrReturnCtx(e);return Iv(t,{code:Av.invalid_type,expected:Mv.string,received:t.parsedType}),Fv}const t=new Rv;let n;for(const a of this._def.checks)if("min"===a.kind)e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),Iv(n,{code:Av.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),Iv(n,{code:Av.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if("length"===a.kind){const o=e.data.length>a.value,r=e.data.length<a.value;(o||r)&&(n=this._getOrReturnCtx(e,n),o?Iv(n,{code:Av.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):r&&Iv(n,{code:Av.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if("email"===a.kind)Yv.test(e.data)||(n=this._getOrReturnCtx(e,n),Iv(n,{validation:"email",code:Av.invalid_string,message:a.message}),t.dirty());else if("emoji"===a.kind)Jv.test(e.data)||(n=this._getOrReturnCtx(e,n),Iv(n,{validation:"emoji",code:Av.invalid_string,message:a.message}),t.dirty());else if("uuid"===a.kind)Xv.test(e.data)||(n=this._getOrReturnCtx(e,n),Iv(n,{validation:"uuid",code:Av.invalid_string,message:a.message}),t.dirty());else if("cuid"===a.kind)Wv.test(e.data)||(n=this._getOrReturnCtx(e,n),Iv(n,{validation:"cuid",code:Av.invalid_string,message:a.message}),t.dirty());else if("cuid2"===a.kind)qv.test(e.data)||(n=this._getOrReturnCtx(e,n),Iv(n,{validation:"cuid2",code:Av.invalid_string,message:a.message}),t.dirty());else if("ulid"===a.kind)Gv.test(e.data)||(n=this._getOrReturnCtx(e,n),Iv(n,{validation:"ulid",code:Av.invalid_string,message:a.message}),t.dirty());else if("url"===a.kind)try{new URL(e.data)}catch(Zw){n=this._getOrReturnCtx(e,n),Iv(n,{validation:"url",code:Av.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),Iv(n,{validation:"regex",code:Av.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),Iv(n,{code:Av.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),Iv(n,{code:Av.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),Iv(n,{code:Av.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty());else if("datetime"===a.kind){((i=a).precision?i.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`):0===i.precision?i.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$"):i.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$")).test(e.data)||(n=this._getOrReturnCtx(e,n),Iv(n,{code:Av.invalid_string,validation:"datetime",message:a.message}),t.dirty())}else"ip"===a.kind?(o=e.data,("v4"!==(r=a.version)&&r||!Qv.test(o))&&("v6"!==r&&r||!eg.test(o))&&(n=this._getOrReturnCtx(e,n),Iv(n,{validation:"ip",code:Av.invalid_string,message:a.message}),t.dirty())):kv.assertNever(a);var o,r,i;return{status:t.value,value:e.data}}_addCheck(e){return new tg({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Bv.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Bv.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Bv.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Bv.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Bv.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Bv.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Bv.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Bv.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,...Bv.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Bv.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...Bv.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Bv.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Bv.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Bv.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Bv.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Bv.errToObj(t)})}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 ng(e,t){const n=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,r=n>o?n:o;return parseInt(e.toFixed(r).replace(".",""))%parseInt(t.toFixed(r).replace(".",""))/Math.pow(10,r)}tg.create=e=>{var t;return new tg({checks:[],typeName:zg.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Vv(e)})};class og extends Hv{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)!==Mv.number){const t=this._getOrReturnCtx(e);return Iv(t,{code:Av.invalid_type,expected:Mv.number,received:t.parsedType}),Fv}let t;const n=new Rv;for(const o of this._def.checks)if("int"===o.kind)kv.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Iv(t,{code:Av.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty());else if("min"===o.kind){(o.inclusive?e.data<o.value:e.data<=o.value)&&(t=this._getOrReturnCtx(e,t),Iv(t,{code:Av.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty())}else if("max"===o.kind){(o.inclusive?e.data>o.value:e.data>=o.value)&&(t=this._getOrReturnCtx(e,t),Iv(t,{code:Av.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty())}else"multipleOf"===o.kind?0!==ng(e.data,o.value)&&(t=this._getOrReturnCtx(e,t),Iv(t,{code:Av.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):"finite"===o.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Iv(t,{code:Av.not_finite,message:o.message}),n.dirty()):kv.assertNever(o);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Bv.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Bv.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Bv.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Bv.toString(t))}setLimit(e,t,n,o){return new og({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Bv.toString(o)}]})}_addCheck(e){return new og({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Bv.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Bv.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Bv.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Bv.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Bv.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Bv.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Bv.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Bv.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Bv.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&&kv.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)}}og.create=e=>new og({checks:[],typeName:zg.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...Vv(e)});class rg extends Hv{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)!==Mv.bigint){const t=this._getOrReturnCtx(e);return Iv(t,{code:Av.invalid_type,expected:Mv.bigint,received:t.parsedType}),Fv}let t;const n=new Rv;for(const o of this._def.checks)if("min"===o.kind){(o.inclusive?e.data<o.value:e.data<=o.value)&&(t=this._getOrReturnCtx(e,t),Iv(t,{code:Av.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty())}else if("max"===o.kind){(o.inclusive?e.data>o.value:e.data>=o.value)&&(t=this._getOrReturnCtx(e,t),Iv(t,{code:Av.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty())}else"multipleOf"===o.kind?e.data%o.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Iv(t,{code:Av.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):kv.assertNever(o);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Bv.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Bv.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Bv.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Bv.toString(t))}setLimit(e,t,n,o){return new rg({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Bv.toString(o)}]})}_addCheck(e){return new rg({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Bv.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Bv.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Bv.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Bv.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Bv.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}}rg.create=e=>{var t;return new rg({checks:[],typeName:zg.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Vv(e)})};class ig extends Hv{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==Mv.boolean){const t=this._getOrReturnCtx(e);return Iv(t,{code:Av.invalid_type,expected:Mv.boolean,received:t.parsedType}),Fv}return zv(e.data)}}ig.create=e=>new ig({typeName:zg.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...Vv(e)});class ag extends Hv{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==Mv.date){const t=this._getOrReturnCtx(e);return Iv(t,{code:Av.invalid_type,expected:Mv.date,received:t.parsedType}),Fv}if(isNaN(e.data.getTime())){return Iv(this._getOrReturnCtx(e),{code:Av.invalid_date}),Fv}const t=new Rv;let n;for(const o of this._def.checks)"min"===o.kind?e.data.getTime()<o.value&&(n=this._getOrReturnCtx(e,n),Iv(n,{code:Av.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),t.dirty()):"max"===o.kind?e.data.getTime()>o.value&&(n=this._getOrReturnCtx(e,n),Iv(n,{code:Av.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),t.dirty()):kv.assertNever(o);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ag({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Bv.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Bv.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}}ag.create=e=>new ag({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:zg.ZodDate,...Vv(e)});class sg extends Hv{_parse(e){if(this._getType(e)!==Mv.symbol){const t=this._getOrReturnCtx(e);return Iv(t,{code:Av.invalid_type,expected:Mv.symbol,received:t.parsedType}),Fv}return zv(e.data)}}sg.create=e=>new sg({typeName:zg.ZodSymbol,...Vv(e)});class lg extends Hv{_parse(e){if(this._getType(e)!==Mv.undefined){const t=this._getOrReturnCtx(e);return Iv(t,{code:Av.invalid_type,expected:Mv.undefined,received:t.parsedType}),Fv}return zv(e.data)}}lg.create=e=>new lg({typeName:zg.ZodUndefined,...Vv(e)});class cg extends Hv{_parse(e){if(this._getType(e)!==Mv.null){const t=this._getOrReturnCtx(e);return Iv(t,{code:Av.invalid_type,expected:Mv.null,received:t.parsedType}),Fv}return zv(e.data)}}cg.create=e=>new cg({typeName:zg.ZodNull,...Vv(e)});class ug extends Hv{constructor(){super(...arguments),this._any=!0}_parse(e){return zv(e.data)}}ug.create=e=>new ug({typeName:zg.ZodAny,...Vv(e)});class dg extends Hv{constructor(){super(...arguments),this._unknown=!0}_parse(e){return zv(e.data)}}dg.create=e=>new dg({typeName:zg.ZodUnknown,...Vv(e)});class fg extends Hv{_parse(e){const t=this._getOrReturnCtx(e);return Iv(t,{code:Av.invalid_type,expected:Mv.never,received:t.parsedType}),Fv}}fg.create=e=>new fg({typeName:zg.ZodNever,...Vv(e)});class pg extends Hv{_parse(e){if(this._getType(e)!==Mv.undefined){const t=this._getOrReturnCtx(e);return Iv(t,{code:Av.invalid_type,expected:Mv.void,received:t.parsedType}),Fv}return zv(e.data)}}pg.create=e=>new pg({typeName:zg.ZodVoid,...Vv(e)});class mg extends Hv{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),o=this._def;if(t.parsedType!==Mv.array)return Iv(t,{code:Av.invalid_type,expected:Mv.array,received:t.parsedType}),Fv;if(null!==o.exactLength){const e=t.data.length>o.exactLength.value,r=t.data.length<o.exactLength.value;(e||r)&&(Iv(t,{code:e?Av.too_big:Av.too_small,minimum:r?o.exactLength.value:void 0,maximum:e?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(null!==o.minLength&&t.data.length<o.minLength.value&&(Iv(t,{code:Av.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),null!==o.maxLength&&t.data.length>o.maxLength.value&&(Iv(t,{code:Av.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>o.type._parseAsync(new Kv(t,e,t.path,n))))).then((e=>Rv.mergeArray(n,e)));const r=[...t.data].map(((e,n)=>o.type._parseSync(new Kv(t,e,t.path,n))));return Rv.mergeArray(n,r)}get element(){return this._def.type}min(e,t){return new mg({...this._def,minLength:{value:e,message:Bv.toString(t)}})}max(e,t){return new mg({...this._def,maxLength:{value:e,message:Bv.toString(t)}})}length(e,t){return new mg({...this._def,exactLength:{value:e,message:Bv.toString(t)}})}nonempty(e){return this.min(1,e)}}function hg(e){if(e instanceof vg){const t={};for(const n in e.shape){const o=e.shape[n];t[n]=Dg.create(hg(o))}return new vg({...e._def,shape:()=>t})}return e instanceof mg?new mg({...e._def,type:hg(e.element)}):e instanceof Dg?Dg.create(hg(e.unwrap())):e instanceof Pg?Pg.create(hg(e.unwrap())):e instanceof xg?xg.create(e.items.map((e=>hg(e)))):e}mg.create=(e,t)=>new mg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:zg.ZodArray,...Vv(t)});class vg extends Hv{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=kv.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==Mv.object){const t=this._getOrReturnCtx(e);return Iv(t,{code:Av.invalid_type,expected:Mv.object,received:t.parsedType}),Fv}const{status:t,ctx:n}=this._processInputParams(e),{shape:o,keys:r}=this._getCached(),i=[];if(!(this._def.catchall instanceof fg&&"strip"===this._def.unknownKeys))for(const s in n.data)r.includes(s)||i.push(s);const a=[];for(const s of r){const e=o[s],t=n.data[s];a.push({key:{status:"valid",value:s},value:e._parse(new Kv(n,t,n.path,s)),alwaysSet:s in n.data})}if(this._def.catchall instanceof fg){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&&(Iv(n,{code:Av.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 o=n.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new Kv(n,o,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=>Rv.mergeObjectSync(t,e))):Rv.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return Bv.errToObj,new vg({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var o,r,i,a;const s=null!==(i=null===(r=(o=this._def).errorMap)||void 0===r?void 0:r.call(o,t,n).message)&&void 0!==i?i:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(a=Bv.errToObj(e).message)&&void 0!==a?a:s}:{message:s}}}:{}})}strip(){return new vg({...this._def,unknownKeys:"strip"})}passthrough(){return new vg({...this._def,unknownKeys:"passthrough"})}extend(e){return new vg({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new vg({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:zg.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new vg({...this._def,catchall:e})}pick(e){const t={};return kv.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new vg({...this._def,shape:()=>t})}omit(e){const t={};return kv.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new vg({...this._def,shape:()=>t})}deepPartial(){return hg(this)}partial(e){const t={};return kv.objectKeys(this.shape).forEach((n=>{const o=this.shape[n];e&&!e[n]?t[n]=o:t[n]=o.optional()})),new vg({...this._def,shape:()=>t})}required(e){const t={};return kv.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Dg;)e=e._def.innerType;t[n]=e}})),new vg({...this._def,shape:()=>t})}keyof(){return _g(kv.objectKeys(this.shape))}}vg.create=(e,t)=>new vg({shape:()=>e,unknownKeys:"strip",catchall:fg.create(),typeName:zg.ZodObject,...Vv(t)}),vg.strictCreate=(e,t)=>new vg({shape:()=>e,unknownKeys:"strict",catchall:fg.create(),typeName:zg.ZodObject,...Vv(t)}),vg.lazycreate=(e,t)=>new vg({shape:e,unknownKeys:"strip",catchall:fg.create(),typeName:zg.ZodObject,...Vv(t)});class gg extends Hv{_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 o of e)if("dirty"===o.result.status)return t.common.issues.push(...o.ctx.common.issues),o.result;const n=e.map((e=>new Ov(e.ctx.common.issues)));return Iv(t,{code:Av.invalid_union,unionErrors:n}),Fv}));{let e;const o=[];for(const i of n){const n={...t,common:{...t.common,issues:[]},parent:null},r=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:n}),n.common.issues.length&&o.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const r=o.map((e=>new Ov(e)));return Iv(t,{code:Av.invalid_union,unionErrors:r}),Fv}}get options(){return this._def.options}}gg.create=(e,t)=>new gg({options:e,typeName:zg.ZodUnion,...Vv(t)});function bg(e,t){const n=Sv(e),o=Sv(t);if(e===t)return{valid:!0,data:e};if(n===Mv.object&&o===Mv.object){const n=kv.objectKeys(t),o=kv.objectKeys(e).filter((e=>-1!==n.indexOf(e))),r={...e,...t};for(const i of o){const n=bg(e[i],t[i]);if(!n.valid)return{valid:!1};r[i]=n.data}return{valid:!0,data:r}}if(n===Mv.array&&o===Mv.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let o=0;o<e.length;o++){const r=bg(e[o],t[o]);if(!r.valid)return{valid:!1};n.push(r.data)}return{valid:!0,data:n}}return n===Mv.date&&o===Mv.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class wg extends Hv{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),o=(e,o)=>{if($v(e)||$v(o))return Fv;const r=bg(e.value,o.value);return r.valid?((Lv(e)||Lv(o))&&t.dirty(),{status:t.value,value:r.data}):(Iv(n,{code:Av.invalid_intersection_types}),Fv)};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])=>o(e,t))):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}wg.create=(e,t,n)=>new wg({left:e,right:t,typeName:zg.ZodIntersection,...Vv(n)});class xg extends Hv{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Mv.array)return Iv(n,{code:Av.invalid_type,expected:Mv.array,received:n.parsedType}),Fv;if(n.data.length<this._def.items.length)return Iv(n,{code:Av.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Fv;!this._def.rest&&n.data.length>this._def.items.length&&(Iv(n,{code:Av.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const o=[...n.data].map(((e,t)=>{const o=this._def.items[t]||this._def.rest;return o?o._parse(new Kv(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(o).then((e=>Rv.mergeArray(t,e))):Rv.mergeArray(t,o)}get items(){return this._def.items}rest(e){return new xg({...this._def,rest:e})}}xg.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new xg({items:e,typeName:zg.ZodTuple,rest:null,...Vv(t)})};class yg extends Hv{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Mv.map)return Iv(n,{code:Av.invalid_type,expected:Mv.map,received:n.parsedType}),Fv;const o=this._def.keyType,r=this._def.valueType,i=[...n.data.entries()].map((([e,t],i)=>({key:o._parse(new Kv(n,e,n.path,[i,"key"])),value:r._parse(new Kv(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 o=await n.key,r=await n.value;if("aborted"===o.status||"aborted"===r.status)return Fv;"dirty"!==o.status&&"dirty"!==r.status||t.dirty(),e.set(o.value,r.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of i){const o=n.key,r=n.value;if("aborted"===o.status||"aborted"===r.status)return Fv;"dirty"!==o.status&&"dirty"!==r.status||t.dirty(),e.set(o.value,r.value)}return{status:t.value,value:e}}}}yg.create=(e,t,n)=>new yg({valueType:t,keyType:e,typeName:zg.ZodMap,...Vv(n)});class Ng extends Hv{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Mv.set)return Iv(n,{code:Av.invalid_type,expected:Mv.set,received:n.parsedType}),Fv;const o=this._def;null!==o.minSize&&n.data.size<o.minSize.value&&(Iv(n,{code:Av.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),t.dirty()),null!==o.maxSize&&n.data.size>o.maxSize.value&&(Iv(n,{code:Av.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),t.dirty());const r=this._def.valueType;function i(e){const n=new Set;for(const o of e){if("aborted"===o.status)return Fv;"dirty"===o.status&&t.dirty(),n.add(o.value)}return{status:t.value,value:n}}const a=[...n.data.values()].map(((e,t)=>r._parse(new Kv(n,e,n.path,t))));return n.common.async?Promise.all(a).then((e=>i(e))):i(a)}min(e,t){return new Ng({...this._def,minSize:{value:e,message:Bv.toString(t)}})}max(e,t){return new Ng({...this._def,maxSize:{value:e,message:Bv.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ng.create=(e,t)=>new Ng({valueType:e,minSize:null,maxSize:null,typeName:zg.ZodSet,...Vv(t)});class Cg extends Hv{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})}}Cg.create=(e,t)=>new Cg({getter:e,typeName:zg.ZodLazy,...Vv(t)});class kg extends Hv{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Iv(t,{received:t.data,code:Av.invalid_literal,expected:this._def.value}),Fv}return{status:"valid",value:e.data}}get value(){return this._def.value}}function _g(e,t){return new Mg({values:e,typeName:zg.ZodEnum,...Vv(t)})}kg.create=(e,t)=>new kg({value:e,typeName:zg.ZodLiteral,...Vv(t)});class Mg extends Hv{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return Iv(t,{expected:kv.joinValues(n),received:t.parsedType,code:Av.invalid_type}),Fv}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return Iv(t,{received:t.data,code:Av.invalid_enum_value,options:n}),Fv}return zv(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 Mg.create(e)}exclude(e){return Mg.create(this.options.filter((t=>!e.includes(t))))}}Mg.create=_g;class Sg extends Hv{_parse(e){const t=kv.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Mv.string&&n.parsedType!==Mv.number){const e=kv.objectValues(t);return Iv(n,{expected:kv.joinValues(e),received:n.parsedType,code:Av.invalid_type}),Fv}if(-1===t.indexOf(e.data)){const e=kv.objectValues(t);return Iv(n,{received:n.data,code:Av.invalid_enum_value,options:e}),Fv}return zv(e.data)}get enum(){return this._def.values}}Sg.create=(e,t)=>new Sg({values:e,typeName:zg.ZodNativeEnum,...Vv(t)});class Ag extends Hv{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Mv.promise&&!1===t.common.async)return Iv(t,{code:Av.invalid_type,expected:Mv.promise,received:t.parsedType}),Fv;const n=t.parsedType===Mv.promise?t.data:Promise.resolve(t.data);return zv(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Ag.create=(e,t)=>new Ag({type:e,typeName:zg.ZodPromise,...Vv(t)});class Og extends Hv{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===zg.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),o=this._def.effect||null;if("preprocess"===o.type){const e=o.transform(n.data);return 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})}const r={addIssue:e=>{Iv(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(r.addIssue=r.addIssue.bind(r),"refinement"===o.type){const e=e=>{const t=o.refinement(e,r);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 o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===o.status?Fv:("dirty"===o.status&&t.dirty(),e(o.value),{status:t.value,value:o.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?Fv:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===o.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!jv(e))return e;const i=o.transform(e.value,r);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=>jv(e)?Promise.resolve(o.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}kv.assertNever(o)}}Og.create=(e,t,n)=>new Og({schema:e,typeName:zg.ZodEffects,effect:t,...Vv(n)}),Og.createWithPreprocess=(e,t,n)=>new Og({schema:t,effect:{type:"preprocess",transform:e},typeName:zg.ZodEffects,...Vv(n)});class Dg extends Hv{_parse(e){return this._getType(e)===Mv.undefined?zv(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Dg.create=(e,t)=>new Dg({innerType:e,typeName:zg.ZodOptional,...Vv(t)});class Pg extends Hv{_parse(e){return this._getType(e)===Mv.null?zv(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pg.create=(e,t)=>new Pg({innerType:e,typeName:zg.ZodNullable,...Vv(t)});class Eg extends Hv{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===Mv.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Eg.create=(e,t)=>new Eg({innerType:e,typeName:zg.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...Vv(t)});class Tg extends Hv{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Uv(o)?o.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Ov(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===o.status?o.value:this._def.catchValue({get error(){return new Ov(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Tg.create=(e,t)=>new Tg({innerType:e,typeName:zg.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...Vv(t)});class Ig extends Hv{_parse(e){if(this._getType(e)!==Mv.nan){const t=this._getOrReturnCtx(e);return Iv(t,{code:Av.invalid_type,expected:Mv.nan,received:t.parsedType}),Fv}return{status:"valid",value:e.data}}}Ig.create=e=>new Ig({typeName:zg.ZodNaN,...Vv(e)});class Rg extends Hv{_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 Fg extends Hv{_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?Fv:"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?Fv:"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 Fg({in:e,out:t,typeName:zg.ZodPipeline})}}var zg;vg.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"}(zg||(zg={}));const $g=tg.create;og.create,Ig.create,rg.create;const Lg=ig.create;ag.create,sg.create,lg.create,cg.create,ug.create,dg.create,fg.create,pg.create;const jg=mg.create,Ug=vg.create;vg.strictCreate,gg.create,wg.create,xg.create,yg.create,Ng.create,Cg.create,kg.create,Mg.create;const Bg=Sg.create;
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("react"),require("react-dom"),require("react-dom/server")):"function"==typeof define&&define.amd?define(["react","react-dom","react-dom/server"],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 g(t,n,r){const o=m(t),i=e.createElement(n,r);return o.render(i),{root:o,ReactComponent:n}}function y({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,{...A(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 A(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 C(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=C(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=C(e))&&(r&&(r+=" "),r+=t);return r}const E=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,P=T,D=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return P(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 P(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=_(e))&&(r&&(r+=" "),r+=t);return r}function _(e){if("string"==typeof e)return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=_(e[r]))&&(n&&(n+=" "),n+=t);return n}var R="-";function L(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(R);return""===n[0]&&1!==n.length&&n.shift(),F(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 F(e,t){if(0===e.length)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),o=r?F(e.slice(1),r):void 0;if(o)return o;if(0!==t.validators.length){var i=e.join(R);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(R).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 U="!";function H(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(U);return{modifiers:a,hasImportantModifier:f,baseClassName:f?d.substring(1):d,maybePostfixModifierPosition:i&&i>l?i-l:void 0}}}var V=/\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:H(e),...L(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(V).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+U: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 Y(e){var t=function(t){return t[e]||[]};return t.isThemeGetter=!0,t}var X=/^\[(?:([a-z-]+):)?(.+)\]$/i,G=/^\d+\/\d+$/,K=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)||K.has(e)||G.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 X.test(e)}function ce(){return!0}function de(e){return Z.test(e)}function fe(e){return he(e,"",ge)}function he(e,t,n){var r=X.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 ge(e){return J.test(e)}function ye(){var e=Y("colors"),t=Y("spacing"),n=Y("blur"),r=Y("brightness"),o=Y("borderColor"),i=Y("borderRadius"),a=Y("borderSpacing"),u=Y("borderWidth"),l=Y("contrast"),s=Y("grayscale"),c=Y("hueRotate"),d=Y("invert"),f=Y("gap"),h=Y("gradientColorStops"),v=Y("gradientColorStopPositions"),p=Y("inset"),m=Y("margin"),b=Y("opacity"),g=Y("padding"),y=Y("saturate"),w=Y("scale"),x=Y("sepia"),k=Y("skew"),O=Y("space"),j=Y("translate"),S=function(){return["auto",se,t]},N=function(){return[se,t]},M=function(){return["",ee]},A=function(){return["auto",ae,se]},C=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:C(),hueRotate:E(),invert:C(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[ue,te],inset:S(),margin:S(),opacity:T(),padding:N(),saturate:T(),scale:T(),sepia:C(),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:C()}],shrink:[{shrink:C()}],order:[{order:["first","last","none",le]}],"grid-cols":[{"grid-cols":[ce]}],"col-start-end":[{col:["auto",{span:["full",le]},se]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[ce]}],"row-start-end":[{row:["auto",{span:[le]},se]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"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:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],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:[y]}],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":[y]}],"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(ye);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 Ae(){return Ae=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},Ae.apply(this,arguments)}const Ce=["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,Ae({},i,{ref:r}))}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});function Te(e,n){e&&t.flushSync((()=>e.dispatchEvent(n)))}const Ee="Avatar",[Pe,De]=je(Ee),[Ie,_e]=Pe(Ee);const Re=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(Ce.span,x({},o,{ref:n})))})),Le=e.forwardRef(((t,n)=>{const{N:r,src:o,onLoadingStatusChange:i=(()=>{}),...a}=t,u=_e("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(Ce.img,x({},a,{ref:n,src:o})):null})),Fe=e.forwardRef(((t,n)=>{const{N:r,delayMs:o,...i}=t,a=_e("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(Ce.span,x({},i,{ref:n})):null})),Be="Progress",ze=100,[$e,We]=je(Be),[Ue,He]=$e(Be),Ve=e.forwardRef(((t,n)=>{const{C:r,value:o,max:i,getValueLabel:a=qe,...u}=t,l=Ge(i)?i:ze,s=Ke(o,l)?o:null,c=Xe(s)?a(s,l):void 0;return e.createElement(Ue,{scope:r,value:s,max:l},e.createElement(Ce.div,x({"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Xe(s)?s:void 0,"aria-valuetext":c,role:"progressbar","data-state":Ye(s,l),"data-value":null!=s?s:void 0,"data-max":l},u,{ref:n})))}));Ve.propTypes={max(e,t,n){const r=e[t],o=String(r);return r&&!Ge(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=Ge(e.max)?e.max:ze;return null==r||Ke(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 Ye(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Xe(e){return"number"==typeof e}function Ge(e){return Xe(e)&&!isNaN(e)&&e>0}function Ke(e,t){return Xe(e)&&!isNaN(e)&&e<=t&&e>=0}const Ze=Ve,Qe=e.forwardRef(((t,n)=>{var r;const{C:o,...i}=t,a=He("ProgressIndicator",o);return e.createElement(Ce.div,x({"data-state":Ye(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),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(g),w=f?b.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,k=w>=y,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(Ce.div,Ae({},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(Ce.div,Ae({},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,gt=e=>({x:e,y:e}),yt={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 At(e){return St(Mt(e))}function Ct(e){return e.replace(/start|end/g,(e=>wt[e]))}function Tt(e){return e.replace(/left|right|bottom|top/g,(e=>yt[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 Pt(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Dt(e,t,n){let{reference:r,floating:o}=e;const i=Mt(t),a=At(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=Pt(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,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(u.floating)),y=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=Pt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:g,strategy:l}):b);return{top:(m.top-w.top+v.top)/y.y,bottom:(w.bottom-m.bottom+v.bottom)/y.y,left:(m.left-w.left+v.left)/y.x,right:(w.right-m.right+v.right)/y.x}}const _t=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=At(o),h=Nt(f),v=await a.getDimensions(l),p="y"===f,m=p?"top":"left",b=p?"bottom":"right",g=p?"clientHeight":"clientWidth",y=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[g]:0;k&&await(null==a.isElement?void 0:a.isElement(x))||(k=u.floating[g]||i.floating[h]);const O=y/2-w/2,j=k/2-v[h]/2-1,S=vt(c[m],j),N=vt(c[b],j),M=S,A=k-v[h]-N,C=k/2-v[h]/2+O,T=xt(M,C,A),E=null!=jt(o)&&C!=T&&i.reference[h]/2-(C<M?S:N)-v[h]/2<0?C<M?M-C:A-C:0;return{[f]:d[f]-E,data:{[f]:T,centerOffset:C-T+E}}}}),Rt=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,g=await(null==u.isRTL?void 0:u.isRTL(l.floating)),y=d||(b||!v?[Tt(a)]:function(e){const t=Tt(e);return[Ct(e),t,Ct(t)]}(a));d||"none"===h||y.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(Ct)))),i}(a,v,h,g));const w=[a,...y],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=At(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,g);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 Lt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ft(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=Lt(await It(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ft(e)}}}case"escaped":{const e=Lt(await It(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ft(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,g;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==(g=a.offset)?void 0:g[d])||0)-(t?m.crossAxis:0);v<n?v=n:v>r&&(v=r)}return{[f]:h,[d]:v}}}},Ut=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],g=!t.middlewareData.shift;let y=m,w=b;if(d){const e=f-l.left-l.right;w=c||g?vt(b,e):e}else{const e=h-l.top-l.bottom;y=c||g?vt(m,e):e}if(g&&!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)):y=h-2*(0!==n||0!==r?n+r:pt(l.top,l.bottom))}await a({...t,availableWidth:w,availableHeight:y});const x=await o.getDimensions(i.floating);return f!==x.width||h!==x.height?{reset:{rects:!0}}:{}}}};function Ht(e){return Yt(e)?(e.nodeName||"").toLowerCase():"#document"}function Vt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function qt(e){var t;return null==(t=(Yt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Yt(e){return e instanceof Node||e instanceof Vt(e).Node}function Xt(e){return e instanceof Element||e instanceof Vt(e).Element}function Gt(e){return e instanceof HTMLElement||e instanceof Vt(e).HTMLElement}function Kt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Vt(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(Ht(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(Ht(e))}function nn(e){return Vt(e).getComputedStyle(e)}function rn(e){return Xt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function on(e){if("html"===Ht(e))return e;const t=e.assignedSlot||e.parentNode||Kt(e)&&e.host||qt(e);return Kt(t)?t.host:t}function an(e){const t=on(e);return tn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gt(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=Vt(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=Gt(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 Xt(e)?e:e.contextElement}function cn(e){const t=sn(e);if(!Gt(t))return gt(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=gt(0);function fn(e){const t=Vt(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=gt(1);t&&(r?Xt(r)&&(a=cn(r)):a=cn(e));const u=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Vt(e))&&t}(i,n,r)?fn(i):gt(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=Vt(i),t=r&&Xt(r)?Vt(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=Vt(n).frameElement}}return Pt({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=Vt(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(Xt(t))r=function(e,t){const n=hn(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Gt(e)?cn(e):gt(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 Pt(r)}function mn(e,t){const n=on(e);return!(n===t||!Xt(n)||tn(n))&&("fixed"===nn(n).position||mn(n,t))}function bn(e,t,n){const r=Gt(t),o=qt(t),i="fixed"===n,a=hn(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const l=gt(0);if(r||!r&&!i)if(("body"!==Ht(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 gn(e,t){return Gt(e)&&"fixed"!==nn(e).position?t?t(e):e.offsetParent:null}function yn(e,t){const n=Vt(e);if(!Gt(e))return n;let r=gn(e,t);for(;r&&Qt(r)&&"static"===nn(r).position;)r=gn(r,t);return r&&("html"===Ht(r)||"body"===Ht(r)&&"static"===nn(r).position&&!Jt(r))?n:r||function(e){let t=on(e);for(;Gt(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=Gt(n),i=qt(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},u=gt(1);const l=gt(0);if((o||!o&&"fixed"!==r)&&(("body"!==Ht(n)||Zt(i))&&(a=rn(n)),Gt(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=>Xt(e)&&"body"!==Ht(e))),o=null;const i="fixed"===nn(e).position;let a=i?on(e):e;for(;Xt(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:yn,getElementRects:async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||yn,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:Xt,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(xee){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}=Dt(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:g,reset:y}=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],...g}},y&&v<=50&&(v++,"object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(s=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:c,y:d}=Dt(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?_t({element:n.current,padding:r}).fn(t):{}:n?_t({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 An(e){const t=r.useRef(e);return jn((()=>{t.current=e})),t}function Cn(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,Pn]=je(Tn),[Dn,In]=En(Tn),_n=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(Ce.div,Ae({},i,{ref:l}))})),Rn="PopperContent",[Ln,Fn]=En(Rn),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:g=0,collisionBoundary:y=[],collisionPadding:w=0,sticky:x="partial",hideWhenDetached:k=!1,avoidCollisions:j=!0,onPlaced:S,...N}=t,M=In(Rn,h),[A,C]=e.useState(null),T=O(n,(e=>C(e))),[E,P]=e.useState(null),D=Cn(E),I=null!==(i=null==D?void 0:D.width)&&void 0!==i?i:0,_=null!==(a=null==D?void 0:D.height)&&void 0!==a?a:0,R=v+("center"!==m?"-"+m:""),L="number"==typeof w?w:{top:0,right:0,bottom:0,left:0,...w},F=Array.isArray(y)?y:[y],B=F.length>0,z={padding:L,boundary:F.filter(zn),altBoundary:B},{refs:$,floatingStyles:W,placement:U,isPositioned:H,middlewareData:V}=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),[g,y]=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,y(e))}),[y]),k=u||m,O=l||g,j=r.useRef(null),S=r.useRef(null),N=r.useRef(f),M=An(c),A=An(a),C=r.useCallback((()=>{if(!j.current||!S.current)return;const e={placement:t,strategy:n,middleware:v};A.current&&(e.platform=A.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,A]);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,C);C()}}),[k,O,C,M]);const E=r.useMemo((()=>({reference:j,floating:S,setReference:w,setFloating:x})),[w,x]),P=r.useMemo((()=>({reference:k,floating:O})),[k,O]),D=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=Mn(P.floating,f.x),r=Mn(P.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Nn(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,P.floating,f.x,f.y]);return r.useMemo((()=>({...f,update:C,refs:E,elements:P,floatingStyles:D})),[f,C,E,P,D])}({strategy:"fixed",placement:R,whileElementsMounted:xn,elements:{reference:M.anchor},middleware:[zt({mainAxis:p+_,alignmentAxis:b}),j&&$t({mainAxis:!0,crossAxis:!1,limiter:"partial"===x?Wt():void 0,...z}),j&&Rt({...z}),Ut({...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:g}),$n({arrowWidth:I,arrowHeight:_}),k&&Bt({strategy:"referenceHidden"})]}),[q,Y]=Wn(U),X=Ne(S);Me((()=>{H&&(null==X||X())}),[H,X]);const G=null===(u=V.arrow)||void 0===u?void 0:u.x,K=null===(l=V.arrow)||void 0===l?void 0:l.y,Z=0!==(null===(s=V.arrow)||void 0===s?void 0:s.centerOffset),[Q,J]=e.useState();return Me((()=>{A&&J(window.getComputedStyle(A).zIndex)}),[A]),e.createElement("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:H?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[null===(c=V.transformOrigin)||void 0===c?void 0:c.x,null===(d=V.transformOrigin)||void 0===d?void 0:d.y].join(" ")},dir:t.dir},e.createElement(Ln,{scope:h,placedSide:q,onArrowChange:P,arrowX:G,arrowY:K,shouldHideArrow:Z},e.createElement(Ce.div,Ae({"data-side":q,"data-align":Y},N,{ref:T,style:{...N.style,animation:H?void 0:"none",opacity:null!==(f=V.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 g="",y="";return"bottom"===h?(g=c?p:`${m}px`,y=-f+"px"):"top"===h?(g=c?p:`${m}px`,y=`${l.floating.height+f}px`):"right"===h?(g=-f+"px",y=c?p:`${b}px`):"left"===h&&(g=`${l.floating.width+f}px`,y=c?p:`${b}px`),{data:{x:g,y}}}});function Wn(e){const[t,n="center"]=e.split("-");return[t,n]}const Un=_n,Hn=Bn,Vn=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(Ce.div,Ae({},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=Yn(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=Yn(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=Yn(i.current).includes(e.animationName);e.target===r&&n&&t.flushSync((()=>c("ANIMATION_END")))},n=e=>{e.target===r&&(u.current=Yn(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 Yn(e){return(null==e?void 0:e.animationName)||"none"}function Xn({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 Gn=e.forwardRef(((t,n)=>e.createElement(Ce.span,Ae({},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}})))),Kn=Gn,[Zn,Qn]=je("Tooltip",[Pn]),Jn=Pn(),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(Hn,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(Kn,{id:s.contentId,role:"tooltip"},i||o))))}));const vr=sr,pr="focusScope.autoFocusOnMount",mr="focusScope.autoFocusOnUnmount",br={bubbles:!1,cancelable:!0},gr=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=yr(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=yr(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(Ce.div,Ae({tabIndex:-1},u,{ref:h,onKeyDown:p}))}));function yr(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 Ar=function(){return Ar=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},Ar.apply(this,arguments)};function Cr(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",Pr="width-before-scroll-bar";function Dr(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 _r(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=Ar({async:!0,ssr:!1},e),t}var Rr=function(e){var t=e.sideCar,n=Cr(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,Ar({},n))};function Lr(e,t){return e.useMedium(t),Rr}Rr.isSideCarExport=!0;var Fr=_r(),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,g=void 0===b?"div":b,y=Cr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=h,x=Dr([n,t]),k=Ar(Ar({},y),i);return r.createElement(r.Fragment,null,d&&r.createElement(w,{sideCar:Fr,removeScrollBar:c,shards:f,noIsolation:v,inert:p,setCallbacks:a,allowPinchZoom:!!m,lockRef:n}),u?r.cloneElement(r.Children.only(l),Ar(Ar({},k),{ref:x})):r.createElement(g,Ar({},k,{className:s,ref:x}),l))}));zr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},zr.classNames={fullWidth:Pr,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)}}},Ur=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}},Hr={left:0,top:0,right:0,gap:0},Vr=function(e){return parseInt(e||"",10)||0},qr=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Hr;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[Vr(n),Vr(r),Vr(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])}},Yr=Ur(),Xr=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(Pr," {\n margin-right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(Er," .").concat(Er," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Pr," .").concat(Pr," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(u,"px;\n }\n")},Gr=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(Yr,{styles:Xr(a,!t,i,n?"":"!important")})},Kr=!1;if("undefined"!=typeof window)try{var Zr=Object.defineProperty({},"passive",{get:function(){return Kr=!0,!0}});window.addEventListener("test",Zr,Zr),window.removeEventListener("test",Zr,Zr)}catch(rse){Kr=!1}var Qr=!!Kr&&{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?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},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=Lr(Fr,(function(e){var t=r.useRef([]),n=r.useRef([0,0]),o=r.useRef(),i=r.useState(uo++)[0],a=r.useState((function(){return Ur()}))[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(Gr,{gapMode:"margin"}):null)})),co=r.forwardRef((function(e,t){return r.createElement(zr,Ar({},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))},go=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={})}},yo=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]"))),go(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(Ce.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,Ao]=xo(No,{forceMount:void 0}),Co="DialogOverlay",To=e.forwardRef(((t,n)=>{const r=Ao(Co,t.ee),{forceMount:o=r.forceMount,...i}=t,a=jo(Co,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(Co,r);return e.createElement(fo,{as:j,allowPinchZoom:!0,shards:[i.contentRef]},e.createElement(Ce.div,x({"data-state":$o(i.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))})),Po="DialogContent",Do=e.forwardRef(((t,n)=>{const r=Ao(Po,t.ee),{forceMount:o=r.forceMount,...i}=t,a=jo(Po,t.ee);return e.createElement(qn,{present:o||a.open},a.modal?e.createElement(Io,x({},i,{ref:n})):e.createElement(_o,x({},i,{ref:n})))})),Io=e.forwardRef(((t,n)=>{const r=jo(Po,t.ee),o=e.useRef(null),i=O(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return yo(e)}),[]),e.createElement(Ro,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()))}))})),_o=e.forwardRef(((t,n)=>{const r=jo(Po,t.ee),o=e.useRef(!1),i=e.useRef(!1);return e.createElement(Ro,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()}}))})),Ro=e.forwardRef(((t,n)=>{const{ee:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...u}=t,l=jo(Po,r),s=O(n,e.useRef(null));return Nr(),e.createElement(e.Fragment,null,e.createElement(gr,{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)})),Lo="DialogTitle",Fo=e.forwardRef(((t,n)=>{const{ee:r,...o}=t,i=jo(Lo,r);return e.createElement(Ce.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(Ce.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(Ce.button,x({type:"button"},o,{ref:n,onClick:Je(t.onClick,(()=>i.onOpenChange(!1)))}))}));function $o(e){return e?"open":"closed"}const[Wo,Uo]=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:Po,titleName:Lo,docsSlug:"dialog"}),Ho=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]=Xn({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)},Vo=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(Vn,{asChild:!0,container:i},t)))))},Yo=To,Xo=Do,Go=Fo,Ko=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,gi]=pi(vi),yi=e.forwardRef(((t,n)=>{const{te:r,open:o,defaultOpen:i,disabled:a,onOpenChange:u,...l}=t,[s=!1,c]=Xn({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(Ce.div,Ae({"data-state":ji(s),"data-disabled":a?"":void 0},l,{ref:n})))})),wi=e.forwardRef(((t,n)=>{const{te:r,...o}=t,i=gi("CollapsibleTrigger",r);return e.createElement(Ce.button,Ae({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=gi(xi,t.te);return e.createElement(qn,{present:r||i.open},(({present:t})=>e.createElement(Oi,Ae({},o,{ref:n,present:t}))))})),Oi=e.forwardRef(((t,n)=>{const{te:r,present:o,children:i,...a}=t,u=gi(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),g=e.useRef();return e.useEffect((()=>{const e=requestAnimationFrame((()=>b.current=!1));return()=>cancelAnimationFrame(e)}),[]),Me((()=>{const e=c.current;if(e){g.current=g.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=g.current.transitionDuration,e.style.animationName=g.current.animationName),s(o)}}),[u.open,o]),e.createElement(Ce.div,Ae({"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=yi,Ni=wi,Mi=ki,Ai=e.createContext(void 0);function Ci(t){const n=e.useContext(Ai);return t||n||"ltr"}const Ti="Accordion",Ei=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Pi,Di,Ii]=hi(Ti),[_i,Ri]=je(Ti,[Ii,mi]),Li=mi();e.forwardRef(((t,n)=>{const{type:r,...o}=t,i=o,a=o;return e.createElement(Pi.Provider,{scope:t.ne},"multiple"===r?e.createElement(Ui,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[Fi,Bi]=_i(Ti),[zi,$i]=_i(Ti,{collapsible:!1}),Wi=e.forwardRef(((t,n)=>{const{value:r,defaultValue:o,onValueChange:i=(()=>{}),collapsible:a=!1,...u}=t,[l,s]=Xn({prop:r,defaultProp:o,onChange:i});return e.createElement(Fi,{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}))))})),Ui=e.forwardRef(((t,n)=>{const{value:r,defaultValue:o,onValueChange:i=(()=>{}),...a}=t,[u=[],l]=Xn({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(Fi,{scope:t.ne,value:u,onItemOpen:s,onItemClose:c},e.createElement(zi,{scope:t.ne,collapsible:!0},e.createElement(qi,x({},a,{ref:n}))))})),[Hi,Vi]=_i(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=Di(r),c="ltr"===Ci(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(Hi,{scope:r,disabled:o,direction:i,orientation:a},e.createElement(Pi.Slot,{scope:r},e.createElement(Ce.div,x({},u,{"data-orientation":a,ref:l,onKeyDown:o?void 0:d}))))})),Yi="AccordionItem",[Xi,Gi]=_i(Yi),Ki="AccordionTrigger";function Zi(e){return e?"open":"closed"}const Qi=e.forwardRef(((t,n)=>{const{ne:r,value:o,...i}=t,a=Vi(Yi,r),u=Bi(Yi,r),l=Li(r),s=ft(),c=o&&u.value.includes(o)||!1,d=a.disabled||t.disabled;return e.createElement(Xi,{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=Vi(Ti,r),a=Gi("AccordionHeader",r);return e.createElement(Ce.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=Vi(Ti,r),a=Gi(Ki,r),u=$i(Ki,r),l=Li(r);return e.createElement(Pi.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=Vi(Ti,r),a=Gi("AccordionContent",r),u=Li(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(Vo,x({},i,o,{ref:n}))})),aa=e.forwardRef(((t,n)=>{const{re:r,...o}=t,i=oa(r);return e.createElement(Yo,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(Xo,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(Go,x({},i,o,{ref:n}))})),ha=e.forwardRef(((t,n)=>{const{re:r,...o}=t,i=oa(r);return e.createElement(Ko,x({},i,o,{ref:n}))})),va=t=>{const{re:n,...r}=t,o=oa(n);return e.createElement(Ho,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,ga=ca,ya=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 Aa(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 Ca={};function Ta(){return Ca}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 Pa(e){return Sa(1,arguments),Ea(e,{weekStartsOn:1})}function Da(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=Pa(r),i=new Date(0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);var a=Pa(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),Pa(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 _a(e){Sa(1,arguments);var t=Na(e);return t.setHours(0,0,0,0),t}var Ra=864e5;function La(e,t){Sa(2,arguments);var n=_a(e),r=_a(t),o=n.getTime()-Ia(n),i=r.getTime()-Ia(r);return Math.round((o-i)/Ra)}function Fa(e,t){return Sa(2,arguments),Ma(e,7*ja(t))}function Ba(e,t){return Sa(2,arguments),Aa(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=_a(e),r=_a(t);return n.getTime()===r.getTime()}function Ua(e){return Sa(1,arguments),e instanceof Date||"object"===Oa(e)&&"[object Date]"===Object.prototype.toString.call(e)}function Ha(e,t){Sa(2,arguments);var n=Na(e),r=Na(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}var Va=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 Ya(e){Sa(1,arguments);var t=Na(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Xa(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 Ga(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 Ka(e){return Sa(1,arguments),Ga(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,gu=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"})}},yu=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:yu,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return gu(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}}",gu(o,t)).replace("{{time}}",yu(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 Au={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"})},Cu={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 Cu[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 Pu={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"})},Du=Pu;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 _u,Ru={ordinalNumber:(_u={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(_u.matchPattern);if(!n)return null;var r=n[0],o=e.match(_u.parsePattern);if(!o)return null;var i=_u.valueCallback?_u.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"})},Lu={code:"en-US",formatDistance:Nu,formatLong:Au,formatRelative:Tu,localize:Du,match:Ru,options:{weekStartsOn:0,firstWeekContainsDate:1}},Fu=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bu=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zu=/^'([^]*?)'?$/,$u=/''/g,Wu=/[a-zA-Z]/;function Uu(e,t,n){var r,o,i,a,u,l,s,c,d,f,h,v,p,m,b,g,y,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:Lu,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===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==p?p:k.weekStartsOn)&&void 0!==v?v:null===(y=k.locale)||void 0===y||null===(w=y.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),!Ua(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)),A={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(Fu).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,A);if(o.match(Wu))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}var Hu=6048e5;function Vu(e){Sa(1,arguments);var t=Na(e),n=Pa(t).getTime()-Da(t).getTime();return Math.round(n/Hu)+1}function qu(e){return Sa(1,arguments),Math.floor(function(e){return Sa(1,arguments),Na(e).getTime()}(e)/1e3)}function Yu(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 Xu=6048e5;function Gu(e,t){Sa(1,arguments);var n=Na(e),r=Ea(n,t).getTime()-Yu(n,t).getTime();return Math.round(r/Xu)+1}function Ku(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)/Va)}(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),Ya(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 _a(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),Aa(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)}var al,ul=function(){return ul=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},ul.apply(this,arguments)},ll=e.createContext(void 0);function sl(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(ll);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=ul(ul({},i.button_reset),i.button);return t.style&&Object.assign(l,t.style),e.createElement("button",ul({},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"}(al||(al={})),al.Selected,al.Disabled,al.Hidden,al.Today,al.RangeEnd,al.RangeMiddle,al.RangeStart,al.Outside,e.createContext(void 0),e.createContext(void 0),e.createContext(void 0);const cl="Checkbox",[dl,fl]=je(cl),[hl,vl]=dl(cl),pl=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,g]=Xn({prop:i,defaultProp:a,onChange:c}),y=e.useRef(b);return e.useEffect((()=>{const e=null==f?void 0:f.form;if(e){const t=()=>g(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,g]),e.createElement(hl,{scope:r,state:b,disabled:l},e.createElement(Ce.button,x({type:"button",role:"checkbox","aria-checked":bl(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=>{g((e=>!!bl(e)||!e)),m&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),m&&e.createElement(ml,{control:f,bubbles:!p.current,name:o,value:s,checked:b,required:u,disabled:l,style:{transform:"translateX(-100%)"}}))})),ml=t=>{const{control:n,checked:r,bubbles:o=!0,...i}=t,a=e.useRef(null),u=sl(r),l=Cn(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=bl(r),n.call(e,!bl(r)&&r),e.dispatchEvent(t)}}),[u,r,o]),e.createElement("input",x({type:"checkbox","aria-hidden":!0,defaultChecked:!bl(r)&&r},i,{tabIndex:-1,ref:a,style:{...t.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function bl(e){return"indeterminate"===e}function gl(e){return bl(e)?"indeterminate":e?"checked":"unchecked"}const yl=pl,wl=e.forwardRef(((t,n)=>{const{oe:r,forceMount:o,...i}=t,a=vl("CheckboxIndicator",r);return e.createElement(qn,{present:o||bl(a.state)||!0===a.state},e.createElement(Ce.span,x({"data-state":gl(a.state),"data-disabled":a.disabled?"":void 0},i,{ref:n,style:{pointerEvents:"none",...t.style}})))}));function xl(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 kl(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Ol(...t){return e.useCallback(kl(...t),t)}function jl(...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 Sl=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{},Nl=r["useId".toString()]||(()=>{});let Ml=0;function Al(e){const[t,n]=r.useState(Nl());return Sl((()=>{e||n((e=>null!=e?e:String(Ml++)))}),[e]),e||(t?`radix-${t}`:"")}function Cl(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 Tl({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=Cl(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=Cl(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 El=e.forwardRef(((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(Il);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,Ae({},o,{ref:n}),e.isValidElement(t)?e.cloneElement(t,void 0,r):null)}return e.createElement(Pl,Ae({},o,{ref:n}),r)}));El.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:kl(n,r.ref)}):e.Children.count(r)>1?e.Children.only(null):null}));Pl.displayName="SlotClone";const Dl=({children:t})=>e.createElement(e.Fragment,null,t);function Il(t){return e.isValidElement(t)&&t.type===Dl}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 Rl=["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?El:n;return e.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.createElement(a,Ae({},i,{ref:r}))}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});const Ll="dismissableLayer.update",Fl="dismissableLayer.pointerDownOutside",Bl="dismissableLayer.focusOutside";let zl;const $l=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wl=e.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:u,onDismiss:l,...s}=t,c=e.useContext($l),[d,f]=e.useState(null),[,h]=e.useState({}),v=Ol(n,(e=>f(e))),p=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=p.indexOf(m),g=d?p.indexOf(d):-1,y=c.layersWithOutsidePointerEventsDisabled.size>0,w=g>=b,x=function(t){const n=Cl(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(Fl,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=Cl(t),r=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!r.current){Hl(Bl,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=Cl(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n])}((e=>{g===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))})),e.useEffect((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(zl=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=zl)}}),[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(Ll,e),()=>document.removeEventListener(Ll,e)}),[]),e.createElement(Rl.div,Ae({},s,{ref:v,style:{pointerEvents:y?w?"auto":"none":void 0,...t.style},onFocusCapture:xl(t.onFocusCapture,k.onFocusCapture),onBlurCapture:xl(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:xl(t.onPointerDownCapture,x.onPointerDownCapture)}))}));function Ul(){const e=new CustomEvent(Ll);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 Vl="focusScope.autoFocusOnMount",ql="focusScope.autoFocusOnUnmount",Yl={bubbles:!1,cancelable:!0},Xl=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...u}=t,[l,s]=e.useState(null),c=Cl(i),d=Cl(a),f=e.useRef(null),h=Ol(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:Ql(f.current,{select:!0})}function t(e){!v.paused&&l&&(l.contains(e.relatedTarget)||Ql(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){Jl.add(v);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(Vl,Yl);l.addEventListener(Vl,c),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ql(r,{select:t}),document.activeElement!==n)return}((e=Gl(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Ql(l))}return()=>{l.removeEventListener(Vl,c),setTimeout((()=>{const e=new CustomEvent(ql,Yl);l.addEventListener(ql,d),l.dispatchEvent(e),e.defaultPrevented||Ql(null!=t?t:document.body,{select:!0}),l.removeEventListener(ql,d),Jl.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=Gl(e),n=Kl(t,e),r=Kl(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Ql(i,{select:!0})):(e.preventDefault(),r&&Ql(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,v.paused]);return e.createElement(Rl.div,Ae({tabIndex:-1},u,{ref:h,onKeyDown:p}))}));function Gl(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 Kl(e,t){for(const n of e)if(!Zl(n,{upTo:t}))return n}function Zl(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 Ql(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 Jl=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=es(e,t),e.unshift(t)},remove(t){var n;e=es(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function es(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const ts=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(Rl.div,Ae({},a,{ref:r})),i):null}));const ns=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=rs(i.current);u.current="mounted"===s?e:"none"}),[s]),Sl((()=>{const e=i.current,t=a.current;if(t!==n){const r=u.current,o=rs(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]),Sl((()=>{if(r){const e=e=>{const n=rs(i.current).includes(e.animationName);e.target===r&&n&&t.flushSync((()=>c("ANIMATION_END")))},n=e=>{e.target===r&&(u.current=rs(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=Ol(i.ref,a.ref);return"function"==typeof o||i.isPresent?e.cloneElement(a,{ref:u}):null};function rs(e){return(null==e?void 0:e.animationName)||"none"}ns.displayName="Presence";let os=0;function is(){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 as=_r(),us=function(){},ls=r.forwardRef((function(e,t){var n=r.useRef(null),o=r.useState({onScrollCapture:us,onWheelCapture:us,onTouchMoveCapture:us}),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,g=void 0===b?"div":b,y=Cr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=h,x=Dr([n,t]),k=Ar(Ar({},y),i);return r.createElement(r.Fragment,null,d&&r.createElement(w,{sideCar:as,removeScrollBar:c,shards:f,noIsolation:v,inert:p,setCallbacks:a,allowPinchZoom:!!m,lockRef:n}),u?r.cloneElement(r.Children.only(l),Ar(Ar({},k),{ref:x})):r.createElement(g,Ar({},k,{className:s,ref:x}),l))}));ls.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ls.classNames={fullWidth:Pr,zeroRight:Er};var ss=!1;if("undefined"!=typeof window)try{var cs=Object.defineProperty({},"passive",{get:function(){return ss=!0,!0}});window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch(rse){ss=!1}var ds=!!ss&&{passive:!1},fs=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),hs(e,n)){var r=vs(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},hs=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)},vs=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},ps=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ms=function(e){return[e.deltaX,e.deltaY]},bs=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")},ys=0,ws=[];var xs=Lr(as,(function(e){var t=r.useRef([]),n=r.useRef([0,0]),o=r.useRef(),i=r.useState(ys++)[0],a=r.useState((function(){return Ur()}))[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(bs),!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=ps(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=fs(d,c);if(!f)return!0;if(f?r=d:(r="v"===d?"h":"v",f=fs(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=vs(e,u),v=h[0],p=h[1]-h[2]-i*v;(v||p)&&hs(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(ws.length&&ws[ws.length-1]===a){var r="deltaY"in n?ms(n):ps(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(bs).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=ps(e),o.current=void 0}),[]),f=r.useCallback((function(t){c(t.type,ms(t),t.target,l(t,e.lockRef.current))}),[]),h=r.useCallback((function(t){c(t.type,ps(t),t.target,l(t,e.lockRef.current))}),[]);r.useEffect((function(){return ws.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",s,ds),document.addEventListener("touchmove",s,ds),document.addEventListener("touchstart",d,ds),function(){ws=ws.filter((function(e){return e!==a})),document.removeEventListener("wheel",s,ds),document.removeEventListener("touchmove",s,ds),document.removeEventListener("touchstart",d,ds)}}),[]);var v=e.removeScrollBar,p=e.inert;return r.createElement(r.Fragment,null,p?r.createElement(a,{styles:gs(i)}):null,v?r.createElement(Gr,{gapMode:"margin"}):null)})),ks=r.forwardRef((function(e,t){return r.createElement(ls,Ar({},e,{ref:t,sideCar:xs}))}));ks.classNames=ls.classNames;var Os=ks;const js="Dialog",[Ss,Ns]=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}\``)}]},jl(o,...n)]}(js),[Ms,As]=Ss(js),Cs="DialogPortal",[Ts,Es]=Ss(Cs,{forceMount:void 0}),Ps="DialogOverlay",Ds=e.forwardRef(((t,n)=>{const r=Es(Ps,t.ee),{forceMount:o=r.forceMount,...i}=t,a=As(Ps,t.ee);return a.modal?e.createElement(ns,{present:o||a.open},e.createElement(Is,Ae({},i,{ref:n}))):null})),Is=e.forwardRef(((t,n)=>{const{ee:r,...o}=t,i=As(Ps,r);return e.createElement(Os,{as:El,allowPinchZoom:!0,shards:[i.contentRef]},e.createElement(Rl.div,Ae({"data-state":zs(i.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))})),_s="DialogContent",Rs=e.forwardRef(((t,n)=>{const r=Es(_s,t.ee),{forceMount:o=r.forceMount,...i}=t,a=As(_s,t.ee);return e.createElement(ns,{present:o||a.open},a.modal?e.createElement(Ls,Ae({},i,{ref:n})):e.createElement(Fs,Ae({},i,{ref:n})))})),Ls=e.forwardRef(((t,n)=>{const r=As(_s,t.ee),o=e.useRef(null),i=Ol(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return yo(e)}),[]),e.createElement(Bs,Ae({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xl(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:xl(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:xl(t.onFocusOutside,(e=>e.preventDefault()))}))})),Fs=e.forwardRef(((t,n)=>{const r=As(_s,t.ee),o=e.useRef(!1);return e.createElement(Bs,Ae({},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()}}))})),Bs=e.forwardRef(((t,n)=>{const{ee:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...u}=t,l=As(_s,r),s=Ol(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:is()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:is()),os++,()=>{1===os&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),os--}}),[]),e.createElement(e.Fragment,null,e.createElement(Xl,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a},e.createElement(Wl,Ae({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":zs(l.open)},u,{ref:s,onDismiss:()=>l.onOpenChange(!1)}))),!1)}));function zs(e){return e?"open":"closed"}const $s=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]=Tl({prop:o,defaultProp:i,onChange:a});return e.createElement(Ms,{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)},Ws=t=>{const{ee:n,forceMount:r,children:o,container:i}=t,a=As(Cs,n);return e.createElement(Ts,{scope:n,forceMount:r},e.Children.map(o,(t=>e.createElement(ns,{present:r||a.open},e.createElement(ts,{asChild:!0,container:i},t)))))},Us=Ds,Hs=Rs;var Vs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function qs(e){return e&&e.ie&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ys=1,Xs=.9,Gs=.3,Ks=.1,Zs=0,Qs=.999,Js=.9999,ec=.99,tc=/[\\\/\-_+.# \t"@\[\(\{&]/,nc=/[\\\/\-_+.# \t"@\[\(\{&]/g;function rc(e,t,n,r,o,i){if(i===t.length)return o===e.length?Ys:ec;for(var a,u,l,s=r.charAt(i),c=n.indexOf(s,o),d=0;c>=0;)(a=rc(e,t,n,r,c+1,i+1))>d&&(c===o?a*=Ys:tc.test(e.charAt(c-1))?(a*=Xs,(l=e.slice(o,c-1).match(nc))&&o>0&&(a*=Math.pow(Qs,l.length))):tc.test(e.slice(o,c-1))?(a*=Zs,o>0&&(a*=Math.pow(Qs,c-o))):(a*=Gs,o>0&&(a*=Math.pow(Qs,c-o))),e.charAt(c)!==t.charAt(i)&&(a*=Js)),a<Ks&&n.charAt(c-1)===r.charAt(i+1)&&n.charAt(c-1)!==r.charAt(i)&&(u=rc(e,t,n,r,c+1,i+2))*Ks>a&&(a=u*Ks),a>d&&(d=a),c=n.indexOf(s,c+1);return d}var oc=function(e,t){return rc(e,t,e.toLowerCase(),t.toLowerCase(),0,0)},ic=qs(oc),ac='[cmdk-group=""]',uc='[cmdk-group-items=""]',lc='[cmdk-item=""]',sc=`${lc}:not([aria-disabled="true"])`,cc="cmdk-item-select",dc="data-value",fc=(e,t)=>ic(e,t),hc=r.createContext(void 0),vc=()=>r.useContext(hc),pc=r.createContext(void 0),mc=()=>r.useContext(pc),bc=r.createContext(void 0),gc=r.forwardRef(((e,t)=>{let n=r.useRef(null),o=Pc((()=>({search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}}))),i=Pc((()=>new Set)),a=Pc((()=>new Map)),u=Pc((()=>new Map)),l=Pc((()=>new Set)),s=Tc(e),{label:c,children:d,value:f,onValueChange:h,filter:v,shouldFilter:p,...m}=e,b=r.useId(),g=r.useId(),y=r.useId(),w=Rc();Ec((()=>{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:y,labelId:g})),[]);function O(e){var t;let n=(null==(t=s.current)?void 0:t.filter)??fc;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=""]');C().sort(((t,n)=>{let r=t.getAttribute(dc),o=n.getAttribute(dc);return(e.get(o)??0)-(e.get(r)??0)})).forEach((e=>{let t=e.closest(uc);t?t.appendChild(e.parentElement===t?e:e.closest(`${uc} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${uc} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=n.current.querySelector(`${ac}[${dc}="${e[0]}"]`);null==t||t.parentElement.appendChild(t)}))}function S(){let e=C().find((e=>!e.ariaDisabled)),t=null==e?void 0:e.getAttribute(dc);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=A();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(ac))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function A(){return n.current.querySelector(`${lc}[aria-selected="true"]`)}function C(){return Array.from(n.current.querySelectorAll(sc))}function T(e){let t=C()[e];t&&x.setState("value",t.getAttribute(dc))}function E(e){var t;let n=A(),r=C(),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(dc))}function P(e){let t,n=A(),r=null==n?void 0:n.closest(ac);for(;r&&!t;)r=e>0?Ac(r,ac):Cc(r,ac),t=null==r?void 0:r.querySelector(sc);t?x.setState("value",t.getAttribute(dc)):E(e)}let D=()=>T(C().length-1),I=e=>{e.preventDefault(),e.metaKey?D():e.altKey?P(1):E(1)},_=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?P(-1):E(-1)};return r.createElement("div",{ref:Dc([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&&_(e);break;case"ArrowUp":_(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),D();break;case"Enter":{e.preventDefault();let t=A();if(t){let e=new Event(cc);t.dispatchEvent(e)}}}}},r.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:Lc},c),r.createElement(pc.Provider,{value:x},r.createElement(hc.Provider,{value:k},d)))})),yc=r.forwardRef(((e,t)=>{let n=r.useId(),o=r.useRef(null),i=r.useContext(bc),a=vc(),u=Tc(e);Ec((()=>a.item(n,i)),[]);let l=_c(n,o,[e.value,e.children,o]),s=mc(),c=Ic((e=>e.value&&e.value===l.current)),d=Ic((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(cc,f),()=>t.removeEventListener(cc,f)}),[d,e.onSelect,e.disabled]),!d)return null;let{disabled:h,value:v,onSelect:p,...m}=e;return r.createElement("div",{ref:Dc([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)})),wc=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=vc(),d=Ic((e=>!1===c.filter()||(!e.search||e.filtered.groups.has(a))));Ec((()=>c.group(a)),[]),_c(a,u,[e.value,e.heading,l]);let f=r.createElement(bc.Provider,{value:a},o);return r.createElement("div",{ref:Dc([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))})),xc=r.forwardRef(((e,t)=>{let{alwaysRender:n,...o}=e,i=r.useRef(null),a=Ic((e=>!e.search));return n||a?r.createElement("div",{ref:Dc([i,t]),...o,"cmdk-separator":"",role:"separator"}):null})),kc=r.forwardRef(((e,t)=>{let{onValueChange:n,...o}=e,i=null!=e.value,a=mc(),u=Ic((e=>e.search)),l=vc();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)}})})),Oc=r.forwardRef(((e,t)=>{let{children:n,...o}=e,i=r.useRef(null),a=r.useRef(null),u=vc();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:Dc([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))})),jc=r.forwardRef(((e,t)=>{let{open:n,onOpenChange:o,container:i,...a}=e;return r.createElement($s,{open:n,onOpenChange:o},r.createElement(Ws,{container:i},r.createElement(Us,{"cmdk-overlay":""}),r.createElement(Hs,{"aria-label":e.label,"cmdk-dialog":""},r.createElement(gc,{ref:t,...a}))))})),Sc=r.forwardRef(((e,t)=>{let n=r.useRef(!0),o=Ic((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"})})),Nc=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))})),Mc=Object.assign(gc,{List:Oc,Item:yc,Input:kc,Group:wc,Separator:xc,Dialog:jc,Empty:Sc,Loading:Nc});function Ac(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Cc(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Tc(e){let t=r.useRef(e);return Ec((()=>{t.current=e})),t}var Ec=typeof window>"u"?r.useEffect:r.useLayoutEffect;function Pc(e){let t=r.useRef();return void 0===t.current&&(t.current=e()),t}function Dc(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function Ic(e){let t=mc(),n=()=>e(t.snapshot());return r.useSyncExternalStore(t.subscribe,n,n)}function _c(e,t,n){let o=r.useRef(),i=vc();return Ec((()=>{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(dc,a),o.current=a})),o}var Rc=()=>{let[e,t]=r.useState(),n=Pc((()=>new Map));return Ec((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}},Lc={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Fc="rovingFocusGroup.onEntryFocus",Bc={bubbles:!1,cancelable:!0},zc="RovingFocusGroup",[$c,Wc,Uc]=hi(zc),[Hc,Vc]=je(zc,[Uc]),[qc,Yc]=Hc(zc),Xc=e.forwardRef(((t,n)=>e.createElement($c.Provider,{scope:t.ae},e.createElement($c.Slot,{scope:t.ae},e.createElement(Gc,Ae({},t,{ref:n})))))),Gc=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=Ci(a),[p=null,m]=Xn({prop:u,defaultProp:l,onChange:s}),[b,g]=e.useState(!1),y=Ne(c),w=Wc(r),x=e.useRef(!1),[k,j]=e.useState(0);return e.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(Fc,y),()=>e.removeEventListener(Fc,y)}),[y]),e.createElement(qc,{scope:r,orientation:o,dir:v,loop:i,currentTabStopId:p,onItemFocus:e.useCallback((e=>m(e)),[m]),onItemShiftTab:e.useCallback((()=>g(!0)),[]),onFocusableItemAdd:e.useCallback((()=>j((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>j((e=>e-1))),[])},e.createElement(Ce.div,Ae({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(Fc,Bc);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));Qc([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,(()=>g(!1)))})))})),Kc=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=Wc(r),{onFocusableItemAdd:h,onFocusableItemRemove:v}=c;return e.useEffect((()=>{if(o)return h(),()=>v()}),[o,h,v]),e.createElement($c.ItemSlot,{scope:r,id:s,focusable:o,active:i},e.createElement(Ce.span,Ae({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:Zc[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((()=>Qc(n)))}}))})))})),Zc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Qc(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const Jc=Xc,ed=Kc,td=["Enter"," "],nd=["ArrowUp","PageDown","End"],rd=["ArrowDown","PageUp","Home",...nd],od={ltr:[...td,"ArrowRight"],rtl:[...td,"ArrowLeft"]},id={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ad="Menu",[ud,ld,sd]=hi(ad),[cd,dd]=je(ad,[sd,Pn,Vc]),fd=Pn(),hd=Vc(),[vd,pd]=cd(ad),[md,bd]=cd(ad),gd=e.forwardRef(((t,n)=>{const{ue:r,...o}=t,i=fd(r);return e.createElement(Un,Ae({},i,o,{ref:n}))})),yd="MenuPortal",[wd,xd]=cd(yd,{forceMount:void 0}),kd="MenuContent",[Od,jd]=cd(kd),Sd=e.forwardRef(((t,n)=>{const r=xd(kd,t.ue),{forceMount:o=r.forceMount,...i}=t,a=pd(kd,t.ue),u=bd(kd,t.ue);return e.createElement(ud.Provider,{scope:t.ue},e.createElement(qn,{present:o||a.open},e.createElement(ud.Slot,{scope:t.ue},u.modal?e.createElement(Nd,Ae({},i,{ref:n})):e.createElement(Md,Ae({},i,{ref:n})))))})),Nd=e.forwardRef(((t,n)=>{const r=pd(kd,t.ue),o=e.useRef(null),i=O(n,o);return e.useEffect((()=>{const e=o.current;if(e)return yo(e)}),[]),e.createElement(Ad,Ae({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Je(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))})),Md=e.forwardRef(((t,n)=>{const r=pd(kd,t.ue);return e.createElement(Ad,Ae({},t,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)}))})),Ad=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=pd(kd,r),g=bd(kd,r),y=fd(r),w=hd(r),x=ld(r),[k,S]=e.useState(null),N=e.useRef(null),M=O(n,N,b.onContentChange),A=e.useRef(0),C=e.useRef(""),T=e.useRef(0),E=e.useRef(null),P=e.useRef("right"),D=e.useRef(0),I=p?fo:e.Fragment,_=p?{as:j,allowPinchZoom:!0}:void 0,R=e=>{var t,n;const r=C.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){C.current=t,window.clearTimeout(A.current),""!==t&&(A.current=window.setTimeout((()=>e("")),1e3))}(r),l&&setTimeout((()=>l.focus()))};e.useEffect((()=>()=>window.clearTimeout(A.current)),[]),Nr();const L=e.useCallback((e=>{var t,n;return P.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(Od,{scope:r,searchRef:C,onItemEnter:e.useCallback((e=>{L(e)&&e.preventDefault()}),[L]),onItemLeave:e.useCallback((e=>{var t;L(e)||(null===(t=N.current)||void 0===t||t.focus(),S(null))}),[L]),onTriggerLeave:e.useCallback((e=>{L(e)&&e.preventDefault()}),[L]),pointerGraceTimerRef:T,onPointerGraceIntentChange:e.useCallback((e=>{E.current=e}),[])},e.createElement(I,_,e.createElement(gr,{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(Jc,Ae({asChild:!0},w,{dir:g.dir,orientation:"vertical",loop:o,currentTabStopId:k,onCurrentTabStopIdChange:S,onEntryFocus:Je(s,(e=>{g.isUsingKeyboardRef.current||e.preventDefault()}))}),e.createElement(Hn,Ae({role:"menu","aria-orientation":"vertical","data-state":qd(b.open),"data-radix-menu-content":"",dir:g.dir},y,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&&R(e.key));const o=N.current;if(e.target!==o)return;if(!rd.includes(e.key))return;e.preventDefault();const i=x().filter((e=>!e.disabled)).map((e=>e.ref.current));nd.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(A.current),C.current="")})),onPointerMove:Je(t.onPointerMove,Gd((e=>{const t=e.target,n=D.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>D.current?"right":"left";P.current=t,D.current=e.clientX}})))})))))))})),Cd=e.forwardRef(((t,n)=>{const{ue:r,...o}=t;return e.createElement(Ce.div,Ae({},o,{ref:n}))})),Td="MenuItem",Ed="menu.itemSelect",Pd=e.forwardRef(((t,n)=>{const{disabled:r=!1,onSelect:o,...i}=t,a=e.useRef(null),u=bd(Td,t.ue),l=jd(Td,t.ue),s=O(n,a),c=e.useRef(!1);return e.createElement(Dd,Ae({},i,{ref:s,disabled:r,onClick:Je(t.onClick,(()=>{const e=a.current;if(!r&&e){const t=new CustomEvent(Ed,{bubbles:!0,cancelable:!0});e.addEventListener(Ed,(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||td.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),Dd=e.forwardRef(((t,n)=>{const{ue:r,disabled:o=!1,textValue:i,...a}=t,u=jd(Td,r),l=hd(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(ud.ItemSlot,{scope:r,disabled:o,textValue:null!=i?i:h},e.createElement(ed,Ae({asChild:!0},l,{focusable:!o}),e.createElement(Ce.div,Ae({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0},a,{ref:c,onPointerMove:Je(t.onPointerMove,Gd((e=>{if(o)u.onItemLeave(e);else if(u.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus()}}))),onPointerLeave:Je(t.onPointerLeave,Gd((e=>u.onItemLeave(e)))),onFocus:Je(t.onFocus,(()=>f(!0))),onBlur:Je(t.onBlur,(()=>f(!1)))}))))})),Id=e.forwardRef(((t,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=t;return e.createElement(Bd,{scope:t.ue,checked:r},e.createElement(Pd,Ae({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})})))})),[_d,Rd]=cd("MenuRadioGroup",{value:void 0,onValueChange:()=>{}}),Ld=e.forwardRef(((t,n)=>{const{value:r,...o}=t,i=Rd("MenuRadioItem",t.ue),a=r===i.value;return e.createElement(Bd,{scope:t.ue,checked:a},e.createElement(Pd,Ae({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})})))})),Fd="MenuItemIndicator",[Bd,zd]=cd(Fd,{checked:!1}),$d=e.forwardRef(((t,n)=>{const{ue:r,forceMount:o,...i}=t,a=zd(Fd,r);return e.createElement(qn,{present:o||Yd(a.checked)||!0===a.checked},e.createElement(Ce.span,Ae({},i,{ref:n,"data-state":Xd(a.checked)})))})),Wd=e.forwardRef(((t,n)=>{const{ue:r,...o}=t;return e.createElement(Ce.div,Ae({role:"separator","aria-orientation":"horizontal"},o,{ref:n}))})),[Ud,Hd]=cd("MenuSub"),Vd="MenuSubTrigger";function qd(e){return e?"open":"closed"}function Yd(e){return"indeterminate"===e}function Xd(e){return Yd(e)?"indeterminate":e?"checked":"unchecked"}function Gd(e){return t=>"mouse"===t.pointerType?e(t):void 0}const Kd=gd,Zd=t=>{const{ue:n,forceMount:r,children:o,container:i}=t,a=pd(yd,n);return e.createElement(wd,{scope:n,forceMount:r},e.createElement(qn,{present:r||a.open},e.createElement(Vn,{asChild:!0,container:i},o)))},Qd=Sd,Jd=Cd,ef=Pd,tf=Id,nf=Ld,rf=$d,of=Wd,af=e.forwardRef(((t,n)=>{const r=pd(Vd,t.ue),o=bd(Vd,t.ue),i=Hd(Vd,t.ue),a=jd(Vd,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(gd,Ae({asChild:!0},c),e.createElement(Dd,Ae({id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":qd(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,Gd((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,Gd((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||od[o.dir].includes(e.key)&&(r.onOpenChange(!0),null===(i=r.content)||void 0===i||i.focus(),e.preventDefault())}))})))})),uf=e.forwardRef(((t,n)=>{const r=xd(kd,t.ue),{forceMount:o=r.forceMount,...i}=t,a=pd(kd,t.ue),u=bd(kd,t.ue),l=Hd("MenuSubContent",t.ue),s=e.useRef(null),c=O(n,s);return e.createElement(ud.Provider,{scope:t.ue},e.createElement(qn,{present:o||a.open},e.createElement(ud.Slot,{scope:t.ue},e.createElement(Ad,Ae({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=id[u.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))})),lf="ContextMenu",[sf,cf]=je(lf,[dd]),df=dd(),[ff,hf]=sf(lf),vf=t=>{const{le:n,...r}=t,o=df(n);return e.createElement(Zd,x({},o,r))},pf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=hf("ContextMenuContent",r),a=df(r),u=e.useRef(!1);return e.createElement(Qd,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)"}}))})),mf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=df(r);return e.createElement(Jd,x({},i,o,{ref:n}))})),bf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=df(r);return e.createElement(ef,x({},i,o,{ref:n}))})),gf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=df(r);return e.createElement(tf,x({},i,o,{ref:n}))})),yf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=df(r);return e.createElement(nf,x({},i,o,{ref:n}))})),wf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=df(r);return e.createElement(rf,x({},i,o,{ref:n}))})),xf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=df(r);return e.createElement(of,x({},i,o,{ref:n}))})),kf=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=df(r);return e.createElement(af,x({},i,o,{ref:n}))})),Of=e.forwardRef(((t,n)=>{const{le:r,...o}=t,i=df(r);return e.createElement(uf,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)"}}))})),jf="DropdownMenu",[Sf,Nf]=je(jf,[dd]),Mf=dd(),[Af,Cf]=Sf(jf),Tf=t=>{const{se:n,...r}=t,o=Mf(n);return e.createElement(Zd,x({},o,r))},Ef=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Cf("DropdownMenuContent",r),a=Mf(r),u=e.useRef(!1);return e.createElement(Qd,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)"}}))})),Pf=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Mf(r);return e.createElement(Jd,x({},i,o,{ref:n}))})),Df=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Mf(r);return e.createElement(ef,x({},i,o,{ref:n}))})),If=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Mf(r);return e.createElement(tf,x({},i,o,{ref:n}))})),_f=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Mf(r);return e.createElement(nf,x({},i,o,{ref:n}))})),Rf=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Mf(r);return e.createElement(rf,x({},i,o,{ref:n}))})),Lf=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Mf(r);return e.createElement(of,x({},i,o,{ref:n}))})),Ff=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Mf(r);return e.createElement(af,x({},i,o,{ref:n}))})),Bf=e.forwardRef(((t,n)=>{const{se:r,...o}=t,i=Mf(r);return e.createElement(uf,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)"}}))})),zf=e.createContext(null),$f=e.forwardRef(((t,n)=>e.createElement(Ce.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()}})))),Wf="Menubar",[Uf,Hf,Vf]=hi(Wf),[qf,Yf]=je(Wf,[Vf,Vc]),Xf=dd(),Gf=Vc(),[Kf,Zf]=qf(Wf),Qf=e.forwardRef(((t,n)=>{const{ce:r,value:o,onValueChange:i,defaultValue:a,loop:u=!0,dir:l,...s}=t,c=Ci(l),d=Gf(r),[f="",h]=Xn({prop:o,onChange:i,defaultProp:a}),[v,p]=e.useState(null);return e.createElement(Kf,{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(Uf.Provider,{scope:r},e.createElement(Uf.Slot,{scope:r},e.createElement(Jc,x({asChild:!0},d,{orientation:"horizontal",loop:u,dir:c,currentTabStopId:v,onCurrentTabStopIdChange:p}),e.createElement(Ce.div,x({role:"menubar"},s,{ref:n}))))))})),[Jf,eh]=qf("MenubarMenu"),th="MenubarTrigger",nh=e.forwardRef(((t,n)=>{const{ce:r,disabled:o=!1,...i}=t,a=Gf(r),u=Xf(r),l=Zf(th,r),s=eh(th,r),c=e.useRef(null),d=O(n,c,s.triggerRef),[f,h]=e.useState(!1),v=l.value===s.value;return e.createElement(Uf.ItemSlot,{scope:r,value:s.value,disabled:o},e.createElement(ed,x({asChild:!0},a,{focusable:!o,tabStopId:s.value}),e.createElement(Kd,x({asChild:!0},u),e.createElement(Ce.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)))})))))})),rh="MenubarContent",oh=e.forwardRef(((t,n)=>{const{ce:r,align:o="start",...i}=t,a=Xf(r),u=Zf(rh,r),l=eh(rh,r),s=Hf(r),c=e.useRef(!1);return e.createElement(Qd,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 ih=Qf,ah=nh,uh=t=>{const{ce:n,...r}=t,o=Xf(n);return e.createElement(Zd,x({},o,r))},lh=oh,sh=e.forwardRef(((t,n)=>{const{ce:r,...o}=t,i=Xf(r);return e.createElement(Jd,x({},i,o,{ref:n}))})),ch=e.forwardRef(((t,n)=>{const{ce:r,...o}=t,i=Xf(r);return e.createElement(ef,x({},i,o,{ref:n}))})),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({"data-radix-menubar-subtrigger":""},i,o,{ref:n}))})),mh=e.forwardRef(((t,n)=>{const{ce:r,...o}=t,i=Xf(r);return e.createElement(uf,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)"}}))})),bh="NavigationMenu",[gh,yh,wh]=hi(bh),[xh,kh,Oh]=hi(bh),[jh,Sh]=je(bh,[wh,Oh]),[Nh,Mh]=jh(bh),[Ah,Ch]=jh(bh),Th=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=Ci(c),m=e.useRef(0),b=e.useRef(0),g=e.useRef(0),[y,w]=e.useState(!0),[k="",j]=Xn({prop:o,onChange:e=>{const t=l>0;""!==e?(window.clearTimeout(g.current),t&&w(!1)):(window.clearTimeout(g.current),g.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(g.current)}),[]),e.createElement(Eh,{scope:r,isRootMenu:!0,value:k,dir:p,orientation:s,rootNavigationMenu:f,onTriggerEnter:e=>{window.clearTimeout(m.current),y?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(Ce.nav,x({"aria-label":"Main","data-orientation":s,dir:p},d,{ref:v})))})),Eh=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,g]=e.useState(new Map),[y,w]=e.useState(null);return e.createElement(Nh,{scope:n,isRootMenu:r,rootNavigationMenu:o,value:l,previousValue:sl(l),baseId:ft(),dir:i,orientation:a,viewport:p,onViewportChange:m,indicatorTrack:y,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)=>{g((n=>(n.set(e,t),new Map(n))))}),[]),onViewportContentRemove:e.useCallback((e=>{g((t=>t.has(e)?(t.delete(e),new Map(t)):t))}),[])},e.createElement(gh.Provider,{scope:n},e.createElement(Ah,{scope:n,items:b},u)))},Ph=e.forwardRef(((t,n)=>{const{de:r,...o}=t,i=Mh("NavigationMenuList",r),a=e.createElement(Ce.ul,x({"data-orientation":i.orientation},o,{ref:n}));return e.createElement(Ce.div,{style:{position:"relative"},ref:i.onIndicatorTrackChange},e.createElement(gh.Slot,{scope:r},i.isRootMenu?e.createElement(Xh,{asChild:!0},a):a))})),[Dh,Ih]=jh("NavigationMenuItem"),_h="NavigationMenuTrigger",Rh=e.forwardRef(((t,n)=>{const{de:r,disabled:o,...i}=t,a=Mh(_h,t.de),u=Ih(_h,t.de),l=e.useRef(null),s=O(l,u.triggerRef,n),c=ev(a.baseId,u.value),d=tv(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(gh.ItemSlot,{scope:r,value:u.value},e.createElement(Kh,{asChild:!0},e.createElement(Ce.button,x({id:c,disabled:o,"data-disabled":o?"":void 0,"data-state":Jh(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,nv((()=>{o||h.current||u.wasEscapeCloseRef.current||f.current||(a.onTriggerEnter(u.value),f.current=!0)}))),onPointerLeave:Je(t.onPointerLeave,nv((()=>{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(Kn,{"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})))})),Lh="NavigationMenuIndicator",Fh=e.forwardRef(((n,r)=>{const{forceMount:o,...i}=n,a=Mh(Lh,n.de),u=Boolean(a.value);return a.indicatorTrack?t.createPortal(e.createElement(qn,{present:o||u},e.createElement(Bh,x({},i,{ref:r}))),a.indicatorTrack):null})),Bh=e.forwardRef(((t,n)=>{const{de:r,...o}=t,i=Mh(Lh,r),a=yh(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 Qh(u,h),Qh(i.indicatorTrack,h),s?e.createElement(Ce.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})),zh="NavigationMenuContent",$h=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Mh(zh,t.de),a=Ih(zh,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(Wh,x({forceMount:r},s,{ref:u})):e.createElement(qn,{present:r||l},e.createElement(Hh,x({"data-state":Jh(l)},s,{ref:u,onPointerEnter:Je(t.onPointerEnter,i.onContentEnter),onPointerLeave:Je(t.onPointerLeave,nv(i.onContentLeave)),style:{pointerEvents:!l&&i.isRootMenu?"none":void 0,...s.style}})))})),Wh=e.forwardRef(((e,t)=>{const n=Mh(zh,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})),Uh="navigationMenu.rootContentDismiss",Hh=e.forwardRef(((t,n)=>{const{de:r,value:o,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:u,onRootContentClose:l,onContentFocusOutside:s,...c}=t,d=Mh(zh,r),f=e.useRef(null),h=O(f,n),v=ev(d.baseId,o),p=tv(d.baseId,o),m=yh(r),b=e.useRef(null),{onItemDismiss:g}=d;e.useEffect((()=>{const e=f.current;if(d.isRootMenu&&e){const t=()=>{var t;g(),l(),e.contains(document.activeElement)&&(null===(t=i.current)||void 0===t||t.focus())};return e.addEventListener(Uh,t),()=>e.removeEventListener(Uh,t)}}),[d.isRootMenu,t.value,i,g,l]);const y=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":y,"data-orientation":d.orientation},c,{ref:h,onDismiss:()=>{var e;const t=new Event(Uh,{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(Zh(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}))})))})),Vh="NavigationMenuViewport",qh=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Mh(Vh,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=Mh(Vh,r),u=O(n,a.onViewportChange),l=Ch(zh,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 Qh(d,(()=>{d&&c({width:d.offsetWidth,height:d.offsetHeight})})),e.createElement(Ce.div,x({"data-state":Jh(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,nv(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(Hh,x({},o,{ref:k(n,(e=>{i&&e&&f(e)}))})))})))})),Xh=e.forwardRef(((t,n)=>{const{de:r,...o}=t,i=Mh("FocusGroup",r);return e.createElement(xh.Provider,{scope:r},e.createElement(xh.Slot,{scope:r},e.createElement(Ce.div,x({dir:i.dir},o,{ref:n}))))})),Gh=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Kh=e.forwardRef(((t,n)=>{const{de:r,...o}=t,i=kh(r),a=Mh("FocusGroupItem",r);return e.createElement(xh.ItemSlot,{scope:r},e.createElement(Ce.button,x({},o,{ref:n,onKeyDown:Je(t.onKeyDown,(e=>{if(["Home","End",...Gh].includes(e.key)){let t=i().map((e=>e.ref.current));if(["rtl"===a.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),Gh.includes(e.key)){const n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout((()=>Zh(t))),e.preventDefault()}}))})))}));function Zh(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}function Qh(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 Jh(e){return e?"open":"closed"}function ev(e,t){return`${e}-trigger-${t}`}function tv(e,t){return`${e}-content-${t}`}function nv(e){return t=>"mouse"===t.pointerType?e(t):void 0}const rv=Th,ov=Ph,iv=Rh,av=Fh,uv=$h,lv=qh,sv="Popover",[cv,dv]=je(sv,[Pn]),fv=Pn(),[hv,vv]=cv(sv),pv="PopoverPortal",[mv,bv]=cv(pv,{forceMount:void 0}),gv="PopoverContent",yv=e.forwardRef(((t,n)=>{const r=bv(gv,t.fe),{forceMount:o=r.forceMount,...i}=t,a=vv(gv,t.fe);return e.createElement(qn,{present:o||a.open},a.modal?e.createElement(wv,x({},i,{ref:n})):e.createElement(xv,x({},i,{ref:n})))})),wv=e.forwardRef(((t,n)=>{const r=vv(gv,t.fe),o=e.useRef(null),i=O(n,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return yo(e)}),[]),e.createElement(fo,{as:j,allowPinchZoom:!0},e.createElement(kv,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})})))})),xv=e.forwardRef(((t,n)=>{const r=vv(gv,t.fe),o=e.useRef(!1),i=e.useRef(!1);return e.createElement(kv,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()}}))})),kv=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=vv(gv,r),v=fv(r);return Nr(),e.createElement(gr,{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(Hn,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 Ov=t=>{const{fe:n,forceMount:r,children:o,container:i}=t,a=vv(pv,n);return e.createElement(mv,{scope:n,forceMount:r},e.createElement(qn,{present:r||a.open},e.createElement(Vn,{asChild:!0,container:i},o)))},jv=yv,Sv="Radio",[Nv,Mv]=je(Sv),[Av,Cv]=Nv(Sv),Tv=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(Av,{scope:r,checked:i,disabled:u},e.createElement(Ce.button,x({type:"button",role:"radio","aria-checked":i,"data-state":Dv(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(Pv,{control:d,bubbles:!v.current,name:o,value:l,checked:i,required:a,disabled:u,style:{transform:"translateX(-100%)"}}))})),Ev=e.forwardRef(((t,n)=>{const{he:r,forceMount:o,...i}=t,a=Cv("RadioIndicator",r);return e.createElement(qn,{present:o||a.checked},e.createElement(Ce.span,x({"data-state":Dv(a.checked),"data-disabled":a.disabled?"":void 0},i,{ref:n})))})),Pv=t=>{const{control:n,checked:r,bubbles:o=!0,...i}=t,a=e.useRef(null),u=sl(r),l=Cn(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 Dv(e){return e?"checked":"unchecked"}const Iv=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_v="RadioGroup",[Rv,Lv]=je(_v,[Vc,Mv]),Fv=Vc(),Bv=Mv(),[zv,$v]=Rv(_v),Wv=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=Fv(r),p=Ci(c),[m,b]=Xn({prop:a,defaultProp:i,onChange:f});return e.createElement(zv,{scope:r,name:o,required:u,disabled:l,value:m,onValueChange:b},e.createElement(Jc,x({asChild:!0},v,{orientation:s,dir:p,loop:d}),e.createElement(Ce.div,x({role:"radiogroup","aria-required":u,"aria-orientation":s,"data-disabled":l?"":void 0,dir:p},h,{ref:n}))))})),Uv=Wv,Hv=e.forwardRef(((t,n)=>{const{ve:r,disabled:o,...i}=t,a=$v("RadioGroupItem",r),u=a.disabled||o,l=Fv(r),s=Bv(r),c=e.useRef(null),d=O(n,c),f=a.value===i.value,h=e.useRef(!1);return e.useEffect((()=>{const e=e=>{Iv.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(ed,x({asChild:!0},l,{focusable:!u,active:f}),e.createElement(Tv,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())}))})))})),Vv=e.forwardRef(((t,n)=>{const{ve:r,...o}=t,i=Bv(r);return e.createElement(Ev,x({},i,o,{ref:n}))}));function qv(e,[t,n]){return Math.min(n,Math.max(t,e))}const Yv="ScrollArea",[Xv,Gv]=je(Yv),[Kv,Zv]=Xv(Yv),Qv=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),[g,y]=e.useState(0),[w,k]=e.useState(0),[j,S]=e.useState(!1),[N,M]=e.useState(!1),A=O(n,(e=>s(e))),C=Ci(i);return e.createElement(Kv,{scope:r,type:o,dir:C,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:y,onCornerHeightChange:k},e.createElement(Ce.div,x({dir:C},u,{ref:A,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":w+"px",...t.style}})))})),Jv=e.forwardRef(((t,n)=>{const{be:r,children:o,...i}=t,a=Zv("ScrollAreaViewport",r),u=O(n,e.useRef(null),a.onViewportChange);return e.createElement(e.Fragment,null,e.createElement("style",{dangerouslySetInnerHTML:{ge:"[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(Ce.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)))})),ep="ScrollAreaScrollbar",tp=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Zv(ep,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(np,x({},o,{ref:n,forceMount:r})):"scroll"===i.type?e.createElement(rp,x({},o,{ref:n,forceMount:r})):"auto"===i.type?e.createElement(op,x({},o,{ref:n,forceMount:r})):"always"===i.type?e.createElement(ip,x({},o,{ref:n})):null})),np=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Zv(ep,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(op,x({"data-state":a?"visible":"hidden"},o,{ref:n})))})),rp=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Zv(ep,t.be),a="horizontal"===t.orientation,u=jp((()=>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(ip,x({"data-state":"hidden"===l?"hidden":"visible"},o,{ref:n,onPointerEnter:Je(t.onPointerEnter,(()=>s("POINTER_ENTER"))),onPointerLeave:Je(t.onPointerLeave,(()=>s("POINTER_LEAVE")))})))})),op=e.forwardRef(((t,n)=>{const r=Zv(ep,t.be),{forceMount:o,...i}=t,[a,u]=e.useState(!1),l="horizontal"===t.orientation,s=jp((()=>{if(r.viewport){const e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;u(l?e:t)}}),10);return Sp(r.viewport,s),Sp(r.content,s),e.createElement(qn,{present:o||a},e.createElement(ip,x({"data-state":a?"visible":"hidden"},i,{ref:n})))})),ip=e.forwardRef(((t,n)=>{const{orientation:r="vertical",...o}=t,i=Zv(ep,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=gp(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=yp(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=xp([l,s],d);return f(e)}(e,u.current,l,t)}return"horizontal"===r?e.createElement(ap,x({},d,{ref:n,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=wp(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(up,x({},d,{ref:n,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=wp(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})),ap=e.forwardRef(((t,n)=>{const{sizes:r,onSizesChange:o,...i}=t,a=Zv(ep,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(cp,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":yp(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),kp(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:bp(u.paddingLeft),paddingEnd:bp(u.paddingRight)}})}}))})),up=e.forwardRef(((t,n)=>{const{sizes:r,onSizesChange:o,...i}=t,a=Zv(ep,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(cp,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":yp(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),kp(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:bp(u.paddingTop),paddingEnd:bp(u.paddingBottom)}})}}))})),[lp,sp]=Xv(ep),cp=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=Zv(ep,r),[p,m]=e.useState(null),b=O(n,(e=>m(e))),g=e.useRef(null),y=e.useRef(""),w=v.viewport,k=o.content-o.viewport,j=Ne(d),S=Ne(s),N=jp(f,10);function M(e){if(g.current){const t=e.clientX-g.current.left,n=e.clientY-g.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]),Sp(p,N),Sp(v.content,N),e.createElement(lp,{scope:r,scrollbar:p,hasThumb:i,onThumbChange:Ne(a),onThumbPointerUp:Ne(u),onThumbPositionChange:S,onThumbPointerDown:Ne(l)},e.createElement(Ce.div,x({},h,{ref:b,style:{position:"absolute",...h.style},onPointerDown:Je(t.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),y.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=y.current,g.current=null}))})))})),dp="ScrollAreaThumb",fp=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=sp(dp,t.be);return e.createElement(qn,{present:r||i.hasThumb},e.createElement(hp,x({ref:n},o)))})),hp=e.forwardRef(((t,n)=>{const{be:r,style:o,...i}=t,a=Zv(dp,r),u=sp(dp,r),{onThumbPositionChange:l}=u,s=O(n,(e=>u.onThumbChange(e))),c=e.useRef(),d=jp((()=>{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=Op(e,l);c.current=t,l()}};return l(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[a.viewport,d,l]),e.createElement(Ce.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)}))})),vp="ScrollAreaCorner",pp=e.forwardRef(((t,n)=>{const r=Zv(vp,t.be),o=Boolean(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&o?e.createElement(mp,x({},t,{ref:n})):null})),mp=e.forwardRef(((t,n)=>{const{be:r,...o}=t,i=Zv(vp,r),[a,u]=e.useState(0),[l,s]=e.useState(0),c=Boolean(a&&l);return Sp(i.scrollbarX,(()=>{var e;const t=(null===(e=i.scrollbarX)||void 0===e?void 0:e.offsetHeight)||0;i.onCornerHeightChange(t),s(t)})),Sp(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(Ce.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 bp(e){return e?parseInt(e,10):0}function gp(e,t){const n=e/t;return isNaN(n)?0:n}function yp(e){const t=gp(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function wp(e,t,n="ltr"){const r=yp(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,u=i-r,l=qv(e,"ltr"===n?[0,a]:[-1*a,0]);return xp([0,a],[0,u])(l)}function xp(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 kp(e,t){return e>0&&e<t}const Op=(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 jp(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 Sp(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 Np=Qv,Mp=Jv,Ap=pp,Cp=[" ","Enter","ArrowUp","ArrowDown"],Tp=[" ","Enter"],Ep="Select",[Pp,Dp,Ip]=hi(Ep),[_p,Rp]=je(Ep,[Ip,Pn]),Lp=Pn(),[Fp,Bp]=_p(Ep),[zp,$p]=_p(Ep),Wp=e.forwardRef(((t,n)=>{const{ye:r,disabled:o=!1,...i}=t,a=Lp(r),u=Bp("SelectTrigger",r),l=u.disabled||o,s=O(n,u.onTriggerChange),c=Dp(r),[d,f,h]=hm((e=>{const t=c().filter((e=>!e.disabled)),n=t.find((e=>e.value===u.value)),r=vm(t,e,n);void 0!==r&&u.onValueChange(r.value)})),v=()=>{l||(u.onOpenChange(!0),h())};return e.createElement(Un,x({asChild:!0},a),e.createElement(Ce.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||Cp.includes(e.key)&&(v(),e.preventDefault())}))})))})),Up=e.forwardRef(((t,n)=>{const{ye:r,children:o,...i}=t;return e.createElement(Ce.span,x({"aria-hidden":!0},i,{ref:n}),o||"▼")})),Hp="SelectContent",Vp=e.forwardRef(((n,r)=>{const o=Bp(Hp,n.ye),[i,a]=e.useState();if(Me((()=>{a(new DocumentFragment)}),[]),!o.open){const r=i;return r?t.createPortal(e.createElement(Yp,{scope:n.ye},e.createElement(Pp.Slot,{scope:n.ye},e.createElement("div",null,n.children))),r):null}return e.createElement(Gp,x({},n,{ref:r}))})),qp=10,[Yp,Xp]=_p(Hp),Gp=e.forwardRef(((t,n)=>{const{ye: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,...g}=t,y=Bp(Hp,r),[w,k]=e.useState(null),[S,N]=e.useState(null),M=O(n,(e=>k(e))),[A,C]=e.useState(null),[T,E]=e.useState(null),P=Dp(r),[D,I]=e.useState(!1),_=e.useRef(!1);e.useEffect((()=>{if(w)return yo(w)}),[w]),Nr();const R=e.useCallback((e=>{const[t,...n]=P().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}}),[P,S]),L=e.useCallback((()=>R([A,w])),[R,A,w]);e.useEffect((()=>{D&&L()}),[D,L]);const{onOpenChange:F,triggerPointerDownPosRef:B}=y;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)||F(!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,F,B]),e.useEffect((()=>{const e=()=>F(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[F]);const[z,$]=hm((e=>{const t=P().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=vm(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),W=e.useCallback(((e,t,n)=>{const r=!_.current&&!n;(void 0!==y.value&&y.value===t||r)&&(C(e),r&&(_.current=!0))}),[y.value]),U=e.useCallback((()=>null==w?void 0:w.focus()),[w]),H=e.useCallback(((e,t,n)=>{const r=!_.current&&!n;(void 0!==y.value&&y.value===t||r)&&E(e)}),[y.value]),V="popper"===o?Zp:Kp,q=V===Zp?{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:A,onItemLeave:U,itemTextRefCallback:H,focusSelectedItem:L,selectedItemText:T,position:o,isPositioned:D,searchRef:z},e.createElement(fo,{as:j,allowPinchZoom:!0},e.createElement(gr,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Je(i,(e=>{var t;null===(t=y.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:()=>y.onOpenChange(!1)},e.createElement(V,x({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault()},g,q,{onPlaced:()=>I(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:Je(g.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=P().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((()=>R(t))),e.preventDefault()}}))}))))))})),Kp=e.forwardRef(((t,n)=>{const{ye:r,onPlaced:o,...i}=t,a=Bp(Hp,r),u=Xp(Hp,r),[l,s]=e.useState(null),[c,d]=e.useState(null),f=O(n,(e=>d(e))),h=Dp(r),v=e.useRef(!1),p=e.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:g,focusSelectedItem:y}=u,w=e.useCallback((()=>{if(a.trigger&&a.valueNode&&l&&c&&m&&b&&g){const e=a.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),r=g.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-qp,d=qv(i,[qp,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-qp,d=qv(i,[qp,c-s]);l.style.minWidth=u+"px",l.style.right=d+"px"}const i=h(),u=window.innerHeight-2*qp,s=m.scrollHeight,d=window.getComputedStyle(c),f=parseInt(d.borderTopWidth,10),p=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),w=f+p+s+parseInt(d.paddingBottom,10)+y,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-qp,N=u-S,M=b.offsetHeight/2,A=f+p+(b.offsetTop+M),C=w-A;if(A<=S){const e=b===i[i.length-1].ref.current;l.style.bottom="0px";const t=c.clientHeight-m.offsetTop-m.offsetHeight,n=A+Math.max(N,M+(e?j:0)+t+y);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)+C;l.style.height=t+"px",m.scrollTop=A-S+m.offsetTop}l.style.margin=`${qp}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,g,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==y||y(),p.current=!1)}),[w,y]);return e.createElement(Qp,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:v,onScrollButtonChange:S},e.createElement("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k}},e.createElement(Ce.div,x({},i,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))})),Zp=e.forwardRef(((t,n)=>{const{ye:r,align:o="start",collisionPadding:i=qp,...a}=t,u=Lp(r);return e.createElement(Hn,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)"}}))})),[Qp,Jp]=_p(Hp,{}),em="SelectViewport",tm=e.forwardRef(((t,n)=>{const{ye:r,...o}=t,i=Xp(em,r),a=Jp(em,r),u=O(n,i.onViewportChange),l=e.useRef(0);return e.createElement(e.Fragment,null,e.createElement("style",{dangerouslySetInnerHTML:{ge:"[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(Pp.Slot,{scope:r},e.createElement(Ce.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*qp,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}))}))))})),[nm,rm]=_p("SelectGroup"),om=e.forwardRef(((t,n)=>{const{ye:r,...o}=t,i=rm("SelectLabel",r);return e.createElement(Ce.div,x({id:i.id},o,{ref:n}))})),im="SelectItem",[am,um]=_p(im),lm=e.forwardRef(((t,n)=>{const{ye:r,value:o,disabled:i=!1,textValue:a,...u}=t,l=Bp(im,r),s=Xp(im,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(am,{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(Pp.ItemSlot,{scope:r,value:o,disabled:i,textValue:d},e.createElement(Ce.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||(Tp.includes(e.key)&&b()," "===e.key&&e.preventDefault())}))}))))})),sm="SelectItemText",cm=e.forwardRef(((n,r)=>{const{ye:o,className:i,style:a,...u}=n,l=Bp(sm,o),s=Xp(sm,o),c=um(sm,o),d=$p(sm,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:g}=d;return Me((()=>(b(m),()=>g(m))),[b,g,m]),e.createElement(e.Fragment,null,e.createElement(Ce.span,x({id:c.textId},u,{ref:v})),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren?t.createPortal(u.children,l.valueNode):null)})),dm=e.forwardRef(((t,n)=>{const{ye:r,...o}=t;return um("SelectItemIndicator",r).isSelected?e.createElement(Ce.span,x({"aria-hidden":!0},o,{ref:n})):null})),fm=e.forwardRef(((t,n)=>{const{ye:r,...o}=t;return e.createElement(Ce.div,x({"aria-hidden":!0},o,{ref:n}))}));function hm(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 vm(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=sl(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(Gn,{asChild:!0},e.createElement("select",x({},o,{ref:a,defaultValue:r})))})).displayName="BubbleSelect";const pm=Wp,mm=Up,bm=t=>e.createElement(Vn,x({asChild:!0},t)),gm=Vp,ym=tm,wm=om,xm=lm,km=cm,Om=dm,jm=fm,Sm="horizontal",Nm=["horizontal","vertical"],Mm=e.forwardRef(((t,n)=>{const{decorative:r,orientation:o=Sm,...i}=t,a=Am(o)?o:Sm,u=r?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return e.createElement(Ce.div,x({"data-orientation":a},u,i,{ref:n}))}));function Am(e){return Nm.includes(e)}Mm.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!Am(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 \`${Sm}\`.`}(o,n)):null}};const Cm=Mm,Tm=["PageUp","PageDown"],Em=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Pm={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Dm="Slider",[Im,_m,Rm]=hi(Dm),[Lm,Fm]=je(Dm,[Rm]),[Bm,zm]=Lm(Dm),$m=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),g=O(n,(e=>b(e))),y=e.useRef(new Set),w=e.useRef(0),k="horizontal"===u,j=!m||Boolean(m.closest("form")),S=k?Hm:Vm,[N=[],M]=Xn({prop:d,defaultProp:c,onChange:e=>{var t;null===(t=[...y.current][w.current])||void 0===t||t.focus(),f(e)}}),A=e.useRef(N);function C(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=qv(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(Bm,{scope:t.we,disabled:l,min:o,max:i,valueIndexToChangeRef:w,thumbs:y.current,values:N,orientation:u},e.createElement(Im.Provider,{scope:t.we},e.createElement(Im.Slot,{scope:t.we},e.createElement(S,x({"aria-disabled":l,"data-disabled":l?"":void 0},p,{ref:g,onPointerDown:Je(p.onPointerDown,(()=>{l||(A.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);C(e,t)},onSlideMove:l?void 0:function(e){C(e,w.current)},onSlideEnd:l?void 0:function(){const e=A.current[w.current];N[w.current]!==e&&h(N)},onHomeKeyDown:()=>!l&&C(o,0,{commit:!0}),onEndKeyDown:()=>!l&&C(i,N.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=Tm.includes(e.key)||e.shiftKey&&Em.includes(e.key)?10:1,r=w.current;C(N[r]+a*n*t,r,{commit:!0})}}})))),j&&N.map(((t,n)=>e.createElement(Jm,{key:n,name:r?r+(N.length>1?"[]":""):void 0,value:t}))))})),[Wm,Um]=Lm(Dm,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Hm=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=Ci(i),b="ltr"===m,g=b&&!a||!b&&a;function y(e){const t=p.current||f.getBoundingClientRect(),n=tb([0,t.width],g?[r,o]:[o,r]);return p.current=t,n(e-t.left)}return e.createElement(Wm,{scope:t.we,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width"},e.createElement(qm,x({dir:m,"data-orientation":"horizontal"},d,{ref:v,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=y(e.clientX);null==u||u(t)},onSlideMove:e=>{const t=y(e.clientX);null==l||l(t)},onSlideEnd:()=>{p.current=void 0,null==s||s()},onStepKeyDown:e=>{const t=Pm[g?"from-left":"from-right"].includes(e.key);null==c||c({event:e,direction:t?-1:1})}})))})),Vm=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=tb([0,t.height],v?[o,r]:[r,o]);return h.current=t,n(e-t.top)}return e.createElement(Wm,{scope:t.we,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1},e.createElement(qm,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=Pm[v?"from-bottom":"from-top"].includes(e.key);null==s||s({event:e,direction:t?-1:1})}})))})),qm=e.forwardRef(((t,n)=>{const{we:r,onSlideStart:o,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:u,onEndKeyDown:l,onStepKeyDown:s,...c}=t,d=zm(Dm,r);return e.createElement(Ce.span,x({},c,{ref:n,onKeyDown:Je(t.onKeyDown,(e=>{"Home"===e.key?(u(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):Tm.concat(Em).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=zm("SliderTrack",r);return e.createElement(Ce.span,x({"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation},o,{ref:n}))})),Xm="SliderRange",Gm=e.forwardRef(((t,n)=>{const{we:r,...o}=t,i=zm(Xm,r),a=Um(Xm,r),u=O(n,e.useRef(null)),l=i.values.length,s=i.values.map((e=>eb(e,i.min,i.max))),c=l>1?Math.min(...s):0,d=100-Math.max(...s);return e.createElement(Ce.span,x({"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0},o,{ref:u,style:{...t.style,[a.startEdge]:c+"%",[a.endEdge]:d+"%"}}))})),Km="SliderThumb",Zm=e.forwardRef(((t,n)=>{const r=_m(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(Qm,x({},t,{ref:a,index:u}))})),Qm=e.forwardRef(((t,n)=>{const{we:r,index:o,...i}=t,a=zm(Km,r),u=Um(Km,r),[l,s]=e.useState(null),c=O(n,(e=>s(e))),d=Cn(l),f=a.values[o],h=void 0===f?0:eb(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=tb([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(Im.ItemSlot,{scope:t.we},e.createElement(Ce.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}))}))))})),Jm=t=>{const{value:n,...r}=t,o=e.useRef(null),i=sl(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 eb(e,t,n){return qv(100/(n-t)*(e-t),[0,100])}function tb(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 nb=$m,rb=Ym,ob=Gm,ib=Zm,ab="Switch",[ub,lb]=je(ab),[sb,cb]=ub(ab),db=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,g]=Xn({prop:i,defaultProp:a,onChange:c});return e.createElement(sb,{scope:r,checked:b,disabled:l},e.createElement(Ce.button,x({type:"button",role:"switch","aria-checked":b,"aria-required":u,"data-state":hb(b),"data-disabled":l?"":void 0,disabled:l,value:s},d,{ref:v,onClick:Je(t.onClick,(e=>{g((e=>!e)),m&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),m&&e.createElement(fb,{control:f,bubbles:!p.current,name:o,value:s,checked:b,required:u,disabled:l,style:{transform:"translateX(-100%)"}}))})),fb=t=>{const{control:n,checked:r,bubbles:o=!0,...i}=t,a=e.useRef(null),u=sl(r),l=Cn(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 hb(e){return e?"checked":"unchecked"}const vb=db,pb=e.forwardRef(((t,n)=>{const{xe:r,...o}=t,i=cb("SwitchThumb",r);return e.createElement(Ce.span,x({"data-state":hb(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:n}))})),mb="Tabs",[bb,gb]=je(mb,[Vc]),yb=Vc(),[wb,xb]=bb(mb),kb=e.forwardRef(((t,n)=>{const{ke:r,loop:o=!0,...i}=t,a=xb("TabsList",r),u=yb(r);return e.createElement(Jc,x({asChild:!0},u,{orientation:a.orientation,dir:a.dir,loop:o}),e.createElement(Ce.div,x({role:"tablist","aria-orientation":a.orientation},i,{ref:n})))}));function Ob(e,t){return`${e}-trigger-${t}`}function jb(e,t){return`${e}-content-${t}`}const Sb=kb,Nb=e.forwardRef(((t,n)=>{const{ke:r,value:o,disabled:i=!1,...a}=t,u=xb("TabsTrigger",r),l=yb(r),s=Ob(u.baseId,o),c=jb(u.baseId,o),d=o===u.value;return e.createElement(ed,x({asChild:!0},l,{focusable:!i,active:d}),e.createElement(Ce.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)}))})))})),Mb=e.forwardRef(((t,n)=>{const{ke:r,value:o,forceMount:i,children:a,...u}=t,l=xb("TabsContent",r),s=Ob(l.baseId,o),c=jb(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(Ce.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)))})),Ab="ToastProvider",[Cb,Tb,Eb]=hi("Toast"),[Pb,Db]=je("Toast",[Eb]),[Ib,_b]=Pb(Ab),Rb=["F8"],Lb="toast.viewportPause",Fb="toast.viewportResume",Bb=e.forwardRef(((t,n)=>{const{Oe:r,hotkey:o=Rb,label:i="Notifications ({hotkey})",...a}=t,u=_b("ToastViewport",r),l=Tb(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(Lb);t.dispatchEvent(e),u.isClosePausedRef.current=!0}},r=()=>{if(u.isClosePausedRef.current){const e=new CustomEvent(Fb);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,...tg(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(ng(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(zb,{ref:c,onFocusFromOutsideViewport:()=>{ng(m({tabbingDirection:"forwards"}))}}),e.createElement(Cb.Slot,{scope:r},e.createElement(Ce.ol,x({tabIndex:-1},a,{ref:h}))),p&&e.createElement(zb,{ref:d,onFocusFromOutsideViewport:()=>{ng(m({tabbingDirection:"backwards"}))}}))})),zb=e.forwardRef(((t,n)=>{const{Oe:r,onFocusFromOutsideViewport:o,...i}=t,a=_b("ToastFocusProxy",r);return e.createElement(Gn,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()}}))})),$b="Toast",Wb=e.forwardRef(((t,n)=>{const{forceMount:r,open:o,defaultOpen:i,onOpenChange:a,...u}=t,[l=!0,s]=Xn({prop:o,defaultProp:i,onChange:a});return e.createElement(qn,{present:r||l},e.createElement(Vb,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)}))})))})),[Ub,Hb]=Pb($b,{onClose(){}}),Vb=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=_b($b,o),[g,y]=e.useState(null),w=O(r,(e=>y(e))),k=e.useRef(null),j=e.useRef(null),S=a||b.duration,N=e.useRef(0),M=e.useRef(S),A=e.useRef(0),{onToastAdd:C,onToastRemove:T}=b,E=Ne((()=>{var e;(null==g?void 0:g.contains(document.activeElement))&&(null===(e=b.viewport)||void 0===e||e.focus()),l()})),P=e.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout(A.current),N.current=(new Date).getTime(),A.current=window.setTimeout(E,e))}),[E]);e.useEffect((()=>{const e=b.viewport;if(e){const t=()=>{P(M.current),null==d||d()},n=()=>{const e=(new Date).getTime()-N.current;M.current=M.current-e,window.clearTimeout(A.current),null==c||c()};return e.addEventListener(Lb,n),e.addEventListener(Fb,t),()=>{e.removeEventListener(Lb,n),e.removeEventListener(Fb,t)}}}),[b.viewport,S,c,d,P]),e.useEffect((()=>{u&&!b.isClosePausedRef.current&&P(S)}),[u,S,b.isClosePausedRef,P]),e.useEffect((()=>(C(),()=>T())),[C,T]);const D=e.useMemo((()=>g?Qb(g):null),[g]);return b.viewport?e.createElement(e.Fragment,null,D&&e.createElement(qb,{Oe:o,role:"status","aria-live":"foreground"===i?"assertive":"polite","aria-atomic":!0},D),e.createElement(Ub,{scope:o,onClose:E},t.createPortal(e.createElement(Cb.ItemSlot,{scope:o},e.createElement(lt,{asChild:!0,onEscapeKeyDown:Je(s,(()=>{b.isFocusedToastEscapeKeyDownRef.current||E(),b.isFocusedToastEscapeKeyDownRef.current=!1}))},e.createElement(Ce.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,Jb("toast.swipeMove",h,c,{discrete:!1})):eg(s,b.swipeDirection,l)?(j.current=s,Jb("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};eg(t,b.swipeDirection,b.swipeThreshold)?Jb("toast.swipeEnd",p,r,{discrete:!0}):Jb("toast.swipeCancel",v,r,{discrete:!0}),n.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})))),b.viewport))):null}));Vb.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){return new Error(`Invalid prop \`type\` supplied to \`${$b}\`. Expected \`foreground | background\`.`)}return null}};const qb=t=>{const{Oe:n,children:r,...o}=t,i=_b($b,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(Vn,{asChild:!0},e.createElement(Gn,o,a&&e.createElement(e.Fragment,null,i.label," ",r)))},Yb=e.forwardRef(((t,n)=>{const{Oe:r,...o}=t;return e.createElement(Ce.div,x({},o,{ref:n}))})),Xb=e.forwardRef(((t,n)=>{const{Oe:r,...o}=t;return e.createElement(Ce.div,x({},o,{ref:n}))})),Gb=e.forwardRef(((t,n)=>{const{altText:r,...o}=t;return r?e.createElement(Zb,{altText:r,asChild:!0},e.createElement(Kb,x({},o,{ref:n}))):null}));Gb.propTypes={altText:e=>e.altText?null:new Error("Missing prop `altText` expected on `ToastAction`")};const Kb=e.forwardRef(((t,n)=>{const{Oe:r,...o}=t,i=Hb("ToastClose",r);return e.createElement(Zb,{asChild:!0},e.createElement(Ce.button,x({type:"button"},o,{ref:n,onClick:Je(t.onClick,i.onClose)})))})),Zb=e.forwardRef(((t,n)=>{const{Oe:r,altText:o,...i}=t;return e.createElement(Ce.div,x({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0},i,{ref:n}))}));function Qb(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(...Qb(e))}})),t}function Jb(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 eg=(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 tg(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 ng(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}const rg=Bb,og=Wb,ig=Yb,ag=Xb,ug=Gb,lg=Kb,sg=e.forwardRef(((t,n)=>{const{pressed:r,defaultPressed:o=!1,onPressedChange:i,...a}=t,[u=!1,l]=Xn({prop:r,onChange:i,defaultProp:o});return e.createElement(Ce.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 cg={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 dg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fg=(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,...cg,width:o,height:o,stroke:r,strokeWidth:a?24*Number(i)/Number(o):i,className:`lucide lucide-${dg(t)}`,...l},[...n.map((([t,n])=>e.createElement(t,n))),...(Array.isArray(u)?u:[u])||[]])));return r.displayName=`${t}`,r},hg=fg("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),vg=fg("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"}]]),pg=fg("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"}]]);var mg,bg;!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}(mg||(mg={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(bg||(bg={}));const gg=mg.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),yg=e=>{switch(typeof e){case"undefined":return gg.undefined;case"string":return gg.string;case"number":return isNaN(e)?gg.nan:gg.number;case"boolean":return gg.boolean;case"function":return gg.function;case"bigint":return gg.bigint;case"symbol":return gg.symbol;case"object":return Array.isArray(e)?gg.array:null===e?gg.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?gg.promise:"undefined"!=typeof Map&&e instanceof Map?gg.map:"undefined"!=typeof Set&&e instanceof Set?gg.set:"undefined"!=typeof Date&&e instanceof Date?gg.date:gg.object;default:return gg.unknown}},wg=mg.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 xg 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,mg.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()}}xg.create=e=>new xg(e);const kg=(e,t)=>{let n;switch(e.code){case wg.invalid_type:n=e.received===gg.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case wg.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,mg.jsonStringifyReplacer)}`;break;case wg.unrecognized_keys:n=`Unrecognized key(s) in object: ${mg.joinValues(e.keys,", ")}`;break;case wg.invalid_union:n="Invalid input";break;case wg.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${mg.joinValues(e.options)}`;break;case wg.invalid_enum_value:n=`Invalid enum value. Expected ${mg.joinValues(e.options)}, received '${e.received}'`;break;case wg.invalid_arguments:n="Invalid function arguments";break;case wg.invalid_return_type:n="Invalid function return type";break;case wg.invalid_date:n="Invalid date";break;case wg.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}"`:mg.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case wg.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 wg.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 wg.custom:n="Invalid input";break;case wg.invalid_intersection_types:n="Intersection results could not be merged";break;case wg.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case wg.not_finite:n="Number must be finite";break;default:n=t.defaultError,mg.assertNever(e)}return{message:n}};let Og=kg;function jg(){return Og}const Sg=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 Ng(e,t){const n=Sg({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,jg(),kg].filter((e=>!!e))});e.common.issues.push(n)}class Mg{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 Ag;"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 Mg.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 Ag;if("aborted"===o.status)return Ag;"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 Ag=Object.freeze({status:"aborted"}),Cg=e=>({status:"valid",value:e}),Tg=e=>"aborted"===e.status,Eg=e=>"dirty"===e.status,Pg=e=>"valid"===e.status,Dg=e=>"undefined"!=typeof Promise&&e instanceof Promise;var Ig;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(Ig||(Ig={}));class _g{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 Rg=(e,t)=>{if(Pg(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 xg(e.common.issues);return this._error=t,this._error}}};function Lg(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 Fg{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 yg(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:yg(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Mg,ctx:{common:e.parent.common,data:e.data,parsedType:yg(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Dg(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:yg(e)},o=this._parseSync({data:e,path:r.path,parent:r});return Rg(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:yg(e)},r=this._parse({data:e,path:n.path,parent:n}),o=await(Dg(r)?r:Promise.resolve(r));return Rg(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:wg.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 ky({schema:this,typeName:Ey.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Oy.create(this,this._def)}nullable(){return jy.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return uy.create(this,this._def)}promise(){return xy.create(this,this._def)}or(e){return cy.create([this,e],this._def)}and(e){return fy.create(this,e,this._def)}transform(e){return new ky({...Lg(this._def),schema:this,typeName:Ey.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Sy({...Lg(this._def),innerType:this,defaultValue:t,typeName:Ey.ZodDefault})}brand(){return new Ay({typeName:Ey.ZodBranded,type:this,...Lg(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ny({...Lg(this._def),innerType:this,catchValue:t,typeName:Ey.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Cy.create(this,e)}readonly(){return Ty.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Bg=/^c[^\s-]{8,}$/i,zg=/^[a-z][a-z0-9]*$/,$g=/^[0-9A-HJKMNP-TV-Z]{26}$/,Wg=/^[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,Ug=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let Hg;const Vg=/^(((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}))$/,qg=/^(([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})))$/,Yg=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 Xg extends Fg{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==gg.string){const t=this._getOrReturnCtx(e);return Ng(t,{code:wg.invalid_type,expected:gg.string,received:t.parsedType}),Ag}const t=new Mg;let n;for(const i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),Ng(n,{code:wg.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("max"===i.kind)e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),Ng(n,{code:wg.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("length"===i.kind){const r=e.data.length>i.value,o=e.data.length<i.value;(r||o)&&(n=this._getOrReturnCtx(e,n),r?Ng(n,{code:wg.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&Ng(n,{code:wg.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if("email"===i.kind)Ug.test(e.data)||(n=this._getOrReturnCtx(e,n),Ng(n,{validation:"email",code:wg.invalid_string,message:i.message}),t.dirty());else if("emoji"===i.kind)Hg||(Hg=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Hg.test(e.data)||(n=this._getOrReturnCtx(e,n),Ng(n,{validation:"emoji",code:wg.invalid_string,message:i.message}),t.dirty());else if("uuid"===i.kind)Wg.test(e.data)||(n=this._getOrReturnCtx(e,n),Ng(n,{validation:"uuid",code:wg.invalid_string,message:i.message}),t.dirty());else if("cuid"===i.kind)Bg.test(e.data)||(n=this._getOrReturnCtx(e,n),Ng(n,{validation:"cuid",code:wg.invalid_string,message:i.message}),t.dirty());else if("cuid2"===i.kind)zg.test(e.data)||(n=this._getOrReturnCtx(e,n),Ng(n,{validation:"cuid2",code:wg.invalid_string,message:i.message}),t.dirty());else if("ulid"===i.kind)$g.test(e.data)||(n=this._getOrReturnCtx(e,n),Ng(n,{validation:"ulid",code:wg.invalid_string,message:i.message}),t.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(uue){n=this._getOrReturnCtx(e,n),Ng(n,{validation:"url",code:wg.invalid_string,message:i.message}),t.dirty()}else if("regex"===i.kind){i.regex.lastIndex=0;i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Ng(n,{validation:"regex",code:wg.invalid_string,message:i.message}),t.dirty())}else if("trim"===i.kind)e.data=e.data.trim();else if("includes"===i.kind)e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),Ng(n,{code:wg.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty());else if("toLowerCase"===i.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===i.kind)e.data=e.data.toUpperCase();else if("startsWith"===i.kind)e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),Ng(n,{code:wg.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty());else if("endsWith"===i.kind)e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),Ng(n,{code:wg.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty());else if("datetime"===i.kind){Yg(i).test(e.data)||(n=this._getOrReturnCtx(e,n),Ng(n,{code:wg.invalid_string,validation:"datetime",message:i.message}),t.dirty())}else"ip"===i.kind?(r=e.data,("v4"!==(o=i.version)&&o||!Vg.test(r))&&("v6"!==o&&o||!qg.test(r))&&(n=this._getOrReturnCtx(e,n),Ng(n,{validation:"ip",code:wg.invalid_string,message:i.message}),t.dirty())):mg.assertNever(i);var r,o;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:wg.invalid_string,...Ig.errToObj(n)})}_addCheck(e){return new Xg({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ig.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ig.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Ig.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ig.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ig.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ig.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Ig.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Ig.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,...Ig.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Ig.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...Ig.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Ig.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Ig.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Ig.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Ig.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Ig.errToObj(t)})}nonempty(e){return this.min(1,Ig.errToObj(e))}trim(){return new Xg({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Xg({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Xg({...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 Gg(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)}Xg.create=e=>{var t;return new Xg({checks:[],typeName:Ey.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Lg(e)})};class Kg extends Fg{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)!==gg.number){const t=this._getOrReturnCtx(e);return Ng(t,{code:wg.invalid_type,expected:gg.number,received:t.parsedType}),Ag}let t;const n=new Mg;for(const r of this._def.checks)if("int"===r.kind)mg.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Ng(t,{code:wg.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),Ng(t,{code:wg.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),Ng(t,{code:wg.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==Gg(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),Ng(t,{code:wg.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Ng(t,{code:wg.not_finite,message:r.message}),n.dirty()):mg.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Ig.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Ig.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Ig.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Ig.toString(t))}setLimit(e,t,n,r){return new Kg({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Ig.toString(r)}]})}_addCheck(e){return new Kg({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ig.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ig.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ig.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ig.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ig.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Ig.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Ig.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ig.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ig.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&&mg.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)}}Kg.create=e=>new Kg({checks:[],typeName:Ey.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...Lg(e)});class Zg extends Fg{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)!==gg.bigint){const t=this._getOrReturnCtx(e);return Ng(t,{code:wg.invalid_type,expected:gg.bigint,received:t.parsedType}),Ag}let t;const n=new Mg;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),Ng(t,{code:wg.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),Ng(t,{code:wg.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),Ng(t,{code:wg.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):mg.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Ig.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Ig.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Ig.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Ig.toString(t))}setLimit(e,t,n,r){return new Zg({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Ig.toString(r)}]})}_addCheck(e){return new Zg({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ig.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ig.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ig.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ig.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Ig.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}}Zg.create=e=>{var t;return new Zg({checks:[],typeName:Ey.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Lg(e)})};class Qg extends Fg{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==gg.boolean){const t=this._getOrReturnCtx(e);return Ng(t,{code:wg.invalid_type,expected:gg.boolean,received:t.parsedType}),Ag}return Cg(e.data)}}Qg.create=e=>new Qg({typeName:Ey.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...Lg(e)});class Jg extends Fg{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==gg.date){const t=this._getOrReturnCtx(e);return Ng(t,{code:wg.invalid_type,expected:gg.date,received:t.parsedType}),Ag}if(isNaN(e.data.getTime())){return Ng(this._getOrReturnCtx(e),{code:wg.invalid_date}),Ag}const t=new Mg;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),Ng(n,{code:wg.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),Ng(n,{code:wg.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):mg.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Jg({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Ig.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Ig.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}}Jg.create=e=>new Jg({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ey.ZodDate,...Lg(e)});class ey extends Fg{_parse(e){if(this._getType(e)!==gg.symbol){const t=this._getOrReturnCtx(e);return Ng(t,{code:wg.invalid_type,expected:gg.symbol,received:t.parsedType}),Ag}return Cg(e.data)}}ey.create=e=>new ey({typeName:Ey.ZodSymbol,...Lg(e)});class ty extends Fg{_parse(e){if(this._getType(e)!==gg.undefined){const t=this._getOrReturnCtx(e);return Ng(t,{code:wg.invalid_type,expected:gg.undefined,received:t.parsedType}),Ag}return Cg(e.data)}}ty.create=e=>new ty({typeName:Ey.ZodUndefined,...Lg(e)});class ny extends Fg{_parse(e){if(this._getType(e)!==gg.null){const t=this._getOrReturnCtx(e);return Ng(t,{code:wg.invalid_type,expected:gg.null,received:t.parsedType}),Ag}return Cg(e.data)}}ny.create=e=>new ny({typeName:Ey.ZodNull,...Lg(e)});class ry extends Fg{constructor(){super(...arguments),this._any=!0}_parse(e){return Cg(e.data)}}ry.create=e=>new ry({typeName:Ey.ZodAny,...Lg(e)});class oy extends Fg{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Cg(e.data)}}oy.create=e=>new oy({typeName:Ey.ZodUnknown,...Lg(e)});class iy extends Fg{_parse(e){const t=this._getOrReturnCtx(e);return Ng(t,{code:wg.invalid_type,expected:gg.never,received:t.parsedType}),Ag}}iy.create=e=>new iy({typeName:Ey.ZodNever,...Lg(e)});class ay extends Fg{_parse(e){if(this._getType(e)!==gg.undefined){const t=this._getOrReturnCtx(e);return Ng(t,{code:wg.invalid_type,expected:gg.void,received:t.parsedType}),Ag}return Cg(e.data)}}ay.create=e=>new ay({typeName:Ey.ZodVoid,...Lg(e)});class uy extends Fg{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==gg.array)return Ng(t,{code:wg.invalid_type,expected:gg.array,received:t.parsedType}),Ag;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,o=t.data.length<r.exactLength.value;(e||o)&&(Ng(t,{code:e?wg.too_big:wg.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&&(Ng(t,{code:wg.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&&(Ng(t,{code:wg.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 _g(t,e,t.path,n))))).then((e=>Mg.mergeArray(n,e)));const o=[...t.data].map(((e,n)=>r.type._parseSync(new _g(t,e,t.path,n))));return Mg.mergeArray(n,o)}get element(){return this._def.type}min(e,t){return new uy({...this._def,minLength:{value:e,message:Ig.toString(t)}})}max(e,t){return new uy({...this._def,maxLength:{value:e,message:Ig.toString(t)}})}length(e,t){return new uy({...this._def,exactLength:{value:e,message:Ig.toString(t)}})}nonempty(e){return this.min(1,e)}}function ly(e){if(e instanceof sy){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Oy.create(ly(r))}return new sy({...e._def,shape:()=>t})}return e instanceof uy?new uy({...e._def,type:ly(e.element)}):e instanceof Oy?Oy.create(ly(e.unwrap())):e instanceof jy?jy.create(ly(e.unwrap())):e instanceof hy?hy.create(e.items.map((e=>ly(e)))):e}uy.create=(e,t)=>new uy({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ey.ZodArray,...Lg(t)});class sy extends Fg{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=mg.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==gg.object){const t=this._getOrReturnCtx(e);return Ng(t,{code:wg.invalid_type,expected:gg.object,received:t.parsedType}),Ag}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:o}=this._getCached(),i=[];if(!(this._def.catchall instanceof iy&&"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 _g(n,t,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof iy){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&&(Ng(n,{code:wg.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 _g(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=>Mg.mergeObjectSync(t,e))):Mg.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return Ig.errToObj,new sy({...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=Ig.errToObj(e).message)&&void 0!==a?a:u}:{message:u}}}:{}})}strip(){return new sy({...this._def,unknownKeys:"strip"})}passthrough(){return new sy({...this._def,unknownKeys:"passthrough"})}extend(e){return new sy({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new sy({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ey.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new sy({...this._def,catchall:e})}pick(e){const t={};return mg.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new sy({...this._def,shape:()=>t})}omit(e){const t={};return mg.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new sy({...this._def,shape:()=>t})}deepPartial(){return ly(this)}partial(e){const t={};return mg.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new sy({...this._def,shape:()=>t})}required(e){const t={};return mg.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Oy;)e=e._def.innerType;t[n]=e}})),new sy({...this._def,shape:()=>t})}keyof(){return gy(mg.objectKeys(this.shape))}}sy.create=(e,t)=>new sy({shape:()=>e,unknownKeys:"strip",catchall:iy.create(),typeName:Ey.ZodObject,...Lg(t)}),sy.strictCreate=(e,t)=>new sy({shape:()=>e,unknownKeys:"strict",catchall:iy.create(),typeName:Ey.ZodObject,...Lg(t)}),sy.lazycreate=(e,t)=>new sy({shape:e,unknownKeys:"strip",catchall:iy.create(),typeName:Ey.ZodObject,...Lg(t)});class cy extends Fg{_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 xg(e.ctx.common.issues)));return Ng(t,{code:wg.invalid_union,unionErrors:n}),Ag}));{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 xg(e)));return Ng(t,{code:wg.invalid_union,unionErrors:o}),Ag}}get options(){return this._def.options}}cy.create=(e,t)=>new cy({options:e,typeName:Ey.ZodUnion,...Lg(t)});function dy(e,t){const n=yg(e),r=yg(t);if(e===t)return{valid:!0,data:e};if(n===gg.object&&r===gg.object){const n=mg.objectKeys(t),r=mg.objectKeys(e).filter((e=>-1!==n.indexOf(e))),o={...e,...t};for(const i of r){const n=dy(e[i],t[i]);if(!n.valid)return{valid:!1};o[i]=n.data}return{valid:!0,data:o}}if(n===gg.array&&r===gg.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const o=dy(e[r],t[r]);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}return n===gg.date&&r===gg.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class fy extends Fg{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(Tg(e)||Tg(r))return Ag;const o=dy(e.value,r.value);return o.valid?((Eg(e)||Eg(r))&&t.dirty(),{status:t.value,value:o.data}):(Ng(n,{code:wg.invalid_intersection_types}),Ag)};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}))}}fy.create=(e,t,n)=>new fy({left:e,right:t,typeName:Ey.ZodIntersection,...Lg(n)});class hy extends Fg{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==gg.array)return Ng(n,{code:wg.invalid_type,expected:gg.array,received:n.parsedType}),Ag;if(n.data.length<this._def.items.length)return Ng(n,{code:wg.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ag;!this._def.rest&&n.data.length>this._def.items.length&&(Ng(n,{code:wg.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 _g(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>Mg.mergeArray(t,e))):Mg.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new hy({...this._def,rest:e})}}hy.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new hy({items:e,typeName:Ey.ZodTuple,rest:null,...Lg(t)})};class vy extends Fg{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!==gg.map)return Ng(n,{code:wg.invalid_type,expected:gg.map,received:n.parsedType}),Ag;const r=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map((([e,t],i)=>({key:r._parse(new _g(n,e,n.path,[i,"key"])),value:o._parse(new _g(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 Ag;"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 Ag;"dirty"!==r.status&&"dirty"!==o.status||t.dirty(),e.set(r.value,o.value)}return{status:t.value,value:e}}}}vy.create=(e,t,n)=>new vy({valueType:t,keyType:e,typeName:Ey.ZodMap,...Lg(n)});class py extends Fg{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==gg.set)return Ng(n,{code:wg.invalid_type,expected:gg.set,received:n.parsedType}),Ag;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(Ng(n,{code:wg.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&&(Ng(n,{code:wg.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 Ag;"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 _g(n,e,n.path,t))));return n.common.async?Promise.all(a).then((e=>i(e))):i(a)}min(e,t){return new py({...this._def,minSize:{value:e,message:Ig.toString(t)}})}max(e,t){return new py({...this._def,maxSize:{value:e,message:Ig.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}py.create=(e,t)=>new py({valueType:e,minSize:null,maxSize:null,typeName:Ey.ZodSet,...Lg(t)});class my extends Fg{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})}}my.create=(e,t)=>new my({getter:e,typeName:Ey.ZodLazy,...Lg(t)});class by extends Fg{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Ng(t,{received:t.data,code:wg.invalid_literal,expected:this._def.value}),Ag}return{status:"valid",value:e.data}}get value(){return this._def.value}}function gy(e,t){return new yy({values:e,typeName:Ey.ZodEnum,...Lg(t)})}by.create=(e,t)=>new by({value:e,typeName:Ey.ZodLiteral,...Lg(t)});class yy extends Fg{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return Ng(t,{expected:mg.joinValues(n),received:t.parsedType,code:wg.invalid_type}),Ag}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return Ng(t,{received:t.data,code:wg.invalid_enum_value,options:n}),Ag}return Cg(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 yy.create(e)}exclude(e){return yy.create(this.options.filter((t=>!e.includes(t))))}}yy.create=gy;class wy extends Fg{_parse(e){const t=mg.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==gg.string&&n.parsedType!==gg.number){const e=mg.objectValues(t);return Ng(n,{expected:mg.joinValues(e),received:n.parsedType,code:wg.invalid_type}),Ag}if(-1===t.indexOf(e.data)){const e=mg.objectValues(t);return Ng(n,{received:n.data,code:wg.invalid_enum_value,options:e}),Ag}return Cg(e.data)}get enum(){return this._def.values}}wy.create=(e,t)=>new wy({values:e,typeName:Ey.ZodNativeEnum,...Lg(t)});class xy extends Fg{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==gg.promise&&!1===t.common.async)return Ng(t,{code:wg.invalid_type,expected:gg.promise,received:t.parsedType}),Ag;const n=t.parsedType===gg.promise?t.data:Promise.resolve(t.data);return Cg(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}xy.create=(e,t)=>new xy({type:e,typeName:Ey.ZodPromise,...Lg(t)});class ky extends Fg{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ey.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=>{Ng(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?Ag:("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?Ag:("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(!Pg(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=>Pg(e)?Promise.resolve(r.transform(e.value,o)).then((e=>({status:t.value,value:e}))):e))}mg.assertNever(r)}}ky.create=(e,t,n)=>new ky({schema:e,typeName:Ey.ZodEffects,effect:t,...Lg(n)}),ky.createWithPreprocess=(e,t,n)=>new ky({schema:t,effect:{type:"preprocess",transform:e},typeName:Ey.ZodEffects,...Lg(n)});class Oy extends Fg{_parse(e){return this._getType(e)===gg.undefined?Cg(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Oy.create=(e,t)=>new Oy({innerType:e,typeName:Ey.ZodOptional,...Lg(t)});class jy extends Fg{_parse(e){return this._getType(e)===gg.null?Cg(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}jy.create=(e,t)=>new jy({innerType:e,typeName:Ey.ZodNullable,...Lg(t)});class Sy extends Fg{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===gg.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Sy.create=(e,t)=>new Sy({innerType:e,typeName:Ey.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...Lg(t)});class Ny extends Fg{_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 Dg(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new xg(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new xg(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Ny.create=(e,t)=>new Ny({innerType:e,typeName:Ey.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...Lg(t)});class My extends Fg{_parse(e){if(this._getType(e)!==gg.nan){const t=this._getOrReturnCtx(e);return Ng(t,{code:wg.invalid_type,expected:gg.nan,received:t.parsedType}),Ag}return{status:"valid",value:e.data}}}My.create=e=>new My({typeName:Ey.ZodNaN,...Lg(e)});class Ay extends Fg{_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 Cy extends Fg{_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?Ag:"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?Ag:"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 Cy({in:e,out:t,typeName:Ey.ZodPipeline})}}class Ty extends Fg{_parse(e){const t=this._def.innerType._parse(e);return Pg(t)&&(t.value=Object.freeze(t.value)),t}}var Ey;Ty.create=(e,t)=>new Ty({innerType:e,typeName:Ey.ZodReadonly,...Lg(t)}),sy.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"}(Ey||(Ey={}));const Py=Xg.create;Kg.create,My.create,Zg.create;const Dy=Qg.create;Jg.create,ey.create,ty.create,ny.create,ry.create,oy.create,iy.create,ay.create;const Iy=uy.create,_y=sy.create;sy.strictCreate,cy.create,fy.create,hy.create,vy.create,py.create,my.create,by.create,yy.create;const Ry=wy.create;
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -13,5 +13,12 @@
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
15
  ***************************************************************************** */
16
- function Kg(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{l(o.next(e))}catch(t){i(t)}}function s(e){try{l(o.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))}Ag.create,Og.create,Dg.create,Pg.create,Og.createWithPreprocess,Fg.create;var Zg=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 o,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))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((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var a=i[r];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n};const Vg="__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 Wg{constructor({apiKey:e,authReferrerPolicy:t,channel:n,client:o,id:r=Vg,language:i,libraries:a=[],mapIds:s,nonce:l,region:c,retries:u=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=o,this.id=r||Vg,this.language=i,this.libraries=a,this.mapIds=s,this.nonce=l,this.region=c,this.retries=u,this.url=d,this.version=f,Wg.instance){if(!Zg(this.options,Wg.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Wg.instance.options)}`);return Wg.instance}Wg.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+=`&region=${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,o,r="The Google Maps JavaScript API",i="google",a="importLibrary",s="__ib__",l=document,c=window;c=c[i]||(c[i]={});const u=c.maps||(c.maps={}),d=new Set,f=new URLSearchParams,p=()=>t||(t=new Promise(((a,c)=>Kg(this,void 0,void 0,(function*(){var p;for(o in yield n=l.createElement("script"),n.id=this.id,f.set("libraries",[...d]+""),e)f.set(o.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),e[o]);f.set("callback",i+".maps."+s),n.src=this.url+"?"+f,u[s]=a,n.onerror=()=>t=c(Error(r+" could not load.")),n.nonce=this.nonce||(null===(p=l.querySelector("script[nonce]"))||void 0===p?void 0:p.nonce)||"",l.head.append(n)})))));u[a]?console.warn(r+" only loads once. Ignoring:",e):u[a]=(e,...t)=>d.add(e)&&p().then((()=>u[a](e,...t)))})(n);const o=this.libraries.map((e=>this.importLibrary(e)));o.length||o.push(this.importLibrary("core")),Promise.all(o).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())}}}function qg(...e){return xe(D(e))}var Gg=T("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"}}),Xg=o.forwardRef((({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>o.createElement(r?k:"button",{className:qg(Gg({variant:t,size:n,className:e})),ref:a,...i})));Xg.displayName="Button";var Yg=o.forwardRef((({className:e,...t},n)=>o.createElement("div",{ref:n,className:qg("rounded-xl border bg-card text-card-foreground shadow",e),...t})));Yg.displayName="Card";var Jg=o.forwardRef((({className:e,...t},n)=>o.createElement("div",{ref:n,className:qg("flex flex-col space-y-1.5 p-6",e),...t})));Jg.displayName="CardHeader";var Qg=o.forwardRef((({className:e,...t},n)=>o.createElement("h3",{ref:n,className:qg("font-semibold leading-none tracking-tight",e),...t})));Qg.displayName="CardTitle";var eb=o.forwardRef((({className:e,...t},n)=>o.createElement("p",{ref:n,className:qg("text-sm text-muted-foreground",e),...t})));eb.displayName="CardDescription";var tb=o.forwardRef((({className:e,...t},n)=>o.createElement("div",{ref:n,className:qg("p-6 pt-0",e),...t})));tb.displayName="CardContent";var nb=o.forwardRef((({className:e,...t},n)=>o.createElement("div",{ref:n,className:qg("flex items-center p-6 pt-0",e),...t})));nb.displayName="CardFooter";var ob=o.forwardRef((({className:e,...t},n)=>o.createElement(Te,{ref:n,className:qg("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t})));ob.displayName=Te.displayName;var rb=o.forwardRef((({className:e,...t},n)=>o.createElement(Ie,{ref:n,className:qg("aspect-square h-full w-full",e),...t})));rb.displayName=Ie.displayName;var ib=o.forwardRef((({className:e,...t},n)=>o.createElement(Re,{ref:n,className:qg("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t})));ib.displayName=Re.displayName;var ab=o.forwardRef((({className:e,value:t,...n},r)=>o.createElement(qe,{ref:r,className:qg("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n},o.createElement(Ge,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}}))));ab.displayName=qe.displayName;var sb=o.forwardRef((({className:e,sideOffset:t=4,...n},r)=>o.createElement(fo,{ref:r,sideOffset:t,className:qg("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})));sb.displayName=fo.displayName;var lb=({className:e,...t})=>o.createElement(Kr,{className:qg(e),...t});lb.displayName=Kr.displayName;var cb=o.forwardRef((({className:e,...t},n)=>o.createElement(Zr,{className:qg("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})));cb.displayName=Zr.displayName;var ub=T("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"}}),db=o.forwardRef((({side:e="right",className:t,children:n,...r},i)=>o.createElement(lb,null,o.createElement(cb,null),o.createElement(Vr,{ref:i,className:qg(ub({side:e}),t),...r},n,o.createElement(qr,{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"},o.createElement(ii,{className:"h-4 w-4"}),o.createElement("span",{className:"sr-only"},"Close"))))));db.displayName=Vr.displayName;var fb=o.forwardRef((({className:e,...t},n)=>o.createElement(Hr,{ref:n,className:qg("text-lg font-semibold text-foreground",e),...t})));fb.displayName=Hr.displayName;var pb=o.forwardRef((({className:e,...t},n)=>o.createElement(Wr,{ref:n,className:qg("text-sm text-muted-foreground",e),...t})));pb.displayName=Wr.displayName;var mb=o.forwardRef((({className:e,...t},n)=>o.createElement("div",{className:"w-full overflow-auto"},o.createElement("table",{ref:n,className:qg("w-full caption-bottom text-sm",e),...t}))));mb.displayName="Table";var hb=o.forwardRef((({className:e,...t},n)=>o.createElement("thead",{ref:n,className:qg("[&_tr]:border-b",e),...t})));hb.displayName="TableHeader";var vb=o.forwardRef((({className:e,...t},n)=>o.createElement("tbody",{ref:n,className:qg("[&_tr:last-child]:border-0",e),...t})));vb.displayName="TableBody";var gb=o.forwardRef((({className:e,...t},n)=>o.createElement("tfoot",{ref:n,className:qg("bg-primary font-medium text-primary-foreground",e),...t})));gb.displayName="TableFooter";var bb=o.forwardRef((({className:e,...t},n)=>o.createElement("tr",{ref:n,className:qg("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})));bb.displayName="TableRow";var wb=o.forwardRef((({className:e,...t},n)=>o.createElement("th",{ref:n,className:qg("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})));wb.displayName="TableHead";var xb=o.forwardRef((({className:e,...t},n)=>o.createElement("td",{ref:n,className:qg("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})));xb.displayName="TableCell";var yb=o.forwardRef((({className:e,...t},n)=>o.createElement("caption",{ref:n,className:qg("mt-4 text-sm text-muted-foreground",e),...t})));yb.displayName="TableCaption";var Nb=o.forwardRef((({className:e,...t},n)=>o.createElement(Gi,{ref:n,className:qg("border-b",e),...t})));Nb.displayName="AccordionItem";var Cb=o.forwardRef((({className:e,children:t,...n},r)=>o.createElement(Xi,{className:"flex"},o.createElement(Yi,{ref:r,className:qg("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,o.createElement(ti,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})))));Cb.displayName=Yi.displayName;var kb=o.forwardRef((({className:e,children:t,...n},r)=>o.createElement(Ji,{ref:r,className:qg("overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...n},o.createElement("div",{className:"pb-4 pt-0"},t))));kb.displayName=Ji.displayName;var _b=T("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"}}),Mb=o.forwardRef((({className:e,variant:t,...n},r)=>o.createElement("div",{ref:r,role:"alert",className:qg(_b({variant:t}),e),...n})));Mb.displayName="Alert";var Sb=o.forwardRef((({className:e,...t},n)=>o.createElement("h5",{ref:n,className:qg("mb-1 font-medium leading-none tracking-tight",e),...t})));Sb.displayName="AlertTitle";var Ab=o.forwardRef((({className:e,...t},n)=>o.createElement("div",{ref:n,className:qg("text-sm [&_p]:leading-relaxed",e),...t})));Ab.displayName="AlertDescription";var Ob=da,Db=fa,Pb=({className:e,...t})=>o.createElement(pa,{className:qg(e),...t});Pb.displayName=pa.displayName;var Eb=o.forwardRef((({className:e,...t},n)=>o.createElement(ma,{className:qg("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})));Eb.displayName=ma.displayName;var Tb=o.forwardRef((({className:e,...t},n)=>o.createElement(Pb,null,o.createElement(Eb,null),o.createElement(ha,{ref:n,className:qg("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}))));Tb.displayName=ha.displayName;var Ib=({className:e,...t})=>o.createElement("div",{className:qg("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ib.displayName="AlertDialogFooter";var Rb=o.forwardRef((({className:e,...t},n)=>o.createElement(ba,{ref:n,className:qg("text-lg font-semibold",e),...t})));Rb.displayName=ba.displayName;var Fb=o.forwardRef((({className:e,...t},n)=>o.createElement(wa,{ref:n,className:qg("text-sm text-muted-foreground",e),...t})));Fb.displayName=wa.displayName;var zb=o.forwardRef((({className:e,...t},n)=>o.createElement(va,{ref:n,className:qg(Gg(),e),...t})));zb.displayName=va.displayName;var $b=o.forwardRef((({className:e,...t},n)=>o.createElement(ga,{ref:n,className:qg(Gg({variant:"outline"}),"mt-2 sm:mt-0",e),...t})));$b.displayName=ga.displayName;var Lb=o.forwardRef((({className:e,...t},n)=>o.createElement(Ta,{ref:n,className:qg("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},o.createElement(Ia,{className:qg("flex items-center justify-center text-current")},o.createElement(Qr,{className:"h-4 w-4"})))));Lb.displayName=Ta.displayName;var jb=({className:e,...t})=>o.createElement(Kr,{className:qg(e),...t});jb.displayName=Kr.displayName;var Ub=o.forwardRef((({className:e,...t},n)=>o.createElement(Zr,{ref:n,className:qg("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})));Ub.displayName=Zr.displayName;var Bb=o.forwardRef((({className:e,children:t,...n},r)=>o.createElement(jb,null,o.createElement(Ub,null),o.createElement(Vr,{ref:r,className:qg("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,o.createElement(qr,{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"},o.createElement(ii,{className:"h-4 w-4"}),o.createElement("span",{className:"sr-only"},"Close"))))));Bb.displayName=Vr.displayName;var Kb=o.forwardRef((({className:e,...t},n)=>o.createElement(Hr,{ref:n,className:qg("text-lg font-semibold leading-none tracking-tight",e),...t})));Kb.displayName=Hr.displayName;var Zb=o.forwardRef((({className:e,...t},n)=>o.createElement(Wr,{ref:n,className:qg("text-sm text-muted-foreground",e),...t})));Zb.displayName=Wr.displayName;var Vb=o.forwardRef((({className:e,...t},n)=>o.createElement(Ll,{ref:n,className:qg("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));Vb.displayName=Ll.displayName;var Hb=o.forwardRef((({className:e,...t},n)=>o.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},o.createElement(ci,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),o.createElement(Ll.Input,{ref:n,className:qg("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}))));Hb.displayName=Ll.Input.displayName;var Wb=o.forwardRef((({className:e,...t},n)=>o.createElement(Ll.List,{ref:n,className:qg("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));Wb.displayName=Ll.List.displayName;var qb=o.forwardRef(((e,t)=>o.createElement(Ll.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));qb.displayName=Ll.Empty.displayName;var Gb=o.forwardRef((({className:e,...t},n)=>o.createElement(Ll.Group,{ref:n,className:qg("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})));Gb.displayName=Ll.Group.displayName;var Xb=o.forwardRef((({className:e,...t},n)=>o.createElement(Ll.Separator,{ref:n,className:qg("-mx-1 h-px bg-border",e),...t})));Xb.displayName=Ll.Separator.displayName;var Yb=o.forwardRef((({className:e,...t},n)=>o.createElement(Ll.Item,{ref:n,className:qg("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})));Yb.displayName=Ll.Item.displayName;var Jb=o.forwardRef((({className:e,inset:t,children:n,...r},i)=>o.createElement(Tu,{ref:i,className:qg("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),...r},n,o.createElement(oi,{className:"ml-auto h-4 w-4"}))));Jb.displayName=Tu.displayName;var Qb=o.forwardRef((({className:e,...t},n)=>o.createElement(Iu,{ref:n,className:qg("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})));Qb.displayName=Iu.displayName;var ew=o.forwardRef((({className:e,...t},n)=>o.createElement(_u,null,o.createElement(Mu,{ref:n,className:qg("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}))));ew.displayName=Mu.displayName;var tw=o.forwardRef((({className:e,inset:t,...n},r)=>o.createElement(Au,{ref:r,className:qg("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})));tw.displayName=Au.displayName;var nw=o.forwardRef((({className:e,children:t,checked:n,...r},i)=>o.createElement(Ou,{ref:i,className:qg("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,...r},o.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},o.createElement(Pu,null,o.createElement(Qr,{className:"h-4 w-4"}))),t)));nw.displayName=Ou.displayName;var ow=o.forwardRef((({className:e,children:t,...n},r)=>o.createElement(Du,{ref:r,className:qg("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},o.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},o.createElement(Pu,null,o.createElement(si,{className:"h-4 w-4 fill-current"}))),t)));ow.displayName=Du.displayName;var rw=o.forwardRef((({className:e,inset:t,...n},r)=>o.createElement(Su,{ref:r,className:qg("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n})));rw.displayName=Su.displayName;var iw=o.forwardRef((({className:e,...t},n)=>o.createElement(Eu,{ref:n,className:qg("-mx-1 my-1 h-px bg-border",e),...t})));iw.displayName=Eu.displayName;var aw=o.forwardRef((({className:e,inset:t,children:n,...r},i)=>o.createElement(Gu,{ref:i,className:qg("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),...r},n,o.createElement(oi,{className:"ml-auto h-4 w-4"}))));aw.displayName=Gu.displayName;var sw=o.forwardRef((({className:e,...t},n)=>o.createElement(Xu,{ref:n,className:qg("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})));sw.displayName=Xu.displayName;var lw=o.forwardRef((({className:e,sideOffset:t=4,...n},r)=>o.createElement(Uu,null,o.createElement(Bu,{ref:r,sideOffset:t,className:qg("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}))));lw.displayName=Bu.displayName;var cw=o.forwardRef((({className:e,inset:t,...n},r)=>o.createElement(Zu,{ref:r,className:qg("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})));cw.displayName=Zu.displayName;var uw=o.forwardRef((({className:e,children:t,checked:n,...r},i)=>o.createElement(Vu,{ref:i,className:qg("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,...r},o.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},o.createElement(Wu,null,o.createElement(Qr,{className:"h-4 w-4"}))),t)));uw.displayName=Vu.displayName;var dw=o.forwardRef((({className:e,children:t,...n},r)=>o.createElement(Hu,{ref:r,className:qg("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},o.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},o.createElement(Wu,null,o.createElement(si,{className:"h-4 w-4 fill-current"}))),t)));dw.displayName=Hu.displayName;var fw=o.forwardRef((({className:e,inset:t,...n},r)=>o.createElement(Ku,{ref:r,className:qg("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n})));fw.displayName=Ku.displayName;var pw=o.forwardRef((({className:e,...t},n)=>o.createElement(qu,{ref:n,className:qg("-mx-1 my-1 h-px bg-muted",e),...t})));pw.displayName=qu.displayName;var mw=T("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),hw=o.forwardRef((({className:e,...t},n)=>o.createElement(Ju,{ref:n,className:qg(mw(),e),...t})));hw.displayName=Ju.displayName;var vw=o.createContext({}),gw=()=>{let t=o.useContext(vw),n=o.useContext(bw),{getFieldState:r,formState:i}=e.useContext(Yu),a=r(t.name,i);if(!t)throw new Error("useFormField should be used within <FormField>");let{id:s}=n;return{id:s,name:t.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...a}},bw=o.createContext({}),ww=o.forwardRef((({className:e,...t},n)=>{let r=o.useId();return o.createElement(bw.Provider,{value:{id:r}},o.createElement("div",{ref:n,className:qg("space-y-2",e),...t}))}));ww.displayName="FormItem";var xw=o.forwardRef((({className:e,...t},n)=>{let{error:r,formItemId:i}=gw();return o.createElement(hw,{ref:n,className:qg(r&&"text-destructive",e),htmlFor:i,...t})}));xw.displayName="FormLabel";var yw=o.forwardRef((({...e},t)=>{let{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=gw();return o.createElement(k,{ref:t,id:r,"aria-describedby":n?`${i} ${a}`:`${i}`,"aria-invalid":!!n,...e})}));yw.displayName="FormControl";var Nw=o.forwardRef((({className:e,...t},n)=>{let{formDescriptionId:r}=gw();return o.createElement("p",{ref:n,id:r,className:qg("text-[0.8rem] text-muted-foreground",e),...t})}));Nw.displayName="FormDescription";var Cw=o.forwardRef((({className:e,children:t,...n},r)=>{let{error:i,formMessageId:a}=gw(),s=i?String(i?.message):t;return s?o.createElement("p",{ref:r,id:a,className:qg("text-[0.8rem] font-medium text-destructive",e),...n},s):null}));Cw.displayName="FormMessage";var kw=o.forwardRef((({className:e,type:t,...n},r)=>o.createElement("input",{type:t,className:qg("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:r,...n})));kw.displayName="Input";var _w=o.forwardRef((({className:e,...t},n)=>o.createElement(vd,{ref:n,className:qg("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",e),...t})));_w.displayName=vd.displayName;var Mw=o.forwardRef((({className:e,...t},n)=>o.createElement(gd,{ref:n,className:qg("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})));Mw.displayName=gd.displayName;var Sw=o.forwardRef((({className:e,inset:t,children:n,...r},i)=>o.createElement(Md,{ref:i,className:qg("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),...r},n,o.createElement(oi,{className:"ml-auto h-4 w-4"}))));Sw.displayName=Md.displayName;var Aw=o.forwardRef((({className:e,...t},n)=>o.createElement(Sd,{ref:n,className:qg("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})));Aw.displayName=Sd.displayName;var Ow=o.forwardRef((({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,...i},a)=>o.createElement(bd,null,o.createElement(wd,{ref:a,align:t,alignOffset:n,sideOffset:r,className:qg("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}))));Ow.displayName=wd.displayName;var Dw=o.forwardRef((({className:e,inset:t,...n},r)=>o.createElement(yd,{ref:r,className:qg("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})));Dw.displayName=yd.displayName;var Pw=o.forwardRef((({className:e,children:t,checked:n,...r},i)=>o.createElement(Nd,{ref:i,className:qg("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,...r},o.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},o.createElement(kd,null,o.createElement(Qr,{className:"h-4 w-4"}))),t)));Pw.displayName=Nd.displayName;var Ew=o.forwardRef((({className:e,children:t,...n},r)=>o.createElement(Cd,{ref:r,className:qg("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},o.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},o.createElement(kd,null,o.createElement(si,{className:"h-4 w-4 fill-current"}))),t)));Ew.displayName=Cd.displayName;var Tw=o.forwardRef((({className:e,inset:t,...n},r)=>o.createElement(xd,{ref:r,className:qg("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n})));Tw.displayName=xd.displayName;var Iw=o.forwardRef((({className:e,...t},n)=>o.createElement(_d,{ref:n,className:qg("-mx-1 my-1 h-px bg-muted",e),...t})));Iw.displayName=_d.displayName;var Rw=o.forwardRef((({className:e,children:t,...n},r)=>o.createElement(hf,{ref:r,className:qg("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n},t,o.createElement(jw,null))));Rw.displayName=hf.displayName;var Fw=o.forwardRef((({className:e,...t},n)=>o.createElement(vf,{ref:n,className:qg("group flex flex-1 list-none items-center justify-center space-x-1",e),...t})));Fw.displayName=vf.displayName;var zw=T("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"),$w=o.forwardRef((({className:e,children:t,...n},r)=>o.createElement(gf,{ref:r,className:qg(zw(),"group",e),...n},t," ",o.createElement(ti,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"}))));$w.displayName=gf.displayName;var Lw=o.forwardRef((({className:e,...t},n)=>o.createElement(wf,{ref:n,className:qg("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})));Lw.displayName=wf.displayName;var jw=o.forwardRef((({className:e,...t},n)=>o.createElement("div",{className:qg("absolute left-0 top-full flex justify-center")},o.createElement(xf,{className:qg("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}))));jw.displayName=xf.displayName;var Uw=o.forwardRef((({className:e,...t},n)=>o.createElement(bf,{ref:n,className:qg("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},o.createElement("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"}))));Uw.displayName=bf.displayName;var Bw=o.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},i)=>o.createElement(Rf,null,o.createElement(Ff,{ref:i,align:t,sideOffset:n,className:qg("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),...r}))));Bw.displayName=Ff.displayName;var Kw=o.forwardRef((({className:e,...t},n)=>o.createElement(ep,{className:qg("grid gap-2",e),...t,ref:n})));Kw.displayName=ep.displayName,o.forwardRef((({className:e,children:t,...n},r)=>o.createElement(tp,{ref:r,className:qg("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},o.createElement(np,{className:"flex items-center justify-center"},o.createElement(Qr,{className:"h-3.5 w-3.5 fill-primary"}))))).displayName=tp.displayName;var Zw=o.forwardRef((({className:e,children:t,...n},r)=>o.createElement(zp,{ref:r,className:qg("relative overflow-hidden",e),...n},o.createElement($p,{className:"h-full w-full rounded-[inherit]"},t),o.createElement(Vw,null),o.createElement(Lp,null))));Zw.displayName=zp.displayName;var Vw=o.forwardRef((({className:e,orientation:t="vertical",...n},r)=>o.createElement(fp,{ref:r,orientation:t,className:qg("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 border-t border-t-transparent p-[1px]",e),...n},o.createElement(Cp,{className:"relative flex-1 rounded-full bg-border"}))));Vw.displayName=fp.displayName;var Hw=o.forwardRef((({className:e,children:t,...n},r)=>o.createElement(Mm,{ref:r,className:qg("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,o.createElement(Sm,{asChild:!0},o.createElement(Yr,{className:"h-4 w-4 opacity-50"})))));Hw.displayName=Mm.displayName;var Ww=o.forwardRef((({className:e,children:t,position:n="popper",...r},i)=>o.createElement(Am,null,o.createElement(Om,{ref:i,className:qg("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,...r},o.createElement(Dm,{className:qg("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t)))));Ww.displayName=Om.displayName;var qw=o.forwardRef((({className:e,...t},n)=>o.createElement(Pm,{ref:n,className:qg("px-2 py-1.5 text-sm font-semibold",e),...t})));qw.displayName=Pm.displayName;var Gw=o.forwardRef((({className:e,children:t,...n},r)=>o.createElement(Em,{ref:r,className:qg("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},o.createElement("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},o.createElement(Im,null,o.createElement(Qr,{className:"h-4 w-4"}))),o.createElement(Tm,null,t))));Gw.displayName=Em.displayName;var Xw=o.forwardRef((({className:e,...t},n)=>o.createElement(Rm,{ref:n,className:qg("-mx-1 my-1 h-px bg-muted",e),...t})));Xw.displayName=Rm.displayName;var Yw=o.forwardRef((({className:e,orientation:t="horizontal",decorative:n=!0,...r},i)=>o.createElement(jm,{ref:i,decorative:n,orientation:t,className:qg("shrink-0 bg-border","horizontal"===t?"h-[1px] w-full":"h-full w-[1px]",e),...r})));Yw.displayName=jm.displayName;var Jw=o.forwardRef((({className:e,...t},n)=>o.createElement(ph,{ref:n,className:qg("relative flex w-full touch-none select-none items-center",e),...t},o.createElement(mh,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20"},o.createElement(hh,{className:"absolute h-full bg-primary"})),o.createElement(vh,{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"}))));Jw.displayName=ph.displayName;var Qw=o.forwardRef((({className:e,...t},n)=>o.createElement(_h,{className:qg("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},o.createElement(Mh,{className:qg("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")}))));Qw.displayName=_h.displayName;var ex=o.forwardRef((({className:e,...t},n)=>o.createElement(Rh,{ref:n,className:qg("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t})));ex.displayName=Rh.displayName;var tx=o.forwardRef((({className:e,...t},n)=>o.createElement(Fh,{ref:n,className:qg("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})));tx.displayName=Fh.displayName;var nx=o.forwardRef((({className:e,...t},n)=>o.createElement(zh,{ref:n,className:qg("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));nx.displayName=zh.displayName;var ox=o.forwardRef((({className:e,...t},n)=>o.createElement("textarea",{className:qg("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})));ox.displayName="Textarea";var rx=o.forwardRef((({className:e,...t},n)=>o.createElement(pv,{ref:n,className:qg("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})));rx.displayName=pv.displayName;var ix=T("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"}}),ax=o.forwardRef((({className:e,variant:t,...n},r)=>o.createElement(mv,{ref:r,className:qg(ix({variant:t}),e),...n})));ax.displayName=mv.displayName;var sx=o.forwardRef((({className:e,...t},n)=>o.createElement(gv,{ref:n,className:qg("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})));sx.displayName=gv.displayName;var lx=o.forwardRef((({className:e,...t},n)=>o.createElement(bv,{ref:n,className:qg("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},o.createElement(ii,{className:"h-4 w-4"}))));lx.displayName=bv.displayName;var cx=o.forwardRef((({className:e,...t},n)=>o.createElement(hv,{ref:n,className:qg("text-sm font-semibold [&+div]:text-xs",e),...t})));cx.displayName=hv.displayName;var ux=o.forwardRef((({className:e,...t},n)=>o.createElement(vv,{ref:n,className:qg("text-sm opacity-90",e),...t})));ux.displayName=vv.displayName;var dx=T("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"}}),fx=o.forwardRef((({className:e,variant:t,size:n,...r},i)=>o.createElement(wv,{ref:i,className:qg(dx({variant:t,size:n,className:e})),...r})));fx.displayName=wv.displayName;var px=(e=>(e.buyer="buyer",e.seller="seller",e.buyerSeller="buyer-seller",e.broker="broker",e))(px||{}),mx=class{};mx.ESTIMATED_VALUES_HEADER_TITLE="Estimated Values",mx.ESTIMATED_VALUES_DIALOG_TITLE="How estimated values work",mx.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.",mx.ESTIMATED_VALUES_BUTTON_DESCRIPTION="Contact Mortgage Consultant",mx.FORM_TITLE="Learn more about my options",mx.FORM_DESCRIPTION="Get more insights on how your property valuation",mx.FORM_FIRST_NAME_LABEL="First Name *",mx.FORM_FIRST_NAME_PLACEHOLDER="Enter First Name",mx.FORM_EMAIL_ADDRESS_LABEL="Email Address *",mx.FORM_EMAIL_ADDRESS_PLACEHOLDER="Enter Email Adress",mx.FORM_LAST_NAME_LABEL="Last Name *",mx.FORM_LAST_NAME_PLACEHOLDER="Enter Last Name",mx.FORM_PHONE_NUMBER_LABEL="Phone Number *",mx.FORM_PHONE_NUMBER_PLACEHOLDER="Enter Phone Number",mx.FORM_USER_TYPE_LABEL="I am: *",mx.FORM_USER_TYPE_PLACEHOLDER="Please tell us who you are.",mx.FORM_AGENT_CHECK_BOX_DESCRIPTION="Are you currently working with a",mx.FORM_AGENT_CHECK_BOX_AGENT_TYPE="Agent",mx.FORM_AGENT_CHECK_BOX_BROKERAGE_NAME="Percy Realty",mx.FORM_AGENT_NAME_PLACEHOLDER="Enter Agent's Name",mx.FORM_ACTION_BUTTOM="Submit",mx.FIRST_NAME_REQUIRED_VALIDATION_MESSAGE="First Name is required.",mx.EMAIL_ADDRESS_REQUIRED_VALIDATION_MESSAGE="Email address is required.",mx.EMAIL_ADDRESS_FORMAT_VALIDATION_MESSAGE="Email address format is wrong.",mx.LAST_NAME_REQUIRED_VALIDATION_MESSAGE="Last Name is required.",mx.PHONE_NUMBER_REQUIRED_VALIDATION_MESSAGE="Phone Number is required.",mx.PHONE_NUMBER_FORMAT_VALIDATION_MESSAGE="Phone Number format is wrong.",mx.IAM_REQUIRED_VALIDATION_MESSAGE="Please select an option.",mx.HOME_ADDRESS_REQUIRED_VALIDATION_MESSAGE="Home Address is required.",mx.ON_ERROR_OCCURRED="An error occurred while submitting the form. Please try again.",mx.BUYER="A Buyer",mx.SELLER="A Seller",mx.BUYER_SELLER="A Buyer and Seller",mx.BROKER="A Broker/Agent",mx.PERIOD_1="Immediately",mx.PERIOD_2="1 to 3 Months",mx.PERIOD_3="3 to 6 Months",mx.PERIOD_4="6 to 12 Months",mx.PERIOD_5="12+ Months",mx.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL="Message",mx.DYNAMIC_VALUES_BUYER_MESSAGE_PLACEHOLDER="Hello, I am interested in learning more about this property.",mx.DYNAMIC_VALUES_BROKER_MESSAGE_PLACEHOLDER="Hello, I am interested in learning more about this buyer.",mx.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_LABEL="Home Address *",mx.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_PLACEHOLDER="Enter Home Address",mx.DYNAMIC_VALUES_SELLER_APROXIMATE_VALUE_LABEL="Property's Approximate Value",mx.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_LABEL="Time Frame for Selling",mx.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_PLACEHOLDER="Please select a time frame",mx.sellerBuyerSharedContent=[{label:mx.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_LABEL,type:"text",placeholder:mx.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_PLACEHOLDER},{label:mx.DYNAMIC_VALUES_SELLER_APROXIMATE_VALUE_LABEL,type:"number",placeholder:""},{label:mx.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_LABEL,type:"select",placeholder:mx.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_PLACEHOLDER}],mx.DYNAMIC_VALUES={buyer:[{label:mx.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL,type:"textarea",placeholder:mx.DYNAMIC_VALUES_BUYER_MESSAGE_PLACEHOLDER}],seller:mx.sellerBuyerSharedContent,"buyer-seller":mx.sellerBuyerSharedContent,broker:[{label:mx.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL,type:"textarea",placeholder:mx.DYNAMIC_VALUES_BROKER_MESSAGE_PLACEHOLDER}]};var hx=mx;function vx({className:e}){return o.createElement("svg",{className:qg("-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"},o.createElement("circle",{className:qg("stroke-brand-400 opacity-25"),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o.createElement("path",{className:qg("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"}))}vx.displayName="Spinner";var gx=Bg(px,{required_error:hx.IAM_REQUIRED_VALIDATION_MESSAGE});function bx({children:e}){return React.createElement("div",{className:qg("flex justify-center w-full")},e)}function wx({title:t,infoTitle:n,icon:o,infoDescription:r}){let i=e.cloneElement(o,{className:"w-6 h-6"});return React.createElement("div",{className:qg("flex flex-row items-center gap-2")},React.createElement("div",{className:qg("flex flex-col items-center bg-slate-50 rounded-[100px] p-2")},i),React.createElement("h3",{className:qg("font-semibold leading-8 text-2xl text-gray-700")},t),React.createElement(Ob,null,React.createElement(Db,{asChild:!0},React.createElement(Nv,{className:qg("w-5 h-5 text-gray-400")})),React.createElement(Tb,{className:qg("flex flex-col gap-2 p-6")},React.createElement(Rb,null,n),r,React.createElement(Ib,null,React.createElement(zb,null,"OK")))))}function xx({icon:e,infoDescription:t,title:n,infoTitle:o,actions:r}){return React.createElement("div",{className:qg("flex flex-row justify-between items-stretch")},React.createElement(wx,{title:n,infoTitle:o,icon:e,infoDescription:t}),r&&r)}Ug({firstName:$g().min(2,{message:hx.FIRST_NAME_REQUIRED_VALIDATION_MESSAGE}),emailAdress:$g({required_error:hx.EMAIL_ADDRESS_REQUIRED_VALIDATION_MESSAGE}).email({message:hx.EMAIL_ADDRESS_FORMAT_VALIDATION_MESSAGE}),lastName:$g().min(2,{message:hx.LAST_NAME_REQUIRED_VALIDATION_MESSAGE}),phoneNumber:$g().min(2,{message:hx.PHONE_NUMBER_REQUIRED_VALIDATION_MESSAGE}),iam:gx,agent:Lg().optional(),agentName:$g().optional(),dynamicValues:jg(Ug({homeAddress:$g().min(2,{message:hx.HOME_ADDRESS_REQUIRED_VALIDATION_MESSAGE}).optional(),value:$g().optional()})).optional()});var yx=({clientKey:e,apiKey:t})=>{let[n,r]=o.useState(!1),[i,a]=o.useState(),s=o.useCallback((async n=>{let{url:o,requestInit:s}=n,{headers:l,...c}=s??{},u=i;i?.token||(u=await(async({clientKey:e})=>{try{return e?await(await fetch("https://api-dev.liberty.percyai.io/key_service/v1/jwt/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientKey:e})})).json():void 0}catch(t){return void console.error("Error requesting token:",t)}})({clientKey:e}));let d={"Content-Type":"application/json",...u?.token&&{Authorization:`Bearer ${u?.token}`},...t&&{"x-api-key":e},...l},f=await fetch(o,{headers:d,...c});try{r(!0);let e=await f.json();return r(!1),a(u),e}catch(p){return console.error(`Error requesting ${o}`,p),void r(!1)}}),[i,e,t]);return{isLoading:n,tokens:i,request:s}};var Nx=function({apiKey:t,mapOptions:n,geoJsonLayerInput:o,markers:r,markersIcon:i,markerEvents:a}){let s=e.useRef(null),[l,c]=e.useState(null);e.useEffect((()=>{s.current&&new Wg({apiKey:t??"AIzaSyCDNlq-LeVQGoubUXL_a8p6LYPXR5Bjs_Q"}).importLibrary("maps").then((()=>{n.center||(n.center={lat:39.8283,lng:-98.5795}),s.current&&u(s.current,n)}))}),[]);let u=(e,t)=>{c(new window.google.maps.Map(e,t)),o&&f(o),d(r)},d=e=>{if(!l||!e)return;let t=new google.maps.LatLngBounds;e.forEach(((e,n)=>{t.extend(new google.maps.LatLng(e.lat,e.lng));let o=new google.maps.Marker({position:{lat:e.lat,lng:e.lng},map:l,icon:e.icon??i,label:e.label});a&&a(n,o)})),l.setCenter(t.getCenter()),l.setZoom(3)},f=({center:e,geoJson:t})=>{if(!l||!t)return;e&&(l.setCenter(e),new window.google.maps.Marker({position:e,map:l}));let n=new window.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:s,setGeojson:f,setMarkers:d,zoomHandler:(e,t)=>{l&&(l.setCenter(e),l.setZoom(t))}}},Cx=["#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"];function kx(){return React.createElement("div",{className:qg("absolute top-4 left-4 bg-white bg-opacity-70 p-2 shadow-lg flex flex-col")},React.createElement("div",{className:qg("flex justify-between")},React.createElement("div",{className:qg("text-left text-xs")},"Active"),React.createElement("div",{className:qg("text-right text-xs")},"Very Active")),React.createElement("div",{className:qg("flex flex-col items-center space-y-2")},React.createElement("div",{className:qg("flex")},Cx.map(((e,t)=>React.createElement("div",{key:t,className:qg("w-4 h-4"),style:{backgroundColor:e}}))))))}var _x=function(e,t={}){return function(e,t,n){var o,r,i;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]);const s=(Array.isArray(t.props)?t.props.slice():Object.keys(t.props)).filter((e=>"container"!==e)),l={},c={},v={};for(const a of s){l[a]=Array.isArray(t.props)?"string":t.props[a];const e=h(a);c[a]=e,v[e]=a}class g extends HTMLElement{constructor(){super(),a(this,o,!0),a(this,r),a(this,i,{}),a(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[m].container=this.container;for(const e of s){const t=c[e],n=this.getAttribute(t),o=l[e],r=u[o];n&&null!=r&&r.parse&&(this[m][e]=r.parse(n,this))}}static get observedAttributes(){return Object.keys(v)}connectedCallback(){this[f]=!0,this[d]()}disconnectedCallback(){this[f]=!1,this[p]&&n.unmount(this[p])}attributeChangedCallback(e,t,n){const o=v[e],r=l[o],i=u[r];o in l&&null!=i&&i.parse&&(this[m][o]=i.parse(n,this),this[d]())}[(o=f,r=p,i=m,d)](){this[f]&&(this[p]?n.update(this[p],this[m]):this[p]=n.mount(this.container,e,this[m]))}}for(const a of s){const e=c[a],t=l[a];Object.defineProperty(g.prototype,a,{enumerable:!0,configurable:!0,get(){return this[m][a]},set(n){this[m][a]=n;const o=u[t];if(null!=o&&o.stringify){const t=o.stringify(n);this.getAttribute(e)!==t&&this.setAttribute(e,t)}}})}return g}(e,t,{mount:b,update:w,unmount:x})}((function({zipcode:t,url:n="https://api.liberty.percyai.io/location/v1/heatmap",zoomLevel:o=10,zoomControl:r=!0,googleApiKey:i,clientKey:a,apiKey:s}){let{request:l,isLoading:c,tokens:u}=yx({clientKey:a,apiKey:s}),d={zoom:o,draggable:!1,scrollwheel:!1,fullscreenControl:!1,gestureHandling:"none",zoomControl:r,mapId:""},{mapRef:f,setGeojson:p}=Nx({mapOptions:d,apiKey:i});return e.useEffect((()=>{!async function(){let e=((e,t)=>e?.config?e.config.find((e=>e.name===t)):{})(u?.meta,"color");if(t&&n){let o=new URL(n);o.searchParams.set("zipcode",t),e?.value&&o.searchParams.set("colors",e?.value);let r=await l({url:o.toString()});r&&p(r.data)}}()}),[a,s,u,t,n]),React.createElement("div",{className:qg("flex flex-col bg-white")},React.createElement(xx,{title:"Heat Map",infoDescription:"The best way to visualize the distribution of data in a geographical area.",infoTitle:"Heat Map",icon:React.createElement(Cv,null)}),React.createElement(bx,null,React.createElement("div",{className:"relative w-[inherit] h-[inherit]"},React.createElement("div",{ref:f,className:qg("h-[600px] w-full")}),React.createElement(kx,null),c&&React.createElement("div",{className:qg("absolute inset-0 flex items-center justify-center")},React.createElement(vx,null)))))}),{props:{zipcode:"string",url:"string",zoomLevel:"number",zoomControl:"boolean",googleApiKey:"string",clientKey:"string",apiKey:"string"}});customElements&&customElements.define("heat-map",_x)}));
16
+ function Ly(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(xee){i(xee)}}function u(e){try{l(r.throw(e))}catch(xee){i(xee)}}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())}))}xy.create,ky.create,Oy.create,jy.create,ky.createWithPreprocess,Cy.create;var Fy=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 By="__googleMapsScriptId";var zy;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(zy||(zy={}));class $y{constructor({apiKey:e,authReferrerPolicy:t,channel:n,client:r,id:o=By,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||By,this.language=i,this.libraries=a,this.mapIds=u,this.nonce=l,this.region=s,this.retries=c,this.url=d,this.version=f,$y.instance){if(!Fy(this.options,$y.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify($y.instance.options)}`);return $y.instance}$y.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?zy.FAILURE:this.done?zy.SUCCESS:this.loading?zy.LOADING:zy.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+=`&region=${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)=>Ly(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 Wy={},Uy={},Hy="object"==typeof Vs&&Vs&&Vs.Object===Object&&Vs,Vy=Hy,qy="object"==typeof self&&self&&self.Object===Object&&self,Yy=Vy||qy||Function("return this")(),Xy=Yy.Symbol,Gy=Xy,Ky=Object.prototype,Zy=Ky.hasOwnProperty,Qy=Ky.toString,Jy=Gy?Gy.toStringTag:void 0;var ew=function(e){var t=Zy.call(e,Jy),n=e[Jy];try{e[Jy]=void 0;var r=!0}catch(xee){}var o=Qy.call(e);return r&&(t?e[Jy]=n:delete e[Jy]),o},tw=Object.prototype.toString;var nw=ew,rw=function(e){return tw.call(e)},ow=Xy?Xy.toStringTag:void 0;var iw=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ow&&ow in Object(e)?nw(e):rw(e)},aw=Array.isArray,uw=qs(aw);var lw=function(e){return null!=e&&"object"==typeof e},sw=iw,cw=aw,dw=lw;var fw=function(e){return"string"==typeof e||!cw(e)&&dw(e)&&"[object String]"==sw(e)},hw=qs(fw);var vw=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}},pw=vw();var mw=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},bw=iw,gw=lw;var yw=function(e){return gw(e)&&"[object Arguments]"==bw(e)},ww=lw,xw=Object.prototype,kw=xw.hasOwnProperty,Ow=xw.propertyIsEnumerable,jw=yw(function(){return arguments}())?yw:function(e){return ww(e)&&kw.call(e,"callee")&&!Ow.call(e,"callee")},Sw=jw,Nw={exports:{}};var Mw=function(){return!1};!function(e,t){var n=Yy,r=Mw,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}(Nw,Nw.exports);var Aw=Nw.exports,Cw=/^(?:0|[1-9]\d*)$/;var Tw=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Cw.test(e))&&e>-1&&e%1==0&&e<t};var Ew=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Pw=iw,Dw=Ew,Iw=lw,_w={};_w["[object Float32Array]"]=_w["[object Float64Array]"]=_w["[object Int8Array]"]=_w["[object Int16Array]"]=_w["[object Int32Array]"]=_w["[object Uint8Array]"]=_w["[object Uint8ClampedArray]"]=_w["[object Uint16Array]"]=_w["[object Uint32Array]"]=!0,_w["[object Arguments]"]=_w["[object Array]"]=_w["[object ArrayBuffer]"]=_w["[object Boolean]"]=_w["[object DataView]"]=_w["[object Date]"]=_w["[object Error]"]=_w["[object Function]"]=_w["[object Map]"]=_w["[object Number]"]=_w["[object Object]"]=_w["[object RegExp]"]=_w["[object Set]"]=_w["[object String]"]=_w["[object WeakMap]"]=!1;var Rw=function(e){return Iw(e)&&Dw(e.length)&&!!_w[Pw(e)]};var Lw=function(e){return function(t){return e(t)}},Fw={exports:{}};!function(e,t){var n=Hy,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(xee){}}();e.exports=a}(Fw,Fw.exports);var Bw=Fw.exports,zw=Rw,$w=Lw,Ww=Bw&&Bw.isTypedArray,Uw=Ww?$w(Ww):zw,Hw=mw,Vw=Sw,qw=aw,Yw=Aw,Xw=Tw,Gw=Uw,Kw=Object.prototype.hasOwnProperty;var Zw=function(e,t){var n=qw(e),r=!n&&Vw(e),o=!n&&!r&&Yw(e),i=!n&&!r&&!o&&Gw(e),a=n||r||o||i,u=a?Hw(e.length,String):[],l=u.length;for(var s in e)!t&&!Kw.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Xw(s,l))||u.push(s);return u},Qw=Object.prototype;var Jw=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Qw)};var ex=function(e,t){return function(n){return e(t(n))}},tx=ex(Object.keys,Object),nx=Jw,rx=tx,ox=Object.prototype.hasOwnProperty;var ix=function(e){if(!nx(e))return rx(e);var t=[];for(var n in Object(e))ox.call(e,n)&&"constructor"!=n&&t.push(n);return t};var ax=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ux=qs(ax),lx=iw,sx=ax;var cx=function(e){if(!sx(e))return!1;var t=lx(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},dx=qs(cx),fx=cx,hx=Ew;var vx=function(e){return null!=e&&hx(e.length)&&!fx(e)},px=Zw,mx=ix,bx=vx;var gx=function(e){return bx(e)?px(e):mx(e)},yx=pw,wx=gx;var xx=function(e,t){return e&&yx(e,t,wx)};var kx=function(e){return e},Ox=kx;var jx=xx,Sx=function(e){return"function"==typeof e?e:Ox};var Nx=function(e,t){return e&&jx(e,Sx(t))},Mx=ex(Object.getPrototypeOf,Object),Ax=iw,Cx=Mx,Tx=lw,Ex=Function.prototype,Px=Object.prototype,Dx=Ex.toString,Ix=Px.hasOwnProperty,_x=Dx.call(Object);var Rx=function(e){if(!Tx(e)||"[object Object]"!=Ax(e))return!1;var t=Cx(e);if(null===t)return!0;var n=Ix.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Dx.call(n)==_x},Lx=qs(Rx);var Fx=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 Bx=function(){this.je=[],this.size=0};var zx=function(e,t){return e===t||e!=e&&t!=t},$x=zx;var Wx=function(e,t){for(var n=e.length;n--;)if($x(e[n][0],t))return n;return-1},Ux=Wx,Hx=Array.prototype.splice;var Vx=function(e){var t=this.je,n=Ux(t,e);return!(n<0)&&(n==t.length-1?t.pop():Hx.call(t,n,1),--this.size,!0)},qx=Wx;var Yx=function(e){var t=this.je,n=qx(t,e);return n<0?void 0:t[n][1]},Xx=Wx;var Gx=Wx;var Kx=function(e,t){var n=this.je,r=Gx(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Zx=Bx,Qx=Vx,Jx=Yx,ek=function(e){return Xx(this.je,e)>-1},tk=Kx;function nk(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])}}nk.prototype.clear=Zx,nk.prototype.delete=Qx,nk.prototype.get=Jx,nk.prototype.has=ek,nk.prototype.set=tk;var rk=nk,ok=rk;var ik=function(){this.je=new ok,this.size=0};var ak=function(e){var t=this.je,n=t.delete(e);return this.size=t.size,n};var uk=function(e){return this.je.get(e)};var lk,sk=function(e){return this.je.has(e)},ck=Yy["Se"],dk=(lk=/[^.]+$/.exec(ck&&ck.keys&&ck.keys.IE_PROTO||""))?"Symbol(src)_1."+lk:"";var fk=function(e){return!!dk&&dk in e},hk=Function.prototype.toString;var vk=function(e){if(null!=e){try{return hk.call(e)}catch(xee){}try{return e+""}catch(xee){}}return""},pk=cx,mk=fk,bk=ax,gk=vk,yk=/^\[object .+?Constructor\]$/,wk=Function.prototype,xk=Object.prototype,kk=wk.toString,Ok=xk.hasOwnProperty,jk=RegExp("^"+kk.call(Ok).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Sk=function(e,t){return null==e?void 0:e[t]},Nk=function(e){return!(!bk(e)||mk(e))&&(pk(e)?jk:yk).test(gk(e))},Mk=Sk;var Ak=function(e,t){var n=Mk(e,t);return Nk(n)?n:void 0},Ck=Ak(Yy,"Map"),Tk=Ak(Object,"create"),Ek=Tk;var Pk=function(){this.je=Ek?Ek(null):{},this.size=0};var Dk=function(e){var t=this.has(e)&&delete this.je[e];return this.size-=t?1:0,t},Ik=Tk,_k=Object.prototype.hasOwnProperty;var Rk=function(e){var t=this.je;if(Ik){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return _k.call(t,e)?t[e]:void 0},Lk=Tk,Fk=Object.prototype.hasOwnProperty;var Bk=Tk;var zk=Pk,$k=Dk,Wk=Rk,Uk=function(e){var t=this.je;return Lk?void 0!==t[e]:Fk.call(t,e)},Hk=function(e,t){var n=this.je;return this.size+=this.has(e)?0:1,n[e]=Bk&&void 0===t?"__lodash_hash_undefined__":t,this};function Vk(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])}}Vk.prototype.clear=zk,Vk.prototype.delete=$k,Vk.prototype.get=Wk,Vk.prototype.has=Uk,Vk.prototype.set=Hk;var qk=Vk,Yk=rk,Xk=Ck;var Gk=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Kk=function(e,t){var n=e.je;return Gk(t)?n["string"==typeof t?"string":"hash"]:n.map},Zk=Kk;var Qk=Kk;var Jk=Kk;var eO=Kk;var tO=function(e,t){var n=eO(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},nO=function(){this.size=0,this.je={hash:new qk,map:new(Xk||Yk),string:new qk}},rO=function(e){var t=Zk(this,e).delete(e);return this.size-=t?1:0,t},oO=function(e){return Qk(this,e).get(e)},iO=function(e){return Jk(this,e).has(e)},aO=tO;function uO(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])}}uO.prototype.clear=nO,uO.prototype.delete=rO,uO.prototype.get=oO,uO.prototype.has=iO,uO.prototype.set=aO;var lO=uO,sO=rk,cO=Ck,dO=lO;var fO=rk,hO=ik,vO=ak,pO=uk,mO=sk,bO=function(e,t){var n=this.je;if(n instanceof sO){var r=n.je;if(!cO||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.je=new dO(r)}return n.set(e,t),this.size=n.size,this};function gO(e){var t=this.je=new fO(e);this.size=t.size}gO.prototype.clear=hO,gO.prototype.delete=vO,gO.prototype.get=pO,gO.prototype.has=mO,gO.prototype.set=bO;var yO=gO;var wO=lO,xO=function(e){return this.je.set(e,"__lodash_hash_undefined__"),this},kO=function(e){return this.je.has(e)};function OO(e){var t=-1,n=null==e?0:e.length;for(this.je=new wO;++t<n;)this.add(e[t])}OO.prototype.add=OO.prototype.push=xO,OO.prototype.has=kO;var jO=OO;var SO=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 NO=function(e,t){return e.has(t)},MO=jO,AO=SO,CO=NO;var TO=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 MO: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(!AO(t,(function(e,t){if(!CO(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},EO=Yy.Uint8Array;var PO=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var DO=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},IO=EO,_O=zx,RO=TO,LO=PO,FO=DO,BO=Xy?Xy.prototype:void 0,zO=BO?BO.valueOf:void 0;var $O=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 IO(e),new IO(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return _O(+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=LO;case"[object Set]":var l=1&r;if(u||(u=FO),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=RO(u(e),u(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(zO)return zO.call(e)==zO.call(t)}return!1};var WO=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},UO=WO,HO=aw;var VO=function(e,t,n){var r=t(e);return HO(e)?r:UO(r,n(e))};var qO=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 YO=function(){return[]},XO=qO,GO=YO,KO=Object.prototype.propertyIsEnumerable,ZO=Object.getOwnPropertySymbols,QO=ZO?function(e){return null==e?[]:(e=Object(e),XO(ZO(e),(function(t){return KO.call(e,t)})))}:GO,JO=QO,ej=VO,tj=JO,nj=gx;var rj=function(e){return ej(e,nj,tj)},oj=rj,ij=Object.prototype.hasOwnProperty;var aj=function(e,t,n,r,o,i){var a=1&n,u=oj(e),l=u.length;if(l!=oj(t).length&&!a)return!1;for(var s=l;s--;){var c=u[s];if(!(a?c in t:ij.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 g=e.constructor,y=t.constructor;g==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof y&&y instanceof y||(h=!1)}return i.delete(e),i.delete(t),h},uj=Ak(Yy,"DataView"),lj=Ak(Yy,"Promise"),sj=Ak(Yy,"Set"),cj=uj,dj=Ck,fj=lj,hj=sj,vj=Ak(Yy,"WeakMap"),pj=iw,mj=vk,bj="[object Map]",gj="[object Promise]",yj="[object Set]",wj="[object WeakMap]",xj="[object DataView]",kj=mj(cj),Oj=mj(dj),jj=mj(fj),Sj=mj(hj),Nj=mj(vj),Mj=pj;(cj&&Mj(new cj(new ArrayBuffer(1)))!=xj||dj&&Mj(new dj)!=bj||fj&&Mj(fj.resolve())!=gj||hj&&Mj(new hj)!=yj||vj&&Mj(new vj)!=wj)&&(Mj=function(e){var t=pj(e),n="[object Object]"==t?e.constructor:void 0,r=n?mj(n):"";if(r)switch(r){case kj:return xj;case Oj:return bj;case jj:return gj;case Sj:return yj;case Nj:return wj}return t});var Aj=Mj,Cj=yO,Tj=TO,Ej=$O,Pj=aj,Dj=Aj,Ij=aw,_j=Aw,Rj=Uw,Lj="[object Arguments]",Fj="[object Array]",Bj="[object Object]",zj=Object.prototype.hasOwnProperty;var $j=function(e,t,n,r,o,i){var a=Ij(e),u=Ij(t),l=a?Fj:Dj(e),s=u?Fj:Dj(t),c=(l=l==Lj?Bj:l)==Bj,d=(s=s==Lj?Bj:s)==Bj,f=l==s;if(f&&_j(e)){if(!_j(t))return!1;a=!0,c=!1}if(f&&!c)return i||(i=new Cj),a||Rj(e)?Tj(e,t,n,r,o,i):Ej(e,t,l,n,r,o,i);if(!(1&n)){var h=c&&zj.call(e,"__wrapped__"),v=d&&zj.call(t,"__wrapped__");if(h||v){var p=h?e.value():e,m=v?t.value():t;return i||(i=new Cj),o(p,m,n,r,i)}}return!!f&&(i||(i=new Cj),Pj(e,t,n,r,o,i))},Wj=$j,Uj=lw;var Hj=function e(t,n,r,o,i){return t===n||(null==t||null==n||!Uj(t)&&!Uj(n)?t!=t&&n!=n:Wj(t,n,r,o,e,i))},Vj=yO,qj=Hj;var Yj=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 Vj;if(r)var f=r(s,c,l,e,t,d);if(!(void 0===f?qj(c,s,3,r,d):f))return!1}}return!0},Xj=ax;var Gj=function(e){return e==e&&!Xj(e)},Kj=Gj,Zj=gx;var Qj=function(e){for(var t=Zj(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Kj(o)]}return t};var Jj=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},eS=Yj,tS=Qj,nS=Jj;var rS=function(e){var t=tS(e);return 1==t.length&&t[0][2]?nS(t[0][0],t[0][1]):function(n){return n===e||eS(n,e,t)}},oS=iw,iS=lw;var aS=function(e){return"symbol"==typeof e||iS(e)&&"[object Symbol]"==oS(e)},uS=aw,lS=aS,sS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cS=/^\w*$/;var dS=function(e,t){if(uS(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!lS(e))||(cS.test(e)||!sS.test(e)||null!=t&&e in Object(t))},fS=lO;function hS(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(hS.Cache||fS),n}hS.Cache=fS;var vS=hS;var pS=function(e){var t=vS(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t},mS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bS=/\\(\\)?/g,gS=pS((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(mS,(function(e,n,r,o){t.push(r?o.replace(bS,"$1"):n||e)})),t})),yS=gS,wS=Fx,xS=aw,kS=aS,OS=Xy?Xy.prototype:void 0,jS=OS?OS.toString:void 0;var SS=function e(t){if("string"==typeof t)return t;if(xS(t))return wS(t,e)+"";if(kS(t))return jS?jS.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},NS=SS;var MS=function(e){return null==e?"":NS(e)},AS=aw,CS=dS,TS=yS,ES=MS;var PS=function(e,t){return AS(e)?e:CS(e,t)?[e]:TS(ES(e))},DS=aS;var IS=function(e){if("string"==typeof e||DS(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},_S=PS,RS=IS;var LS=function(e,t){for(var n=0,r=(t=_S(t,e)).length;null!=e&&n<r;)e=e[RS(t[n++])];return n&&n==r?e:void 0},FS=LS;var BS=function(e,t,n){var r=null==e?void 0:FS(e,t);return void 0===r?n:r},zS=qs(BS);var $S=function(e,t){return null!=e&&t in Object(e)},WS=PS,US=Sw,HS=aw,VS=Tw,qS=Ew,YS=IS;var XS=function(e,t,n){for(var r=-1,o=(t=WS(t,e)).length,i=!1;++r<o;){var a=YS(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&qS(o)&&VS(a,o)&&(HS(e)||US(e))},GS=$S,KS=XS;var ZS=function(e,t){return null!=e&&KS(e,t,GS)},QS=Hj,JS=BS,eN=ZS,tN=dS,nN=Gj,rN=Jj,oN=IS;var iN=function(e,t){return tN(e)&&nN(t)?rN(oN(e),t):function(n){var r=JS(n,e);return void 0===r&&r===t?eN(n,e):QS(t,r,3)}};var aN=function(e){return function(t){return null==t?void 0:t[e]}},uN=LS;var lN=function(e){return function(t){return uN(t,e)}},sN=aN,cN=lN,dN=dS,fN=IS;var hN=rS,vN=iN,pN=kx,mN=aw,bN=function(e){return dN(e)?sN(fN(e)):cN(e)};var gN=function(e){return"function"==typeof e?e:null==e?pN:"object"==typeof e?mN(e)?vN(e[0],e[1]):hN(e):bN(e)},yN=vx;var wN=function(e,t){return function(n,r){if(null==n)return n;if(!yN(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}},xN=wN(xx),kN=xN,ON=vx;var jN=function(e,t){var n=-1,r=ON(e)?Array(e.length):[];return kN(e,(function(e,o,i){r[++n]=t(e,o,i)})),r},SN=Fx,NN=gN,MN=jN,AN=aw;var CN=function(e,t){return(AN(e)?SN:MN)(e,NN(t))};Object.defineProperty(Uy,"ie",{value:!0}),Uy.flattenNames=void 0;var TN=IN(fw),EN=IN(Nx),PN=IN(Rx),DN=IN(CN);function IN(e){return e&&e.ie?e:{default:e}}var _N=Uy.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,DN.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,PN.default)(t)?(0,EN.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,TN.default)(t)&&n.push(t)})),n};Uy.default=_N;var RN={};var LN=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},FN=Ak,BN=function(){try{var e=FN(Object,"defineProperty");return e({},"",{}),e}catch(xee){}}(),zN=BN,$N=zN;var WN=function(e,t,n){"__proto__"==t&&$N?$N(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},UN=WN,HN=zx,VN=Object.prototype.hasOwnProperty;var qN=function(e,t,n){var r=e[t];VN.call(e,t)&&HN(r,n)&&(void 0!==n||t in e)||UN(e,t,n)},YN=qN,XN=WN;var GN=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?XN(n,u,l):YN(n,u,l)}return n},KN=GN,ZN=gx;var QN=function(e,t){return e&&KN(t,ZN(t),e)};var JN=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},eM=ax,tM=Jw,nM=JN,rM=Object.prototype.hasOwnProperty;var oM=function(e){if(!eM(e))return nM(e);var t=tM(e),n=[];for(var r in e)("constructor"!=r||!t&&rM.call(e,r))&&n.push(r);return n},iM=Zw,aM=oM,uM=vx;var lM=function(e){return uM(e)?iM(e,!0):aM(e)},sM=GN,cM=lM;var dM=function(e,t){return e&&sM(t,cM(t),e)},fM={exports:{}};!function(e,t){var n=Yy,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}}(fM,fM.exports);var hM=fM.exports;var vM=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},pM=GN,mM=JO;var bM=function(e,t){return pM(e,mM(e),t)},gM=WO,yM=Mx,wM=JO,xM=YO,kM=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)gM(t,wM(e)),e=yM(e);return t}:xM,OM=GN,jM=kM;var SM=function(e,t){return OM(e,jM(e),t)},NM=VO,MM=kM,AM=lM;var CM=function(e){return NM(e,AM,MM)},TM=Object.prototype.hasOwnProperty;var EM=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&TM.call(e,"index")&&(n.index=e.index,n.input=e.input),n},PM=EO;var DM=function(e){var t=new e.constructor(e.byteLength);return new PM(t).set(new PM(e)),t},IM=DM;var _M=function(e,t){var n=t?IM(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},RM=/\w*$/;var LM=function(e){var t=new e.constructor(e.source,RM.exec(e));return t.lastIndex=e.lastIndex,t},FM=Xy?Xy.prototype:void 0,BM=FM?FM.valueOf:void 0;var zM=DM;var $M=DM,WM=_M,UM=LM,HM=function(e){return BM?Object(BM.call(e)):{}},VM=function(e,t){var n=t?zM(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var qM=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return $M(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return WM(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 VM(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 UM(e);case"[object Symbol]":return HM(e)}},YM=ax,XM=Object.create,GM=function(){function e(){}return function(t){if(!YM(t))return{};if(XM)return XM(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),KM=GM,ZM=Mx,QM=Jw;var JM=function(e){return"function"!=typeof e.constructor||QM(e)?{}:KM(ZM(e))},eA=Aj,tA=lw;var nA=function(e){return tA(e)&&"[object Map]"==eA(e)},rA=Lw,oA=Bw&&Bw.isMap,iA=oA?rA(oA):nA,aA=Aj,uA=lw;var lA=function(e){return uA(e)&&"[object Set]"==aA(e)},sA=Lw,cA=Bw&&Bw.isSet,dA=cA?sA(cA):lA,fA=yO,hA=LN,vA=qN,pA=QN,mA=dM,bA=hM,gA=vM,yA=bM,wA=SM,xA=rj,kA=CM,OA=Aj,jA=EM,SA=qM,NA=JM,MA=aw,AA=Aw,CA=iA,TA=ax,EA=dA,PA=gx,DA=lM,IA="[object Arguments]",_A="[object Function]",RA="[object Object]",LA={};LA[IA]=LA["[object Array]"]=LA["[object ArrayBuffer]"]=LA["[object DataView]"]=LA["[object Boolean]"]=LA["[object Date]"]=LA["[object Float32Array]"]=LA["[object Float64Array]"]=LA["[object Int8Array]"]=LA["[object Int16Array]"]=LA["[object Int32Array]"]=LA["[object Map]"]=LA["[object Number]"]=LA[RA]=LA["[object RegExp]"]=LA["[object Set]"]=LA["[object String]"]=LA["[object Symbol]"]=LA["[object Uint8Array]"]=LA["[object Uint8ClampedArray]"]=LA["[object Uint16Array]"]=LA["[object Uint32Array]"]=!0,LA["[object Error]"]=LA[_A]=LA["[object WeakMap]"]=!1;var FA=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(!TA(t))return t;var d=MA(t);if(d){if(u=jA(t),!l)return gA(t,u)}else{var f=OA(t),h=f==_A||"[object GeneratorFunction]"==f;if(AA(t))return bA(t,l);if(f==RA||f==IA||h&&!i){if(u=s||h?{}:NA(t),!l)return s?wA(t,mA(u,t)):yA(t,pA(u,t))}else{if(!LA[f])return i?t:{};u=SA(t,f,l)}}a||(a=new fA);var v=a.get(t);if(v)return v;a.set(t,u),EA(t)?t.forEach((function(o){u.add(e(o,n,r,o,t,a))})):CA(t)&&t.forEach((function(o,i){u.set(i,e(o,n,r,i,t,a))}));var p=d?void 0:(c?s?kA:xA:s?DA:PA)(t);return hA(p||t,(function(o,i){p&&(o=t[i=o]),vA(u,i,e(o,n,r,i,t,a))})),u},BA=FA;var zA=function(e){return BA(e,5)};Object.defineProperty(RN,"ie",{value:!0}),RN.mergeClasses=void 0;var $A=HA(Nx),WA=HA(zA),UA=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 HA(e){return e&&e.ie?e:{default:e}}var VA=RN.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,WA.default)(e.default)||{};return t.map((function(t){var r=e[t];return r&&(0,$A.default)(r,(function(e,t){n[t]||(n[t]={}),n[t]=UA({},n[t],r[t])})),t})),n};RN.default=VA;var qA={};Object.defineProperty(qA,"ie",{value:!0}),qA.autoprefix=void 0;var YA,XA=(YA=Nx)&&YA.ie?YA:{default:YA},GA=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 KA={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}}},ZA=qA.autoprefix=function(e){var t={};return(0,XA.default)(e,(function(e,n){var r={};(0,XA.default)(e,(function(e,t){var n=KA[t];n?r=GA({},r,n(e)):r[t]=e})),t[n]=r})),t};qA.default=ZA;var QA={};Object.defineProperty(QA,"ie",{value:!0}),QA.hover=void 0;var JA=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},eC=function(e){return e&&e.ie?e:{default:e}}(e);function tC(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 nC=QA.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=tC(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 eC.default.createElement(t,{onMouseOver:i.handleMouseOver,onMouseOut:i.handleMouseOut},eC.default.createElement(e,JA({},i.props,i.state)))},tC(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}(eC.default.Component)};QA.default=nC;var rC={};Object.defineProperty(rC,"ie",{value:!0}),rC.active=void 0;var oC=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},iC=function(e){return e&&e.ie?e:{default:e}}(e);function aC(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 uC=rC.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=aC(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 iC.default.createElement(t,{onMouseDown:i.handleMouseDown,onMouseUp:i.handleMouseUp},iC.default.createElement(e,oC({},i.props,i.state)))},aC(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}(iC.default.Component)};rC.default=uC;var lC={};Object.defineProperty(lC,"ie",{value:!0});lC.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(Wy,"ie",{value:!0}),Wy.ReactCSS=Wy.loop=Wy.handleActive=mC=Wy.handleHover=Wy.hover=void 0;var sC=pC(Uy),cC=pC(RN),dC=pC(qA),fC=pC(QA),hC=pC(rC),vC=pC(lC);function pC(e){return e&&e.ie?e:{default:e}}Wy.hover=fC.default;var mC=Wy.handleHover=fC.default;Wy.handleActive=hC.default,Wy.loop=vC.default;var bC=Wy.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,sC.default)(n),i=(0,cC.default)(e,o);return(0,dC.default)(i)},gC=Wy.default=bC,yC={},wC=function(e,t,n,r){var o=e+"-"+t+"-"+n+(r?"-server":"");if(yC[o])return yC[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 yC[o]=i,i},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},kC=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=gC({default:{grid:{borderRadius:a,boxShadow:u,absolute:"0px 0px 0px 0px",background:"url("+wC(n,r,o,i.canvas)+") center left"}}});return e.isValidElement(l)?e.cloneElement(l,xC({},l.props,{style:xC({},l.props.style,s.grid)})):e.createElement("div",{style:s.grid})};kC.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var OC=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},jC=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 SC(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 NC=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=SC(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)},SC(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),jC(n,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var t=this,n=this.props.rgb,r=gC({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:OC({},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(kC,{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),MC=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 AC=[38,40],CC=1,TC=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,AC.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-"+CC++,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),MC(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=gC({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),EC=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 PC(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 DC=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=PC(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()},PC(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),EC(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=gC({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),IC={exports:{}};function _C(){}function RC(){}RC.resetWarningCache=_C;IC.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:RC,resetWarningCache:_C};return n.PropTypes=n,n}();var LC=qs(IC.exports);function FC(e,t){return e===t||e!=e&&t!=t}function BC(e,t){for(var n=e.length;n--;)if(FC(e[n][0],t))return n;return-1}var zC=Array.prototype.splice;function $C(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])}}$C.prototype.clear=function(){this.je=[],this.size=0},$C.prototype.delete=function(e){var t=this.je,n=BC(t,e);return!(n<0)&&(n==t.length-1?t.pop():zC.call(t,n,1),--this.size,!0)},$C.prototype.get=function(e){var t=this.je,n=BC(t,e);return n<0?void 0:t[n][1]},$C.prototype.has=function(e){return BC(this.je,e)>-1},$C.prototype.set=function(e,t){var n=this.je,r=BC(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var WC="object"==typeof global&&global&&global.Object===Object&&global,UC="object"==typeof self&&self&&self.Object===Object&&self,HC=WC||UC||Function("return this")(),VC=HC.Symbol,qC=Object.prototype,YC=qC.hasOwnProperty,XC=qC.toString,GC=VC?VC.toStringTag:void 0;var KC=Object.prototype.toString;var ZC="[object Null]",QC="[object Undefined]",JC=VC?VC.toStringTag:void 0;function eT(e){return null==e?void 0===e?QC:ZC:JC&&JC in Object(e)?function(e){var t=YC.call(e,GC),n=e[GC];try{e[GC]=void 0;var r=!0}catch(xee){}var o=XC.call(e);return r&&(t?e[GC]=n:delete e[GC]),o}(e):function(e){return KC.call(e)}(e)}function tT(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var nT="[object AsyncFunction]",rT="[object Function]",oT="[object GeneratorFunction]",iT="[object Proxy]";function aT(e){if(!tT(e))return!1;var t=eT(e);return t==rT||t==oT||t==nT||t==iT}var uT=HC["Se"],lT=function(){var e=/[^.]+$/.exec(uT&&uT.keys&&uT.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var sT=Function.prototype.toString;function cT(e){if(null!=e){try{return sT.call(e)}catch(xee){}try{return e+""}catch(xee){}}return""}var dT=/^\[object .+?Constructor\]$/,fT=Function.prototype,hT=Object.prototype,vT=fT.toString,pT=hT.hasOwnProperty,mT=RegExp("^"+vT.call(pT).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function bT(e){return!(!tT(e)||(t=e,lT&&lT in t))&&(aT(e)?mT:dT).test(cT(e));var t}function gT(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return bT(n)?n:void 0}var yT=gT(HC,"Map"),wT=gT(Object,"create");var xT=Object.prototype.hasOwnProperty;var kT=Object.prototype.hasOwnProperty;function OT(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 jT(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 ST(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])}}OT.prototype.clear=function(){this.je=wT?wT(null):{},this.size=0},OT.prototype.delete=function(e){var t=this.has(e)&&delete this.je[e];return this.size-=t?1:0,t},OT.prototype.get=function(e){var t=this.je;if(wT){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return xT.call(t,e)?t[e]:void 0},OT.prototype.has=function(e){var t=this.je;return wT?void 0!==t[e]:kT.call(t,e)},OT.prototype.set=function(e,t){var n=this.je;return this.size+=this.has(e)?0:1,n[e]=wT&&void 0===t?"__lodash_hash_undefined__":t,this},ST.prototype.clear=function(){this.size=0,this.je={hash:new OT,map:new(yT||$C),string:new OT}},ST.prototype.delete=function(e){var t=jT(this,e).delete(e);return this.size-=t?1:0,t},ST.prototype.get=function(e){return jT(this,e).get(e)},ST.prototype.has=function(e){return jT(this,e).has(e)},ST.prototype.set=function(e,t){var n=jT(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function NT(e){var t=this.je=new $C(e);this.size=t.size}NT.prototype.clear=function(){this.je=new $C,this.size=0},NT.prototype.delete=function(e){var t=this.je,n=t.delete(e);return this.size=t.size,n},NT.prototype.get=function(e){return this.je.get(e)},NT.prototype.has=function(e){return this.je.has(e)},NT.prototype.set=function(e,t){var n=this.je;if(n instanceof $C){var r=n.je;if(!yT||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.je=new ST(r)}return n.set(e,t),this.size=n.size,this};var MT=function(){try{var e=gT(Object,"defineProperty");return e({},"",{}),e}catch(xee){}}(),AT=MT;function CT(e,t,n){"__proto__"==t&&AT?AT(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function TT(e,t,n){(void 0!==n&&!FC(e[t],n)||void 0===n&&!(t in e))&&CT(e,t,n)}var ET,PT=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var u=i[ET?a:++r];if(!1===t(o[u],u,o))break}return e},DT=PT,IT="object"==typeof exports&&exports&&!exports.nodeType&&exports,_T=IT&&"object"==typeof module&&module&&!module.nodeType&&module,RT=_T&&_T.exports===IT?HC.Buffer:void 0,LT=RT?RT.allocUnsafe:void 0;var FT=HC.Uint8Array;function BT(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new FT(r).set(new FT(n)),r):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}var zT=Object.create,$T=function(){function e(){}return function(t){if(!tT(t))return{};if(zT)return zT(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),WT=$T;function UT(e,t){return function(n){return e(t(n))}}var HT=UT(Object.getPrototypeOf,Object),VT=Object.prototype;function qT(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||VT)}function YT(e){return null!=e&&"object"==typeof e}function XT(e){return YT(e)&&"[object Arguments]"==eT(e)}var GT=Object.prototype,KT=GT.hasOwnProperty,ZT=GT.propertyIsEnumerable,QT=XT(function(){return arguments}())?XT:function(e){return YT(e)&&KT.call(e,"callee")&&!ZT.call(e,"callee")},JT=QT,eE=Array.isArray,tE=9007199254740991;function nE(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=tE}function rE(e){return null!=e&&nE(e.length)&&!aT(e)}var oE="object"==typeof exports&&exports&&!exports.nodeType&&exports,iE=oE&&"object"==typeof module&&module&&!module.nodeType&&module,aE=iE&&iE.exports===oE?HC.Buffer:void 0,uE=(aE?aE.isBuffer:void 0)||function(){return!1},lE="[object Object]",sE=Function.prototype,cE=Object.prototype,dE=sE.toString,fE=cE.hasOwnProperty,hE=dE.call(Object);var vE={};vE["[object Float32Array]"]=vE["[object Float64Array]"]=vE["[object Int8Array]"]=vE["[object Int16Array]"]=vE["[object Int32Array]"]=vE["[object Uint8Array]"]=vE["[object Uint8ClampedArray]"]=vE["[object Uint16Array]"]=vE["[object Uint32Array]"]=!0,vE["[object Arguments]"]=vE["[object Array]"]=vE["[object ArrayBuffer]"]=vE["[object Boolean]"]=vE["[object DataView]"]=vE["[object Date]"]=vE["[object Error]"]=vE["[object Function]"]=vE["[object Map]"]=vE["[object Number]"]=vE["[object Object]"]=vE["[object RegExp]"]=vE["[object Set]"]=vE["[object String]"]=vE["[object WeakMap]"]=!1;var pE,mE="object"==typeof exports&&exports&&!exports.nodeType&&exports,bE=mE&&"object"==typeof module&&module&&!module.nodeType&&module,gE=bE&&bE.exports===mE&&WC.process,yE=function(){try{var e=bE&&bE.require&&bE.require("util").types;return e||gE&&gE.binding&&gE.binding("util")}catch(xee){}}(),wE=yE&&yE.isTypedArray,xE=wE?(pE=wE,function(e){return pE(e)}):function(e){return YT(e)&&nE(e.length)&&!!vE[eT(e)]};function kE(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var OE=Object.prototype.hasOwnProperty;function jE(e,t,n){var r=e[t];OE.call(e,t)&&FC(r,n)&&(void 0!==n||t in e)||CT(e,t,n)}var SE=9007199254740991,NE=/^(?:0|[1-9]\d*)$/;function ME(e,t){var n=typeof e;return!!(t=null==t?SE:t)&&("number"==n||"symbol"!=n&&NE.test(e))&&e>-1&&e%1==0&&e<t}var AE=Object.prototype.hasOwnProperty;function CE(e,t){var n=eE(e),r=!n&&JT(e),o=!n&&!r&&uE(e),i=!n&&!r&&!o&&xE(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&&!AE.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||ME(s,l))||u.push(s);return u}var TE=Object.prototype.hasOwnProperty;function EE(e){if(!tT(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=qT(e),n=[];for(var r in e)("constructor"!=r||!t&&TE.call(e,r))&&n.push(r);return n}function PE(e){return rE(e)?CE(e,!0):EE(e)}function DE(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?CT(n,u,l):jE(n,u,l)}return n}(e,PE(e))}function IE(e,t,n,r,o,i,a){var u=kE(e,n),l=kE(t,n),s=a.get(l);if(s)TT(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=eE(l),v=!h&&uE(l),p=!h&&!v&&xE(l);d=l,h||v||p?eE(u)?d=u:YT(c=u)&&rE(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=LT?LT(n):new e.constructor(n);return e.copy(r),r}(l,!0)):p?(f=!1,d=BT(l,!0)):d=[]:function(e){if(!YT(e)||eT(e)!=lE)return!1;var t=HT(e);if(null===t)return!0;var n=fE.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&dE.call(n)==hE}(l)||JT(l)?(d=u,JT(u)?d=DE(u):tT(u)&&!aT(u)||(d=function(e){return"function"!=typeof e.constructor||qT(e)?{}:WT(HT(e))}(l))):f=!1}f&&(a.set(l,d),o(d,l,r,i,a),a.delete(l)),TT(e,n,d)}}function _E(e,t,n,r,o){e!==t&&DT(t,(function(i,a){if(o||(o=new NT),tT(i))IE(e,t,a,n,_E,r,o);else{var u=r?r(kE(e,a),i,a+"",e,t,o):void 0;void 0===u&&(u=i),TT(e,a,u)}}),PE)}function RE(e){return e}var LE=Math.max;var FE=AT?function(e,t){return AT(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:RE,BE=FE,zE=Date.now;var $E=function(e){var t=0,n=0;return function(){var r=zE(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(BE),WE=$E;function UE(e,t){return WE(function(e,t,n){return t=LE(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=LE(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,RE),e+"")}var HE,VE=(HE=function(e,t,n){_E(e,t,n)},UE((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=HE.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!tT(n))return!1;var r=typeof t;return!!("number"==r?rE(n)&&ME(t,n.length):"string"==r&&t in n)&&FC(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&&HE(e,a,n,o)}return e}))),qE=VE,YE=function(t){var n=t.zDepth,r=t.radius,o=t.background,i=t.children,a=t.styles,u=gC(qE({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))};YE.propTypes={background:LC.string,zDepth:LC.oneOf([0,1,2,3,4,5]),radius:LC.number,styles:LC.object},YE.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var XE=function(){return HC.Date.now()},GE=/\s/;var KE=/^\s+/;function ZE(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&GE.test(e.charAt(t)););return t}(e)+1).replace(KE,""):e}var QE="[object Symbol]";function JE(e){return"symbol"==typeof e||YT(e)&&eT(e)==QE}var eP=NaN,tP=/^[-+]0x[0-9a-f]+$/i,nP=/^0b[01]+$/i,rP=/^0o[0-7]+$/i,oP=parseInt;function iP(e){if("number"==typeof e)return e;if(JE(e))return eP;if(tT(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tT(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ZE(e);var n=nP.test(e);return n||rP.test(e)?oP(e.slice(2),n?2:8):tP.test(e)?eP:+e}var aP="Expected a function",uP=Math.max,lP=Math.min;function sP(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(aP);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=XE();if(v(e))return m(e);u=setTimeout(p,function(e){var n=t-(e-l);return d?lP(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=XE(),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=iP(t)||0,tT(n)&&(c=!!n.leading,i=(d="maxWait"in n)?uP(iP(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(XE())},b}var cP=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 dP=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 tT(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),sP(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),cP(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=gC({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 fP(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}var hP=UT(Object.keys,Object),vP=Object.prototype.hasOwnProperty;function pP(e){return rE(e)?CE(e):function(e){if(!qT(e))return hP(e);var t=[];for(var n in Object(e))vP.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var mP=function(e,t){return function(n,r){if(null==n)return n;if(!rE(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&&DT(e,t,pP)})),bP=mP;function gP(e,t){var n;return(eE(e)?fP:bP)(e,"function"==typeof(n=t)?n:RE)}function yP(e){return yP="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},yP(e)}var wP=/^\s+/,xP=/\s+$/;function kP(e,t){if(t=t||{},(e=e||"")instanceof kP)return e;if(!(this instanceof kP))return new kP(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(wP,"").replace(xP,"").toLowerCase();var t,n=!1;if(BP[e])e=BP[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=QP.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=QP.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=QP.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=QP.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=QP.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=QP.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=QP.hex8.exec(e))return{r:HP(t[1]),g:HP(t[2]),b:HP(t[3]),a:XP(t[4]),format:n?"name":"hex8"};if(t=QP.hex6.exec(e))return{r:HP(t[1]),g:HP(t[2]),b:HP(t[3]),format:n?"name":"hex"};if(t=QP.hex4.exec(e))return{r:HP(t[1]+""+t[1]),g:HP(t[2]+""+t[2]),b:HP(t[3]+""+t[3]),a:XP(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=QP.hex3.exec(e))return{r:HP(t[1]+""+t[1]),g:HP(t[2]+""+t[2]),b:HP(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==yP(e)&&(JP(e.r)&&JP(e.g)&&JP(e.b)?(t=function(e,t,n){return{r:255*WP(e,255),g:255*WP(t,255),b:255*WP(n,255)}}(e.r,e.g,e.b),a=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):JP(e.h)&&JP(e.s)&&JP(e.v)?(r=qP(e.s),o=qP(e.v),t=function(e,t,n){e=6*WP(e,360),t=WP(t,100),n=WP(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"):JP(e.h)&&JP(e.s)&&JP(e.l)&&(r=qP(e.s),i=qP(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=WP(e,360),t=WP(t,100),n=WP(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=$P(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 OP(e,t,n){e=WP(e,255),t=WP(t,255),n=WP(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 jP(e,t,n){e=WP(e,255),t=WP(t,255),n=WP(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 SP(e,t,n,r){var o=[VP(Math.round(e).toString(16)),VP(Math.round(t).toString(16)),VP(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 NP(e,t,n,r){return[VP(YP(r)),VP(Math.round(e).toString(16)),VP(Math.round(t).toString(16)),VP(Math.round(n).toString(16))].join("")}function MP(e,t){t=0===t?0:t||10;var n=kP(e).toHsl();return n.s-=t/100,n.s=UP(n.s),kP(n)}function AP(e,t){t=0===t?0:t||10;var n=kP(e).toHsl();return n.s+=t/100,n.s=UP(n.s),kP(n)}function CP(e){return kP(e).desaturate(100)}function TP(e,t){t=0===t?0:t||10;var n=kP(e).toHsl();return n.l+=t/100,n.l=UP(n.l),kP(n)}function EP(e,t){t=0===t?0:t||10;var n=kP(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))),kP(n)}function PP(e,t){t=0===t?0:t||10;var n=kP(e).toHsl();return n.l-=t/100,n.l=UP(n.l),kP(n)}function DP(e,t){var n=kP(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,kP(n)}function IP(e){var t=kP(e).toHsl();return t.h=(t.h+180)%360,kP(t)}function _P(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=kP(e).toHsl(),r=[kP(e)],o=360/t,i=1;i<t;i++)r.push(kP({h:(n.h+i*o)%360,s:n.s,l:n.l}));return r}function RP(e){var t=kP(e).toHsl(),n=t.h;return[kP(e),kP({h:(n+72)%360,s:t.s,l:t.l}),kP({h:(n+216)%360,s:t.s,l:t.l})]}function LP(e,t,n){t=t||6,n=n||30;var r=kP(e).toHsl(),o=360/n,i=[kP(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(kP(r));return i}function FP(e,t){t=t||6;for(var n=kP(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],u=1/t;t--;)a.push(kP({h:r,s:o,v:i})),i=(i+u)%1;return a}kP.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=$P(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=jP(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=jP(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=OP(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=OP(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 SP(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=[VP(Math.round(e).toString(16)),VP(Math.round(t).toString(16)),VP(Math.round(n).toString(16)),VP(YP(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*WP(this._r,255))+"%",g:Math.round(100*WP(this._g,255))+"%",b:Math.round(100*WP(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*WP(this._r,255))+"%, "+Math.round(100*WP(this._g,255))+"%, "+Math.round(100*WP(this._b,255))+"%)":"rgba("+Math.round(100*WP(this._r,255))+"%, "+Math.round(100*WP(this._g,255))+"%, "+Math.round(100*WP(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(zP[SP(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+NP(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=kP(e);n="#"+NP(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 kP(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(TP,arguments)},brighten:function(){return this._applyModification(EP,arguments)},darken:function(){return this._applyModification(PP,arguments)},desaturate:function(){return this._applyModification(MP,arguments)},saturate:function(){return this._applyModification(AP,arguments)},greyscale:function(){return this._applyModification(CP,arguments)},spin:function(){return this._applyModification(DP,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(LP,arguments)},complement:function(){return this._applyCombination(IP,arguments)},monochromatic:function(){return this._applyCombination(FP,arguments)},splitcomplement:function(){return this._applyCombination(RP,arguments)},triad:function(){return this._applyCombination(_P,[3])},tetrad:function(){return this._applyCombination(_P,[4])}},kP.fromRatio=function(e,t){if("object"==yP(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:qP(e[r]));e=n}return kP(e,t)},kP.equals=function(e,t){return!(!e||!t)&&kP(e).toRgbString()==kP(t).toRgbString()},kP.random=function(){return kP.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},kP.mix=function(e,t,n){n=0===n?0:n||50;var r=kP(e).toRgb(),o=kP(t).toRgb(),i=n/100;return kP({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})},kP.readability=function(e,t){var n=kP(e),r=kP(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},kP.isReadable=function(e,t,n){var r,o,i=kP.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},kP.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=kP.readability(e,t[s]))>l&&(l=r,u=kP(t[s]));return kP.isReadable(e,u,{level:i,size:a})||!o?u:(n.includeFallbackColors=!1,kP.mostReadable(e,["#fff","#000"],n))};var BP=kP.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"},zP=kP.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(BP);function $P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function WP(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 UP(e){return Math.min(1,Math.max(0,e))}function HP(e){return parseInt(e,16)}function VP(e){return 1==e.length?"0"+e:""+e}function qP(e){return e<=1&&(e=100*e+"%"),e}function YP(e){return Math.round(255*parseFloat(e)).toString(16)}function XP(e){return HP(e)/255}var GP,KP,ZP,QP=(KP="[\\s|\\(]+("+(GP="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+GP+")[,|\\s]+("+GP+")\\s*\\)?",ZP="[\\s|\\(]+("+GP+")[,|\\s]+("+GP+")[,|\\s]+("+GP+")[,|\\s]+("+GP+")\\s*\\)?",{CSS_UNIT:new RegExp(GP),rgb:new RegExp("rgb"+KP),rgba:new RegExp("rgba"+ZP),hsl:new RegExp("hsl"+KP),hsla:new RegExp("hsla"+ZP),hsv:new RegExp("hsv"+KP),hsva:new RegExp("hsva"+ZP),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 JP(e){return!!QP.CSS_UNIT.exec(e)}var eD=function(e){var t=0,n=0;return gP(["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},tD=function(e,t){var n=e.hex?kP(e.hex):kP(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}},nD=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&kP(e).isValid()},rD=function(e){if(!e)return"#fff";var t=tD(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"},oD=function(e,t){return kP(t+" ("+e.replace("°","")+")")._ok},iD=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},aD=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 uD=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(eD(e)){var r=tD(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(eD(e)){var r=tD(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=iD({},tD(e.color,0)),t.debounce=sP((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),aD(r,[{key:"render",value:function(){var n={};return this.props.onSwatchHover&&(n.onSwatchHover=this.handleSwatchHover),e.createElement(t,iD({},this.props,this.state,{onChange:this.handleChange},n))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return iD({},tD(e.color,t.oldHue))}}]),r}(e.PureComponent||e.Component);return n.propTypes=iD({},t.propTypes),n.defaultProps=iD({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),n},lD=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},sD=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 cD(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 dD=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},fD=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=cD(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})},cD(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),sD(o,[{key:"render",value:function(){return e.createElement(n,{onFocus:this.handleFocus,onBlur:this.handleBlur},e.createElement(t,lD({},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=gC({default:{swatch:dD({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",dD({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(kC,{borderRadius:h.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))})),hD=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},vD=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=gC({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(NC,hD({},h.alpha,{rgb:n,hsl:r,pointer:c,renderers:s,onChange:a,direction:u})))};function pD(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}vD.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:function(t){var n=t.direction,r=gC({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})}},uD(vD);function mD(e){var t=-1,n=null==e?0:e.length;for(this.je=new ST;++t<n;)this.add(e[t])}function bD(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}mD.prototype.add=mD.prototype.push=function(e){return this.je.set(e,"__lodash_hash_undefined__"),this},mD.prototype.has=function(e){return this.je.has(e)};var gD=1,yD=2;function wD(e,t,n,r,o,i){var a=n&gD,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&yD?new mD: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(!bD(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 xD(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function kD(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var OD=1,jD=2,SD="[object Boolean]",ND="[object Date]",MD="[object Error]",AD="[object Map]",CD="[object Number]",TD="[object RegExp]",ED="[object Set]",PD="[object String]",DD="[object Symbol]",ID="[object ArrayBuffer]",_D="[object DataView]",RD=VC?VC.prototype:void 0,LD=RD?RD.valueOf:void 0;var FD=Object.prototype.propertyIsEnumerable,BD=Object.getOwnPropertySymbols,zD=BD?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}(BD(e),(function(t){return FD.call(e,t)})))}:function(){return[]},$D=zD;function WD(e){return function(e,t,n){var r=t(e);return eE(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,pP,$D)}var UD=1,HD=Object.prototype.hasOwnProperty;var VD=gT(HC,"DataView"),qD=gT(HC,"Promise"),YD=gT(HC,"Set"),XD=gT(HC,"WeakMap"),GD="[object Map]",KD="[object Promise]",ZD="[object Set]",QD="[object WeakMap]",JD="[object DataView]",eI=cT(VD),tI=cT(yT),nI=cT(qD),rI=cT(YD),oI=cT(XD),iI=eT;(VD&&iI(new VD(new ArrayBuffer(1)))!=JD||yT&&iI(new yT)!=GD||qD&&iI(qD.resolve())!=KD||YD&&iI(new YD)!=ZD||XD&&iI(new XD)!=QD)&&(iI=function(e){var t=eT(e),n="[object Object]"==t?e.constructor:void 0,r=n?cT(n):"";if(r)switch(r){case eI:return JD;case tI:return GD;case nI:return KD;case rI:return ZD;case oI:return QD}return t});var aI=iI,uI=1,lI="[object Arguments]",sI="[object Array]",cI="[object Object]",dI=Object.prototype.hasOwnProperty;function fI(e,t,n,r,o,i){var a=eE(e),u=eE(t),l=a?sI:aI(e),s=u?sI:aI(t),c=(l=l==lI?cI:l)==cI,d=(s=s==lI?cI:s)==cI,f=l==s;if(f&&uE(e)){if(!uE(t))return!1;a=!0,c=!1}if(f&&!c)return i||(i=new NT),a||xE(e)?wD(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case _D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ID:return!(e.byteLength!=t.byteLength||!i(new FT(e),new FT(t)));case SD:case ND:case CD:return FC(+e,+t);case MD:return e.name==t.name&&e.message==t.message;case TD:case PD:return e==t+"";case AD:var u=xD;case ED:var l=r&OD;if(u||(u=kD),e.size!=t.size&&!l)return!1;var s=a.get(e);if(s)return s==t;r|=jD,a.set(e,t);var c=wD(u(e),u(t),r,o,i,a);return a.delete(e),c;case DD:if(LD)return LD.call(e)==LD.call(t)}return!1}(e,t,l,n,r,o,i);if(!(n&uI)){var h=c&&dI.call(e,"__wrapped__"),v=d&&dI.call(t,"__wrapped__");if(h||v){var p=h?e.value():e,m=v?t.value():t;return i||(i=new NT),o(p,m,n,r,i)}}return!!f&&(i||(i=new NT),function(e,t,n,r,o,i){var a=n&UD,u=WD(e),l=u.length;if(l!=WD(t).length&&!a)return!1;for(var s=l;s--;){var c=u[s];if(!(a?c in t:HD.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 g=e.constructor,y=t.constructor;g==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof y&&y instanceof y||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))}function hI(e,t,n,r,o){return e===t||(null==e||null==t||!YT(e)&&!YT(t)?e!=e&&t!=t:fI(e,t,n,r,hI,o))}var vI=1,pI=2;function mI(e){return e==e&&!tT(e)}function bI(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function gI(e){var t=function(e){for(var t=pP(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,mI(o)]}return t}(e);return 1==t.length&&t[0][2]?bI(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 NT;if(r)var f=r(s,c,l,e,t,d);if(!(void 0===f?hI(c,s,vI|pI,r,d):f))return!1}}return!0}(n,e,t)}}var yI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wI=/^\w*$/;function xI(e,t){if(eE(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!JE(e))||(wI.test(e)||!yI.test(e)||null!=t&&e in Object(t))}var kI="Expected a function";function OI(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(kI);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(OI.Cache||ST),n}OI.Cache=ST;var jI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,SI=/\\(\\)?/g,NI=function(e){var t=OI(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(jI,(function(e,n,r,o){t.push(r?o.replace(SI,"$1"):n||e)})),t})),MI=NI,AI=1/0,CI=VC?VC.prototype:void 0,TI=CI?CI.toString:void 0;function EI(e){if("string"==typeof e)return e;if(eE(e))return pD(e,EI)+"";if(JE(e))return TI?TI.call(e):"";var t=e+"";return"0"==t&&1/e==-AI?"-0":t}function PI(e,t){return eE(e)?e:xI(e,t)?[e]:MI(function(e){return null==e?"":EI(e)}(e))}var DI=1/0;function II(e){if("string"==typeof e||JE(e))return e;var t=e+"";return"0"==t&&1/e==-DI?"-0":t}function _I(e,t){for(var n=0,r=(t=PI(t,e)).length;null!=e&&n<r;)e=e[II(t[n++])];return n&&n==r?e:void 0}function RI(e,t){return null!=e&&t in Object(e)}function LI(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=PI(t,e)).length,i=!1;++r<o;){var a=II(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&nE(o)&&ME(a,o)&&(eE(e)||JT(e))}(e,t,RI)}var FI=1,BI=2;function zI(e,t){return xI(e)&&mI(t)?bI(II(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:_I(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?LI(n,e):hI(t,r,FI|BI)}}function $I(e){return xI(e)?(t=II(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return _I(t,e)}}(e);var t}function WI(e,t){var n=-1,r=rE(e)?Array(e.length):[];return bP(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function UI(e,t){var n;return(eE(e)?pD:WI)(e,"function"==typeof(n=t)?n:null==n?RE:"object"==typeof n?eE(n)?zI(n[0],n[1]):gI(n):$I(n))}var HI=function(t){var n=t.colors,r=t.onClick,o=t.onSwatchHover,i=gC({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},UI(n,(function(t){return e.createElement(fD,{key:t,color:t,style:i.swatch,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}})})),e.createElement("div",{style:i.clear}))},VI=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){nD(e)&&n({hex:e,source:"hex"},t)},v=gC(qE({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:rD(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(kC,{borderRadius:"6px 6px 0 0"}),e.createElement("div",{style:v.label},o)),e.createElement("div",{style:v.body},e.createElement(HI,{colors:i,onClick:h,onSwatchHover:r}),e.createElement(TC,{style:{input:v.input},value:o,onChange:h})))};VI.propTypes={width:LC.oneOfType([LC.string,LC.number]),colors:LC.arrayOf(LC.string),triangle:LC.oneOf(["top","hide"]),styles:LC.object},VI.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}},uD(VI);var qI="#ffcdd2",YI="#e57373",XI="#f44336",GI="#d32f2f",KI="#b71c1c",ZI="#f8bbd0",QI="#f06292",JI="#e91e63",e_="#c2185b",t_="#880e4f",n_="#e1bee7",r_="#ba68c8",o_="#9c27b0",i_="#7b1fa2",a_="#4a148c",u_="#d1c4e9",l_="#9575cd",s_="#673ab7",c_="#512da8",d_="#311b92",f_="#c5cae9",h_="#7986cb",v_="#3f51b5",p_="#303f9f",m_="#1a237e",b_="#bbdefb",g_="#64b5f6",y_="#2196f3",w_="#1976d2",x_="#0d47a1",k_="#b3e5fc",O_="#4fc3f7",j_="#03a9f4",S_="#0288d1",N_="#01579b",M_="#b2ebf2",A_="#4dd0e1",C_="#00bcd4",T_="#0097a7",E_="#006064",P_="#b2dfdb",D_="#4db6ac",I_="#009688",__="#00796b",R_="#004d40",L_="#c8e6c9",F_="#81c784",B_="#4caf50",z_="#388e3c",$_="#dcedc8",W_="#aed581",U_="#8bc34a",H_="#689f38",V_="#33691e",q_="#f0f4c3",Y_="#dce775",X_="#cddc39",G_="#afb42b",K_="#827717",Z_="#fff9c4",Q_="#fff176",J_="#ffeb3b",eR="#fbc02d",tR="#f57f17",nR="#ffecb3",rR="#ffd54f",oR="#ffc107",iR="#ffa000",aR="#ff6f00",uR="#ffe0b2",lR="#ffb74d",sR="#ff9800",cR="#f57c00",dR="#e65100",fR="#ffccbc",hR="#ff8a65",vR="#ff5722",pR="#e64a19",mR="#bf360c",bR="#d7ccc8",gR="#a1887f",yR="#795548",wR="#5d4037",xR="#3e2723",kR="#cfd8dc",OR="#90a4ae",jR="#607d8b",SR="#455a64",NR="#263238",MR=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=gC({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(fD,{style:s.Swatch,color:n,onClick:r,onHover:o,focusStyle:{boxShadow:s.Swatch.boxShadow+", 0 0 5px "+n}}))};MR.defaultProps={circleSize:28,circleSpacing:14};var AR=mC(MR),CR=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=gC(qE({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},UI(i,(function(t){return e.createElement(AR,{key:t,color:t,onClick:v,onSwatchHover:o,active:a===t.toLowerCase(),circleSize:u,circleSpacing:c})})))};function TR(e){return void 0===e}CR.propTypes={width:LC.oneOfType([LC.string,LC.number]),circleSize:LC.number,circleSpacing:LC.number,styles:LC.object},CR.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[XI,JI,o_,s_,v_,y_,j_,C_,I_,B_,U_,X_,J_,oR,sR,vR,yR,jR],styles:{}},uD(CR);var ER={};Object.defineProperty(ER,"ie",{value:!0});var PR=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},DR=function(e){return e&&e.ie?e:{default:e}}(e);var IR=ER.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 DR.default.createElement("svg",PR({viewBox:"0 0 24 24",style:PR({fill:n,width:o,height:a},l)},s),DR.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"}))},_R=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 RR=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?nD(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(TR(e.s)?t.props.hsl.s:e.s),l:Number(TR(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),_R(n,[{key:"render",value:function(){var t=this,n=gC({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(TC,{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(TC,{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(TC,{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(TC,{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(TC,{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(TC,{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(TC,{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(TC,{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(TC,{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(IR,{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);RR.defaultProps={view:"hex"};var LR=function(){var t=gC({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})},FR=function(){var t=gC({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})},BR=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=gC(qE({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(dP,{style:p.Saturation,hsl:a,hsv:u,pointer:FR,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(kC,{renderers:s}))),e.createElement("div",{style:p.toggles},e.createElement("div",{style:p.hue},e.createElement(DC,{style:p.Hue,hsl:a,pointer:LR,onChange:r})),e.createElement("div",{style:p.alpha},e.createElement(NC,{style:p.Alpha,rgb:i,hsl:a,pointer:LR,renderers:s,onChange:r})))),e.createElement(RR,{rgb:i,hsl:a,hex:l,view:v,onChange:r,disableAlpha:o})))};BR.propTypes={width:LC.oneOfType([LC.string,LC.number]),disableAlpha:LC.bool,styles:LC.object,defaultView:LC.oneOf(["hex","rgb","hsl"])},BR.defaultProps={width:225,disableAlpha:!1,styles:{}},uD(BR);var zR=function(t){var n=t.color,r=t.onClick,o=void 0===r?function(){}:r,i=t.onSwatchHover,a=t.active,u=gC({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:rD(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(fD,{style:u.color,color:n,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},e.createElement("div",{style:u.dot}))},$R=function(t){var n=t.hex,r=t.rgb,o=t.onChange,i=gC({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(TC,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),e.createElement(TC,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:a}),e.createElement(TC,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:a}),e.createElement(TC,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:a}))},WR=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=gC(qE({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?nD(e.hex)&&n({hex:e.hex,source:"hex"},t):n(e,t)};return e.createElement(YE,{style:d.Compact,styles:l},e.createElement("div",{style:d.compact,className:"compact-picker "+c},e.createElement("div",null,UI(o,(function(t){return e.createElement(zR,{key:t,color:t,active:t.toLowerCase()===i,onClick:f,onSwatchHover:r})})),e.createElement("div",{style:d.clear})),e.createElement($R,{hex:i,rgb:a,onChange:f})))};WR.propTypes={colors:LC.arrayOf(LC.string),styles:LC.object},WR.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:{}},uD(WR);var UR=mC((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=gC({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return e.createElement("div",{style:u.swatch},e.createElement(fD,{color:r,onClick:o,onHover:i,focusStyle:a}))})),HR=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=gC(qE({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}),UI(r,(function(t){return e.createElement(UR,{color:t,key:t,onClick:f,onSwatchHover:i})})))};HR.propTypes={width:LC.oneOfType([LC.string,LC.number]),colors:LC.arrayOf(LC.string),triangle:LC.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:LC.object},HR.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},uD(HR);var VR=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},qR=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=gC(qE({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(DC,VR({},f.hue,{hsl:i,pointer:u,onChange:function(e){return o({a:1,h:e.h,l:.5,s:1})},direction:a})))};qR.propTypes={styles:LC.object},qR.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:function(t){var n=t.direction,r=gC({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:{}},uD(qR);uD((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=gC(qE({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?nD(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(YE,{styles:a},e.createElement("div",{style:s.material,className:"material-picker "+l},e.createElement(TC,{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(TC,{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(TC,{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(TC,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:o.b,onChange:c})))))}));var YR=function(t){var n=t.onChange,r=t.rgb,o=t.hsv,i=t.hex,a=gC({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["#"]?nD(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(TC,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"h",value:Math.round(o.h),onChange:u}),e.createElement(TC,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"s",value:Math.round(100*o.s),onChange:u}),e.createElement(TC,{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(TC,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:u}),e.createElement(TC,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:u}),e.createElement(TC,{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(TC,{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},"%")))},XR=function(t){var n=t.hsl,r=gC({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})},GR=function(){var t=gC({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})))},KR=function(t){var n=t.onClick,r=t.label,o=t.children,i=t.active,a=gC({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)},ZR=function(t){var n=t.rgb,r=t.currentColor,o=gC({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"))},QR=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 JR=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),QR(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=gC(qE({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(dP,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:XR,onChange:this.props.onChange})),e.createElement("div",{style:a.hue},e.createElement(DC,{direction:"vertical",hsl:this.props.hsl,pointer:GR,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(ZR,{rgb:this.props.rgb,currentColor:this.state.currentColor})),e.createElement("div",{style:a.actions},e.createElement(KR,{label:"OK",onClick:this.props.onAccept,active:!0}),e.createElement(KR,{label:"Cancel",onClick:this.props.onCancel}),e.createElement(YR,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),n}(e.Component);JR.propTypes={header:LC.string,styles:LC.object},JR.defaultProps={header:"Color Picker",styles:{}},uD(JR);var eL=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.disableAlpha,u=gC({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?nD(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(TC,{style:{input:u.input,label:u.label},label:"hex",value:i.replace("#",""),onChange:l})),e.createElement("div",{style:u.single},e.createElement(TC,{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(TC,{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(TC,{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(TC,{style:{input:u.input,label:u.label},label:"a",value:Math.round(100*r.a),onChange:l,dragLabel:"true",dragMax:"100"})))},tL=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},nL=function(t){var n=t.colors,r=t.onClick,o=void 0===r?function(){}:r,i=t.onSwatchHover,a=gC({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(fD,tL({},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}})))})))};nL.propTypes={colors:LC.arrayOf(LC.oneOfType([LC.string,LC.shape({color:LC.string,title:LC.string})])).isRequired};var rL=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},oL=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=gC(qE({default:rL({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(dP,{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(DC,{style:m.Hue,hsl:a,onChange:u})),e.createElement("div",{style:m.alpha},e.createElement(NC,{style:m.Alpha,rgb:r,hsl:a,renderers:d,onChange:u}))),e.createElement("div",{style:m.color},e.createElement(kC,null),e.createElement("div",{style:m.activeColor}))),e.createElement(eL,{rgb:r,hsl:a,hex:o,onChange:u,disableAlpha:s}),e.createElement(nL,{colors:c,onClick:u,onSwatchHover:l}))};oL.propTypes={disableAlpha:LC.bool,width:LC.oneOfType([LC.string,LC.number]),styles:LC.object},oL.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},uD(oL);var iL=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=gC({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)}})},aL=function(t){var n=t.onClick,r=t.hsl,o=gC({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(iL,{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(iL,{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(iL,{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(iL,{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(iL,{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}))},uL=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=gC(qE({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(DC,{style:s.Hue,hsl:n,pointer:o,onChange:r})),e.createElement("div",{style:s.swatches},e.createElement(aL,{hsl:n,onClick:r})))};uL.propTypes={styles:LC.object},uL.defaultProps={pointer:function(){var t=gC({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:{}},uD(uL);var lL={};Object.defineProperty(lL,"ie",{value:!0});var sL=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},cL=function(e){return e&&e.ie?e:{default:e}}(e);var dL=lL.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 cL.default.createElement("svg",sL({viewBox:"0 0 24 24",style:sL({fill:n,width:o,height:a},l)},s),cL.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},fL=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=gC({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:rD(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(fD,{color:n,style:s.color,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},e.createElement("div",{style:s.check},e.createElement(dL,null)))},hL=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,i=t.active,a=gC({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return e.createElement("div",{style:a.group},UI(o,(function(t,a){return e.createElement(fL,{key:t,color:t,active:t.toLowerCase()===i,first:0===a,last:a===o.length-1,onClick:n,onSwatchHover:r})})))},vL=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=gC(qE({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(YE,null,e.createElement("div",{style:f.overflow},e.createElement("div",{style:f.body},UI(a,(function(t){return e.createElement(hL,{key:t.toString(),group:t,active:u,onClick:h,onSwatchHover:i})})),e.createElement("div",{style:f.clear})))))};vL.propTypes={width:LC.oneOfType([LC.string,LC.number]),height:LC.oneOfType([LC.string,LC.number]),colors:LC.arrayOf(LC.arrayOf(LC.string)),styles:LC.object},vL.defaultProps={width:320,height:240,colors:[[KI,GI,XI,YI,qI],[t_,e_,JI,QI,ZI],[a_,i_,o_,r_,n_],[d_,c_,s_,l_,u_],[m_,p_,v_,h_,f_],[x_,w_,y_,g_,b_],[N_,S_,j_,O_,k_],[E_,T_,C_,A_,M_],[R_,__,I_,D_,P_],["#194D33",z_,B_,F_,L_],[V_,H_,U_,W_,$_],[K_,G_,X_,Y_,q_],[tR,eR,J_,Q_,Z_],[aR,iR,oR,rR,nR],[dR,cR,sR,lR,uR],[mR,pR,vR,hR,fR],[xR,wR,yR,gR,bR],[NR,SR,jR,OR,kR],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}},uD(vL);var pL=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=gC(qE({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){nD(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},UI(i,(function(t,n){return e.createElement(fD,{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(TC,{label:null,style:{input:f.input},value:o.replace("#",""),onChange:h}),e.createElement("div",{style:f.clear})))};pL.propTypes={width:LC.oneOfType([LC.string,LC.number]),triangle:LC.oneOf(["hide","top-left","top-right"]),colors:LC.arrayOf(LC.string),styles:LC.object},pL.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}},uD(pL);var mL=function(t){var n=gC({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})};mL.propTypes={hsl:LC.shape({h:LC.number,s:LC.number,l:LC.number,a:LC.number})},mL.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var bL=function(t){var n=gC({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})};bL.propTypes={hsl:LC.shape({h:LC.number,s:LC.number,l:LC.number,a:LC.number})},bL.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var gL=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)nD(e.hex)&&n({hex:e.hex,source:"hex"},t);else if(e.rgb){var r=e.rgb.split(",");oD(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(",");oD(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(",");oD(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=gC({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(TC,{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(TC,{style:{input:l.input2,label:l.label2},label:"rgb",value:s,onChange:u})),e.createElement("div",{style:l.single},e.createElement(TC,{style:{input:l.input2,label:l.label2},label:"hsv",value:d,onChange:u})),e.createElement("div",{style:l.single},e.createElement(TC,{style:{input:l.input2,label:l.label2},label:"hsl",value:c,onChange:u})))))},yL=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=gC(qE({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(dP,{hsl:i,hsv:a,pointer:mL,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(DC,{style:h.Hue,hsl:i,radius:"4px",pointer:bL,onChange:r}))),e.createElement(gL,{rgb:o,hsl:i,hex:u,hsv:a,onChange:r})))};yL.propTypes={width:LC.oneOfType([LC.string,LC.number]),styles:LC.object,header:LC.string},yL.defaultProps={width:652,styles:{},header:"Color picker"},uD(yL);var wL={exports:{}};
17
+ /*!
18
+ Copyright (c) 2018 Jed Watson.
19
+ Licensed under the MIT License (MIT), see
20
+ http://jedwatson.github.io/classnames
21
+ */!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var a=n.apply(null,o);a&&e.push(a)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var u in o)t.call(o,u)&&o[u]&&e.push(u)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(wL);var xL=qs(wL.exports);var kL=qs((function(e){return null==e})),OL={exports:{}},jL={},SL="function"==typeof Symbol&&Symbol.for,NL=SL?Symbol.for("react.element"):60103,ML=SL?Symbol.for("react.portal"):60106,AL=SL?Symbol.for("react.fragment"):60107,CL=SL?Symbol.for("react.strict_mode"):60108,TL=SL?Symbol.for("react.profiler"):60114,EL=SL?Symbol.for("react.provider"):60109,PL=SL?Symbol.for("react.context"):60110,DL=SL?Symbol.for("react.async_mode"):60111,IL=SL?Symbol.for("react.concurrent_mode"):60111,_L=SL?Symbol.for("react.forward_ref"):60112,RL=SL?Symbol.for("react.suspense"):60113,LL=SL?Symbol.for("react.suspense_list"):60120,FL=SL?Symbol.for("react.memo"):60115,BL=SL?Symbol.for("react.lazy"):60116,zL=SL?Symbol.for("react.block"):60121,$L=SL?Symbol.for("react.fundamental"):60117,WL=SL?Symbol.for("react.responder"):60118,UL=SL?Symbol.for("react.scope"):60119;function HL(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case NL:switch(e=e.type){case DL:case IL:case AL:case TL:case CL:case RL:return e;default:switch(e=e&&e.$$typeof){case PL:case _L:case BL:case FL:case EL:return e;default:return t}}case ML:return t}}}function VL(e){return HL(e)===IL}jL.AsyncMode=DL,jL.ConcurrentMode=IL,jL.ContextConsumer=PL,jL.ContextProvider=EL,jL.Element=NL,jL.ForwardRef=_L,jL.Fragment=AL,jL.Lazy=BL,jL.Memo=FL,jL.Portal=ML,jL.Profiler=TL,jL.StrictMode=CL,jL.Suspense=RL,jL.isAsyncMode=function(e){return VL(e)||HL(e)===DL},jL.isConcurrentMode=VL,jL.isContextConsumer=function(e){return HL(e)===PL},jL.isContextProvider=function(e){return HL(e)===EL},jL.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===NL},jL.isForwardRef=function(e){return HL(e)===_L},jL.isFragment=function(e){return HL(e)===AL},jL.isLazy=function(e){return HL(e)===BL},jL.isMemo=function(e){return HL(e)===FL},jL.isPortal=function(e){return HL(e)===ML},jL.isProfiler=function(e){return HL(e)===TL},jL.isStrictMode=function(e){return HL(e)===CL},jL.isSuspense=function(e){return HL(e)===RL},jL.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===AL||e===IL||e===TL||e===CL||e===RL||e===LL||"object"==typeof e&&null!==e&&(e.$$typeof===BL||e.$$typeof===FL||e.$$typeof===EL||e.$$typeof===PL||e.$$typeof===_L||e.$$typeof===$L||e.$$typeof===WL||e.$$typeof===UL||e.$$typeof===zL)},jL.typeOf=HL,OL.exports=jL;var qL=OL.exports,YL=iw,XL=lw;var GL=function(e){return"number"==typeof e||XL(e)&&"[object Number]"==YL(e)},KL=qs(GL),ZL=GL;var QL=qs((function(e){return ZL(e)&&e!=+e})),JL=function(e){return 0===e?0:e>0?1:-1},eF=function(e){return hw(e)&&e.indexOf("%")===e.length-1},tF=function(e){return KL(e)&&!QL(e)},nF=function(e){return tF(e)||hw(e)},rF=0,oF=function(e){var t=++rF;return"".concat(e||"").concat(t)},iF=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(!tF(e)&&!hw(e))return r;if(eF(e)){var i=e.indexOf("%");n=t*parseFloat(e.slice(0,i))/100}else n=+e;return QL(n)&&(n=r),o&&n>t&&(n=t),n},aF=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},uF=function(e,t){return tF(e)&&tF(t)?function(n){return e+n*(t-e)}:function(){return t}};function lF(e,t,n){return e&&e.length?e.find((function(e){return e&&("function"==typeof t?t(e):zS(e,t))===n})):null}function sF(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 cF(e){return cF="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},cF(e)}var dF=["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"],fF=["points","pathLength"],hF={svg:["viewBox","children"],polygon:fF,polyline:fF},vF=["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"],pF=function(t,n){if(!t||"function"==typeof t||"boolean"==typeof t)return null;var r=t;if(e.isValidElement(t)&&(r=t.props),!ux(r))return null;var o={};return Object.keys(r).forEach((function(e){vF.includes(e)&&(o[e]=n||function(t){return r[e](r,t)})})),o},mF=function(e,t,n){if(!ux(e)||"object"!==cF(e))return null;var r=null;return Object.keys(e).forEach((function(o){var i=e[o];vF.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},bF=["children"],gF=["children"];function yF(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 wF(e){return wF="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},wF(e)}var xF={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},kF=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},OF=null,jF=null,SF=function t(n){if(n===OF&&uw(jF))return jF;var r=[];return e.Children.forEach(n,(function(e){kL(e)||(qL.isFragment(e)?r=r.concat(t(e.props.children)):r.push(e))})),jF=r,OF=n,r};function NF(e,t){var n=[],r=[];return r=uw(t)?t.map((function(e){return kF(e)})):[kF(t)],SF(e).forEach((function(e){var t=zS(e,"type.displayName")||zS(e,"type.name");-1!==r.indexOf(t)&&n.push(e)})),n}function MF(e,t){var n=NF(e,t);return n&&n[0]}var AF=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!tF(n)||n<=0||!tF(r)||r<=0)},CF=["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"],TF=function(e){return e&&"object"===wF(e)&&"cx"in e&&"cy"in e&&"r"in e},EF=function(t,n,r){if(!t||"function"==typeof t||"boolean"==typeof t)return null;var o=t;if(e.isValidElement(t)&&(o=t.props),!ux(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==hF?void 0:hF[r])&&void 0!==o?o:[];return!dx(e)&&(r&&i.includes(t)||dF.includes(t))||n&&vF.includes(t)})(null===(t=o)||void 0===t?void 0:t[e],e,n,r)&&(i[e]=o[e])})),i},PF=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 DF(uw(n)?n[0]:n,uw(r)?r[0]:r);for(var i=0;i<o;i++){var a=n[i],u=r[i];if(uw(a)||uw(u)){if(!t(a,u))return!1}else if(!DF(a,u))return!1}return!0},DF=function(e,t){if(kL(e)&&kL(t))return!0;if(!kL(e)&&!kL(t)){var n=e.props||{},r=n.children,o=yF(n,bF),i=t.props||{},a=i.children,u=yF(i,gF);return r&&a?sF(o,u)&&PF(r,a):!r&&!a&&sF(o,u)}return!1},IF=function(e,t){var n=[],r={};return SF(e).forEach((function(e,o){if(function(e){return e&&e.type&&hw(e.type)&&CF.indexOf(e.type)>=0}(e))n.push(e);else if(e){var i=kF(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},_F=["children","width","height","viewBox","className","style"];function RF(){return RF=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},RF.apply(this,arguments)}function LF(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 FF(t){var n=t.children,r=t.width,o=t.height,i=t.viewBox,a=t.className,u=t.style,l=LF(t,_F),s=i||{width:r,height:o,x:0,y:0},c=xL("recharts-surface",a);return e.createElement("svg",RF({},EF(l,!0,"svg"),{className:c,width:r,height:o,style:u,viewBox:"".concat(s.x," ").concat(s.y," ").concat(s.width," ").concat(s.height)}),e.createElement("title",null,t.title),e.createElement("desc",null,t.desc),n)}var BF=["children","className"];function zF(){return zF=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},zF.apply(this,arguments)}function $F(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 WF=e.forwardRef((function(t,n){var r=t.children,o=t.className,i=$F(t,BF),a=xL("recharts-layer",o);return e.createElement("g",zF({className:a},EF(i,!0),{ref:n}),r)}));var UF=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 HF=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1},VF=UF,qF=function(e){return e!=e},YF=HF;var XF=function(e,t,n){return t==t?YF(e,t,n):VF(e,qF,n)},GF=XF;var KF=function(e,t){return!!(null==e?0:e.length)&&GF(e,t,0)>-1};var ZF=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 QF=sj,JF=function(){},eB=QF&&1/DO(new QF([,-0]))[1]==1/0?function(e){return new QF(e)}:JF,tB=jO,nB=KF,rB=ZF,oB=NO,iB=eB,aB=DO;var uB=function(e,t,n){var r=-1,o=nB,i=e.length,a=!0,u=[],l=u;if(n)a=!1,o=rB;else if(i>=200){var s=t?null:iB(e);if(s)return aB(s);a=!1,o=oB,l=new tB}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},lB=gN,sB=uB;var cB=function(e,t){return e&&e.length?sB(e,lB(t)):[]},dB=qs(cB),fB=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 hB=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},vB=hB;var pB=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:vB(e,t,n)},mB=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var bB=function(e){return mB.test(e)};var gB=function(e){return e.split("")},yB="\\ud800-\\udfff",wB="["+yB+"]",xB="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",kB="\\ud83c[\\udffb-\\udfff]",OB="[^"+yB+"]",jB="(?:\\ud83c[\\udde6-\\uddff]){2}",SB="[\\ud800-\\udbff][\\udc00-\\udfff]",NB="(?:"+xB+"|"+kB+")"+"?",MB="[\\ufe0e\\ufe0f]?",AB=MB+NB+("(?:\\u200d(?:"+[OB,jB,SB].join("|")+")"+MB+NB+")*"),CB="(?:"+[OB+xB+"?",xB,jB,SB,wB].join("|")+")",TB=RegExp(kB+"(?="+kB+")|"+CB+AB,"g");var EB=function(e){return e.match(TB)||[]},PB=gB,DB=bB,IB=EB;var _B=function(e){return DB(e)?IB(e):PB(e)},RB=pB,LB=bB,FB=_B,BB=MS;var zB=function(e){return function(t){t=BB(t);var n=LB(t)?FB(t):void 0,r=n?n[0]:t.charAt(0),o=n?RB(n,1).join(""):t.slice(1);return r[e]()+o}},$B=qs(zB("toUpperCase"));function WB(e){return function(){return e}}const UB=Math.cos,HB=Math.sin,VB=Math.sqrt,qB=Math.PI,YB=2*qB,XB=Math.PI,GB=2*XB,KB=1e-6,ZB=GB-KB;function QB(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class JB{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?QB:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return QB;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>KB)if(Math.abs(c*u-l*s)>KB&&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),g=o*Math.tan((XB-Math.acos((v+d-p)/(2*m*b)))/2),y=g/b,w=g/m;Math.abs(y-1)>KB&&this._append`L${e+y*s},${t+y*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)>KB||Math.abs(this._y1-s)>KB)&&this._append`L${l},${s}`,n&&(d<0&&(d=d%GB+GB),d>ZB?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>KB&&this._append`A${n},${n},0,${+(d>=XB)},${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 ez(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 JB(t)}function tz(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function nz(e){this._context=e}function rz(e){return new nz(e)}function oz(e){return e[0]}function iz(e){return e[1]}function az(e,t){var n=WB(!0),r=null,o=rz,i=null,a=ez(u);function u(u){var l,s,c,d=(u=tz(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?oz:WB(e),t="function"==typeof t?t:void 0===t?iz:WB(t),u.x=function(t){return arguments.length?(e="function"==typeof t?t:WB(+t),u):e},u.y=function(e){return arguments.length?(t="function"==typeof e?e:WB(+e),u):t},u.defined=function(e){return arguments.length?(n="function"==typeof e?e:WB(!!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 uz(e,t,n){var r=null,o=WB(!0),i=null,a=rz,u=null,l=ez(s);function s(s){var c,d,f,h,v,p=(s=tz(s)).length,m=!1,b=new Array(p),g=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],g[f]);u.lineEnd(),u.areaEnd()}m&&(b[c]=+e(h,c,s),g[c]=+t(h,c,s),u.point(r?+r(h,c,s):b[c],n?+n(h,c,s):g[c]))}if(v)return u=null,v+""||null}function c(){return az().defined(o).curve(a).context(i)}return e="function"==typeof e?e:void 0===e?oz:WB(+e),t="function"==typeof t?t:WB(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?iz:WB(+n),s.x=function(t){return arguments.length?(e="function"==typeof t?t:WB(+t),r=null,s):e},s.x0=function(t){return arguments.length?(e="function"==typeof t?t:WB(+t),s):e},s.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:WB(+e),s):r},s.y=function(e){return arguments.length?(t="function"==typeof e?e:WB(+e),n=null,s):t},s.y0=function(e){return arguments.length?(t="function"==typeof e?e:WB(+e),s):t},s.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:WB(+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:WB(!!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}nz.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 lz{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 sz={draw(e,t){const n=VB(t/qB);e.moveTo(n,0),e.arc(0,0,n,0,YB)}},cz={draw(e,t){const n=VB(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 dz=VB(1/3),fz=2*dz;var hz={draw(e,t){const n=VB(t/fz),r=n*dz;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},vz={draw(e,t){const n=VB(t),r=-n/2;e.rect(r,r,n,n)}};const pz=HB(qB/10)/HB(7*qB/10),mz=HB(YB/10)*pz,bz=-UB(YB/10)*pz;var gz={draw(e,t){const n=VB(.8908130915292852*t),r=mz*n,o=bz*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const t=YB*i/5,a=UB(t),u=HB(t);e.lineTo(u*n,-a*n),e.lineTo(a*r-u*o,u*r+a*o)}e.closePath()}};const yz=VB(3);var wz={draw(e,t){const n=-VB(t/(3*yz));e.moveTo(0,2*n),e.lineTo(-yz*n,-n),e.lineTo(yz*n,-n),e.closePath()}};const xz=-.5,kz=VB(3)/2,Oz=1/VB(12),jz=3*(Oz/2+1);var Sz={draw(e,t){const n=VB(t/jz),r=n/2,o=n*Oz,i=r,a=n*Oz+n,u=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(u,l),e.lineTo(xz*r-kz*o,kz*r+xz*o),e.lineTo(xz*i-kz*a,kz*i+xz*a),e.lineTo(xz*u-kz*l,kz*u+xz*l),e.lineTo(xz*r+kz*o,xz*o-kz*r),e.lineTo(xz*i+kz*a,xz*a-kz*i),e.lineTo(xz*u+kz*l,xz*l-kz*u),e.closePath()}};function Nz(){}function Mz(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 Az(e){this._context=e}function Cz(e){this._context=e}function Tz(e){this._context=e}function Ez(e){this._context=e}function Pz(e){return e<0?-1:1}function Dz(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(Pz(i)+Pz(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(u))||0}function Iz(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function _z(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 Rz(e){this._context=e}function Lz(e){this._context=new Fz(e)}function Fz(e){this._context=e}function Bz(e){this._context=e}function zz(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 $z(e,t){this._context=e,this._t=t}function Wz(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 Uz(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Hz(e,t){return e[t]}function Vz(e){const t=[];return t.key=e,t}function qz(e){return qz="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},qz(e)}Az.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:Mz(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:Mz(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Cz.prototype={areaStart:Nz,areaEnd:Nz,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:Mz(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Tz.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:Mz(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Ez.prototype={areaStart:Nz,areaEnd:Nz,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))}},Rz.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:_z(this,this._t0,Iz(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,_z(this,Iz(this,n=Dz(this,e,t)),n);break;default:_z(this,this._t0,n=Dz(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Lz.prototype=Object.create(Rz.prototype)).point=function(e,t){Rz.prototype.point.call(this,t,e)},Fz.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)}},Bz.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=zz(e),o=zz(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)}},$z.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 Yz=["type","size","sizeType"];function Xz(){return Xz=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},Xz.apply(this,arguments)}function Gz(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){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gz(Object(n),!0).forEach((function(t){Zz(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zz(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==qz(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==qz(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===qz(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qz(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 Jz={symbolCircle:sz,symbolCross:cz,symbolDiamond:hz,symbolSquare:vz,symbolStar:gz,symbolTriangle:wz,symbolWye:Sz},e$=Math.PI/180,t$=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=Kz(Kz({},Qz(t,Yz)),{},{type:i,size:u,sizeType:s}),d=c.className,f=c.cx,h=c.cy,v=EF(c,!0);return f===+f&&h===+h&&u===+u?e.createElement("path",Xz({},v,{className:xL("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(h,")"),d:(n=function(e){var t="symbol".concat($B(e));return Jz[t]||sz}(i),r=function(e,t){let n=null,r=ez(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:WB(e||sz),t="function"==typeof t?t:WB(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:WB(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:WB(+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*e$;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 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)}function r$(){return r$=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},r$.apply(this,arguments)}function o$(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 i$(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,c$(r.key),r)}}function a$(e,t){return a$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a$(e,t)}function u$(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(xee){return!1}}();return function(){var n,r=l$(e);if(t){var o=l$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return 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 function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function l$(e){return l$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l$(e)}function s$(e,t,n){return(t=c$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c$(e){var t=function(e,t){if("object"!==n$(e)||null===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)}t$.registerSymbol=function(e,t){Jz["symbol".concat($B(e))]=t};var d$=32,f$=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&&a$(e,t)}(a,t);var n,r,o,i=u$(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return n=a,r=[{key:"renderIcon",value:function(t){var n=this.props.inactiveColor,r=16,o=d$/6,i=d$/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:d$,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(d$,"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(d$,"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?o$(Object(n),!0).forEach((function(t){s$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o$(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(t$,{fill:a,cx:r,cy:r,size:d$,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:d$,height:d$},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,d=n.formatter||a,f=xL((s$(i={"recharts-legend-item":!0},"legend-item-".concat(r),!0),s$(i,"inactive",n.inactive),i));if("none"===n.type)return null;var h=dx(n.value)?null:n.value;fB(!dx(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 v=n.inactive?u:n.color;return e.createElement("li",r$({className:f,style:s,key:"legend-item-".concat(r)},mF(t.props,n,r)),e.createElement(FF,{width:o,height:o,viewBox:l,style:c},t.renderIcon(n)),e.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},d?d(h,n,r):h))}))}},{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())}}],r&&i$(n.prototype,r),o&&i$(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);function h$(e){return h$="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},h$(e)}s$(f$,"displayName","Legend"),s$(f$,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var v$=["ref"];function p$(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 m$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p$(Object(n),!0).forEach((function(t){k$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b$(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,O$(r.key),r)}}function g$(e,t){return g$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g$(e,t)}function y$(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(xee){return!1}}();return function(){var n,r=x$(e);if(t){var o=x$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===h$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w$(e)}(this,n)}}function w$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x$(e){return x$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x$(e)}function k$(e,t,n){return(t=O$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O$(e){var t=function(e,t){if("object"!==h$(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==h$(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===h$(t)?t:String(t)}function j$(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 S$(e){return e.value}function N$(e,t){return!0===e?dB(t,S$):dx(e)?dB(t,e):t}var M$=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&&g$(e,t)}(a,t);var n,r,o,i=y$(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return k$(w$(e=i.call.apply(i,[this].concat(n))),"state",{boxWidth:-1,boxHeight:-1}),e}return n=a,o=[{key:"getWithHeight",value:function(e,t){var n=e.props.layout;return"vertical"===n&&tF(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}],(r=[{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:"getBBoxSnapshot",value:function(){var e=this.state,t=e.boxWidth,n=e.boxHeight;return t>=0&&n>=0?{width:t,height:n}:null}},{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:0}).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:0}).height)/2}:"bottom"===a?{bottom:u&&u.bottom||0}:{top:u&&u.top||0}),m$(m$({},t),n)}},{key:"updateBBox",value:function(){var e=this.state,t=e.boxWidth,n=e.boxHeight,r=this.props.onBBoxUpdate;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var o=this.wrapperNode.getBoundingClientRect();(Math.abs(o.width-t)>1||Math.abs(o.height-n)>1)&&this.setState({boxWidth:o.width,boxHeight:o.height},(function(){r&&r(o)}))}else-1===t&&-1===n||this.setState({boxWidth:-1,boxHeight:-1},(function(){r&&r(null)}))}},{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=m$(m$({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(dx(t))return e.createElement(t,n);n.ref;var r=j$(n,v$);return e.createElement(f$,r)}(r,m$(m$({},this.props),{},{payload:N$(u,l)})))}}])&&b$(n.prototype,r),o&&b$(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);k$(M$,"displayName","Legend"),k$(M$,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var A$=Object.getOwnPropertyNames,C$=Object.getOwnPropertySymbols,T$=Object.prototype.hasOwnProperty;function E$(e,t){return function(n,r,o){return e(n,r,o)&&t(n,r,o)}}function P$(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 D$(e){return A$(e).concat(C$(e))}var I$=Object.hasOwn||function(e,t){return T$.call(e,t)};function _$(e,t){return e||t?e===t:e===t||e!=e&&t!=t}var R$="_owner",L$=Object.getOwnPropertyDescriptor,F$=Object.keys;function B$(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 z$(e,t){return _$(e.getTime(),t.getTime())}function $$(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 W$(e,t,n){var r,o=F$(e),i=o.length;if(F$(t).length!==i)return!1;for(;i-- >0;){if((r=o[i])===R$&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof)return!1;if(!I$(t,r)||!n.equals(e[r],t[r],r,r,e,t,n))return!1}return!0}function U$(e,t,n){var r,o,i,a=D$(e),u=a.length;if(D$(t).length!==u)return!1;for(;u-- >0;){if((r=a[u])===R$&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof)return!1;if(!I$(t,r))return!1;if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;if(o=L$(e,r),i=L$(t,r),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable))return!1}return!0}function H$(e,t){return _$(e.valueOf(),t.valueOf())}function V$(e,t){return e.source===t.source&&e.flags===t.flags}function q$(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 Y$(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 X$="[object Arguments]",G$="[object Boolean]",K$="[object Date]",Z$="[object Map]",Q$="[object Number]",J$="[object Object]",eW="[object RegExp]",tW="[object Set]",nW="[object String]",rW=Array.isArray,oW="function"==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,iW=Object.assign,aW=Object.prototype.toString.call.bind(Object.prototype.toString);var uW=lW();function lW(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?U$:B$,areDatesEqual:z$,areMapsEqual:r?E$($$,U$):$$,areObjectsEqual:r?U$:W$,arePrimitiveWrappersEqual:H$,areRegExpsEqual:V$,areSetsEqual:r?E$(q$,U$):q$,areTypedArraysEqual:r?U$:Y$};if(n&&(o=iW({},o,n(o))),t){var i=P$(o.areArraysEqual),a=P$(o.areMapsEqual),u=P$(o.areObjectsEqual),l=P$(o.areSetsEqual);o=iW({},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(rW(e))return t(e,s,c);if(null!=oW&&oW(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=aW(e);return f===K$?n(e,s,c):f===eW?a(e,s,c):f===Z$?r(e,s,c):f===tW?u(e,s,c):f===J$?"function"!=typeof e.then&&"function"!=typeof s.then&&o(e,s,c):f===X$?o(e,s,c):(f===G$||f===Q$||f===nW)&&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 sW(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 cW(e){return cW="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},cW(e)}function dW(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 fW(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 fW(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 fW(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 hW(){var e=function(){return null},t=!1,n=function n(r){if(!t){if(Array.isArray(r)){if(!r.length)return;var o=dW(r),i=o[0],a=o.slice(1);return"number"==typeof i?void sW(n.bind(null,a),i):(n(i),void sW(n.bind(null,a)))}"object"===cW(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 vW(e){return vW="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},vW(e)}function pW(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 mW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pW(Object(n),!0).forEach((function(t){bW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==vW(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==vW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===vW(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}lW({strict:!0}),lW({circular:!0}),lW({circular:!0,strict:!0}),lW({createInternalComparator:function(){return _$}}),lW({strict:!0,createInternalComparator:function(){return _$}}),lW({circular:!0,createInternalComparator:function(){return _$}}),lW({circular:!0,createInternalComparator:function(){return _$},strict:!0});var gW=["Webkit","Moz","O","ms"],yW=["-webkit-","-moz-","-o-","-ms-"],wW=["transform","transformOrigin","transition"],xW=function(e){return e},kW=function(e,t){return Object.keys(t).reduce((function(n,r){return mW(mW({},n),{},bW({},r,e(r,t[r])))}),{})},OW=function(e){return Object.keys(e).reduce((function(e,t){return mW(mW({},e),function(e,t){if(-1===wW.indexOf(e))return bW({},e,Number.isNaN(t)?0:t);var n="transition"===e,r=e.replace(/(\w)/,(function(e){return e.toUpperCase()})),o=t;return gW.reduce((function(e,i,a){return n&&(o=t.replace(/(transform|transform-origin)/gim,"".concat(yW[a],"$1"))),mW(mW({},e),{},bW({},i+r,o))}),{})}(t,e[t]))}),e)},jW=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 SW(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(rse){s=!0,o=rse}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||MW(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 NW(e){return function(e){if(Array.isArray(e))return AW(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||MW(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 MW(e,t){if(e){if("string"==typeof e)return AW(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)?AW(e,t):void 0}}function AW(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 CW=1e-4,TW=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},EW=function(e,t){return e.map((function(e,n){return e*Math.pow(t,n)})).reduce((function(e,t){return e+t}))},PW=function(e,t){return function(n){var r=TW(e,t);return EW(r,n)}},DW=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=SW(l,4);r=s[0],o=s[1],i=s[2],a=s[3]}}var c,d,f=PW(r,i),h=PW(o,a),v=(c=r,d=i,function(e){var t=TW(c,d),n=[].concat(NW(t.map((function(e,t){return e*t})).slice(1)),[0]);return EW(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)<CW||a<CW)return h(r);r=(t=r-i/a)>1?1:t<0?0:t}return h(r)};return p.isStepper=!1,p},IW=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 DW(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)<CW&&Math.abs(i)<CW?[t,0]:[u,i]};return u.isStepper=!0,u.dt=a,u}();default:if("cubic-bezier"===r.split("(")[0])return DW(r)}return"function"==typeof r?r:null};function _W(e){return _W="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},_W(e)}function RW(e){return function(e){if(Array.isArray(e))return WW(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$W(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 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 FW(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){BW(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 BW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==_W(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==_W(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===_W(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zW(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(rse){s=!0,o=rse}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||$W(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 $W(e,t){if(e){if("string"==typeof e)return WW(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)?WW(e,t):void 0}}function WW(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 UW=function(e,t,n){return e+(t-e)*n},HW=function(e){return e.from!==e.to},VW=function e(t,n,r){var o=kW((function(e,n){if(HW(n)){var r=zW(t(n.from,n.to,n.velocity),2),o=r[0],i=r[1];return FW(FW({},n),{},{from:o,velocity:i})}return n}),n);return r<1?kW((function(e,t){return HW(t)?FW(FW({},t),{},{velocity:UW(t.velocity,o[e].velocity,r),from:UW(t.from,o[e].from,r)}):t}),n):e(t,o,r-1)},qW=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 FW(FW({},n),{},BW({},r,[e[r],t[r]]))}),{}),d=s.reduce((function(n,r){return FW(FW({},n),{},BW({},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=VW(n,d,i),o(FW(FW(FW({},e),t),kW((function(e,t){return t.from}),d))),u=r,Object.values(d).filter(HW).length&&(f=requestAnimationFrame(h))}:function(i){l||(l=i);var a=(i-l)/r,u=kW((function(e,t){return UW.apply(void 0,RW(t).concat([n(a)]))}),c);if(o(FW(FW(FW({},e),t),u)),a<1)f=requestAnimationFrame(h);else{var s=kW((function(e,t){return UW.apply(void 0,RW(t).concat([n(1)]))}),c);o(FW(FW(FW({},e),t),s))}},function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(f)}}};function YW(e){return YW="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},YW(e)}var XW=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function GW(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 KW(e){return function(e){if(Array.isArray(e))return ZW(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 ZW(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 ZW(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 ZW(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 QW(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 JW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QW(Object(n),!0).forEach((function(t){eU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function eU(e,t,n){return(t=nU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tU(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,nU(r.key),r)}}function nU(e){var t=function(e,t){if("object"!==YW(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==YW(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===YW(t)?t:String(t)}function rU(e,t){return rU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rU(e,t)}function oU(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(xee){return!1}}();return function(){var n,r=uU(e);if(t){var o=uU(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return iU(this,n)}}function iU(e,t){if(t&&("object"===YW(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return aU(e)}function aU(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uU(e){return uU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uU(e)}var lU=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&&rU(e,t)}(a,t);var n,r,o,i=oU(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(aU(n)),n.changeStyle=n.changeStyle.bind(aU(n)),!o||f<=0)return n.state={style:{}},"function"==typeof d&&(n.state={style:s}),iU(n);if(c&&c.length)n.state={style:c[0].style};else if(l){if("function"==typeof d)return n.state={style:l},iU(n);n.state={style:u?eU({},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(!(uW(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?eU({},o,c):c};(o&&[o]!==c||!o&&l!==c)&&this.setState(d)}this.runAnimation(JW(JW({},this.props),{},{from:c,begin:0}))}}else{var f={style:o?eU({},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=qW(n,r,IW(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(KW(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(KW(e),[t.runJSAnimation.bind(t,{from:d.style,to:l,duration:i,easing:u}),i]);var h=jW(f,i,u),v=JW(JW(JW({},d.style),l),{},{transition:h});return[].concat(KW(e),[v,i,c]).filter(xW)}),[a,Math.max(l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=hW());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?eU({},r,o):o,f=jW(Object.keys(d),n,i);c.start([a,t,JW(JW({},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=GW(t,XW),a=e.Children.count(n),u=OW(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,JW(JW({},i),{},{style:JW(JW({},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&&tU(n.prototype,r),o&&tU(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);lU.displayName="Animate",lU.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},lU.propTypes={from:LC.oneOfType([LC.object,LC.string]),to:LC.oneOfType([LC.object,LC.string]),attributeName:LC.string,duration:LC.number,begin:LC.number,easing:LC.oneOfType([LC.string,LC.func]),steps:LC.arrayOf(LC.shape({duration:LC.number.isRequired,style:LC.object.isRequired,easing:LC.oneOfType([LC.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),LC.func]),properties:LC.arrayOf("string"),onAnimationEnd:LC.func})),children:LC.oneOfType([LC.node,LC.func]),isActive:LC.bool,canBegin:LC.bool,onAnimationEnd:LC.func,shouldReAnimate:LC.bool,onAnimationStart:LC.func,onAnimationReStart:LC.func},void 0===Number.isFinite&&(Number.isFinite=function(e){return"number"==typeof e&&isFinite(e)}),LC.object,LC.object,LC.object,LC.element,LC.object,LC.object,LC.object,LC.oneOfType([LC.array,LC.element]),LC.any;var sU=Sw,cU=aw,dU=Xy?Xy.isConcatSpreadable:void 0;var fU=WO,hU=function(e){return cU(e)||sU(e)||!!(dU&&e&&e[dU])};var vU=function e(t,n,r,o,i){var a=-1,u=t.length;for(r||(r=hU),i||(i=[]);++a<u;){var l=t[a];n>0&&r(l)?n>1?e(l,n-1,r,o,i):fU(i,l):o||(i[i.length]=l)}return i};var pU=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e},mU=aS;var bU=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=mU(e),a=void 0!==t,u=null===t,l=t==t,s=mU(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 gU=function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var l=bU(o[r],i[r]);if(l)return r>=u?l:l*("desc"==n[r]?-1:1)}return e.index-t.index},yU=Fx,wU=LS,xU=gN,kU=jN,OU=pU,jU=Lw,SU=gU,NU=kx,MU=aw;var AU=function(e,t,n){t=t.length?yU(t,(function(e){return MU(e)?function(t){return wU(t,1===e.length?e[0]:e)}:e})):[NU];var r=-1;t=yU(t,jU(xU));var o=kU(e,(function(e,n,o){return{criteria:yU(t,(function(t){return t(e)})),index:++r,value:e}}));return OU(o,(function(e,t){return SU(e,t,n)}))};var CU=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)},TU=CU,EU=Math.max;var PU=function(e,t,n){return t=EU(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=EU(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),TU(e,this,u)}};var DU=function(e){return function(){return e}},IU=zN,_U=IU?function(e,t){return IU(e,"toString",{configurable:!0,enumerable:!1,value:DU(t),writable:!0})}:kx,RU=_U,LU=Date.now;var FU=function(e){var t=0,n=0;return function(){var r=LU(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},BU=FU(RU),zU=kx,$U=PU,WU=BU;var UU=function(e,t){return WU($U(e,t,zU),e+"")},HU=zx,VU=vx,qU=Tw,YU=ax;var XU=function(e,t,n){if(!YU(n))return!1;var r=typeof t;return!!("number"==r?VU(n)&&qU(t,n.length):"string"==r&&t in n)&&HU(n[t],e)},GU=vU,KU=AU,ZU=XU,QU=qs(UU((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ZU(e,t[0],t[1])?t=[]:n>2&&ZU(t[0],t[1],t[2])&&(t=[t[0]]),KU(e,GU(t,1),[])})));function JU(e){return JU="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},JU(e)}function eH(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 tH(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 tH(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 tH(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 nH(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 rH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nH(Object(n),!0).forEach((function(t){oH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==JU(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==JU(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===JU(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iH(e){return uw(e)&&nF(e[0])&&nF(e[1])?e.join(" ~ "):e}var aH=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=rH({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),g=rH({margin:0},s),y=!kL(p),w=y?p:"",x=xL("recharts-default-tooltip",h),k=xL("recharts-tooltip-label",v);return y&&m&&null!=c&&(w=m(p,c)),e.createElement("div",{className:x,style:b},e.createElement("p",{className:k,style:g},e.isValidElement(w)?w:"".concat(w)),function(){if(c&&c.length){var t=(f?QU(c,f):c).map((function(t,n){if("none"===t.type)return null;var o=rH({display:"block",paddingTop:4,paddingBottom:4,color:t.color||"#000"},u),i=t.formatter||d||iH,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=eH(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},nF(f)?e.createElement("span",{className:"recharts-tooltip-item-name"},f):null,nF(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}())},uH={isSsr:!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return uH[e]},set:function(e,t){if("string"==typeof e)uH[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){uH[t]=e[t]}))}}};function lH(e){return lH="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},lH(e)}function sH(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 cH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sH(Object(n),!0).forEach((function(t){mH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dH(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,bH(r.key),r)}}function fH(e,t){return fH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fH(e,t)}function hH(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(xee){return!1}}();return function(){var n,r=pH(e);if(t){var o=pH(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===lH(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return vH(e)}(this,n)}}function vH(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pH(e){return pH=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pH(e)}function mH(e,t,n){return(t=bH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bH(e){var t=function(e,t){if("object"!==lH(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==lH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===lH(t)?t:String(t)}var gH="recharts-tooltip-wrapper";function yH(e){return e.dataKey}var wH=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&&fH(e,t)}(a,t);var n,r,o,i=hH(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return mH(vH(e=i.call.apply(i,[this].concat(n))),"state",{boxWidth:-1,boxHeight:-1,dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),mH(vH(e),"handleKeyDown",(function(t){"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:cH(cH({},e.state.dismissedAtCoordinate),{},{x:e.props.coordinate.x,y:e.props.coordinate.y})})})),mH(vH(e),"getTranslate",(function(t){var n=t.key,r=t.tooltipDimension,o=t.viewBoxDimension,i=e.props,a=i.allowEscapeViewBox,u=i.reverseDirection,l=i.coordinate,s=i.offset,c=i.position,d=i.viewBox;if(c&&tF(c[n]))return c[n];var f=l[n]-r-s,h=l[n]+s;return a[n]?u[n]?f:h:u[n]?f<d[n]?Math.max(h,d[n]):Math.max(f,d[n]):h+r>d[n]+o?Math.max(f,d[n]):Math.max(h,d[n])})),e}return n=a,r=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"updateBBox",value:function(){var e=this.state,t=e.boxWidth,n=e.boxHeight;if(e.dismissed?(document.removeEventListener("keydown",this.handleKeyDown),this.props.coordinate.x===this.state.dismissedAtCoordinate.x&&this.props.coordinate.y===this.state.dismissedAtCoordinate.y||this.setState({dismissed:!1})):document.addEventListener("keydown",this.handleKeyDown),this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-t)>1||Math.abs(r.height-n)>1)&&this.setState({boxWidth:r.width,boxHeight:r.height})}else-1===t&&-1===n||this.setState({boxWidth:-1,boxHeight:-1})}},{key:"render",value:function(){var t,n,r,o=this,i=this.props,a=i.payload,u=i.isAnimationActive,l=i.animationDuration,s=i.animationEasing,c=i.filterNull,d=function(e,t){return!0===e?dB(t,yH):dx(e)?dB(t,e):t}(i.payloadUniqBy,c&&a&&a.length?a.filter((function(e){return!kL(e.value)})):a),f=d&&d.length,h=this.props,v=h.content,p=h.viewBox,m=h.coordinate,b=h.position,g=h.active,y=h.wrapperStyle,w=cH({pointerEvents:"none",visibility:!this.state.dismissed&&g&&f?"visible":"hidden",position:"absolute",top:0,left:0},y);if(b&&tF(b.x)&&tF(b.y))n=b.x,r=b.y;else{var x=this.state,k=x.boxWidth,O=x.boxHeight;k>0&&O>0&&m?(n=this.getTranslate({key:"x",tooltipDimension:k,viewBoxDimension:p.width}),r=this.getTranslate({key:"y",tooltipDimension:O,viewBoxDimension:p.height})):w.visibility="hidden"}w=cH(cH({},OW({transform:this.props.useTranslate3d?"translate3d(".concat(n,"px, ").concat(r,"px, 0)"):"translate(".concat(n,"px, ").concat(r,"px)")})),w),u&&g&&(w=cH(cH({},OW({transition:"transform ".concat(l,"ms ").concat(s)})),w));var j=xL(gH,(mH(t={},"".concat(gH,"-right"),tF(n)&&m&&tF(m.x)&&n>=m.x),mH(t,"".concat(gH,"-left"),tF(n)&&m&&tF(m.x)&&n<m.x),mH(t,"".concat(gH,"-bottom"),tF(r)&&m&&tF(m.y)&&r>=m.y),mH(t,"".concat(gH,"-top"),tF(r)&&m&&tF(m.y)&&r<m.y),t));return e.createElement("div",{tabIndex:-1,role:"dialog",className:j,style:w,ref:function(e){o.wrapperNode=e}},function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):dx(t)?e.createElement(t,n):e.createElement(aH,n)}(v,cH(cH({},this.props),{},{payload:d})))}}],r&&dH(n.prototype,r),o&&dH(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);mH(wH,"displayName","Tooltip"),mH(wH,"defaultProps",{active:!1,allowEscapeViewBox:{x:!1,y:!1},reverseDirection:{x:!1,y:!1},offset:10,viewBox:{x:0,y:0,height:0,width:0},coordinate:{x:0,y:0},cursorStyle:{},separator:" : ",wrapperStyle:{},contentStyle:{},itemStyle:{},labelStyle:{},cursor:!0,trigger:"hover",isAnimationActive:!uH.isSsr,animationEasing:"ease",animationDuration:400,filterNull:!0,useTranslate3d:!1});var xH=Yy,kH=/\s/;var OH=function(e){for(var t=e.length;t--&&kH.test(e.charAt(t)););return t},jH=OH,SH=/^\s+/;var NH=function(e){return e?e.slice(0,jH(e)+1).replace(SH,""):e},MH=NH,AH=ax,CH=aS,TH=/^[-+]0x[0-9a-f]+$/i,EH=/^0b[01]+$/i,PH=/^0o[0-7]+$/i,DH=parseInt;var IH=function(e){if("number"==typeof e)return e;if(CH(e))return NaN;if(AH(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=AH(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=MH(e);var n=EH.test(e);return n||PH.test(e)?DH(e.slice(2),n?2:8):TH.test(e)?NaN:+e},_H=ax,RH=function(){return xH.Date.now()},LH=IH,FH=Math.max,BH=Math.min;var zH=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=RH();if(v(e))return m(e);u=setTimeout(p,function(e){var n=t-(e-l);return d?BH(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=RH(),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=LH(t)||0,_H(n)&&(c=!!n.leading,i=(d="maxWait"in n)?FH(LH(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(RH())},b},$H=qs(zH),WH=zH,UH=ax;var HH=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return UH(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),WH(e,t,{leading:r,maxWait:t,trailing:o})},VH=qs(HH),qH=function(e,t){return qH=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},qH(e,t)};var YH=function(e){return"function"==typeof e},XH=function(){return"undefined"==typeof window},GH=function(e){return e instanceof Element||e instanceof HTMLDocument},KH=function(n){function r(r){var o=n.call(this,r)||this;o.cancelHandler=function(){o.resizeHandler&&o.resizeHandler.cancel&&(o.resizeHandler.cancel(),o.resizeHandler=null)},o.attachObserver=function(){var e=o.props,t=e.targetRef,n=e.observerOptions;if(!XH()){t&&t.current&&(o.targetRef.current=t.current);var r=o.getElement();r&&(o.observableElement&&o.observableElement===r||(o.observableElement=r,o.resizeObserver.observe(r,n)))}},o.getElement=function(){var e=o.props,n=e.querySelector,r=e.targetDomEl;if(XH())return null;if(n)return document.querySelector(n);if(r&&GH(r))return r;if(o.targetRef&&GH(o.targetRef.current))return o.targetRef.current;var i=t.findDOMNode(o);if(!i)return null;switch(o.getRenderType()){case"renderProp":case"childFunction":case"child":case"childArray":return i;default:return i.parentElement}},o.createResizeHandler=function(e){var t=o.props,n=t.handleWidth,r=void 0===n||n,i=t.handleHeight,a=void 0===i||i,u=t.onResize;if(r||a){var l=function(e,t,n){return function(r){var o=r.width,i=r.height;e((function(e){return e.width===o&&e.height===i||e.width===o&&!n||e.height===i&&!t?e:{width:o,height:i}}))}}((function(e){return o.setState(e,(function(){return null==u?void 0:u(o.state.width,o.state.height)}))}),r,a);e.forEach((function(e){var t=e&&e.contentRect||{},n=t.width,r=t.height;!o.skipOnMount&&!XH()&&l({width:n,height:r}),o.skipOnMount=!1}))}},o.getRenderType=function(){var t=o.props,n=t.render,r=t.children;return YH(n)?"renderProp":YH(r)?"childFunction":e.isValidElement(r)?"child":Array.isArray(r)?"childArray":"parent"};var i=r.skipOnMount,a=r.refreshMode,u=r.refreshRate,l=void 0===u?1e3:u,s=r.refreshOptions;return o.state={width:void 0,height:void 0},o.skipOnMount=i,o.targetRef=e.createRef(),o.observableElement=null,XH()||(o.resizeHandler=function(e,t,n,r){switch(t){case"debounce":return $H(e,n,r);case"throttle":return VH(e,n,r);default:return e}}(o.createResizeHandler,a,l,s),o.resizeObserver=new window.ResizeObserver(o.resizeHandler)),o}return function(e,t){function n(){this.constructor=e}qH(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(r,n),r.prototype.componentDidMount=function(){this.attachObserver()},r.prototype.componentDidUpdate=function(){this.attachObserver()},r.prototype.componentWillUnmount=function(){XH()||(this.observableElement=null,this.resizeObserver.disconnect(),this.cancelHandler())},r.prototype.render=function(){var t=this.props,n=t.render,r=t.children,o=t.nodeType,i=void 0===o?"div":o,a=this.state,u={width:a.width,height:a.height,targetRef:this.targetRef};switch(this.getRenderType()){case"renderProp":return null==n?void 0:n(u);case"childFunction":var l=r;return null==l?void 0:l(u);case"child":var s=r;if(s.type&&"string"==typeof s.type){var c=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}(u,["targetRef"]);return e.cloneElement(s,c)}return e.cloneElement(s,u);case"childArray":return r.map((function(t){return!!t&&e.cloneElement(t,u)}));default:return e.createElement(i,null)}},r}(e.PureComponent);function ZH(e){return ZH="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},ZH(e)}function QH(){return QH=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},QH.apply(this,arguments)}function JH(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 eV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JH(Object(n),!0).forEach((function(t){tV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tV(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==ZH(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ZH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ZH(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nV(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 rV(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 rV(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 rV(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 oV=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,g=t.className,y=t.onResize,w=t.style,x=void 0===w?{}:w,k=nV(e.useState({containerWidth:i.width,containerHeight:i.height}),2),O=k[0],j=k[1],S=e.useRef(null);e.useImperativeHandle(n,(function(){return S}),[S]);var N=e.useCallback((function(){return S.current?{containerWidth:S.current.clientWidth,containerHeight:S.current.clientHeight}:null}),[]),M=e.useCallback((function(){var e=N();if(e){var t=e.containerWidth,n=e.containerHeight;y&&y(t,n),j((function(e){var r=e.containerWidth,o=e.containerHeight;return t!==r||n!==o?{containerWidth:t,containerHeight:n}:e}))}}),[N,y]),A=e.useMemo((function(){var t=O.containerWidth,n=O.containerHeight;if(t<0||n<0)return null;fB(eF(u)||eF(s),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",u,s),fB(!r||r>0,"The aspect(%s) must be greater than zero.",r);var o=eF(u)?t:u,i=eF(s)?n:s;return r&&r>0&&(o?i=o/r:i&&(o=i*r),h&&i>h&&(i=h)),fB(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),e.cloneElement(v,{width:o,height:i})}),[r,v,s,h,f,d,O,u]);e.useEffect((function(){var e=N();e&&j(e)}),[N]);var C=eV(eV({},x),{},{width:u,height:s,minWidth:d,minHeight:f,maxHeight:h});return e.createElement(KH,{handleWidth:!0,handleHeight:!0,onResize:M,targetRef:S,refreshMode:m>0?"debounce":void 0,refreshRate:m},e.createElement("div",QH({},null!=b?{id:"".concat(b)}:{},{className:xL("recharts-responsive-container",g),style:C,ref:S}),A))})),iV=function(e){return null};function aV(e){return aV="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},aV(e)}function uV(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 lV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uV(Object(n),!0).forEach((function(t){sV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sV(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==aV(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==aV(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===aV(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cV(e){return function(e){if(Array.isArray(e))return dV(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 dV(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 dV(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 dV(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}iV.displayName="Cell";var fV={widthCache:{},cacheCount:0},hV={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},vV=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","lineHeight","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],pV="recharts_measurement_span";var mV=function(e){return Object.keys(e).reduce((function(t,n){return"".concat(t).concat((i=n,i.split("").reduce((function(e,t){return t===t.toUpperCase()?[].concat(cV(e),["-",t.toLowerCase()]):[].concat(cV(e),[t])}),[]).join("")),":").concat((r=n,o=e[n],vV.indexOf(r)>=0&&o===+o?"".concat(o,"px"):o),";");var r,o,i}),"")},bV=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||uH.isSsr)return{width:0,height:0};var n="".concat(e),r=mV(t),o="".concat(n,"-").concat(r);if(fV.widthCache[o])return fV.widthCache[o];try{var i=document.getElementById(pV);i||((i=document.createElement("span")).setAttribute("id",pV),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var a=lV(lV({},hV),t);Object.keys(a).map((function(e){return i.style[e]=a[e],e})),i.textContent=n;var u=i.getBoundingClientRect(),l={width:u.width,height:u.height};return fV.widthCache[o]=l,++fV.cacheCount>2e3&&(fV.cacheCount=0,fV.widthCache={}),l}catch(xee){return{width:0,height:0}}};function gV(e){return gV="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},gV(e)}function yV(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 wV(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 wV(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 wV(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 xV(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,(o=r.key,i=void 0,i=function(e,t){if("object"!==gV(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==gV(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===gV(i)?i:String(i)),r)}var o,i}var kV=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,OV=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,jV=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,SV=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,NV={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},MV=Object.keys(NV),AV="NaN";var CV=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||jV.test(n)||(this.num=NaN,this.unit=""),MV.includes(n)&&(this.num=function(e,t){return e*NV[t]}(t,n),this.unit="px")}var t,n,r;return t=e,r=[{key:"parse",value:function(t){var n,r=yV(null!==(n=SV.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)}}])&&xV(t.prototype,n),r&&xV(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function TV(e){if(e.includes(AV))return AV;for(var t=e;t.includes("*")||t.includes("/");){var n,r=yV(null!==(n=kV.exec(t))&&void 0!==n?n:[],4),o=r[1],i=r[2],a=r[3],u=CV.parse(null!=o?o:""),l=CV.parse(null!=a?a:""),s="*"===i?u.multiply(l):u.divide(l);if(s.isNaN())return AV;t=t.replace(kV,s.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,d=yV(null!==(c=OV.exec(t))&&void 0!==c?c:[],4),f=d[1],h=d[2],v=d[3],p=CV.parse(null!=f?f:""),m=CV.parse(null!=v?v:""),b="+"===h?p.add(m):p.subtract(m);if(b.isNaN())return AV;t=t.replace(OV,b.toString())}return t}var EV=/\(([^()]*)\)/;function PV(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t=e;t.includes("(");){var n=yV(EV.exec(t),2)[1];t=t.replace(EV,TV(n))}return t}(t),t=TV(t)}function DV(e){var t=function(e){try{return PV(e)}catch(xee){return AV}}(e.slice(5,-1));return t===AV?"":t}var IV=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],_V=["dx","dy","angle","className","breakAll"];function RV(){return RV=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},RV.apply(this,arguments)}function LV(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 FV(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 BV(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 BV(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 BV(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 zV=/[ \f\n\r\t\v\u2028\u2029]+/,$V=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var o=[];return kL(t)||(o=n?t.toString().split(""):t.toString().split(zV)),{wordsWithComputedWidth:o.map((function(e){return{word:e,width:bV(e,r).width}})),spaceWidth:n?0:bV(" ",r).width}}catch(xee){return null}},WV=function(e){return[{words:kL(e)?[]:e.toString().split(zV)}]},UV=function(e){var t=e.width,n=e.scaleToFit,r=e.children,o=e.style,i=e.breakAll,a=e.maxLines;if((t||n)&&!uH.isSsr){var u=$V({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=tF(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=$V({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 g=Math.floor((p+m)/2),y=FV(v(g-1),2),w=y[0],x=y[1],k=FV(v(g),1)[0];if(w||k||(p=g+1),w&&k&&(m=g-1),!w&&k){h=x;break}b++}return h||f}({breakAll:i,children:r,maxLines:a,style:o},u.wordsWithComputedWidth,u.spaceWidth,t,n):WV(r)}return WV(r)},HV="#808080",VV=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?HV:m,g=LV(t,IV),y=e.useMemo((function(){return UV({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:d,style:g.style,width:g.width})}),[g.breakAll,g.children,g.maxLines,d,g.style,g.width]),w=g.dx,x=g.dy,k=g.angle,O=g.className,j=g.breakAll,S=LV(g,_V);if(!nF(r)||!nF(i))return null;var N,M=r+(tF(w)?w:0),A=i+(tF(x)?x:0);switch(p){case"start":N=DV("calc(".concat(s,")"));break;case"middle":N=DV("calc(".concat((y.length-1)/2," * -").concat(u," + (").concat(s," / 2))"));break;default:N=DV("calc(".concat(y.length-1," * -").concat(u,")"))}var C=[];if(d){var T=y[0].width,E=g.width;C.push("scale(".concat((tF(E)?E/T:1)/T,")"))}return k&&C.push("rotate(".concat(k,", ").concat(M,", ").concat(A,")")),C.length&&(S.transform=C.join(" ")),e.createElement("text",RV({},EF(S,!0),{x:M,y:A,className:xL("recharts-text",O),textAnchor:h,fill:b.includes("url")?HV:b}),y.map((function(t,n){return e.createElement("tspan",{x:M,dy:0===n?N:u,key:n},t.words.join(j?"":" "))})))},qV=Hj;var YV=qs((function(e,t){return qV(e,t)})),XV=aS;var GV=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&&!XV(a):n(a,u)))var u=a,l=i}return l};var KV=function(e,t){return e>t},ZV=GV,QV=KV,JV=kx;var eq=function(e){return e&&e.length?ZV(e,JV,QV):void 0},tq=qs(eq);var nq=function(e,t){return e<t},rq=GV,oq=nq,iq=kx;var aq=function(e){return e&&e.length?rq(e,iq,oq):void 0},uq=qs(aq),lq=vU,sq=CN;var cq=qs((function(e,t){return lq(sq(e,t),1)}));function dq(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function fq(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function hq(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=dq,n=(t,n)=>dq(e(t),n),r=(t,n)=>e(t)-n):(t=e===dq||e===fq?e:vq,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 vq(){return 0}function pq(e){return null===e?NaN:+e}const mq=hq(dq).right;hq(pq).center;var bq=mq;class gq extends Map{constructor(e,t=wq){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(yq(this,e))}has(e){return super.has(yq(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 yq({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function wq(e){return null!==e&&"object"==typeof e?e.valueOf():e}function xq(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const kq=Math.sqrt(50),Oq=Math.sqrt(10),jq=Math.sqrt(2);function Sq(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>=kq?10:i>=Oq?5:i>=jq?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?Sq(e,t,2*n):[u,l,s]}function Nq(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[o,i,a]=r?Sq(t,e,n):Sq(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 Mq(e,t,n){return Sq(e=+e,t=+t,n=+n)[2]}function Aq(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?Mq(t,e,n):Mq(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function Cq(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 Tq(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 Eq(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?xq:function(e=dq){if(e===dq)return xq;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);Eq(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(Pq(e,n,t),o(e[r],i)>0&&Pq(e,n,r);a<u;){for(Pq(e,a,u),++a,--u;o(e[a],i)<0;)++a;for(;o(e[u],i)>0;)--u}0===o(e[n],i)?Pq(e,n,u):(++u,Pq(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Pq(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Dq(e,t,n=pq){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 Iq(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function _q(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 Rq=Symbol("implicit");function Lq(){var e=new gq,t=[],n=[],r=Rq;function o(o){let i=e.get(o);if(void 0===i){if(r!==Rq)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 gq;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 Lq(t,n).unknown(r)},Iq.apply(o,arguments),o}function Fq(){var e,t,n=Lq().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 Fq(r(),[i,a]).round(u).paddingInner(l).paddingOuter(s).align(c)},Iq.apply(d(),arguments)}function Bq(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Bq(t())},e}function zq(){return Bq(Fq.apply(null,arguments).paddingInner(1))}function $q(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Wq(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Uq(){}var Hq=.7,Vq=1/Hq,qq="\\s*([+-]?\\d+)\\s*",Yq="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xq="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Gq=/^#([0-9a-f]{3,8})$/,Kq=new RegExp(`^rgb\\(${qq},${qq},${qq}\\)$`),Zq=new RegExp(`^rgb\\(${Xq},${Xq},${Xq}\\)$`),Qq=new RegExp(`^rgba\\(${qq},${qq},${qq},${Yq}\\)$`),Jq=new RegExp(`^rgba\\(${Xq},${Xq},${Xq},${Yq}\\)$`),eY=new RegExp(`^hsl\\(${Yq},${Xq},${Xq}\\)$`),tY=new RegExp(`^hsla\\(${Yq},${Xq},${Xq},${Yq}\\)$`),nY={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 rY(){return this.rgb().formatHex()}function oY(){return this.rgb().formatRgb()}function iY(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Gq.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?aY(t):3===n?new sY(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?uY(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?uY(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=Kq.exec(e))?new sY(t[1],t[2],t[3],1):(t=Zq.exec(e))?new sY(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Qq.exec(e))?uY(t[1],t[2],t[3],t[4]):(t=Jq.exec(e))?uY(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=eY.exec(e))?pY(t[1],t[2]/100,t[3]/100,1):(t=tY.exec(e))?pY(t[1],t[2]/100,t[3]/100,t[4]):nY.hasOwnProperty(e)?aY(nY[e]):"transparent"===e?new sY(NaN,NaN,NaN,0):null}function aY(e){return new sY(e>>16&255,e>>8&255,255&e,1)}function uY(e,t,n,r){return r<=0&&(e=t=n=NaN),new sY(e,t,n,r)}function lY(e,t,n,r){return 1===arguments.length?function(e){return e instanceof Uq||(e=iY(e)),e?new sY((e=e.rgb()).r,e.g,e.b,e.opacity):new sY}(e):new sY(e,t,n,null==r?1:r)}function sY(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function cY(){return`#${vY(this.r)}${vY(this.g)}${vY(this.b)}`}function dY(){const e=fY(this.opacity);return`${1===e?"rgb(":"rgba("}${hY(this.r)}, ${hY(this.g)}, ${hY(this.b)}${1===e?")":`, ${e})`}`}function fY(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hY(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vY(e){return((e=hY(e))<16?"0":"")+e.toString(16)}function pY(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new bY(e,t,n,r)}function mY(e){if(e instanceof bY)return new bY(e.h,e.s,e.l,e.opacity);if(e instanceof Uq||(e=iY(e)),!e)return new bY;if(e instanceof bY)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 bY(a,u,l,e.opacity)}function bY(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function gY(e){return(e=(e||0)%360)<0?e+360:e}function yY(e){return Math.max(0,Math.min(1,e||0))}function wY(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}$q(Uq,iY,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rY,formatHex:rY,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return mY(this).formatHsl()},formatRgb:oY,toString:oY}),$q(sY,lY,Wq(Uq,{brighter(e){return e=null==e?Vq:Math.pow(Vq,e),new sY(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Hq:Math.pow(Hq,e),new sY(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new sY(hY(this.r),hY(this.g),hY(this.b),fY(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:cY,formatHex:cY,formatHex8:function(){return`#${vY(this.r)}${vY(this.g)}${vY(this.b)}${vY(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:dY,toString:dY})),$q(bY,(function(e,t,n,r){return 1===arguments.length?mY(e):new bY(e,t,n,null==r?1:r)}),Wq(Uq,{brighter(e){return e=null==e?Vq:Math.pow(Vq,e),new bY(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Hq:Math.pow(Hq,e),new bY(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 sY(wY(e>=240?e-240:e+120,o,r),wY(e,o,r),wY(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new bY(gY(this.h),yY(this.s),yY(this.l),fY(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=fY(this.opacity);return`${1===e?"hsl(":"hsla("}${gY(this.h)}, ${100*yY(this.s)}%, ${100*yY(this.l)}%${1===e?")":`, ${e})`}`}}));var xY=e=>()=>e;function kY(e){return 1==(e=+e)?OY: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):xY(isNaN(t)?n:t)}}function OY(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):xY(isNaN(e)?t:e)}var jY=function e(t){var n=kY(t);function r(e,t){var r=n((e=lY(e)).r,(t=lY(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=OY(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 SY(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 NY(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]=DY(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 MY(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function AY(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function CY(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]=DY(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var TY=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,EY=new RegExp(TY.source,"g");function PY(e,t){var n,r,o,i=TY.lastIndex=EY.lastIndex=0,a=-1,u=[],l=[];for(e+="",t+="";(n=TY.exec(e))&&(r=EY.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:AY(n,r)})),i=EY.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 DY(e,t){var n,r=typeof t;return null==t||"boolean"===r?xY(t):("number"===r?AY:"string"===r?(n=iY(t))?(t=n,jY):PY:t instanceof iY?jY:t instanceof Date?MY:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?SY:Array.isArray(t)?NY:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?CY:AY)(e,t)}function IY(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function _Y(e,t){void 0===t&&(t=e,e=DY);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 RY(e){return+e}var LY=[0,1];function FY(e){return e}function BY(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function zY(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=BY(o,r),i=n(a,i)):(r=BY(r,o),i=n(i,a)),function(e){return i(r(e))}}function $Y(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]=BY(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=bq(e,t,1,r)-1;return i[n](o[n](t))}}function WY(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function UY(){var e,t,n,r,o,i,a=LY,u=LY,l=DY,s=FY;function c(){var e=Math.min(a.length,u.length);return s!==FY&&(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?$Y:zY,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),AY)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,RY),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=IY,c()},d.clamp=function(e){return arguments.length?(s=!!e||FY,c()):s!==FY},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 HY(){return UY()(FY,FY)}function VY(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 qY(e){return(e=VY(Math.abs(e)))?e[1]:NaN}var YY,XY=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function GY(e){if(!(t=XY.exec(e)))throw new Error("invalid format: "+e);var t;return new KY({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 KY(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 ZY(e,t){var n=VY(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")}GY.prototype=KY.prototype,KY.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 QY={"%":(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)=>ZY(100*e,t),r:ZY,s:function(e,t){var n=VY(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(YY=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")+VY(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function JY(e){return e}var eX,tX,nX,rX=Array.prototype.map,oX=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function iX(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?JY:(t=rX.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?JY:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(rX.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=GY(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,g=e.type;"n"===g?(p=!0,g="g"):QY[g]||(void 0===m&&(m=12),b=!0,g="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var y="$"===f?o:"#"===f&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",w="$"===f?i:/[%p]/.test(g)?l:"",x=QY[g],k=/[defgprs%]/.test(g);function O(e){var o,i,l,f=y,O=w;if("c"===g)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"===g?oX[8+YY/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(g)?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=GY(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(qY(t)/3))),o=Math.pow(10,-r),i=oX[8+r/3];return function(e){return n(o*e)+i}}}}function aX(e,t,n,r){var o,i=Aq(e,t,n);switch((r=GY(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(qY(t)/3)))-qY(Math.abs(e)))}(i,a))||(r.precision=o),nX(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,qY(t)-qY(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,-qY(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return tX(r)}function uX(e){var t=e.domain;return e.ticks=function(e){var n=t();return Nq(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return aX(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=Mq(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 lX(){var e=HY();return e.copy=function(){return WY(e,lX())},Iq.apply(e,arguments),uX(e)}function sX(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 cX(e){return Math.log(e)}function dX(e){return Math.exp(e)}function fX(e){return-Math.log(-e)}function hX(e){return-Math.exp(-e)}function vX(e){return isFinite(e)?+("1e"+e):e<0?0:e}function pX(e){return(t,n)=>-e(-t,n)}function mX(e){const t=e(cX,dX),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?vX:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=pX(r),o=pX(o),e(fX,hX)):e(cX,dX),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=Nq(a,u,h))}else v=Nq(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=GY(n)).precision||(n.trim=!0),n=tX(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(sX(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}function bX(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function gX(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function yX(e){var t=1,n=e(bX(t),gX(t));return n.constant=function(n){return arguments.length?e(bX(t=+n),gX(t)):t},uX(n)}function wX(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function xX(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function kX(e){return e<0?-e*e:e*e}function OX(e){var t=e(FY,FY),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(FY,FY):.5===n?e(xX,kX):e(wX(n),wX(1/n)):n},uX(t)}function jX(){var e=OX(UY());return e.copy=function(){return WY(e,jX()).exponent(e.exponent())},Iq.apply(e,arguments),e}function SX(e){return Math.sign(e)*e*e}eX=iX({thousands:",",grouping:[3],currency:["$",""]}),tX=eX.format,nX=eX.formatPrefix;const NX=new Date,MX=new Date;function AX(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=>AX((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)=>(NX.setTime(+t),MX.setTime(+r),e(NX),e(MX),Math.floor(n(NX,MX))),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 CX=AX((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));CX.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?AX((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):CX:null),CX.range;const TX=1e3,EX=6e4,PX=36e5,DX=864e5,IX=6048e5,_X=2592e6,RX=31536e6,LX=AX((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*TX)}),((e,t)=>(t-e)/TX),(e=>e.getUTCSeconds()));LX.range;const FX=AX((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*TX)}),((e,t)=>{e.setTime(+e+t*EX)}),((e,t)=>(t-e)/EX),(e=>e.getMinutes()));FX.range;const BX=AX((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*EX)}),((e,t)=>(t-e)/EX),(e=>e.getUTCMinutes()));BX.range;const zX=AX((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*TX-e.getMinutes()*EX)}),((e,t)=>{e.setTime(+e+t*PX)}),((e,t)=>(t-e)/PX),(e=>e.getHours()));zX.range;const $X=AX((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*PX)}),((e,t)=>(t-e)/PX),(e=>e.getUTCHours()));$X.range;const WX=AX((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*EX)/DX),(e=>e.getDate()-1));WX.range;const UX=AX((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/DX),(e=>e.getUTCDate()-1));UX.range;const HX=AX((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/DX),(e=>Math.floor(e/DX)));function VX(e){return AX((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())*EX)/IX))}HX.range;const qX=VX(0),YX=VX(1),XX=VX(2),GX=VX(3),KX=VX(4),ZX=VX(5),QX=VX(6);function JX(e){return AX((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)/IX))}qX.range,YX.range,XX.range,GX.range,KX.range,ZX.range,QX.range;const eG=JX(0),tG=JX(1),nG=JX(2),rG=JX(3),oG=JX(4),iG=JX(5),aG=JX(6);eG.range,tG.range,nG.range,rG.range,oG.range,iG.range,aG.range;const uG=AX((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()));uG.range;const lG=AX((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()));lG.range;const sG=AX((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()));sG.every=e=>isFinite(e=Math.floor(e))&&e>0?AX((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,sG.range;const cG=AX((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 dG(e,t,n,r,o,i){const a=[[LX,1,TX],[LX,5,5e3],[LX,15,15e3],[LX,30,3e4],[i,1,EX],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,PX],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,DX],[r,2,1728e5],[n,1,IX],[t,1,_X],[t,3,7776e6],[e,1,RX]];function u(t,n,r){const o=Math.abs(n-t)/r,i=hq((([,,e])=>e)).right(a,o);if(i===a.length)return e.every(Aq(t/RX,n/RX,r));if(0===i)return CX.every(Math.max(Aq(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]}cG.every=e=>isFinite(e=Math.floor(e))&&e>0?AX((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,cG.range;const[fG,hG]=dG(cG,lG,eG,HX,$X,BX),[vG,pG]=dG(sG,uG,qX,WX,zX,FX);function mG(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 bG(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 gG(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var yG,wG,xG,kG={"-":"",_:" ",0:"0"},OG=/^\s*\d+/,jG=/^%/,SG=/[\\^$*+?|[\]().{}]/g;function NG(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 MG(e){return e.replace(SG,"\\$&")}function AG(e){return new RegExp("^(?:"+e.map(MG).join("|")+")","i")}function CG(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function TG(e,t,n){var r=OG.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function EG(e,t,n){var r=OG.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function PG(e,t,n){var r=OG.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function DG(e,t,n){var r=OG.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function IG(e,t,n){var r=OG.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function _G(e,t,n){var r=OG.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function RG(e,t,n){var r=OG.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function LG(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 FG(e,t,n){var r=OG.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function BG(e,t,n){var r=OG.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function zG(e,t,n){var r=OG.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function $G(e,t,n){var r=OG.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function WG(e,t,n){var r=OG.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function UG(e,t,n){var r=OG.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function HG(e,t,n){var r=OG.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function VG(e,t,n){var r=OG.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function qG(e,t,n){var r=OG.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function YG(e,t,n){var r=jG.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function XG(e,t,n){var r=OG.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function GG(e,t,n){var r=OG.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function KG(e,t){return NG(e.getDate(),t,2)}function ZG(e,t){return NG(e.getHours(),t,2)}function QG(e,t){return NG(e.getHours()%12||12,t,2)}function JG(e,t){return NG(1+WX.count(sG(e),e),t,3)}function eK(e,t){return NG(e.getMilliseconds(),t,3)}function tK(e,t){return eK(e,t)+"000"}function nK(e,t){return NG(e.getMonth()+1,t,2)}function rK(e,t){return NG(e.getMinutes(),t,2)}function oK(e,t){return NG(e.getSeconds(),t,2)}function iK(e){var t=e.getDay();return 0===t?7:t}function aK(e,t){return NG(qX.count(sG(e)-1,e),t,2)}function uK(e){var t=e.getDay();return t>=4||0===t?KX(e):KX.ceil(e)}function lK(e,t){return e=uK(e),NG(KX.count(sG(e),e)+(4===sG(e).getDay()),t,2)}function sK(e){return e.getDay()}function cK(e,t){return NG(YX.count(sG(e)-1,e),t,2)}function dK(e,t){return NG(e.getFullYear()%100,t,2)}function fK(e,t){return NG((e=uK(e)).getFullYear()%100,t,2)}function hK(e,t){return NG(e.getFullYear()%1e4,t,4)}function vK(e,t){var n=e.getDay();return NG((e=n>=4||0===n?KX(e):KX.ceil(e)).getFullYear()%1e4,t,4)}function pK(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+NG(t/60|0,"0",2)+NG(t%60,"0",2)}function mK(e,t){return NG(e.getUTCDate(),t,2)}function bK(e,t){return NG(e.getUTCHours(),t,2)}function gK(e,t){return NG(e.getUTCHours()%12||12,t,2)}function yK(e,t){return NG(1+UX.count(cG(e),e),t,3)}function wK(e,t){return NG(e.getUTCMilliseconds(),t,3)}function xK(e,t){return wK(e,t)+"000"}function kK(e,t){return NG(e.getUTCMonth()+1,t,2)}function OK(e,t){return NG(e.getUTCMinutes(),t,2)}function jK(e,t){return NG(e.getUTCSeconds(),t,2)}function SK(e){var t=e.getUTCDay();return 0===t?7:t}function NK(e,t){return NG(eG.count(cG(e)-1,e),t,2)}function MK(e){var t=e.getUTCDay();return t>=4||0===t?oG(e):oG.ceil(e)}function AK(e,t){return e=MK(e),NG(oG.count(cG(e),e)+(4===cG(e).getUTCDay()),t,2)}function CK(e){return e.getUTCDay()}function TK(e,t){return NG(tG.count(cG(e)-1,e),t,2)}function EK(e,t){return NG(e.getUTCFullYear()%100,t,2)}function PK(e,t){return NG((e=MK(e)).getUTCFullYear()%100,t,2)}function DK(e,t){return NG(e.getUTCFullYear()%1e4,t,4)}function IK(e,t){var n=e.getUTCDay();return NG((e=n>=4||0===n?oG(e):oG.ceil(e)).getUTCFullYear()%1e4,t,4)}function _K(){return"+0000"}function RK(){return"%"}function LK(e){return+e}function FK(e){return Math.floor(+e/1e3)}function BK(e){return new Date(e)}function zK(e){return e instanceof Date?+e:+new Date(+e)}function $K(e,t,n,r,o,i,a,u,l,s){var c=HY(),d=c.invert,f=c.domain,h=s(".%L"),v=s(":%S"),p=s("%I:%M"),m=s("%I %p"),b=s("%a %d"),g=s("%b %d"),y=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:g:n(e)<e?y:w)(e)}return c.invert=function(e){return new Date(d(e))},c.domain=function(e){return arguments.length?f(Array.from(e,zK)):f().map(BK)},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(sX(n,e)):c},c.copy=function(){return WY(c,$K(e,t,n,r,o,i,a,u,l,s))},c}function WK(){var e,t,n,r,o,i=0,a=1,u=FY,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(DY),s.rangeRound=c(IY),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 UK(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function HK(){var e=OX(WK());return e.copy=function(){return UK(e,HK()).exponent(e.exponent())},_q.apply(e,arguments)}function VK(){var e,t,n,r,o,i,a,u=0,l=.5,s=1,c=1,d=FY,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=_Y(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(DY),h.rangeRound=v(IY),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 qK(){var e=OX(VK());return e.copy=function(){return UK(e,qK()).exponent(e.exponent())},_q.apply(e,arguments)}!function(e){yG=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=AG(o),c=CG(o),d=AG(i),f=CG(i),h=AG(a),v=CG(a),p=AG(u),m=CG(u),b=AG(l),g=CG(l),y={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:KG,e:KG,f:tK,g:fK,G:vK,H:ZG,I:QG,j:JG,L:eK,m:nK,M:rK,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:LK,s:FK,S:oK,u:iK,U:aK,V:lK,w:sK,W:cK,x:null,X:null,y:dK,Y:hK,Z:pK,"%":RK},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:mK,e:mK,f:xK,g:PK,G:IK,H:bK,I:gK,j:yK,L:wK,m:kK,M:OK,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:LK,s:FK,S:jK,u:SK,U:NK,V:AK,w:CK,W:TK,x:null,X:null,y:EK,Y:DK,Z:_K,"%":RK},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=g.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:zG,e:zG,f:qG,g:RG,G:_G,H:WG,I:WG,j:$G,L:VG,m:BG,M:UG,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:FG,Q:XG,s:GG,S:HG,u:EG,U:PG,V:DG,w:TG,W:IG,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:_G,Z:LG,"%":YG};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=kG[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=gG(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=bG(gG(i.y,0,1))).getUTCDay(),r=o>4||0===o?tG.ceil(r):tG(r),r=UX.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=mG(gG(i.y,0,1))).getDay(),r=o>4||0===o?YX.ceil(r):YX(r),r=WX.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?bG(gG(i.y,0,1)).getUTCDay():mG(gG(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,bG(i)):mG(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 kG?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return y.x=k(n,y),y.X=k(r,y),y.c=k(t,y),w.x=k(n,w),w.X=k(r,w),w.c=k(t,w),{format:function(e){var t=k(e+="",y);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),wG=yG.format,yG.parse,xG=yG.utcFormat,yG.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 YK=Object.freeze({__proto__:null,scaleBand:Fq,scaleDiverging:function e(){var t=uX(VK()(FY));return t.copy=function(){return UK(t,e())},_q.apply(t,arguments)},scaleDivergingLog:function e(){var t=mX(VK()).domain([.1,1,10]);return t.copy=function(){return UK(t,e()).base(t.base())},_q.apply(t,arguments)},scaleDivergingPow:qK,scaleDivergingSqrt:function(){return qK.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=yX(VK());return t.copy=function(){return UK(t,e()).constant(t.constant())},_q.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,RY),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,RY):[0,1],uX(r)},scaleImplicit:Rq,scaleLinear:lX,scaleLog:function e(){const t=mX(UY()).domain([1,10]);return t.copy=()=>WY(t,e()).base(t.base()),Iq.apply(t,arguments),t},scaleOrdinal:Lq,scalePoint:zq,scalePow:jX,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]=Dq(n,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:r[bq(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(dq),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)},Iq.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[bq(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)},Iq.apply(uX(u),arguments)},scaleRadial:function e(){var t,n=HY(),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(SX(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,RY)).map(SX)),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)},Iq.apply(i,arguments),uX(i)},scaleSequential:function e(){var t=uX(WK()(FY));return t.copy=function(){return UK(t,e())},_q.apply(t,arguments)},scaleSequentialLog:function e(){var t=mX(WK()).domain([1,10]);return t.copy=function(){return UK(t,e()).base(t.base())},_q.apply(t,arguments)},scaleSequentialPow:HK,scaleSequentialQuantile:function e(){var t=[],n=FY;function r(e){if(null!=e&&!isNaN(e=+e))return n((bq(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(dq),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 Tq(e);if(t>=1)return Cq(e);var r,o=(r-1)*t,i=Math.floor(o),a=Cq(Eq(e,i).subarray(0,i+1));return a+(Tq(e.subarray(i+1))-a)*(o-i)}}(t,r/e)))},r.copy=function(){return e(n).domain(t)},_q.apply(r,arguments)},scaleSequentialSqrt:function(){return HK.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=yX(WK());return t.copy=function(){return UK(t,e()).constant(t.constant())},_q.apply(t,arguments)},scaleSqrt:function(){return jX.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=yX(UY());return t.copy=function(){return WY(t,e()).constant(t.constant())},Iq.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],o=1;function i(e){return null!=e&&e<=e?r[bq(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)},Iq.apply(i,arguments)},scaleTime:function(){return Iq.apply($K(vG,pG,sG,uG,qX,WX,zX,FX,LX,wG).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return Iq.apply($K(fG,hG,cG,lG,eG,UX,$X,BX,LX,xG).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:aX}),XK={exports:{}};
22
+ /*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */
23
+ !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 g(e,t,n){if(e!==~~e||e<t||e>n)throw Error(u+e)}function y(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?A(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):A(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=y(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),y(u.d).slice(0,l)===(t=y(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:(g(e,0,r),void 0===t?t=o.rounding:g(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=C(o,!0):(g(e,0,r),void 0===t?t=i.rounding:g(t,0,8),n=C(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?C(i):(g(e,0,r),void 0===t?t=a.rounding:g(t,0,8),n=C((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=C(i,(n=k(i))<=a.toExpNeg||n>=a.toExpPos):(g(e,1,r),void 0===t?t=a.rounding:g(t,0,8),o=C(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):(g(e,1,r),void 0===t?t=n.rounding:g(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 C(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,g,y,w,x,O,j,S,N,A,C,T=r.constructor,E=r.s==o.s?1:-1,P=r.d,D=o.d;if(!r.s)return new T(r);if(!o.s)throw Error(a+"Division by zero");for(s=r.e-o.e,A=D.length,S=P.length,b=(m=new T(E)).d=[],c=0;D[c]==(P[c]||0);)++c;if(D[c]>(P[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==A)for(d=0,D=D[0],x++;(c<S||d)&&x--;c++)O=d*f+(P[c]||0),b[c]=O/D|0,d=O%D|0;else{for((d=f/(D[0]+1)|0)>1&&(D=e(D,d),P=e(P,d),A=D.length,S=P.length),j=A,y=(g=P.slice(0,A)).length;y<A;)g[y++]=0;(C=D.slice()).unshift(0),N=D[0],D[1]>=f/2&&++N;do{d=0,(l=t(D,g,A,y))<0?(w=g[0],A!=y&&(w=w*f+(g[1]||0)),(d=w/N|0)>1?(d>=f&&(d=f-1),1==(l=t(v=e(D,d),g,p=v.length,y=g.length))&&(d--,n(v,A<p?C:D,p))):(0==d&&(l=d=1),v=D.slice()),(p=v.length)<y&&v.unshift(0),n(g,v,y),-1==l&&(l=t(D,g,A,y=g.length))<1&&(d++,n(g,A<y?C:D,y)),y=g.length):0===l&&(d++,g=[0]),b[c++]=d,l&&g[0]?g[y++]=P[j]||0:(g=[P[j]],y=1)}while((j++<S||void 0!==g[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),y((u=a.plus(w(o,r,s))).d).slice(0,s)===y(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,g=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=g):f=t,p.eq(10))return null==t&&(i=!0),O(b,f);if(f+=10,b.precision=f,o=(r=y(m)).charAt(0),l=k(p),!(Math.abs(l)<15e14))return d=O(b,f+2,g).times(l+""),p=S(new b(o+"."+r.slice(1)),f-10).plus(d),b.precision=g,null==t?(i=!0,M(p,g)):p;for(;o<7&&1!=o||1==o&&r.charAt(1)>3;)o=(r=y((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),y((d=c.plus(w(s,new b(u),f))).d).slice(0,f)===y(c.d).slice(0,f))return c=c.times(2),0!==l&&(c=c.plus(O(b,f+2,g).times(l+""))),c=w(c,new b(v),f),b.precision=g,null==t?(i=!0,M(c,g)):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,g=e.d;for(u=1,a=g[0];a>=10;a/=10)u++;if((r=t-u)<0)r+=h,o=t,m=g[b=0];else{if((b=Math.ceil((r+1)/h))>=(a=g.length))return e;for(m=a=g[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!==g[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:g[b-1])%10&1||n==(e.s<0?8:7))),t<1||!g[0])return v?(a=k(e),g.length=1,t=t-a-1,g[0]=c(10,(h-t%h)%h),e.e=s(-t/h)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(0==r?(g.length=b,a=1,b--):(g.length=b+1,a=c(10,h-r),g[b]=o>0?(m/c(10,u-o)%c(10,o)|0)*a:0),v)for(;;){if(0==b){(g[0]+=a)==f&&(g[0]=1,++e.e);break}if(g[b]+=a,g[b]!=f)break;g[b--]=0,a=1}for(r=g.length;0===g[--r];)g.pop();if(i&&(e.e>p||e.e<-p))throw Error(l+k(e));return e}function A(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 C(e,t,n){var r,o=k(e),i=y(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)}(Vs)}(XK);var GK=qs(XK.exports);function KK(e){return function(e){if(Array.isArray(e))return ZK(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 ZK(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 ZK(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 ZK(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 QK=function(e){return e},JK={"@@functional/placeholder":!0},eZ=function(e){return e===JK},tZ=function(e){return function t(){return 0===arguments.length||1===arguments.length&&eZ(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},nZ=function e(t,n){return 1===t?n:tZ((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!==JK})).length;return a>=t?n.apply(void 0,o):e(t-a,tZ((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 eZ(e)?t.shift():e}));return n.apply(void 0,KK(i).concat(t))})))}))},rZ=function(e){return nZ(e.length,e)},oZ=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},iZ=rZ((function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map((function(e){return t[e]})).map(e)})),aZ=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return QK;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))}},uZ=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},lZ=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 sZ=rZ((function(e,t,n){var r=+e;return r+n*(+t-r)})),cZ=rZ((function(e,t,n){var r=t-+e;return(n-e)/(r=r||1/0)})),dZ=rZ((function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))})),fZ={rangeStep:function(e,t,n){for(var r=new GK(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 GK(e).abs().log(10).toNumber())+1},interpolateNumber:sZ,uninterpolateNumber:cZ,uninterpolateTruncation:dZ};function hZ(e){return function(e){if(Array.isArray(e))return mZ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||pZ(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 vZ(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(rse){o=!0,i=rse}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||pZ(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 pZ(e,t){if(e){if("string"==typeof e)return mZ(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)?mZ(e,t):void 0}}function mZ(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 bZ(e){var t=vZ(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function gZ(e,t,n){if(e.lte(0))return new GK(0);var r=fZ.getDigitCount(e.toNumber()),o=new GK(10).pow(r),i=e.div(o),a=1!==r?.05:.1,u=new GK(Math.ceil(i.div(a).toNumber())).add(n).mul(a).mul(o);return t?u:new GK(Math.ceil(u))}function yZ(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 GK(0),tickMin:new GK(0),tickMax:new GK(0)};var i,a=gZ(new GK(t).sub(e).div(n-1),r,o);i=e<=0&&t>=0?new GK(0):(i=new GK(e).add(t).div(2)).sub(new GK(i).mod(a));var u=Math.ceil(i.sub(e).div(a).toNumber()),l=Math.ceil(new GK(t).sub(i).div(a).toNumber()),s=u+l+1;return s>n?yZ(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 GK(u).mul(a)),tickMax:i.add(new GK(l).mul(a))})}var wZ=lZ((function(e){var t=vZ(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=vZ(bZ([n,r]),2),l=u[0],s=u[1];if(l===-1/0||s===1/0){var c=s===1/0?[l].concat(hZ(oZ(0,o-1).map((function(){return 1/0})))):[].concat(hZ(oZ(0,o-1).map((function(){return-1/0}))),[s]);return n>r?uZ(c):c}if(l===s)return function(e,t,n){var r=1,o=new GK(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new GK(10).pow(fZ.getDigitCount(e)-1),o=new GK(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new GK(Math.floor(e)))}else 0===e?o=new GK(Math.floor((t-1)/2)):n||(o=new GK(Math.floor(e)));var a=Math.floor((t-1)/2),u=aZ(iZ((function(e){return o.add(new GK(e-a).mul(r)).toNumber()})),oZ);return u(0,t)}(l,o,i);var d=yZ(l,s,a,i),f=d.step,h=d.tickMin,v=d.tickMax,p=fZ.rangeStep(h,v.add(new GK(.1).mul(f)),f);return n>r?uZ(p):p})),xZ=lZ((function(e,t){var n=vZ(e,2),r=n[0],o=n[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=vZ(bZ([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=gZ(new GK(l).sub(u).div(s-1),i,0),d=[].concat(hZ(fZ.rangeStep(new GK(u),new GK(l).sub(new GK(.99).mul(c)),c)),[l]);return r>o?uZ(d):d})),kZ=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function OZ(){return OZ=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},OZ.apply(this,arguments)}function jZ(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 SZ(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 SZ(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 SZ(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 NZ(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 MZ(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=NZ(t,kZ),d=EF(c),f=a.map((function(t,a){var c=u(t,i),f=c.x,h=c.y,v=c.value,p=c.errorVal;if(!p)return null;var m,b,g=[];if(Array.isArray(p)){var y=jZ(p,2);m=y[0],b=y[1]}else m=b=p;if("vertical"===r){var w=l.scale,x=h+n,k=x+o,O=x-o,j=w(v-m),S=w(v+b);g.push({x1:S,y1:k,x2:S,y2:O}),g.push({x1:j,y1:x,x2:S,y2:x}),g.push({x1:j,y1:k,x2:j,y2:O})}else if("horizontal"===r){var N=s.scale,M=f+n,A=M-o,C=M+o,T=N(v-m),E=N(v+b);g.push({x1:A,y1:E,x2:C,y2:E}),g.push({x1:M,y1:T,x2:M,y2:E}),g.push({x1:A,y1:T,x2:C,y2:T})}return e.createElement(WF,OZ({className:"recharts-errorBar",key:"bar-".concat(a)},d),g.map((function(t,n){return e.createElement("line",OZ({},t,{key:"line-".concat(n)}))})))}));return e.createElement(WF,{className:"recharts-errorBars"},f)}function AZ(e){return AZ="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},AZ(e)}function CZ(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?CZ(Object(n),!0).forEach((function(t){EZ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function EZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==AZ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==AZ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===AZ(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}MZ.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},MZ.displayName="ErrorBar";var PZ=function(e){var t,n=e.children,r=e.formattedGraphicalItems,o=e.legendWidth,i=e.legendContent,a=MF(n,M$);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:$Z(t),value:o||r,payload:t.props}})),TZ(TZ(TZ({},a.props),M$.getWithHeight(a,o)),{},{payload:t,item:a})):null};function DZ(e){return DZ="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},DZ(e)}function IZ(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 _Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IZ(Object(n),!0).forEach((function(t){RZ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IZ(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"!==DZ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==DZ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===DZ(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LZ(e){return function(e){if(Array.isArray(e))return FZ(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 FZ(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 FZ(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 FZ(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 BZ(e,t,n){return kL(e)||kL(t)?n:nF(t)?zS(e,t,n):dx(t)?t(e):n}function zZ(e,t,n,r){var o=cq(e,(function(e){return BZ(e,t)}));if("number"===n){var i=o.filter((function(e){return tF(e)||parseFloat(e)}));return i.length?[uq(i),tq(i)]:[1/0,-1/0]}return(r?o.filter((function(e){return!kL(e)})):o).map((function(e){return nF(e)||e instanceof Date?e:""}))}var $Z=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},WZ=function(e,t,n,r,o){var i=NF(t.props.children,MZ).filter((function(e){return function(e,t,n){return!!kL(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=BZ(t,n,0),o=uw(r)?[uq(r),tq(r)]:[r,r],i=a.reduce((function(e,n){var r=BZ(t,n,0),i=o[0]-Math.abs(uw(r)?r[0]:r),a=o[1]+Math.abs(uw(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},UZ=function(e,t,n,r,o){var i=t.map((function(t){var i=t.props.dataKey;return"number"===n&&i&&WZ(e,t,i,r)||zZ(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}),[])},HZ=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},VZ=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},qZ=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*JL(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!QL(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}}))},YZ=function(e,t,n){var r;return dx(n)?r=n:dx(t)&&(r=t),dx(e)||r?function(t,n,o,i){dx(e)&&e(t,n,o,i),dx(r)&&r(t,n,o,i)}:null},XZ=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:Fq(),realScaleType:"band"}:"radial"===i&&"angleAxis"===a?{scale:lX(),realScaleType:"linear"}:"category"===o&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!n)?{scale:zq(),realScaleType:"point"}:"category"===o?{scale:Fq(),realScaleType:"band"}:{scale:lX(),realScaleType:"linear"};if(hw(r)){var u="scale".concat($B(r));return{scale:(YK[u]||zq)(),realScaleType:YK[u]?u:"point"}}return dx(r)?{scale:r}:{scale:zq(),realScaleType:"point"}},GZ=1e-4,KZ=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])-GZ,i=Math.max(r[0],r[1])+GZ,a=e(t[0]),u=e(t[n-1]);(a<o||a>i||u<o||u>i)&&e.domain([t[0],t[n-1]])}},ZZ={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=QL(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}Wz(e,t)}},none:Wz,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}Wz(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,Wz(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=QL(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)}}},QZ=function(e,t,n){var r=t.map((function(e){return e.props.dataKey})),o=ZZ[n],i=function(){var e=WB([]),t=Uz,n=Wz,r=Hz;function o(o){var i,a,u=Array.from(e.apply(this,arguments),Vz),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=tz(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:WB(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:WB(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?Uz:"function"==typeof e?e:WB(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?Wz:e,o):n},o}().keys(r).value((function(e,t){return+BZ(e,t,0)})).order(Uz).offset(o);return i(e)},JZ=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=wZ(l,o,a);return e.domain([uq(s),tq(s)]),{niceTicks:s}}if(o&&"number"===r){var c=e.domain();return{niceTicks:xZ(c,o,a)}}return null},eQ=function(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&&!kL(o[t.dataKey])){var u=lF(n,"value",o[t.dataKey]);if(u)return u.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=BZ(o,kL(a)?t.dataKey:a);return kL(l)?null:t.scale(l)},tQ=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=BZ(i,t.dataKey,t.domain[a]);return kL(u)?null:t.scale(u)-o/2+r},nQ=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[uq(t.concat([e[0]]).filter(tF)),tq(t.concat([e[1]]).filter(tF))]}),[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}))},rQ=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,oQ=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,iQ=function(e,t,n){if(dx(e))return e(t,n);if(!uw(e))return t;var r=[];if(tF(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(rQ.test(e[0])){var o=+rQ.exec(e[0])[1];r[0]=t[0]-o}else dx(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(tF(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(oQ.test(e[1])){var i=+oQ.exec(e[1])[1];r[1]=t[1]+i}else dx(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},aQ=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=QU(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},uQ=function(e,t,n){return e&&e.length?YV(e,zS(n,"type.defaultProps.domain"))?t:e:t},lQ=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;return _Z(_Z({},EF(e)),{},{dataKey:r,unit:i,formatter:a,name:o||r,color:$Z(e),value:BZ(t,r),type:u,payload:t,chartType:l})};function sQ(e){return sQ="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},sQ(e)}function cQ(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 dQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cQ(Object(n),!0).forEach((function(t){fQ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cQ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==sQ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==sQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===sQ(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hQ(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 vQ(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 vQ(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 vQ(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 pQ=Math.PI/180,mQ=function(e){return 180*e/Math.PI},bQ=function(e,t,n,r){return{x:e+Math.cos(-pQ*r)*n,y:t+Math.sin(-pQ*r)*n}},gQ=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},yQ=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:mQ(l),angleInRadian:l}},wQ=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)},xQ=function(e,t){var n=e.x,r=e.y,o=yQ({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?dQ(dQ({},t),{},{radius:i,angle:wQ(h,t)}):null};function kQ(e){return kQ="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},kQ(e)}var OQ=["offset"];function jQ(e){return function(e){if(Array.isArray(e))return SQ(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 SQ(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 SQ(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 SQ(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 NQ(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 MQ(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 AQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MQ(Object(n),!0).forEach((function(t){CQ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MQ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function CQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==kQ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==kQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===kQ(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TQ(){return TQ=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},TQ.apply(this,arguments)}var EQ=function(e){var t=e.value,n=e.formatter,r=kL(e.children)?t:e.children;return dx(n)?n(r):r},PQ=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,g=(h+v)/2,y=function(e,t){return JL(t-e)*Math.min(Math.abs(t-e),360)}(p,m),w=y>=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=y<=0?i:!i;var x=bQ(d,f,g,o),k=bQ(d,f,g,o+359*(i?1:-1)),O="M".concat(x.x,",").concat(x.y,"\n A").concat(g,",").concat(g,",0,1,").concat(i?0:1,",\n ").concat(k.x,",").concat(k.y),j=kL(t.id)?oF("recharts-radial-line-"):t.id;return e.createElement("text",TQ({},r,{dominantBaseline:"central",className:xL("recharts-radial-bar-label",s)}),e.createElement("defs",null,e.createElement("path",{id:j,d:O})),e.createElement("textPath",{xlinkHref:"#".concat(j)},n))},DQ=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=bQ(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=bQ(i,a,(u+l)/2,s);return{x:f.x,y:f.y,textAnchor:"middle",verticalAnchor:"middle"}},IQ=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 AQ(AQ({},{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 AQ(AQ({},{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 g={x:a-p,y:u+s/2,textAnchor:m,verticalAnchor:"middle"};return AQ(AQ({},g),n?{width:Math.max(g.x-n.x,0),height:s}:{})}if("right"===o){var y={x:a+l+p,y:u+s/2,textAnchor:b,verticalAnchor:"middle"};return AQ(AQ({},y),n?{width:Math.max(n.x+n.width-y.x,0),height:s}:{})}var w=n?{width:l,height:s}:{};return"insideLeft"===o?AQ({x:a+p,y:u+s/2,textAnchor:b,verticalAnchor:"middle"},w):"insideRight"===o?AQ({x:a+l-p,y:u+s/2,textAnchor:m,verticalAnchor:"middle"},w):"insideTop"===o?AQ({x:a+l/2,y:u+d,textAnchor:"middle",verticalAnchor:h},w):"insideBottom"===o?AQ({x:a+l/2,y:u+s-d,textAnchor:"middle",verticalAnchor:f},w):"insideTopLeft"===o?AQ({x:a+p,y:u+d,textAnchor:b,verticalAnchor:h},w):"insideTopRight"===o?AQ({x:a+l-p,y:u+d,textAnchor:m,verticalAnchor:h},w):"insideBottomLeft"===o?AQ({x:a+p,y:u+s-d,textAnchor:b,verticalAnchor:f},w):"insideBottomRight"===o?AQ({x:a+l-p,y:u+s-d,textAnchor:m,verticalAnchor:f},w):ux(o)&&(tF(o.x)||eF(o.x))&&(tF(o.y)||eF(o.y))?AQ({x:a+iF(o.x,l),y:u+iF(o.y,s),textAnchor:"end",verticalAnchor:"end"},w):AQ({x:a+l/2,y:u+s/2,textAnchor:"middle",verticalAnchor:"middle"},w)},_Q=function(e){return"cx"in e&&tF(e.cx)};function RQ(t){var n,r=t.offset,o=AQ({offset:void 0===r?5:r},NQ(t,OQ)),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||kL(u)&&kL(l)&&!e.isValidElement(s)&&!dx(s))return null;if(e.isValidElement(s))return e.cloneElement(s,o);if(dx(s)){if(n=e.createElement(s,o),e.isValidElement(n))return n}else n=EQ(o);var h=_Q(i),v=EF(o,!0);if(h&&("insideStart"===a||"insideEnd"===a||"end"===a))return PQ(o,n,v);var p=h?DQ(o):IQ(o);return e.createElement(VV,TQ({className:xL("recharts-label",d)},v,p,{breakAll:f}),n)}RQ.displayName="Label";var LQ=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(tF(v)&&tF(p)){if(tF(c)&&tF(d))return{x:c,y:d,width:v,height:p};if(tF(f)&&tF(h))return{x:f,y:h,width:v,height:p}}return tF(c)&&tF(d)?{x:c,y:d,width:0,height:0}:tF(t)&&tF(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:{}};RQ.parseViewBox=LQ,RQ.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=LQ(t),a=NF(o,RQ).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(RQ,{key:"label-implicit",viewBox:n}):nF(t)?e.createElement(RQ,{key:"label-implicit",viewBox:n,value:t}):e.isValidElement(t)?t.type===RQ?e.cloneElement(t,{key:"label-implicit",viewBox:n}):e.createElement(RQ,{key:"label-implicit",content:t,viewBox:n}):dx(t)?e.createElement(RQ,{key:"label-implicit",content:t,viewBox:n}):ux(t)?e.createElement(RQ,TQ({viewBox:n},t,{key:"label-implicit"})):null:null}(t.label,n||i);return[u].concat(jQ(a))};var FQ=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},BQ=qs(FQ);function zQ(e){return zQ="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},zQ(e)}var $Q=["valueAccessor"],WQ=["data","dataKey","clockWise","id","textBreakAll"];function UQ(e){return function(e){if(Array.isArray(e))return HQ(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 HQ(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 HQ(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 HQ(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 VQ(){return VQ=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},VQ.apply(this,arguments)}function qQ(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 YQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qQ(Object(n),!0).forEach((function(t){XQ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qQ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function XQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==zQ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==zQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===zQ(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GQ(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 KQ=function(e){return uw(e.value)?BQ(e.value):e.value};function ZQ(t){var n=t.valueAccessor,r=void 0===n?KQ:n,o=GQ(t,$Q),i=o.data,a=o.dataKey,u=o.clockWise,l=o.id,s=o.textBreakAll,c=GQ(o,WQ);return i&&i.length?e.createElement(WF,{className:"recharts-label-list"},i.map((function(t,n){var o=kL(a)?r(t,n):BZ(t&&t.payload,a),i=kL(l)?{}:{id:"".concat(l,"-").concat(n)};return e.createElement(RQ,VQ({},EF(t,!0),c,i,{parentViewBox:t.parentViewBox,index:n,value:o,textBreakAll:s,viewBox:RQ.parseViewBox(kL(u)?t:YQ(YQ({},t),{},{clockWise:u})),key:"label-".concat(n)}))}))):null}function QQ(e){return QQ="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},QQ(e)}function JQ(){return JQ=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},JQ.apply(this,arguments)}function eJ(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 tJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eJ(Object(n),!0).forEach((function(t){nJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==QQ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==QQ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===QQ(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ZQ.displayName="LabelList",ZQ.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=NF(t.children,ZQ).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(ZQ,{key:"labelList-implicit",data:n}):e.isValidElement(t)||dx(t)?e.createElement(ZQ,{key:"labelList-implicit",data:n,content:t}):ux(t)?e.createElement(ZQ,VQ({data:n},t,{key:"labelList-implicit"})):null:null}(t.label,n)].concat(UQ(o)):o};var rJ=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)/pQ,d=l?o:o+i*c,f=l?o-i*c:o;return{center:bQ(t,n,s,d),circleTangency:bQ(t,n,r,d),lineTangency:bQ(t,n,s*Math.cos(c*pQ),f),theta:c}},oJ=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.startAngle,a=function(e,t){return JL(t-e)*Math.min(Math.abs(t-e),359.999)}(i,e.endAngle),u=i+a,l=bQ(t,n,o,i),s=bQ(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=bQ(t,n,r,i),f=bQ(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},iJ={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},aJ=function(t){var n=tJ(tJ({},iJ),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=xL("recharts-sector",f),p=a-i,m=iF(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=JL(s-l),d=rJ({cx:t,cy:n,radius:o,angle:l,sign:c,cornerRadius:i,cornerIsExternal:u}),f=d.circleTangency,h=d.lineTangency,v=d.theta,p=rJ({cx:t,cy:n,radius:o,angle:s,sign:-c,cornerRadius:i,cornerIsExternal:u}),m=p.circleTangency,b=p.lineTangency,g=p.theta,y=u?Math.abs(l-s):Math.abs(l-s)-v-g;if(y<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 "):oJ({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(+(y>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=rJ({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=rJ({cx:t,cy:n,radius:r,angle:s,sign:-c,isExternal:!0,cornerRadius:i,cornerIsExternal:u}),N=S.circleTangency,M=S.lineTangency,A=S.theta,C=u?Math.abs(l-s):Math.abs(l-s)-j-A;if(C<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(+(C>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}):oJ({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:c,endAngle:d}),e.createElement("path",JQ({},EF(n,!0),{className:v,d:h,role:"img"}))};function uJ(e){return uJ="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},uJ(e)}function lJ(){return lJ=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},lJ.apply(this,arguments)}function sJ(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 cJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sJ(Object(n),!0).forEach((function(t){dJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==uJ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==uJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===uJ(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fJ={curveBasisClosed:function(e){return new Cz(e)},curveBasisOpen:function(e){return new Tz(e)},curveBasis:function(e){return new Az(e)},curveBumpX:function(e){return new lz(e,!0)},curveBumpY:function(e){return new lz(e,!1)},curveLinearClosed:function(e){return new Ez(e)},curveLinear:rz,curveMonotoneX:function(e){return new Rz(e)},curveMonotoneY:function(e){return new Lz(e)},curveNatural:function(e){return new Bz(e)},curveStep:function(e){return new $z(e,.5)},curveStepAfter:function(e){return new $z(e,1)},curveStepBefore:function(e){return new $z(e,0)}},hJ=function(e){return e.x===+e.x&&e.y===+e.y},vJ=function(e){return e.x},pJ=function(e){return e.y},mJ=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(dx(e))return e;var n="curve".concat($B(e));return"curveMonotone"!==n&&"curveBump"!==n||!t?fJ[n]||rz:fJ["".concat(n).concat("vertical"===t?"Y":"X")]}(r,u),d=s?i.filter((function(e){return hJ(e)})):i;if(uw(a)){var f=s?a.filter((function(e){return hJ(e)})):a,h=d.map((function(e,t){return cJ(cJ({},e),{},{base:f[t]})}));return t="vertical"===u?uz().y(pJ).x1(vJ).x0((function(e){return e.base.x})):uz().x(vJ).y1(pJ).y0((function(e){return e.base.y})),t.defined(hJ).curve(c),t(h)}return(t="vertical"===u&&tF(a)?uz().y(pJ).x1(vJ).x0(a):tF(a)?uz().x(vJ).y1(pJ).y0(a):az().x(vJ).y(pJ)).defined(hJ).curve(c),t(d)},bJ=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?mJ(t):o;return e.createElement("path",lJ({},EF(t),pF(t),{className:xL("recharts-curve",n),d:a,ref:i}))};function gJ(e){return gJ="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},gJ(e)}function yJ(){return yJ=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},yJ.apply(this,arguments)}function wJ(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 xJ(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 xJ(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 xJ(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 kJ(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 OJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kJ(Object(n),!0).forEach((function(t){jJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==gJ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==gJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===gJ(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var SJ=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},NJ=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},MJ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},AJ=function(t){var n=OJ(OJ({},MJ),t),r=e.useRef(),o=wJ(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(rse){}}),[]);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 g=xL("recharts-rectangle",f);return b?e.createElement(lU,{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(lU,{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",yJ({},EF(n,!0),{className:g,d:SJ(u,l,o,a,d),ref:r})))})):e.createElement("path",yJ({},EF(n,!0),{className:g,d:SJ(u,l,s,c,d)}))},CJ=["points","className","baseLinePoints","connectNulls"];function TJ(){return TJ=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},TJ.apply(this,arguments)}function EJ(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 PJ(e){return function(e){if(Array.isArray(e))return DJ(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 DJ(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 DJ(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 DJ(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=function(e){return e&&e.x===+e.x&&e.y===+e.y},_J=function(e,t){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach((function(e){IJ(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])})),IJ(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(PJ(e),PJ(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},RJ=function(t){var n=t.points,r=t.className,o=t.baseLinePoints,i=t.connectNulls,a=EJ(t,CJ);if(!n||!n.length)return null;var u=xL("recharts-polygon",r);if(o&&o.length){var l=a.stroke&&"none"!==a.stroke,s=function(e,t,n){var r=_J(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(_J(t.reverse(),n).slice(1))}(n,o,i);return e.createElement("g",{className:u},e.createElement("path",TJ({},EF(a,!0),{fill:"Z"===s.slice(-1)?a.fill:"none",stroke:"none",d:s})),l?e.createElement("path",TJ({},EF(a,!0),{fill:"none",d:_J(n,i)})):null,l?e.createElement("path",TJ({},EF(a,!0),{fill:"none",d:_J(o,i)})):null)}var c=_J(n,i);return e.createElement("path",TJ({},EF(a,!0),{fill:"Z"===c.slice(-1)?a.fill:"none",className:u,d:c}))};function LJ(){return LJ=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},LJ.apply(this,arguments)}var FJ=function(t){var n=t.cx,r=t.cy,o=t.r,i=t.className,a=xL("recharts-dot",i);return n===+n&&r===+r&&o===+o?e.createElement("circle",LJ({},EF(t),pF(t),{className:a,cx:n,cy:r,r:o})):null};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)}var zJ=["x","y","top","left","width","height","className"];function $J(){return $J=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},$J.apply(this,arguments)}function WJ(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,t,n){return(t=function(e){var t=function(e,t){if("object"!==BJ(e)||null===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))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HJ(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 VJ=function(e,t,n,r,o,i){return"M".concat(e,",").concat(o,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n)},qJ=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?WJ(Object(n),!0).forEach((function(t){UJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WJ(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},HJ(t,zJ));return tF(r)&&tF(i)&&tF(d)&&tF(h)&&tF(u)&&tF(s)?e.createElement("path",$J({},EF(p,!0),{className:xL("recharts-cross",v),d:VJ(r,i,d,h,u,s)})):null},YJ=GV,XJ=gN,GJ=nq;var KJ=function(e,t){return e&&e.length?YJ(e,XJ(t),GJ):void 0},ZJ=qs(KJ),QJ=GV,JJ=KV,e0=gN;var t0=function(e,t){return e&&e.length?QJ(e,e0(t),JJ):void 0},n0=qs(t0),r0=["cx","cy","angle","ticks","axisLine"],o0=["ticks","tick","angle","tickFormatter","stroke"];function i0(e){return i0="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},i0(e)}function a0(){return a0=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},a0.apply(this,arguments)}function u0(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 l0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u0(Object(n),!0).forEach((function(t){v0(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s0(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 c0(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,p0(r.key),r)}}function d0(e,t){return d0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d0(e,t)}function f0(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(xee){return!1}}();return function(){var n,r=h0(e);if(t){var o=h0(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===i0(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)}(this,n)}}function h0(e){return h0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h0(e)}function v0(e,t,n){return(t=p0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p0(e){var t=function(e,t){if("object"!==i0(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==i0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i0(t)?t:String(t)}var m0=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&&d0(e,t)}(a,t);var n,r,o,i=f0(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return n=a,r=[{key:"getTickValueCoord",value:function(e){var t=e.coordinate,n=this.props,r=n.angle,o=n.cx,i=n.cy;return bQ(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=n0(o,(function(e){return e.coordinate||0}));return{cx:t,cy:n,startAngle:r,endAngle:r,innerRadius:ZJ(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=s0(t,r0),l=i.reduce((function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]}),[1/0,-1/0]),s=bQ(n,r,l[0],o),c=bQ(n,r,l[1],o),d=l0(l0(l0({},EF(u)),{},{fill:"none"},EF(a)),{},{x1:s.x,y1:s.y,x2:c.x,y2:c.y});return e.createElement("line",a0({className:"recharts-polar-radius-axis-line"},d))}},{key:"renderTicks",value:function(){var t=this,n=this.props,r=n.ticks,o=n.tick,i=n.angle,u=n.tickFormatter,l=n.stroke,s=s0(n,o0),c=this.getTickTextAnchor(),d=EF(s),f=EF(o),h=r.map((function(n,r){var s=t.getTickValueCoord(n),h=l0(l0(l0(l0({textAnchor:c,transform:"rotate(".concat(90-i,", ").concat(s.x,", ").concat(s.y,")")},d),{},{stroke:"none",fill:l},f),{},{index:r},s),{},{payload:n});return e.createElement(WF,a0({className:"recharts-polar-radius-axis-tick",key:"tick-".concat(r)},mF(t.props,n,r)),a.renderTickItem(o,h,u?u(n.value,r):n.value))}));return e.createElement(WF,{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(WF,{className:"recharts-polar-radius-axis"},r&&this.renderAxisLine(),o&&this.renderTicks(),RQ.renderCallByParent(this.props,this.getViewBox())):null}}],o=[{key:"renderTickItem",value:function(t,n,r){return e.isValidElement(t)?e.cloneElement(t,n):dx(t)?t(n):e.createElement(VV,a0({},n,{className:"recharts-polar-radius-axis-tick-value"}),r)}}],r&&c0(n.prototype,r),o&&c0(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(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 g0(){return g0=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},g0.apply(this,arguments)}function y0(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?y0(Object(n),!0).forEach((function(t){S0(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x0(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,N0(r.key),r)}}function k0(e,t){return k0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k0(e,t)}function O0(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(xee){return!1}}();return function(){var n,r=j0(e);if(t){var o=j0(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return 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)}(this,n)}}function j0(e){return j0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j0(e)}function S0(e,t,n){return(t=N0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N0(e){var t=function(e,t){if("object"!==b0(e)||null===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)}v0(m0,"displayName","PolarRadiusAxis"),v0(m0,"axisType","radiusAxis"),v0(m0,"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 M0=Math.PI/180,A0=1e-5,C0=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&&k0(e,t)}(a,t);var n,r,o,i=O0(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return n=a,r=[{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=bQ(n,r,o,e.coordinate),l=bQ(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*M0);return n>A0?"outer"===t?"start":"end":n<-A0?"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({},EF(this.props)),{},{fill:"none"},EF(i));if("circle"===a)return e.createElement(FJ,g0({className:"recharts-polar-angle-axis-line"},u,{cx:n,cy:r,r:o}));var l=this.props.ticks.map((function(e){return bQ(n,r,o,e.coordinate)}));return e.createElement(RJ,g0({className:"recharts-polar-angle-axis-line"},u,{points:l}))}},{key:"renderTicks",value:function(){var t=this,n=this.props,r=n.ticks,o=n.tick,i=n.tickLine,u=n.tickFormatter,l=n.stroke,s=EF(this.props),c=EF(o),d=w0(w0({},s),{},{fill:"none"},EF(i)),f=r.map((function(n,r){var f=t.getTickLineCoord(n),h=w0(w0(w0({textAnchor:t.getTickTextAnchor(n)},s),{},{stroke:"none",fill:l},c),{},{index:r,payload:n,x:f.x2,y:f.y2});return e.createElement(WF,g0({className:"recharts-polar-angle-axis-tick",key:"tick-".concat(r)},mF(t.props,n,r)),i&&e.createElement("line",g0({className:"recharts-polar-angle-axis-tick-line"},d,f)),o&&a.renderTickItem(o,h,u?u(n.value,r):n.value))}));return e.createElement(WF,{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(WF,{className:"recharts-polar-angle-axis"},o&&this.renderAxisLine(),this.renderTicks())}}],o=[{key:"renderTickItem",value:function(t,n,r){return e.isValidElement(t)?e.cloneElement(t,n):dx(t)?t(n):e.createElement(VV,g0({},n,{className:"recharts-polar-angle-axis-tick-value"}),r)}}],r&&x0(n.prototype,r),o&&x0(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);S0(C0,"displayName","PolarAngleAxis"),S0(C0,"axisType","angleAxis"),S0(C0,"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 T0=iw,E0=lw;var P0=qs((function(e){return!0===e||!1===e||E0(e)&&"[object Boolean]"==T0(e)}));function D0(e){return D0="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},D0(e)}function I0(){return I0=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},I0.apply(this,arguments)}function _0(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 R0(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 R0(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 R0(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 L0(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 F0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L0(Object(n),!0).forEach((function(t){B0(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function B0(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==D0(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==D0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===D0(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var z0,$0=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")},W0={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},U0=function(t){var n=F0(F0({},W0),t),r=e.useRef(),o=_0(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(rse){}}),[]);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=xL("recharts-trapezoid",f);return m?e.createElement(lU,{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(lU,{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",I0({},EF(n,!0),{className:b,d:$0(l,s,o,a,u),ref:r})))})):e.createElement("g",null,e.createElement("path",I0({},EF(n,!0),{className:b,d:$0(u,l,s,c,d)})))},H0=["option","shapeType","propTransformer","activeClassName","isActive"];function V0(e){return V0="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},V0(e)}function q0(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 Y0(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 X0(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y0(Object(n),!0).forEach((function(t){G0(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y0(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function G0(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==V0(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==V0(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===V0(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K0(e,t){return X0(X0({},t),e)}function Z0(t){var n=t.shapeType,r=t.elementProps;switch(n){case"rectangle":return e.createElement(AJ,r);case"trapezoid":return e.createElement(U0,r);case"sector":return e.createElement(aJ,r);case"symbols":if(function(e,t){return"symbols"===e}(n))return e.createElement(t$,r);break;default:return null}}function Q0(t){var n,r=t.option,o=t.shapeType,i=t.propTransformer,a=void 0===i?K0:i,u=t.activeClassName,l=void 0===u?"recharts-active-shape":u,s=t.isActive,c=q0(t,H0);if(e.isValidElement(r))n=e.cloneElement(r,c);else if(dx(r))n=r(c);else if(Lx(r)&&!P0(r)){var d=a(r,c);n=e.createElement(Z0,{shapeType:o,elementProps:d})}else{var f=c;n=e.createElement(Z0,{shapeType:o,elementProps:f})}return s?e.createElement(WF,{className:l},n):n}function J0(e,t){return"trapezoids"in e.props}function e1(e,t){return"sectors"in e.props}function t1(e,t){return"points"in e.props}function n1(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 r1(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function o1(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function i1(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,o=function(e,t){var n;return J0(e)?n="trapezoids":e1(e)?n="sectors":t1(e)&&(n="points"),n}(n),i=function(e,t){var n,r;return J0(e)?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:e1(e)?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:t1(e)?t.payload:{}}(n,t),a=r.filter((function(e,r){var a=YV(i,e),u=n.props[o].filter((function(e){var r=function(e,t){var n;return J0(e)?n=n1:e1(e)?n=r1:t1(e)&&(n=o1),n}(n);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 u1(){return u1=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},u1.apply(this,arguments)}function l1(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 s1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l1(Object(n),!0).forEach((function(t){p1(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l1(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c1(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,m1(r.key),r)}}function d1(e,t){return d1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d1(e,t)}function f1(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(xee){return!1}}();return function(){var n,r=v1(e);if(t){var o=v1(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return 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 h1(e)}(this,n)}}function h1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v1(e){return v1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v1(e)}function p1(e,t,n){return(t=m1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m1(e){var t=function(e,t){if("object"!==a1(e)||null===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 b1=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&&d1(e,t)}(a,t);var n,r,o,i=f1(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),p1(h1(t=i.call(this,e)),"pieRef",null),p1(h1(t),"sectorRefs",[]),p1(h1(t),"id",oF("recharts-pie-")),p1(h1(t),"handleAnimationEnd",(function(){var e=t.props.onAnimationEnd;t.setState({isAnimationFinished:!0}),dx(e)&&e()})),p1(h1(t),"handleAnimationStart",(function(){var e=t.props.onAnimationStart;t.setState({isAnimationFinished:!1}),dx(e)&&e()})),t.state={isAnimationFinished:!e.isAnimationActive,prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,sectorToFocus:0},t}return n=a,r=[{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 n=this.props,r=n.label,o=n.labelLine,i=n.dataKey,u=n.valueKey,l=EF(this.props),s=EF(r),c=EF(o),d=r&&r.offsetRadius||20,f=t.map((function(t,n){var f=(t.startAngle+t.endAngle)/2,h=bQ(t.cx,t.cy,t.outerRadius+d,f),v=s1(s1(s1(s1({},l),t),{},{stroke:"none"},s),{},{index:n,textAnchor:a.getTextAnchor(h.x,t.cx)},h),p=s1(s1(s1(s1({},l),t),{},{fill:"none",stroke:t.fill},c),{},{index:n,points:[bQ(t.cx,t.cy,t.outerRadius,f),h],key:"line"}),m=i;return kL(i)&&kL(u)?m="value":kL(i)&&(m=u),e.createElement(WF,{key:"label-".concat(n)},o&&a.renderLabelLineItem(o,p),a.renderLabelItem(r,v,BZ(t,m)))}));return e.createElement(WF,{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(t,r){var u=n.isActiveIndex(r),l=a&&n.hasActiveIndex()?a:null,s=u?o:l,c=s1(s1({},t),{},{stroke:i?t.fill:t.stroke,tabIndex:-1});return e.createElement(WF,u1({ref:function(e){e&&!n.sectorRefs.includes(e)&&n.sectorRefs.push(e)},tabIndex:-1,className:"recharts-pie-sector"},mF(n.props,t,r),{key:"sector-".concat(r)}),e.createElement(Q0,u1({option:s,isActive:u,shapeType:"sector"},c)))}))}},{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(lU,{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?zS(e,"paddingAngle",0):0;if(n){var u=uF(n.endAngle-n.startAngle,e.endAngle-e.startAngle),l=s1(s1({},e),{},{startAngle:a+r,endAngle:a+u(o)+r});i.push(l),a=l.endAngle}else{var s=e.endAngle,d=e.startAngle,f=uF(0,s-d)(o),h=s1(s1({},e),{},{startAngle:a+r,endAngle:a+f+r});i.push(h),a=h.endAngle}})),e.createElement(WF,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&&YV(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||!tF(u)||!tF(l)||!tF(s)||!tF(c))return null;var h=xL("recharts-pie",i);return e.createElement(WF,{tabIndex:this.props.rootTabIndex,className:h,ref:function(e){t.pieRef=e}},this.renderSectors(),a&&this.renderLabels(o),RQ.renderCallByParent(this.props,null,!1),(!d||f)&&ZQ.renderCallByParent(this.props,o,!1))}}],o=[{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):dx(t)?t(n):e.createElement(bJ,u1({},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 dx(t)&&(o=t(n),e.isValidElement(o))?o:e.createElement(VV,u1({},n,{alignmentBaseline:"middle",className:"recharts-pie-label-text"}),o)}}],r&&c1(n.prototype,r),o&&c1(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);z0=b1,p1(b1,"displayName","Pie"),p1(b1,"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:!uH.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),p1(b1,"parseDeltaAngle",(function(e,t){return JL(t-e)*Math.min(Math.abs(t-e),360)})),p1(b1,"getRealPieData",(function(e){var t=e.props,n=t.data,r=t.children,o=EF(e.props),i=NF(r,iV);return n&&n.length?n.map((function(e,t){return s1(s1(s1({payload:e},o),e),i&&i[t]&&i[t].props)})):i&&i.length?i.map((function(e){return s1(s1({},o),e.props)})):[]})),p1(b1,"parseCoordinateOfPie",(function(e,t){var n=t.top,r=t.left,o=t.width,i=t.height,a=gQ(o,i);return{cx:r+iF(e.props.cx,o,o/2),cy:n+iF(e.props.cy,i,i/2),innerRadius:iF(e.props.innerRadius,a,0),outerRadius:iF(e.props.outerRadius,a,.8*a),maxRadius:e.props.maxRadius||Math.sqrt(o*o+i*i)/2}})),p1(b1,"getComposedData",(function(e){var t=e.item,n=e.offset,r=z0.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=z0.parseCoordinateOfPie(t,n),p=z0.parseDeltaAngle(a,u),m=Math.abs(p),b=s;kL(s)&&kL(d)?(fB(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),b="value"):kL(s)&&(fB(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),b=d);var g,y,w=r.filter((function(e){return 0!==BZ(e,b,0)})).length,x=m-w*h-(m>=360?w:w-1)*l,k=r.reduce((function(e,t){var n=BZ(t,b,0);return e+(tF(n)?n:0)}),0);k>0&&(g=r.map((function(e,t){var n,r=BZ(e,b,0),o=BZ(e,c,t),u=(tF(r)?r:0)/k,s=(n=t?y.endAngle+JL(p)*l*(0!==r?1:0):a)+JL(p)*((0!==r?h:0)+u*x),d=(n+s)/2,m=(v.innerRadius+v.outerRadius)/2,g=[{name:o,value:r,payload:e,dataKey:b,type:f}],w=bQ(v.cx,v.cy,m,d);return y=s1(s1(s1({percent:u,cornerRadius:i,name:o,tooltipPayload:g,midAngle:d,middleRadius:m,tooltipPosition:w},e),v),{},{value:BZ(e,b),startAngle:n,endAngle:s,payload:e,paddingAngle:JL(p)*l})})));return s1(s1({},v),{},{sectors:g,data:r})}));var g1=Math.ceil,y1=Math.max;var w1=function(e,t,n,r){for(var o=-1,i=y1(g1((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a},x1=IH,k1=1/0;var O1=function(e){return e?(e=x1(e))===k1||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},j1=w1,S1=XU,N1=O1;var M1=function(e){return function(t,n,r){return r&&"number"!=typeof r&&S1(t,n,r)&&(n=r=void 0),t=N1(t),void 0===n?(n=t,t=0):n=N1(n),r=void 0===r?t<n?1:-1:N1(r),j1(t,n,r,e)}},A1=qs(M1());function C1(e){return C1="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},C1(e)}function T1(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 E1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T1(Object(n),!0).forEach((function(t){P1(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T1(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P1(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==C1(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==C1(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===C1(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var D1=["Webkit","Moz","O","ms"];function I1(e){return I1="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},I1(e)}function _1(){return _1=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},_1.apply(this,arguments)}function R1(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 L1(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R1(Object(n),!0).forEach((function(t){U1(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R1(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F1(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,H1(r.key),r)}}function B1(e,t){return B1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B1(e,t)}function z1(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(xee){return!1}}();return function(){var n,r=W1(e);if(t){var o=W1(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===I1(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return $1(e)}(this,n)}}function $1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W1(e){return W1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},W1(e)}function U1(e,t,n){return(t=H1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H1(e){var t=function(e,t){if("object"!==I1(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==I1(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===I1(t)?t:String(t)}var V1=function(e){return e.changedTouches&&!!e.changedTouches.length},q1=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&&B1(e,t)}(a,t);var n,r,o,i=z1(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),U1($1(t=i.call(this,e)),"handleDrag",(function(e){t.leaveTimer&&(clearTimeout(t.leaveTimer),t.leaveTimer=null),t.state.isTravellerMoving?t.handleTravellerMove(e):t.state.isSlideMoving&&t.handleSlideDrag(e)})),U1($1(t),"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleDrag(e.changedTouches[0])})),U1($1(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()})),U1($1(t),"handleLeaveWrapper",(function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.setTimeout(t.handleDragEnd,t.props.leaveTimeOut))})),U1($1(t),"handleEnterSlideOrTraveller",(function(){t.setState({isTextActive:!0})})),U1($1(t),"handleLeaveSlideOrTraveller",(function(){t.setState({isTextActive:!1})})),U1($1(t),"handleSlideDragStart",(function(e){var n=V1(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:n.pageX}),t.attachDragEndListener()})),t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind($1(t),"startX"),endX:t.handleTravellerDragStart.bind($1(t),"endX")},t.state={},t}return n=a,r=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,n=e.endX,r=this.state.scaleValues,o=this.props,i=o.gap,u=o.data.length-1,l=Math.min(t,n),s=Math.max(t,n),c=a.getIndexInRange(r,l),d=a.getIndexInRange(r,s);return{startIndex:c-c%i,endIndex:d===u?u:d-d%i}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,o=t.dataKey,i=BZ(n[e],o,e);return dx(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=V1(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,n=this.state,r=n.brushMoveStartX,o=n.movingTravellerId,i=n.endX,a=n.startX,u=this.state[o],l=this.props,s=l.x,c=l.width,d=l.travellerWidth,f=l.onChange,h=l.gap,v=l.data,p={startX:this.state.startX,endX:this.state.endX},m=e.pageX-r;m>0?m=Math.min(m,s+c-d-u):m<0&&(m=Math.max(m,s-u)),p[o]=u+m;var b=this.getIndex(p),g=b.startIndex,y=b.endIndex;this.setState((U1(t={},o,u+m),U1(t,"brushMoveStartX",e.pageX),t),(function(){var e;f&&(e=v.length-1,("startX"===o&&(i>a?g%h==0:y%h==0)||i<a&&y===e||"endX"===o&&(i>a?y%h==0:g%h==0)||i>a&&y===e)&&f(b))}))}},{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(U1({},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,n){var r=this,o=this.props,i=o.y,u=o.travellerWidth,l=o.height,s=o.traveller,c=Math.max(t,this.props.x),d=L1(L1({},EF(this.props)),{},{x:c,y:i,width:u,height:l});return e.createElement(WF,{tabIndex:0,role:"slider",className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),r.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,n))},onFocus:function(){r.setState({isTravellerFocused:!0})},onBlur:function(){r.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},a.renderTraveller(s,d))}},{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(WF,{className:"recharts-brush-texts"},e.createElement(VV,_1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(s,c)-5,y:o+i/2},d),this.getTextOfTick(n)),e.createElement(VV,_1({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||!tF(i)||!tF(a)||!tF(u)||!tF(l)||u<=0||l<=0)return null;var b=xL("recharts-brush",r),g=1===e.Children.count(o),y=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,(function(e){return e.toUpperCase()})),r=D1.reduce((function(e,r){return E1(E1({},e),{},P1({},r+n,t))}),{});return r[e]=t,r}("userSelect","none");return e.createElement(WF,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),g&&this.renderPanorama(),this.renderSlide(d,f),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(f,"endX"),(h||v||p||m||s)&&this.renderText())}}],o=[{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,n){return e.isValidElement(t)?e.cloneElement(t,n):dx(t)?t(n):a.renderDefaultTraveller(n)}},{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 L1({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=zq().domain(A1(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}}],r&&F1(n.prototype,r),o&&F1(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);U1(q1,"displayName","Brush"),U1(q1,"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 Y1=xN;var X1=function(e,t){var n;return Y1(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n},G1=SO,K1=gN,Z1=X1,Q1=aw,J1=XU;var e2=function(e,t,n){var r=Q1(e)?G1:Z1;return n&&J1(e,t,n)&&(t=void 0),r(e,K1(t))},t2=qs(e2),n2=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t};var r2=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},o2=xN;var i2=function(e,t){var n=!0;return o2(e,(function(e,r,o){return n=!!t(e,r,o)})),n},a2=r2,u2=i2,l2=gN,s2=aw,c2=XU;var d2=function(e,t,n){var r=s2(e)?a2:u2;return n&&c2(e,t,n)&&(t=void 0),r(e,l2(t))},f2=qs(d2),h2=WN,v2=xx,p2=gN;var m2=function(e,t){var n={};return t=p2(t),v2(e,(function(e,r,o){h2(n,r,t(e,r,o))})),n},b2=qs(m2);function g2(e){return g2="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},g2(e)}var y2=["x","y"];function w2(){return w2=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},w2.apply(this,arguments)}function x2(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?x2(Object(n),!0).forEach((function(t){O2(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x2(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O2(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==g2(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==g2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===g2(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j2(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 S2(e,t){var n=e.x,r=e.y,o=j2(e,y2),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 N2(t){return e.createElement(Q0,w2({shapeType:"rectangle",propTransformer:S2,activeClassName:"recharts-active-bar"},t))}var M2=["value","background"];function A2(e){return A2="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},A2(e)}function C2(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 T2(){return T2=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},T2.apply(this,arguments)}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 P2(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){F2(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 D2(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,B2(r.key),r)}}function I2(e,t){return I2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I2(e,t)}function _2(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(xee){return!1}}();return function(){var n,r=L2(e);if(t){var o=L2(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===A2(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return R2(e)}(this,n)}}function R2(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L2(e){return L2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L2(e)}function F2(e,t,n){return(t=B2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B2(e){var t=function(e,t){if("object"!==A2(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==A2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===A2(t)?t:String(t)}var z2=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&&I2(e,t)}(a,t);var n,r,o,i=_2(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return F2(R2(e=i.call.apply(i,[this].concat(n))),"state",{isAnimationFinished:!1}),F2(R2(e),"id",oF("recharts-bar-")),F2(R2(e),"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()})),F2(R2(e),"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()})),e}return n=a,r=[{key:"renderRectanglesStatically",value:function(t){var n=this,r=this.props,o=r.shape,i=r.dataKey,a=r.activeIndex,u=r.activeBar,l=EF(this.props);return t&&t.map((function(t,r){var s=r===a,c=s?u:o,d=P2(P2(P2({},l),t),{},{isActive:s,option:c,index:r,dataKey:i,onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd});return e.createElement(WF,T2({className:"recharts-bar-rectangle"},mF(n.props,t,r),{key:"rectangle-".concat(r)}),e.createElement(N2,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(lU,{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=uF(n.x,e.x),a=uF(n.y,e.y),u=uF(n.width,e.width),l=uF(n.height,e.height);return P2(P2({},e),{},{x:r(i),y:a(i),width:u(i),height:l(i)})}if("horizontal"===o){var s=uF(0,e.height)(i);return P2(P2({},e),{},{y:e.y+e.height-s,height:s})}var d=uF(0,e.width)(i);return P2(P2({},e),{},{width:d})}));return e.createElement(WF,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&&YV(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=EF(this.props.background);return r.map((function(n,r){n.value;var u=n.background,l=C2(n,M2);if(!u)return null;var s=P2(P2(P2(P2(P2({},l),{},{fill:"#eee"},u),a),mF(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(N2,T2({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=NF(r.children,MZ);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:BZ(e,t)}},d={clipPath:t?"url(#clipPath-".concat(n,")"):null};return e.createElement(WF,d,l.map((function(t,n){return e.cloneElement(t,{key:"error-bar-".concat(n),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=xL("recharts-bar",o),m=i&&i.allowDataOverflow,b=a&&a.allowDataOverflow,g=m||b,y=kL(h)?this.id:h;return e.createElement(WF,{className:p},m||b?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(y)},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(WF,{className:"recharts-bar-rectangles",clipPath:g?"url(#clipPath-".concat(y,")"):null},f?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(g,y),(!d||v)&&ZQ.renderCallByParent(this.props,r))}}],o=[{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}}],r&&D2(n.prototype,r),o&&D2(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);function $2(e){return $2="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},$2(e)}function W2(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,q2(r.key),r)}}function U2(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 H2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U2(Object(n),!0).forEach((function(t){V2(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U2(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V2(e,t,n){return(t=q2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q2(e){var t=function(e,t){if("object"!==$2(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==$2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===$2(t)?t:String(t)}F2(z2,"displayName","Bar"),F2(z2,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!0,isAnimationActive:!uH.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),F2(z2,"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,g=p.minPointSize,y="horizontal"===v?a:i,w=s?y.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:y}),k=NF(b,iV),O=d.map((function(e,t){var r,d,f,p,b,y;if(s?r=function(e,t){if(!t||2!==t.length||!tF(t[0])||!tF(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(!tF(e[0])||e[0]<n)&&(o[0]=n),(!tF(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=BZ(e,m),uw(r)||(r=[x,r])),"horizontal"===v){var O,j=[a.scale(r[0]),a.scale(r[1])],S=j[0],N=j[1];d=tQ({axis:i,ticks:u,bandSize:o,offset:h.offset,entry:e,index:t}),f=null!==(O=null!=N?N:S)&&void 0!==O?O:void 0,p=h.size;var M=S-N;if(b=Number.isNaN(M)?0:M,y={x:d,y:a.y,width:p,height:a.height},Math.abs(g)>0&&Math.abs(b)<Math.abs(g)){var A=JL(b||g)*(Math.abs(g)-Math.abs(b));f-=A,b+=A}}else{var C=[i.scale(r[0]),i.scale(r[1])],T=C[0],E=C[1];if(d=T,f=tQ({axis:a,ticks:l,bandSize:o,offset:h.offset,entry:e,index:t}),p=E-T,b=h.size,y={x:i.x,y:f,width:i.width,height:b},Math.abs(g)>0&&Math.abs(p)<Math.abs(g))p+=JL(p||g)*(Math.abs(g)-Math.abs(p))}return P2(P2(P2({},e),{},{x:d,y:f,width:p,height:b,value:s?r:r[1],payload:e,background:y},k&&k[t]&&k[t].props),{},{tooltipPayload:[lQ(n,e)],tooltipPosition:{x:d+p/2,y:f+b/2}})}));return P2({data:O,layout:v},f)}));var Y2=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=!!MF(l,z2);return s.reduce((function(i,a){var l,s,f,h,v,p=t[a],m=p.orientation,b=p.domain,g=p.padding,y=void 0===g?{}:g,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 A=iF(e.barCategoryGap,N*M),C=N*M/2;l=C-A-(C-A)/M*A}}s="xAxis"===r?[n.left+(y.left||0)+(l||0),n.left+n.width-(y.right||0)-(l||0)]:"yAxis"===r?"horizontal"===u?[n.top+n.height-(y.bottom||0),n.top+(y.top||0)]:[n.top+(y.top||0)+(l||0),n.top+n.height-(y.bottom||0)-(l||0)]:p.range,x&&(s=[s[1],s[0]]);var T=XZ(p,o,d),E=T.scale,P=T.realScaleType;E.domain(b).range(s),KZ(E);var D=JZ(E,H2(H2({},p),{},{realScaleType:P}));"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=H2(H2(H2({},p),D),{},{realScaleType:P,x:f,y:h,scale:E,width:"xAxis"===r?n.width:p.width,height:"yAxis"===r?n.height:p.height});return I.bandSize=aQ(I,D),p.hide||"xAxis"!==r?p.hide||(c[k]+=(v?-1:1)*I.width):c[k]+=(v?-1:1)*I.height,H2(H2({},i),{},V2({},a,I))}),{})},X2=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)}},G2=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&&W2(t.prototype,n),r&&W2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();V2(G2,"EPS",1e-4);var K2=function(e){var t=Object.keys(e).reduce((function(t,n){return H2(H2({},t),{},V2({},n,G2.create(e[n])))}),{});return H2(H2({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,o=n.position;return b2(e,(function(e,n){return t[n].apply(e,{bandAware:r,position:o})}))},isInRange:function(e){return f2(e,(function(e,n){return t[n].isInRange(e)}))}})};var Z2=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)};function Q2(e){return Q2="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},Q2(e)}function J2(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 e5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J2(Object(n),!0).forEach((function(t){t5(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J2(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function t5(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Q2(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Q2(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Q2(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n5(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 r5(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 r5(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 r5(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 o5(){return o5=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},o5.apply(this,arguments)}function i5(t){var n=t.x,r=t.y,o=t.segment,i=t.xAxis,a=t.yAxis,u=t.shape,l=t.className,s=t.alwaysShow,c=t.clipPathId;fB(void 0===s,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=function(e,t,n,r,o){var i=o.viewBox,a=i.x,u=i.y,l=i.width,s=i.height,c=o.position;if(n){var d=o.y,f=o.yAxis.orientation,h=e.y.apply(d,{position:c});if(n2(o,"discard")&&!e.y.isInRange(h))return null;var v=[{x:a+l,y:h},{x:a,y:h}];return"left"===f?v.reverse():v}if(t){var p=o.x,m=o.xAxis.orientation,b=e.x.apply(p,{position:c});if(n2(o,"discard")&&!e.x.isInRange(b))return null;var g=[{x:b,y:u+s},{x:b,y:u}];return"top"===m?g.reverse():g}if(r){var y=o.segment.map((function(t){return e.apply(t,{position:c})}));return n2(o,"discard")&&t2(y,(function(t){return!e.isInRange(t)}))?null:y}return null}(K2({x:i.scale,y:a.scale}),nF(n),nF(r),o&&2===o.length,t);if(!d)return null;var f=n5(d,2),h=f[0],v=h.x,p=h.y,m=f[1],b=m.x,g=m.y,y=e5(e5({clipPath:n2(t,"hidden")?"url(#".concat(c,")"):void 0},EF(t,!0)),{},{x1:v,y1:p,x2:b,y2:g});return e.createElement(WF,{className:xL("recharts-reference-line",l)},function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):dx(t)?t(n):e.createElement("line",o5({},n,{className:"recharts-reference-line-line"}))}(u,y),RQ.renderCallByParent(t,function(e){var t=e.x1,n=e.y1,r=e.x2,o=e.y2;return X2({x:t,y:n},{x:r,y:o})}({x1:v,y1:p,x2:b,y2:g})))}function a5(e){return a5="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},a5(e)}function u5(){return u5=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},u5.apply(this,arguments)}function l5(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 s5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l5(Object(n),!0).forEach((function(t){c5(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c5(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==a5(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==a5(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a5(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}i5.displayName="ReferenceLine",i5.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"};function d5(t){var n=t.x,r=t.y,o=t.r,i=t.alwaysShow,a=t.clipPathId,u=nF(n),l=nF(r);if(fB(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=K2({x:r.scale,y:o.scale}),a=i.apply({x:t,y:n},{bandAware:!0});return n2(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=s5(s5({clipPath:n2(t,"hidden")?"url(#".concat(a,")"):void 0},EF(t,!0)),{},{cx:c,cy:d});return e.createElement(WF,{className:xL("recharts-reference-dot",h)},d5.renderDot(f,v),RQ.renderCallByParent(t,{x:c-o,y:d-o,width:2*o,height:2*o}))}function f5(e){return f5="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},f5(e)}function h5(){return h5=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},h5.apply(this,arguments)}function v5(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 p5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v5(Object(n),!0).forEach((function(t){m5(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m5(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==f5(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==f5(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===f5(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}d5.displayName="ReferenceDot",d5.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1},d5.renderDot=function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):dx(t)?t(n):e.createElement(FJ,u5({},n,{cx:n.cx,cy:n.cy,className:"recharts-reference-dot-dot"}))};function b5(t){var n=t.x1,r=t.x2,o=t.y1,i=t.y2,a=t.className,u=t.alwaysShow,l=t.clipPathId;fB(void 0===u,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var s=nF(n),c=nF(r),d=nF(o),f=nF(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=K2({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!n2(o,"discard")||d.isInRange(f)&&d.isInRange(h)?X2(f,h):null}(s,c,d,f,t);if(!v&&!h)return null;var p=n2(t,"hidden")?"url(#".concat(l,")"):void 0;return e.createElement(WF,{className:xL("recharts-reference-area",a)},b5.renderRect(h,p5(p5({clipPath:p},EF(t,!0)),v)),RQ.renderCallByParent(t,v))}function g5(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 y5(e,t,n,r,o){return e*(t-e*n/2-r)>=0&&e*(t+e*n/2-o)<=0}function w5(e){return w5="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},w5(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 k5(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){O5(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 O5(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==w5(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==w5(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===w5(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j5(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(tF(l)||uH.isSsr)return function(e,t){return g5(e,t+1)}(o,"number"==typeof l&&tF(l)?l:0);var f=[],h="top"===u||"bottom"===u?"width":"height",v=c&&"width"===h?bV(c,{fontSize:t,letterSpacing:n}):{width:0,height:0},p=function(e,r){var o=dx(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 Z2(r,n)}(bV(o,{fontSize:t,letterSpacing:n}),v,d):bV(o,{fontSize:t,letterSpacing:n})[h]},m=o.length>=2?JL(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=(r||[]).slice(),a=t.start,u=t.end,l=0,s=1,c=a;s<=i.length;){var d=null==r?void 0:r[l];if(void 0===d)return g5(r,s);var f=n(d,l),h=d.coordinate,v=0===l||y5(e,h,f,c,u);v||(l=0,c=a,s+=1),v&&(c=h+e*(f/2+o),l+=s)}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=k5(k5({},c),{},{tickCoord:f>0?c.coordinate-f*e:c.coordinate}),y5(e,c.tickCoord,d,l,s)&&(s=c.tickCoord-e*(d/2+o),a[u-1]=k5(k5({},c),{},{isShow:!0}))}for(var h=i?u-1:u,v=0;v<h;v++){var p=a[v],m=n(p,v);if(0===v){var b=e*(p.coordinate-e*m/2-l);a[v]=p=k5(k5({},p),{},{tickCoord:b<0?p.coordinate-b*e:p.coordinate})}else a[v]=p=k5(k5({},p),{},{tickCoord:p.coordinate});y5(e,p.tickCoord,m,l,s)&&(l=p.tickCoord+e*(m/2+o),a[v]=k5(k5({},p),{},{isShow:!0}))}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=a-1;s>=0;s--){var c=i[s],d=n(c,s);if(s===a-1){var f=e*(c.coordinate+e*d/2-l);i[s]=c=k5(k5({},c),{},{tickCoord:f>0?c.coordinate-f*e:c.coordinate})}else i[s]=c=k5(k5({},c),{},{tickCoord:c.coordinate});y5(e,c.tickCoord,d,u,l)&&(l=c.tickCoord-e*(d/2+o),i[s]=k5(k5({},c),{},{isShow:!0}))}return i}(m,b,p,o,a),f.filter((function(e){return e.isShow})))}b5.displayName="ReferenceArea",b5.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1},b5.renderRect=function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):dx(t)?t(n):e.createElement(AJ,h5({},n,{className:"recharts-reference-area-rect"}))};var S5=["viewBox"],N5=["viewBox"],M5=["ticks"];function A5(e){return A5="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},A5(e)}function C5(){return C5=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},C5.apply(this,arguments)}function T5(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 E5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T5(Object(n),!0).forEach((function(t){L5(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P5(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 D5(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 I5(e,t){return I5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I5(e,t)}function _5(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(xee){return!1}}();return function(){var n,r=R5(e);if(t){var o=R5(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===A5(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)}(this,n)}}function R5(e){return R5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R5(e)}function L5(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"!==A5(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==A5(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===A5(t)?t:String(t)}var B5=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&&I5(e,t)}(a,t);var n,r,o,i=_5(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).state={fontSize:"",letterSpacing:""},t}return n=a,r=[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=P5(e,S5),o=this.props,i=o.viewBox,a=P5(o,N5);return!sF(n,i)||!sF(r,a)||!sF(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,g=tF(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=g;break;case"left":r=o=e.coordinate,i=(t=(n=l+ +!v*c)-m*b)-m*p,a=g;break;case"right":r=o=e.coordinate,i=(t=(n=l+ +v*c)+m*b)+m*p,a=g;break;default:t=n=e.coordinate,a=(r=(o=s+ +v*d)+m*b)+m*p,i=g}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=E5(E5(E5({},EF(this.props)),EF(l)),{},{fill:"none"});if("top"===a||"bottom"===a){var c=+("top"===a&&!u||"bottom"===a&&u);s=E5(E5({},s),{},{x1:n,y1:r+c*i,x2:n+o,y2:r+c*i})}else{var d=+("left"===a&&!u||"right"===a&&u);s=E5(E5({},s),{},{x1:n+d*o,y1:r,x2:n+d*o,y2:r+i})}return e.createElement("line",C5({},s,{className:xL("recharts-cartesian-axis-line",zS(l,"className"))}))}},{key:"renderTicks",value:function(t,n,r){var o=this,i=this.props,u=i.tickLine,l=i.stroke,s=i.tick,c=i.tickFormatter,d=i.unit,f=j5(E5(E5({},this.props),{},{ticks:t}),n,r),h=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),p=EF(this.props),m=EF(s),b=E5(E5({},p),{},{fill:"none"},EF(u)),g=f.map((function(t,n){var r=o.getTickLineCoord(t),i=r.line,g=r.tick,y=E5(E5(E5(E5({textAnchor:h,verticalAnchor:v},p),{},{stroke:"none",fill:l},m),g),{},{index:n,payload:t,visibleTicksCount:f.length,tickFormatter:c});return e.createElement(WF,C5({className:"recharts-cartesian-axis-tick",key:"tick-".concat(n)},mF(o.props,t,n)),u&&e.createElement("line",C5({},b,i,{className:xL("recharts-cartesian-axis-tick-line",zS(u,"className"))})),s&&a.renderTickItem(s,y,"".concat(dx(c)?c(t.value,n):t.value).concat(d||"")))}));return e.createElement("g",{className:"recharts-cartesian-axis-ticks"},g)}},{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=P5(l,M5),d=s;return dx(a)&&(d=s&&s.length>0?a(this.props):a(c)),o<=0||i<=0||!d||!d.length?null:e.createElement(WF,{className:xL("recharts-cartesian-axis",u),ref:function(e){t.layerReference=e}},r&&this.renderAxisLine(),this.renderTicks(d,this.state.fontSize,this.state.letterSpacing),RQ.renderCallByParent(this.props))}}],o=[{key:"renderTickItem",value:function(t,n,r){return e.isValidElement(t)?e.cloneElement(t,n):dx(t)?t(n):e.createElement(VV,C5({},n,{className:"recharts-cartesian-axis-tick-value"}),r)}}],r&&D5(n.prototype,r),o&&D5(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.Component);L5(B5,"displayName","CartesianAxis"),L5(B5,"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 z5=["x1","y1","x2","y2","key"],$5=["offset"];function W5(e){return W5="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},W5(e)}function U5(){return U5=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},U5.apply(this,arguments)}function H5(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 V5(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 q5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V5(Object(n),!0).forEach((function(t){Z5(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V5(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y5(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,Q5(r.key),r)}}function X5(e,t){return X5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X5(e,t)}function G5(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(xee){return!1}}();return function(){var n,r=K5(e);if(t){var o=K5(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===W5(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)}(this,n)}}function K5(e){return K5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K5(e)}function Z5(e,t,n){return(t=Q5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q5(e){var t=function(e,t){if("object"!==W5(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==W5(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===W5(t)?t:String(t)}var J5=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&&X5(e,t)}(a,t);var n,r,o,i=G5(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return n=a,r=[{key:"renderHorizontal",value:function(t){var n=this,r=this.props,o=r.x,i=r.width,u=r.horizontal;if(!t||!t.length)return null;var l=t.map((function(e,t){var r=q5(q5({},n.props),{},{x1:o,y1:e,x2:o+i,y2:e,key:"line-".concat(t),index:t});return a.renderLineItem(u,r)}));return e.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}},{key:"renderVertical",value:function(t){var n=this,r=this.props,o=r.y,i=r.height,u=r.vertical;if(!t||!t.length)return null;var l=t.map((function(e,t){var r=q5(q5({},n.props),{},{x1:e,y1:o,x2:e,y2:o+i,key:"line-".concat(t),index:t});return a.renderLineItem(u,r)}));return e.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}},{key:"renderVerticalStripes",value:function(t){var n=this.props.verticalFill;if(!n||!n.length)return null;var r=this.props,o=r.fillOpacity,i=r.x,a=r.y,u=r.width,l=r.height,s=t.map((function(e){return Math.round(e+i-i)})).sort((function(e,t){return e-t}));i!==s[0]&&s.unshift(0);var c=s.map((function(t,r){var c=s[r+1]?s[r+1]-t:i+u-t;if(c<=0)return null;var d=r%n.length;return e.createElement("rect",{key:"react-".concat(r),x:t,y:a,width:c,height:l,stroke:"none",fill:n[d],fillOpacity:o,className:"recharts-cartesian-grid-bg"})}));return e.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}},{key:"renderHorizontalStripes",value:function(t){var n=this.props.horizontalFill;if(!n||!n.length)return null;var r=this.props,o=r.fillOpacity,i=r.x,a=r.y,u=r.width,l=r.height,s=t.map((function(e){return Math.round(e+a-a)})).sort((function(e,t){return e-t}));a!==s[0]&&s.unshift(0);var c=s.map((function(t,r){var c=s[r+1]?s[r+1]-t:a+l-t;if(c<=0)return null;var d=r%n.length;return e.createElement("rect",{key:"react-".concat(r),y:t,x:i,height:c,width:u,stroke:"none",fill:n[d],fillOpacity:o,className:"recharts-cartesian-grid-bg"})}));return e.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}},{key:"renderBackground",value:function(){var t=this.props.fill;if(!t||"none"===t)return null;var n=this.props,r=n.fillOpacity,o=n.x,i=n.y,a=n.width,u=n.height;return e.createElement("rect",{x:o,y:i,width:a,height:u,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})}},{key:"render",value:function(){var t=this.props,n=t.x,r=t.y,o=t.width,i=t.height,a=t.horizontal,u=t.vertical,l=t.horizontalCoordinatesGenerator,s=t.verticalCoordinatesGenerator,c=t.xAxis,d=t.yAxis,f=t.offset,h=t.chartWidth,v=t.chartHeight,p=t.syncWithTicks,m=t.horizontalValues,b=t.verticalValues;if(!tF(o)||o<=0||!tF(i)||i<=0||!tF(n)||n!==+n||!tF(r)||r!==+r)return null;var g=this.props,y=g.horizontalPoints,w=g.verticalPoints;if((!y||!y.length)&&dx(l)){var x=m&&m.length;y=l({yAxis:q5(q5({},d),{},{ticks:x?m:d.ticks}),width:h,height:v,offset:f},!!x||p)}if((!w||!w.length)&&dx(s)){var k=b&&b.length;w=s({xAxis:q5(q5({},c),{},{ticks:k?b:c.ticks}),width:h,height:v,offset:f},!!k||p)}return e.createElement("g",{className:"recharts-cartesian-grid"},this.renderBackground(),a&&this.renderHorizontal(y),u&&this.renderVertical(w),a&&this.renderHorizontalStripes(y),u&&this.renderVerticalStripes(w))}}],o=[{key:"renderLineItem",value:function(t,n){var r;if(e.isValidElement(t))r=e.cloneElement(t,n);else if(dx(t))r=t(n);else{var o=n.x1,i=n.y1,a=n.x2,u=n.y2,l=n.key,s=H5(n,z5),c=EF(s);c.offset;var d=H5(c,$5);r=e.createElement("line",U5({},d,{x1:o,y1:i,x2:a,y2:u,fill:"none",key:l}))}return r}}],r&&Y5(n.prototype,r),o&&Y5(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);Z5(J5,"displayName","CartesianGrid"),Z5(J5,"defaultProps",{horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]});var e3=["type","layout","connectNulls","ref"];function t3(e){return t3="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},t3(e)}function n3(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 r3(){return r3=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},r3.apply(this,arguments)}function o3(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 i3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o3(Object(n),!0).forEach((function(t){h3(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a3(e){return function(e){if(Array.isArray(e))return u3(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 u3(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 u3(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 u3(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 l3(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,v3(r.key),r)}}function s3(e,t){return s3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s3(e,t)}function c3(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(xee){return!1}}();return function(){var n,r=f3(e);if(t){var o=f3(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===t3(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d3(e)}(this,n)}}function d3(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f3(e){return f3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f3(e)}function h3(e,t,n){return(t=v3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v3(e){var t=function(e,t){if("object"!==t3(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==t3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===t3(t)?t:String(t)}var p3=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&&s3(e,t)}(a,t);var n,r,o,i=c3(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h3(d3(e=i.call.apply(i,[this].concat(n))),"state",{isAnimationFinished:!0,totalLength:0}),h3(d3(e),"getStrokeDasharray",(function(e,t,n){for(var r=n.reduce((function(e,t){return e+t})),o=Math.floor(e/r),i=e%r,u=t-e,l=[],s=0,c=0;;c+=n[s],++s)if(c+n[s]>i){l=[].concat(a3(n.slice(0,s)),[i-c]);break}var d=l.length%2==0?[0,u]:[u];return[].concat(a3(a.repeat(n,o)),a3(l),d).map((function(e){return"".concat(e,"px")})).join(", ")})),h3(d3(e),"id",oF("recharts-line-")),h3(d3(e),"pathRef",(function(t){e.mainCurve=t})),h3(d3(e),"handleAnimationEnd",(function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()})),h3(d3(e),"handleAnimationStart",(function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()})),e}return n=a,r=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(rse){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=NF(r.children,MZ);if(!l)return null;var s=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:BZ(e.payload,t)}},c={clipPath:t?"url(#clipPath-".concat(n,")"):null};return e.createElement(WF,c,l.map((function(t,n){return e.cloneElement(t,{key:"bar-".concat(n),data:o,xAxis:i,yAxis:a,layout:u,dataPointFormatter:s})})))}},{key:"renderDots",value:function(t,n,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,i=o.dot,u=o.points,l=o.dataKey,s=EF(this.props),c=EF(i,!0),d=u.map((function(e,t){var n=i3(i3(i3({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 a.renderDotItem(i,n)})),f={clipPath:t?"url(#clipPath-".concat(n?"":"dots-").concat(r,")"):null};return e.createElement(WF,r3({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=n3(i,e3),c=i3(i3(i3({},EF(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(bJ,r3({},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(lU,{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=uF(r.x,e.x),a=uF(r.y,e.y);return i3(i3({},e),{},{x:i(o),y:a(o)})}if(f){var l=uF(2*h,e.x),s=uF(v/2,e.y);return i3(i3({},e),{},{x:l(o),y:s(o)})}return i3(i3({},e),{},{x:e.x,y:e.y})}));return r.renderCurveStatically(l,t,n)}var s,c=uF(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="".concat(c,"px ").concat(b-c,"px");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||!YV(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=xL("recharts-line",a),g=u&&u.allowDataOverflow,y=l&&l.allowDataOverflow,w=g||y,x=kL(v)?this.id:v,k=null!==(t=EF(o))&&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=(TF(o)?o:{}).clipDot,A=void 0===M||M,C=2*j+N;return e.createElement(WF,{className:b},g||y?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(x)},e.createElement("rect",{x:g?c:c-d/2,y:y?s:s-f/2,width:g?d:2*d,height:y?f:2*f})),!A&&e.createElement("clipPath",{id:"clipPath-dots-".concat(x)},e.createElement("rect",{x:c-C/2,y:s-C/2,width:d+C,height:f+C}))):null,!m&&this.renderCurve(w,x),this.renderErrorBar(w,x),(m||o)&&this.renderDots(w,A,x),(!h||p)&&ZQ.renderCallByParent(this.props,i))}}],o=[{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(a3(e),[0]):e,r=[],o=0;o<t;++o)r=[].concat(a3(r),a3(n));return r}},{key:"renderDotItem",value:function(t,n){var r;if(e.isValidElement(t))r=e.cloneElement(t,n);else if(dx(t))r=t(n);else{var o=xL("recharts-line-dot",t?t.className:"");r=e.createElement(FJ,r3({},n,{className:o}))}return r}}],r&&l3(n.prototype,r),o&&l3(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);h3(p3,"displayName","Line"),h3(p3,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!uH.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),h3(p3,"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=BZ(e,a);return"horizontal"===c?{x:eQ({axis:n,ticks:o,bandSize:u,entry:e,index:t}),y:kL(l)?null:r.scale(l),value:l,payload:e}:{x:kL(l)?null:n.scale(l),y:eQ({axis:r,ticks:i,bandSize:u,entry:e,index:t}),value:l,payload:e}}));return i3({points:d,layout:c},s)}));var m3,b3=["layout","type","stroke","connectNulls","isRange","ref"];function g3(e){return g3="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},g3(e)}function y3(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 w3(){return w3=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},w3.apply(this,arguments)}function x3(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 k3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x3(Object(n),!0).forEach((function(t){A3(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O3(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,C3(r.key),r)}}function j3(e,t){return j3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j3(e,t)}function S3(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(xee){return!1}}();return function(){var n,r=M3(e);if(t){var o=M3(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===g3(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return N3(e)}(this,n)}}function N3(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M3(e){return M3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M3(e)}function A3(e,t,n){return(t=C3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C3(e){var t=function(e,t){if("object"!==g3(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==g3(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===g3(t)?t:String(t)}var T3=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&&j3(e,t)}(a,t);var n,r,o,i=S3(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return A3(N3(e=i.call.apply(i,[this].concat(n))),"state",{isAnimationFinished:!0}),A3(N3(e),"id",oF("recharts-area-")),A3(N3(e),"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),dx(t)&&t()})),A3(N3(e),"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),dx(t)&&t()})),e}return n=a,r=[{key:"renderDots",value:function(t,n,r){var o=this.props.isAnimationActive,i=this.state.isAnimationFinished;if(o&&!i)return null;var u=this.props,l=u.dot,s=u.points,c=u.dataKey,d=EF(this.props),f=EF(l,!0),h=s.map((function(e,t){var n=k3(k3(k3({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 a.renderDotItem(l,n)})),v={clipPath:t?"url(#clipPath-".concat(n?"":"dots-").concat(r,")"):null};return e.createElement(WF,w3({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=tq(o.map((function(e){return e.y||0})));return tF(r)&&"number"==typeof r?s=Math.max(r,s):r&&uw(r)&&r.length&&(s=Math.max(tq(r.map((function(e){return e.y||0}))),s)),tF(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=tq(o.map((function(e){return e.x||0})));return tF(r)&&"number"==typeof r?s=Math.max(r,s):r&&uw(r)&&r.length&&(s=Math.max(tq(r.map((function(e){return e.x||0}))),s)),tF(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=y3(i,b3);return e.createElement(WF,{clipPath:r?"url(#clipPath-".concat(o,")"):null},e.createElement(bJ,w3({},EF(d,!0),{points:t,connectNulls:s,type:u,baseLine:n,layout:a,stroke:"none",className:"recharts-area-area"})),"none"!==l&&e.createElement(bJ,w3({},EF(this.props),{className:"recharts-area-curve",layout:a,type:u,connectNulls:s,fill:"none",points:t})),"none"!==l&&c&&e.createElement(bJ,w3({},EF(this.props),{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(lU,{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=uF(r.x,e.x),i=uF(r.y,e.y);return k3(k3({},e),{},{x:o(u),y:i(u)})}return e}));return l=tF(a)&&"number"==typeof a?uF(v,a)(u):kL(a)||QL(a)?uF(v,0)(u):a.map((function(e,t){var n=Math.floor(t*s);if(v[n]){var r=v[n],o=uF(r.x,e.x),i=uF(r.y,e.y);return k3(k3({},e),{},{x:o(u),y:i(u)})}return e})),r.renderAreaStatically(c,l,t,n)}return e.createElement(WF,null,e.createElement("defs",null,e.createElement("clipPath",{id:"animationClipPath-".concat(n)},r.renderClipRect(u))),e.createElement(WF,{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||!YV(u,r)||!YV(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=xL("recharts-area",a),g=s&&s.allowDataOverflow,y=c&&c.allowDataOverflow,w=g||y,x=kL(v)?this.id:v,k=null!==(t=EF(o))&&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=(TF(o)?o:{}).clipDot,A=void 0===M||M,C=2*j+N;return e.createElement(WF,{className:b},g||y?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(x)},e.createElement("rect",{x:g?l:l-d/2,y:y?u:u-f/2,width:g?d:2*d,height:y?f:2*f})),!A&&e.createElement("clipPath",{id:"clipPath-dots-".concat(x)},e.createElement("rect",{x:l-C/2,y:u-C/2,width:d+C,height:f+C}))):null,m?null:this.renderArea(w,x),(o||m)&&this.renderDots(w,A,x),(!h||p)&&ZQ.renderCallByParent(this.props,i))}}],o=[{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}}],r&&O3(n.prototype,r),o&&O3(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);m3=T3,A3(T3,"displayName","Area"),A3(T3,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!uH.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),A3(T3,"getBaseValue",(function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,u=null!=a?a:i;if(tF(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]})),A3(T3,"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=m3.getBaseValue(n,r,o,i),b=!1,g=f.map((function(e,t){var n,r=BZ(e,s);p?n=c[d+t]:uw(n=r)?b=!0:n=[m,n];var f=kL(n[1])||p&&kL(r);return"horizontal"===v?{x:eQ({axis:o,ticks:a,bandSize:l,entry:e,index:t}),y:f?null:i.scale(n[1]),value:n,payload:e}:{x:f?null:o.scale(n[1]),y:eQ({axis:i,ticks:u,bandSize:l,entry:e,index:t}),value:n,payload:e}}));return t=p||b?g.map((function(e){return"horizontal"===v?{x:e.x,y:kL(zS(e,"value[0]"))||kL(zS(e,"y"))?null:i.scale(zS(e,"value[0]"))}:{x:kL(zS(e,"value[0]"))?null:o.scale(zS(e,"value[0]")),y:e.y}})):"horizontal"===v?i.scale(m):o.scale(m),k3({points:g,baseLine:t,layout:v,isRange:b},h)})),A3(T3,"renderDotItem",(function(t,n){return e.isValidElement(t)?e.cloneElement(t,n):dx(t)?t(n):e.createElement(FJ,w3({},n,{className:"recharts-area-dot"}))}));var E3=function(){return null};E3.displayName="ZAxis",E3.defaultProps={zAxisId:0,range:[64,64],scale:"auto",type:"number"};var P3=["option","isActive"];function D3(){return D3=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},D3.apply(this,arguments)}function I3(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 _3(t){var n=t.option,r=t.isActive,o=I3(t,P3);return"string"==typeof n?e.createElement(Q0,D3({option:e.createElement(t$,D3({type:n},o)),isActive:r,shapeType:"symbols"},o)):e.createElement(Q0,D3({option:n,isActive:r,shapeType:"symbols"},o))}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 L3(){return L3=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},L3.apply(this,arguments)}function F3(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 B3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F3(Object(n),!0).forEach((function(t){V3(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F3(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z3(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,q3(r.key),r)}}function $3(e,t){return $3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$3(e,t)}function W3(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(xee){return!1}}();return function(){var n,r=H3(e);if(t){var o=H3(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===R3(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return U3(e)}(this,n)}}function U3(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H3(e){return H3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H3(e)}function V3(e,t,n){return(t=q3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q3(e){var t=function(e,t){if("object"!==R3(e)||null===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)}var Y3=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&&$3(e,t)}(a,t);var n,r,o,i=W3(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return V3(U3(e=i.call.apply(i,[this].concat(n))),"state",{isAnimationFinished:!1}),V3(U3(e),"handleAnimationEnd",(function(){e.setState({isAnimationFinished:!0})})),V3(U3(e),"handleAnimationStart",(function(){e.setState({isAnimationFinished:!1})})),V3(U3(e),"id",oF("recharts-scatter-")),e}return n=a,r=[{key:"renderSymbolsStatically",value:function(t){var n=this,r=this.props,o=r.shape,i=r.activeShape,a=r.activeIndex,u=EF(this.props);return t.map((function(t,r){var l=a===r,s=l?i:o,c=B3(B3({key:"symbol-".concat(r)},u),t);return e.createElement(WF,L3({className:"recharts-scatter-symbol"},mF(n.props,t,r),{key:"symbol-".concat(r),role:"img"}),e.createElement(_3,L3({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(lU,{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=uF(n.cx,e.cx),i=uF(n.cy,e.cy),a=uF(n.size,e.size);return B3(B3({},e),{},{cx:r(o),cy:i(o),size:a(o)})}var u=uF(0,e.size);return B3(B3({},e),{},{size:u(o)})}));return e.createElement(WF,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&&YV(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=NF(t.children,MZ);return i?i.map((function(t,i){var a=t.props.direction;return e.cloneElement(t,{key:i,data:n,xAxis:r,yAxis:o,layout:"x"===a?"vertical":"horizontal",dataPointFormatter:function(e,t){return{x:e.cx,y:e.cy,value:"x"===a?+e.node.x:+e.node.y,errorVal:BZ(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=EF(this.props),s=EF(i);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=B3(B3(B3({},l),{},{fill:"none",stroke:l&&l.fill},s),{},{points:t});return n=e.isValidElement(i)?e.cloneElement(i,m):dx(i)?i(m):e.createElement(bJ,L3({},m,{type:u})),e.createElement(WF,{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=xL("recharts-scatter",i),m=a&&a.allowDataOverflow,b=u&&u.allowDataOverflow,g=m||b,y=kL(f)?this.id:f;return e.createElement(WF,{className:p,clipPath:g?"url(#clipPath-".concat(y,")"):null},m||b?e.createElement("defs",null,e.createElement("clipPath",{id:"clipPath-".concat(y)},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(WF,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!h||v)&&ZQ.renderCallByParent(this.props,r))}}],o=[{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}}],r&&z3(n.prototype,r),o&&z3(n,o),Object.defineProperty(n,"prototype",{writable:!1}),a}(e.PureComponent);V3(Y3,"displayName","Scatter"),V3(Y3,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!uH.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"}),V3(Y3,"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=NF(o.props.children,iV),d=kL(t.dataKey)?o.props.dataKey:t.dataKey,f=kL(n.dataKey)?o.props.dataKey:n.dataKey,h=r&&r.dataKey,v=r?r.range:E3.defaultProps.range,p=v&&v[0],m=t.scale.bandwidth?t.scale.bandwidth():0,b=n.scale.bandwidth?n.scale.bandwidth():0,g=i.map((function(e,i){var l=BZ(e,d),v=BZ(e,f),g=!kL(h)&&BZ(e,h)||"-",y=[{name:kL(t.dataKey)?o.props.name:t.name||t.dataKey,unit:t.unit||"",value:l,payload:e,dataKey:d,type:s},{name:kL(n.dataKey)?o.props.name:n.name||n.dataKey,unit:n.unit||"",value:v,payload:e,dataKey:f,type:s}];"-"!==g&&y.push({name:r.name||r.dataKey,unit:r.unit||"",value:g,payload:e,dataKey:h,type:s});var w=eQ({axis:t,ticks:a,bandSize:m,entry:e,index:i,dataKey:d}),x=eQ({axis:n,ticks:u,bandSize:b,entry:e,index:i,dataKey:f}),k="-"!==g?r.scale(g):p,O=Math.sqrt(Math.max(k,0)/Math.PI);return B3(B3({},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:g},tooltipPayload:y,tooltipPosition:{x:w,y:x},payload:e},c&&c[i]&&c[i].props)}));return B3({points:g},l)}));var X3=function(){return null};X3.displayName="XAxis",X3.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 G3=function(){return null};G3.displayName="YAxis",G3.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 K3=gN,Z3=vx,Q3=gx;var J3=function(e){return function(t,n,r){var o=Object(t);if(!Z3(t)){var i=K3(n);t=Q3(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}},e4=O1;var t4=UF,n4=gN,r4=function(e){var t=e4(e),n=t%1;return t==t?n?t-n:t:0},o4=Math.max;var i4=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:r4(n);return o<0&&(o=o4(r+o,0)),t4(e,n4(t),o)},a4=qs(J3(i4));function u4(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,i=e.endAngle;return{points:[bQ(t,n,r,o),bQ(t,n,r,i)],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}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}var c4=function(e,t,n,r,o){var i=NF(e,i5),a=NF(e,d5),u=[].concat(l4(i),l4(a)),l=NF(e,b5),s="".concat(r,"Id"),c=r[0],d=t;if(u.length&&(d=u.reduce((function(e,t){if(t.props[s]===n&&n2(t.props,"extendDomain")&&tF(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&&n2(t.props,"extendDomain")&&tF(t.props[f])&&tF(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 tF(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e}),d)),d},d4={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}(d4);var f4=new(qs(d4.exports));f4.setMaxListeners&&f4.setMaxListeners(10);var h4="recharts.syncMouseEvents";function v4(e){return v4="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},v4(e)}function p4(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 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"!==v4(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==v4(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===v4(t)?t:String(t)}var g4=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),m4(this,"activeIndex",0),m4(this,"coordinateList",[]),m4(this,"layout","horizontal")}var t,n,r;return t=e,n=[{key:"setDetails",value:function(e){var t=e.coordinateList,n=void 0===t?[]:t,r=e.container,o=void 0===r?null:r,i=e.layout,a=void 0===i?null:i,u=e.offset,l=void 0===u?null:u,s=e.mouseHandlerCallback,c=void 0===s?null:s;this.coordinateList=null!=n?n:this.coordinateList,this.container=null!=o?o:this.container,this.layout=null!=a?a:this.layout,this.offset=null!=l?l:this.offset,this.mouseHandlerCallback=null!=c?c: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:"spoofMouse",value:function(){if("horizontal"===this.layout&&0!==this.coordinateList.length){var e=this.container.getBoundingClientRect(),t=e.x,n=e.y,r=e.height,o=t+this.coordinateList[this.activeIndex].coordinate,i=n+this.offset.top+r/2;this.mouseHandlerCallback({pageX:o,pageY:i})}}}],n&&p4(t.prototype,n),r&&p4(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function y4(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 u4(t);var u=t.cx,l=t.cy,s=t.innerRadius,c=t.outerRadius,d=t.angle,f=bQ(u,l,s,d),h=bQ(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}]}var w4=["item"],x4=["children","className","width","height","style","compact","title","desc"];function k4(e){return k4="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},k4(e)}function O4(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)||P4(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 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)}function S4(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 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,L4(r.key),r)}}function M4(e,t){return M4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M4(e,t)}function A4(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(xee){return!1}}();return function(){var n,r=T4(e);if(t){var o=T4(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===k4(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return C4(e)}(this,n)}}function C4(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T4(e){return T4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T4(e)}function E4(e){return function(e){if(Array.isArray(e))return D4(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||P4(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 P4(e,t){if(e){if("string"==typeof e)return D4(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)?D4(e,t):void 0}}function D4(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 I4(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 _4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I4(Object(n),!0).forEach((function(t){R4(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R4(e,t,n){return(t=L4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L4(e){var t=function(e,t){if("object"!==k4(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==k4(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===k4(t)?t:String(t)}var F4={xAxis:["bottom","top"],yAxis:["left","right"]},B4={x:0,y:0},z4=Number.isFinite?Number.isFinite:isFinite,$4=function(e,t,n){var r=t.graphicalItems,o=t.dataStartIndex,i=t.dataEndIndex,a=(r||[]).reduce((function(e,t){var n=t.props.data;return n&&n.length?[].concat(E4(e),E4(n)):e}),[]);return a&&a.length>0?a:n&&n.props&&n.props.data&&n.props.data.length>0?n.props.data:e&&e.length&&tF(o)&&tF(i)?e.slice(o,i+1):[]};function W4(e){return"number"===e?[0,"auto"]:void 0}var U4=function(e,t,n,r){var o=e.graphicalItems,i=e.tooltipAxis,a=$4(t,e);return n<0||!o||!o.length||n>=a.length?null:o.reduce((function(e,o){if(o.props.hide)return e;var u,l=o.props.data,s=void 0===l?t:l;i.dataKey&&!i.allowDuplicatedCategory?u=lF(void 0===s?a:s,i.dataKey,r):u=s&&s[n]||a[n];return u?[].concat(E4(e),[lQ(o,u)]):e}),[])},H4=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(JL(c-s)!==JL(d-c)){var h=[];if(JL(d-c)===JL(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),g=Math.max(s,d);if(e>(b+c)/2&&e<=(g+c)/2){i=r[l].index;break}}}else for(var y=0;y<a;y++)if(0===y&&e<=(n[y].coordinate+n[y+1].coordinate)/2||y>0&&y<a-1&&e>(n[y].coordinate+n[y-1].coordinate)/2&&e<=(n[y].coordinate+n[y+1].coordinate)/2||y===a-1&&e>(n[y].coordinate+n[y-1].coordinate)/2){i=n[y].index;break}return i}(i,a,l,u);if(s>=0&&l){var c=l[s]&&l[s].value,d=U4(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 _4(_4(_4({},r),bQ(r.cx,r.cy,a,i)),{},{angle:i,radius:a})}var u=o.coordinate,l=r.angle;return _4(_4(_4({},r),bQ(r.cx,r.cy,u,l)),{},{angle:l,radius:u})}return B4}(n,a,s,o);return{activeTooltipIndex:s,activeLabel:c,activePayload:d,activeCoordinate:f}}return null},V4=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=HZ(s,o),h=n.reduce((function(t,n){var h,v=n.props,p=v.type,m=v.dataKey,b=v.allowDataOverflow,g=v.allowDuplicatedCategory,y=v.scale,w=v.ticks,x=v.includeHidden,k=n.props[i];if(t[k])return t;var O,j,S,N=$4(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&&tF(r)&&tF(o))return!0}return!1})(n.props.domain,b,p)&&(O=iQ(n.props.domain,null,b),!f||"number"!==p&&"auto"===y||(S=zZ(N,m,"category")));var A=W4(p);if(!O||0===O.length){var C,T=null!==(C=n.props.domain)&&void 0!==C?C:A;if(m){if(O=zZ(N,m,p),"category"===p&&f){var E=function(e){if(!uw(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);g&&E?(j=O,O=A1(0,M)):g||(O=uQ(T,O,n).reduce((function(e,t){return e.indexOf(t)>=0?e:[].concat(E4(e),[t])}),[]))}else if("category"===p)O=g?O.filter((function(e){return""!==e&&!kL(e)})):uQ(T,O,n).reduce((function(e,t){return e.indexOf(t)>=0||""===t||kL(t)?e:[].concat(E4(e),[t])}),[]);else if("number"===p){var P=function(e,t,n,r,o){var i=t.map((function(t){return WZ(e,t,n,o,r)})).filter((function(e){return!kL(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);P&&(O=P)}!f||"number"!==p&&"auto"===y||(S=zZ(N,m,"category"))}else O=f?A1(0,M):a&&a[k]&&a[k].hasStack&&"number"===p?"expand"===d?[0,1]:nQ(a[k].stackGroups,u,l):UZ(N,r.filter((function(e){return e.props[i]===k&&(x||!e.props.hide)})),p,s,!0);if("number"===p)O=c4(c,O,k,o,w),T&&(O=iQ(T,O,b));else if("category"===p&&T){var D=T;O.every((function(e){return D.indexOf(e)>=0}))&&(O=D)}}return _4(_4({},t),{},R4({},k,_4(_4({},n.props),{},{axisType:o,domain:O,categoricalDomain:S,duplicateDomain:j,originalDomain:null!==(h=n.props.domain)&&void 0!==h?h:A,isCategorical:f,layout:s})))}),{});return h},q4=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=NF(s,o),f={};return d&&d.length?f=V4(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=$4(e.data,{graphicalItems:n,dataStartIndex:u,dataEndIndex:l}),f=d.length,h=HZ(s,o),v=-1;return n.reduce((function(e,t){var p,m=t.props[i],b=W4("number");return e[m]?e:(v++,h?p=A1(0,f):a&&a[m]&&a[m].hasStack?(p=nQ(a[m].stackGroups,u,l),p=c4(c,p,m,o)):(p=iQ(b,UZ(d,n.filter((function(e){return e.props[i]===m&&!e.props.hide})),"number",s),r.defaultProps.allowDataOverflow),p=c4(c,p,m,o)),_4(_4({},e),{},R4({},m,_4(_4({axisType:o},r.defaultProps),{},{hide:!0,orientation:zS(F4,"".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},Y4=function(e){var t,n,r=e.children,o=e.defaultShowTooltip,i=MF(r,q1);return{chartX:0,chartY:0,dataStartIndex:i&&i.props&&i.props.startIndex||0,dataEndIndex:void 0!==(null==i||null===(t=i.props)||void 0===t?void 0:t.endIndex)?null==i||null===(n=i.props)||void 0===n?void 0:n.endIndex:e.data&&e.data.length-1||0,activeTooltipIndex:-1,isTooltipActive:!kL(o)&&o}},X4=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"}},G4=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=MF(s,q1),f=MF(s,M$),h=Object.keys(a).reduce((function(e,t){var n=a[t],r=n.orientation;return n.mirror||n.hide?e:_4(_4({},e),{},R4({},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:_4(_4({},e),{},R4({},r,zS(e,"".concat(r))+n.height))}),{top:c.top||0,bottom:c.bottom||0}),p=_4(_4({},v),h),m=p.bottom;return d&&(p.bottom+=d.props.height||q1.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=PZ({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&&tF(e[f]))return _Z(_Z({},e),{},RZ({},f,e[f]+(c||0)));if(("horizontal"===v||"vertical"===v&&"center"===f)&&"middle"!==h&&tF(e[h]))return _Z(_Z({},e),{},RZ({},h,e[h]+(d||0)))}return e}(p,0,n,t)),_4(_4({brushBottom:m},p),{},{width:u-p.left-p.right,height:l-p.top-p.bottom})},K4=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=X4(c),p=v.numericAxisName,m=v.cateAxisName,b=function(e){return!(!e||!e.length)&&e.some((function(e){var t=kF(e&&e.type);return t&&t.indexOf("Bar")>=0}))}(n),g=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 kF(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:kL(m)?t:m})}}return o}({barSize:l,stackGroups:r}),y=[];return n.forEach((function(n,l){var v=$4(e.data,{dataStartIndex:a,dataEndIndex:u},n),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,i=t["".concat(r.axisType,"Map")],a=n.props["".concat(r.axisType,"Id")];i&&i[a]||"zAxis"===r.axisType||function(e,t){if(!e)throw new Error("Invariant failed")}(!1);var u=i[a];return _4(_4({},e),{},(R4(o={},r.axisType,u),R4(o,"".concat(r.axisType,"Ticks"),qZ(u)),o))}),{}),S=j[m],N=j["".concat(m,"Ticks")],M=r&&r[k]&&r[k].hasStack&&function(e,t){var n=e.props.stackId;if(nF(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),A=kF(n.type).indexOf("Bar")>=0,C=aQ(S,N),T=[];if(A){var E,P,D=kL(x)?h:x,I=null!==(E=null!==(P=aQ(S,N,!0))&&void 0!==P?P:D)&&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=iF(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(LZ(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=iF(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(LZ(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!==C?I:C,sizeList:g[O],maxBarSize:D}),I!==C&&(T=T.map((function(e){return _4(_4({},e),{},{position:_4(_4({},e.position),{},{offset:e.position.offset-I/2})})})))}var _,R,L,F=n&&n.type&&n.type.getComposedData;F&&y.push({props:_4(_4({},F(_4(_4({},j),{},{displayedData:v,props:e,dataKey:w,item:n,bandSize:C,barPosition:T,offset:o,stackedData:M,layout:c,dataStartIndex:a,dataEndIndex:u}))),{},(_={key:n.key||"item-".concat(l)},R4(_,p,j[p]),R4(_,m,j[m]),R4(_,"animationId",i),_)),childIndex:(R=n,L=e.children,SF(L).indexOf(R)),item:n})})),y},v=function(e,t){var n=e.props,i=e.dataStartIndex,a=e.dataEndIndex,u=e.updateId;if(!AF({props:n}))return null;var l=n.children,c=n.layout,f=n.stackOffset,v=n.data,p=n.reverseStackOrder,m=X4(c),b=m.numericAxisName,g=m.cateAxisName,y=NF(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(nF(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[oF("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return _Z(_Z({},e),{},RZ({},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 _Z(_Z({},t),{},RZ({},i,{numericAxisId:n,cateAxisId:r,items:a.items,stackedData:QZ(e,a.items,o)}))}),{})),_Z(_Z({},t),{},RZ({},i,u))}),{})}(v,y,"".concat(b,"Id"),"".concat(g,"Id"),f,p),x=s.reduce((function(e,t){var r="".concat(t.axisType,"Map");return _4(_4({},e),{},R4({},r,q4(n,_4(_4({},t),{},{graphicalItems:y,stackGroups:t.axisType===b&&w,dataStartIndex:i,dataEndIndex:a}))))}),{}),k=G4(_4(_4({},x),{},{props:n,graphicalItems:y}),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(g,"Map")],N=(O=aF(S),{tooltipTicks:j=qZ(O,!1,!0),orderedTooltipTicks:QU(j,(function(e){return e.coordinate})),tooltipAxis:O,tooltipAxisBandSize:aQ(O,j)}),M=h(n,_4(_4({},x),{},{dataStartIndex:i,dataEndIndex:a,updateId:u,graphicalItems:y,stackGroups:w,offset:k}));return _4(_4({formattedGraphicalItems:M,graphicalItems:y,offset:k,stackGroups:w},N),x)};return n=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&&M4(e,t)}(s,t);var n,o,i,u=A4(s);function s(t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),R4(C4(n=u.call(this,t)),"accessibilityManager",new g4),R4(C4(n),"clearDefer",(function(){n.cancelDefer&&(n.cancelDefer(),n.cancelDefer=null)})),R4(C4(n),"handleLegendBBoxUpdate",(function(e){if(e){var t=n.state,r=t.dataStartIndex,o=t.dataEndIndex,i=t.updateId;n.setState(_4({legendBBox:e},v({props:n.props,dataStartIndex:r,dataEndIndex:o,updateId:i},_4(_4({},n.state),{},{legendBBox:e}))))}})),R4(C4(n),"handleReceiveSyncEvent",(function(e,t,r){n.props.syncId===e&&t!==n.uniqueChartId&&(n.clearDefer(),n.cancelDefer=function(e){if("function"==typeof requestAnimationFrame){var t=requestAnimationFrame(e);return function(){return cancelAnimationFrame(t)}}if("function"==typeof setImmediate){var n=setImmediate(e);return function(){return clearImmediate(n)}}var r=setTimeout(e);return function(){return clearTimeout(r)}}(n.applySyncEvent.bind(C4(n),r)))})),R4(C4(n),"handleBrushChange",(function(e){var t=e.startIndex,r=e.endIndex;if(t!==n.state.dataStartIndex||r!==n.state.dataEndIndex){var o=n.state.updateId;n.setState((function(){return _4({dataStartIndex:t,dataEndIndex:r},v({props:n.props,dataStartIndex:t,dataEndIndex:r,updateId:o},n.state))})),n.triggerSyncEvent({dataStartIndex:t,dataEndIndex:r})}})),R4(C4(n),"handleMouseEnter",(function(e){var t=n.props.onMouseEnter,r=n.getMouseInfo(e);if(r){var o=_4(_4({},r),{},{isTooltipActive:!0});n.setState(o),n.triggerSyncEvent(o),dx(t)&&t(o,e)}})),R4(C4(n),"triggeredAfterMouseMove",(function(e){var t=n.props.onMouseMove,r=n.getMouseInfo(e),o=r?_4(_4({},r),{},{isTooltipActive:!0}):{isTooltipActive:!1};n.setState(o),n.triggerSyncEvent(o),dx(t)&&t(o,e)})),R4(C4(n),"handleItemMouseEnter",(function(e){n.setState((function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}}))})),R4(C4(n),"handleItemMouseLeave",(function(){n.setState((function(){return{isTooltipActive:!1}}))})),R4(C4(n),"handleMouseMove",(function(e){e&&dx(e.persist)&&e.persist(),n.triggeredAfterMouseMove(e)})),R4(C4(n),"handleMouseLeave",(function(e){var t=n.props.onMouseLeave,r={isTooltipActive:!1};n.setState(r),n.triggerSyncEvent(r),dx(t)&&t(r,e),n.cancelThrottledTriggerAfterMouseMove()})),R4(C4(n),"handleOuterEvent",(function(e){var t=function(e){var t=e&&e.type;return t&&xF[t]?xF[t]:null}(e),r=zS(n.props,"".concat(t));t&&dx(r)&&r(/.*touch.*/i.test(t)?n.getMouseInfo(e.changedTouches[0]):n.getMouseInfo(e),e)})),R4(C4(n),"handleClick",(function(e){var t=n.props.onClick,r=n.getMouseInfo(e);if(r){var o=_4(_4({},r),{},{isTooltipActive:!0});n.setState(o),n.triggerSyncEvent(o),dx(t)&&t(o,e)}})),R4(C4(n),"handleMouseDown",(function(e){var t=n.props.onMouseDown;dx(t)&&t(n.getMouseInfo(e),e)})),R4(C4(n),"handleMouseUp",(function(e){var t=n.props.onMouseUp;dx(t)&&t(n.getMouseInfo(e),e)})),R4(C4(n),"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&n.handleMouseMove(e.changedTouches[0])})),R4(C4(n),"handleTouchStart",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&n.handleMouseDown(e.changedTouches[0])})),R4(C4(n),"handleTouchEnd",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&n.handleMouseUp(e.changedTouches[0])})),R4(C4(n),"verticalCoordinatesGenerator",(function(e,t){var n=e.xAxis,r=e.width,o=e.height,i=e.offset;return VZ(j5(_4(_4(_4({},B5.defaultProps),n),{},{ticks:qZ(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),i.left,i.left+i.width,t)})),R4(C4(n),"horizontalCoordinatesGenerator",(function(e,t){var n=e.yAxis,r=e.width,o=e.height,i=e.offset;return VZ(j5(_4(_4(_4({},B5.defaultProps),n),{},{ticks:qZ(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),i.top,i.top+i.height,t)})),R4(C4(n),"axesTicksGenerator",(function(e){return qZ(e,!0)})),R4(C4(n),"renderCursor",(function(t){var o=n.state,i=o.isTooltipActive,a=o.activeCoordinate,u=o.activePayload,l=o.offset,s=o.activeTooltipIndex,c=o.tooltipAxisBandSize,d=n.getTooltipEventType();if(!t||!t.props.cursor||!i||!a||"ScatterChart"!==r&&"axis"!==d)return null;var f,h=n.props.layout,v=bJ;if("ScatterChart"===r)f=a,v=qJ;else if("BarChart"===r)f=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}}(h,a,l,c),v=AJ;else if("radial"===h){var p=u4(a),m=p.cx,b=p.cy,g=p.radius;f={cx:m,cy:b,startAngle:p.startAngle,endAngle:p.endAngle,innerRadius:g,outerRadius:g},v=aJ}else f={points:y4(h,a,l)},v=bJ;var y=t.key||"_recharts-cursor",w=_4(_4(_4(_4({stroke:"#ccc",pointerEvents:"none"},l),f),EF(t.props.cursor)),{},{payload:u,payloadIndex:s,key:y,className:"recharts-tooltip-cursor"});return e.isValidElement(t.props.cursor)?e.cloneElement(t.props.cursor,w):e.createElement(v,w)})),R4(C4(n),"renderPolarAxis",(function(t,r,o){var i=zS(t,"type.axisType"),a=zS(n.state,"".concat(i,"Map")),u=a&&a[t.props["".concat(i,"Id")]];return e.cloneElement(t,_4(_4({},u),{},{className:i,key:t.key||"".concat(r,"-").concat(o),ticks:qZ(u,!0)}))})),R4(C4(n),"renderXAxis",(function(e,t,r){var o=n.state.xAxisMap[e.props.xAxisId];return n.renderAxis(o,e,t,r)})),R4(C4(n),"renderYAxis",(function(e,t,r){var o=n.state.yAxisMap[e.props.yAxisId];return n.renderAxis(o,e,t,r)})),R4(C4(n),"renderGrid",(function(t){var r=n.state,o=r.xAxisMap,i=r.yAxisMap,a=r.offset,u=n.props,l=u.width,s=u.height,c=aF(o),d=a4(i,(function(e){return f2(e.domain,z4)}))||aF(i),f=t.props||{};return e.cloneElement(t,{key:t.key||"grid",x:tF(f.x)?f.x:a.left,y:tF(f.y)?f.y:a.top,width:tF(f.width)?f.width:a.width,height:tF(f.height)?f.height:a.height,xAxis:c,yAxis:d,offset:a,chartWidth:l,chartHeight:s,verticalCoordinatesGenerator:f.verticalCoordinatesGenerator||n.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:f.horizontalCoordinatesGenerator||n.horizontalCoordinatesGenerator})})),R4(C4(n),"renderPolarGrid",(function(t){var r=t.props,o=r.radialLines,i=r.polarAngles,a=r.polarRadius,u=n.state,l=u.radiusAxisMap,s=u.angleAxisMap,c=aF(l),d=aF(s),f=d.cx,h=d.cy,v=d.innerRadius,p=d.outerRadius;return e.cloneElement(t,{polarAngles:uw(i)?i:qZ(d,!0).map((function(e){return e.coordinate})),polarRadius:uw(a)?a:qZ(c,!0).map((function(e){return e.coordinate})),cx:f,cy:h,innerRadius:v,outerRadius:p,key:t.key||"polar-grid",radialLines:o})})),R4(C4(n),"renderLegend",(function(){var t=n.state.formattedGraphicalItems,r=n.props,o=r.children,i=r.width,a=r.height,u=n.props.margin||{},l=i-(u.left||0)-(u.right||0),s=PZ({children:o,formattedGraphicalItems:t,legendWidth:l,legendContent:c});if(!s)return null;var d=s.item,f=S4(s,w4);return e.cloneElement(d,_4(_4({},f),{},{chartWidth:i,chartHeight:a,margin:u,onBBoxUpdate:n.handleLegendBBoxUpdate}))})),R4(C4(n),"renderTooltip",(function(){var t=MF(n.props.children,wH);if(!t)return null;var r=n.state,o=r.isTooltipActive,i=r.activeCoordinate,a=r.activePayload,u=r.activeLabel,l=r.offset;return e.cloneElement(t,{viewBox:_4(_4({},l),{},{x:l.left,y:l.top}),active:o,label:u,payload:o?a:[],coordinate:i})})),R4(C4(n),"renderBrush",(function(t){var r=n.props,o=r.margin,i=r.data,a=n.state,u=a.offset,l=a.dataStartIndex,s=a.dataEndIndex,c=a.updateId;return e.cloneElement(t,{key:t.key||"_recharts-brush",onChange:YZ(n.handleBrushChange,null,t.props.onChange),data:i,x:tF(t.props.x)?t.props.x:u.left,y:tF(t.props.y)?t.props.y:u.top+u.height+u.brushBottom-(o.bottom||0),width:tF(t.props.width)?t.props.width:u.width,startIndex:l,endIndex:s,updateId:"brush-".concat(c)})})),R4(C4(n),"renderReferenceElement",(function(t,r,o){if(!t)return null;var i=C4(n).clipPathId,a=n.state,u=a.xAxisMap,l=a.yAxisMap,s=a.offset,c=t.props,d=c.xAxisId,f=c.yAxisId;return e.cloneElement(t,{key:t.key||"".concat(r,"-").concat(o),xAxis:u[d],yAxis:l[f],viewBox:{x:s.left,y:s.top,width:s.width,height:s.height},clipPathId:i})})),R4(C4(n),"renderActivePoints",(function(e){var t=e.item,n=e.activePoint,r=e.basePoint,o=e.childIndex,i=e.isRange,a=[],u=t.props.key,l=t.item.props,c=l.activeDot,d=_4(_4({index:o,dataKey:l.dataKey,cx:n.x,cy:n.y,r:4,fill:$Z(t.item),strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value,key:"".concat(u,"-activePoint-").concat(o)},EF(c)),pF(c));return a.push(s.renderActiveDot(c,d)),r?a.push(s.renderActiveDot(c,_4(_4({},d),{},{cx:r.x,cy:r.y,key:"".concat(u,"-basePoint-").concat(o)}))):i&&a.push(null),a})),R4(C4(n),"renderGraphicChild",(function(t,r,o){var i=n.filterFormatItem(t,r,o);if(!i)return null;var a=n.getTooltipEventType(),u=n.state,l=u.isTooltipActive,s=u.tooltipAxis,c=u.activeTooltipIndex,d=u.activeLabel,f=MF(n.props.children,wH),h=i.props,v=h.points,p=h.isRange,m=h.baseLine,b=i.item.props,g=b.activeDot,y=b.hide,w=b.activeBar,x=b.activeShape,k=Boolean(!y&&l&&f&&(g||w||x)),O={};"axis"!==a&&f&&"click"===f.props.trigger?O={onClick:YZ(n.handleItemMouseEnter,null,t.props.onCLick)}:"axis"!==a&&(O={onMouseLeave:YZ(n.handleItemMouseLeave,null,t.props.onMouseLeave),onMouseEnter:YZ(n.handleItemMouseEnter,null,t.props.onMouseEnter)});var j=e.cloneElement(t,_4(_4({},i.props),O));if(k){if(!(c>=0)){var S,N=(null!==(S=n.getItemByXY(n.state.activeCoordinate))&&void 0!==S?S:{graphicalItem:j}).graphicalItem,M=N.item,A=void 0===M?t:M,C=N.childIndex,T=_4(_4(_4({},i.props),O),{},{activeIndex:C});return[e.cloneElement(A,T),null,null]}var E,P;if(s.dataKey&&!s.allowDuplicatedCategory){var D="function"==typeof s.dataKey?function(e){return"function"==typeof s.dataKey?s.dataKey(e.payload):null}:"payload.".concat(s.dataKey.toString());E=lF(v,D,d),P=p&&m&&lF(m,D,d)}else E=null==v?void 0:v[c],P=p&&m&&m[c];if(x||w){var I=void 0!==t.props.activeIndex?t.props.activeIndex:c;return[e.cloneElement(t,_4(_4(_4({},i.props),O),{},{activeIndex:I})),null,null]}if(!kL(E))return[j].concat(E4(n.renderActivePoints({item:i,activePoint:E,basePoint:P,childIndex:c,isRange:p})))}return p?[j,null,null]:[j,null]})),R4(C4(n),"renderCustomized",(function(t,r,o){return e.cloneElement(t,_4(_4({key:"recharts-customized-".concat(o)},n.props),n.state))})),n.uniqueChartId=kL(t.id)?oF("recharts"):t.id,n.clipPathId="".concat(n.uniqueChartId,"-clip"),t.throttleDelay&&(n.triggeredAfterMouseMove=VH(n.triggeredAfterMouseMove,t.throttleDelay)),n.state={},n}return n=s,o=[{key:"componentDidMount",value:function(){var e,t;kL(this.props.syncId)||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.handleMouseMove,layout:this.props.layout})}},{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){kL(e.syncId)&&!kL(this.props.syncId)&&this.addListener(),!kL(e.syncId)&&kL(this.props.syncId)&&this.removeListener()}},{key:"componentWillUnmount",value:function(){this.clearDefer(),kL(this.props.syncId)||this.removeListener(),this.cancelThrottledTriggerAfterMouseMove()}},{key:"cancelThrottledTriggerAfterMouseMove",value:function(){"function"==typeof this.triggeredAfterMouseMove.cancel&&this.triggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=MF(this.props.children,wH);if(e&&P0(e.props.shared)){var t=e.props.shared?"axis":"item";return l.indexOf(t)>=0?t:a}return a}},{key:"getMouseInfo",value:function(e){var t;if(!this.container)return null;var n,r,o,i=function(e,t){return{chartX:Math.round(e.pageX-t.left),chartY:Math.round(e.pageY-t.top)}}(e,(n=this.container,r=n.ownerDocument.documentElement,o={top:0,left:0},void 0!==n.getBoundingClientRect&&(o=n.getBoundingClientRect()),{top:o.top+window.pageYOffset-r.clientTop,left:o.left+window.pageXOffset-r.clientLeft})),a=this.container,u=(null==a||null===(t=a.getBoundingClientRect())||void 0===t?void 0:t.width)/a.offsetWidth||1,l=this.inRange(i.chartX,i.chartY,u);if(!l)return null;var s=this.state,c=s.xAxisMap,d=s.yAxisMap;if("axis"!==this.getTooltipEventType()&&c&&d){var f=aF(c).scale,h=aF(d).scale,v=f&&f.invert?f.invert(i.chartX):null,p=h&&h.invert?h.invert(i.chartY):null;return _4(_4({},i),{},{xValue:v,yValue:p})}var m=H4(this.state,this.props.data,this.props.layout,l);return m?_4(_4({},i),m):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=aF(l);return xQ({x:o,y:i},c)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=MF(e,wH),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}),_4(_4({},pF(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){f4.on(h4,this.handleReceiveSyncEvent),f4.setMaxListeners&&f4._maxListeners&&f4.setMaxListeners(f4._maxListeners+1)}},{key:"removeListener",value:function(){f4.removeListener(h4,this.handleReceiveSyncEvent),f4.setMaxListeners&&f4._maxListeners&&f4.setMaxListeners(f4._maxListeners-1)}},{key:"triggerSyncEvent",value:function(e){var t=this.props.syncId;kL(t)||f4.emit(h4,t,this.uniqueChartId,e)}},{key:"applySyncEvent",value:function(e){var t=this.props,n=t.layout,r=t.syncMethod,o=this.state.updateId,i=e.dataStartIndex,a=e.dataEndIndex;if(kL(e.dataStartIndex)&&kL(e.dataEndIndex))if(kL(e.activeTooltipIndex))this.setState(e);else{var u=e.chartX,l=e.chartY,s=e.activeTooltipIndex,c=this.state,d=c.offset,f=c.tooltipTicks;if(!d)return;if("function"==typeof r)s=r(f,e);else if("value"===r){s=-1;for(var h=0;h<f.length;h++)if(f[h].value===e.activeLabel){s=h;break}}var p=_4(_4({},d),{},{x:d.left,y:d.top}),m=Math.min(u,p.x+p.width),b=Math.min(l,p.y+p.height),g=f[s]&&f[s].value,y=U4(this.state,this.props.data,s),w=f[s]?{x:"horizontal"===n?f[s].coordinate:m,y:"horizontal"===n?b:f[s].coordinate}:B4;this.setState(_4(_4({},e),{},{activeLabel:g,activeCoordinate:w,activePayload:y,activeTooltipIndex:s}))}else this.setState(_4({dataStartIndex:i,dataEndIndex:a},v({props:this.props,dataStartIndex:i,dataEndIndex:a,updateId:o},this.state)))}},{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===kF(a.item.type)&&n===a.childIndex)return a}return null}},{key:"renderAxis",value:function(t,n,r,o){var i=this.props,a=i.width,u=i.height;return e.createElement(B5,j4({},t,{className:xL("recharts-".concat(t.axisType," ").concat(t.axisType),t.className),key:n.key||"".concat(r,"-").concat(o),viewBox:{x:0,y:0,width:a,height:u},ticksGenerator:this.axesTicksGenerator}))}},{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=O4(t,2),r=n[0],o=n[1];return _4(_4({},e),{},R4({},r,o.scale))}),{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce((function(e,t){var n=O4(t,2),r=n[0],o=n[1];return _4(_4({},e),{},R4({},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=kF(l.type);if("Bar"===s){var c=(u.data||[]).find((function(t){return NJ(e,t)}));if(c)return{graphicalItem:a,payload:c}}else if("RadialBar"===s){var d=(u.data||[]).find((function(t){return xQ(e,t)}));if(d)return{graphicalItem:a,payload:d}}else if(J0(a)||e1(a)||t1(a)){var f=i1({graphicalItem:a,activeTooltipItem:r,itemData:l.props.data}),h=void 0===l.props.activeIndex?f:l.props.activeIndex;return{graphicalItem:_4(_4({},a),{},{childIndex:h}),payload:t1(a)?l.props.data[f]:a.props.data[f]}}}return null}},{key:"render",value:function(){var t=this;if(!AF(this))return null;var n=this.props,r=n.children,o=n.className,i=n.width,a=n.height,u=n.style,l=n.compact,s=n.title,c=n.desc,d=S4(n,x4),f=EF(d),h={CartesianGrid:{handler:this.renderGrid,once:!0},ReferenceArea:{handler:this.renderReferenceElement},ReferenceLine:{handler:this.renderReferenceElement},ReferenceDot:{handler:this.renderReferenceElement},XAxis:{handler:this.renderXAxis},YAxis:{handler:this.renderYAxis},Brush:{handler:this.renderBrush,once:!0},Bar:{handler:this.renderGraphicChild},Line:{handler:this.renderGraphicChild},Area:{handler:this.renderGraphicChild},Radar:{handler:this.renderGraphicChild},RadialBar:{handler:this.renderGraphicChild},Scatter:{handler:this.renderGraphicChild},Pie:{handler:this.renderGraphicChild},Funnel:{handler:this.renderGraphicChild},Tooltip:{handler:this.renderCursor,once:!0},PolarGrid:{handler:this.renderPolarGrid,once:!0},PolarAngleAxis:{handler:this.renderPolarAxis},PolarRadiusAxis:{handler:this.renderPolarAxis},Customized:{handler:this.renderCustomized}};if(l)return e.createElement(FF,j4({},f,{width:i,height:a,title:s,desc:c}),this.renderClipPath(),IF(r,h));this.props.accessibilityLayer&&(f.tabIndex=0,f.role="img",f.onKeyDown=function(e){t.accessibilityManager.keyboardEvent(e)},f.onFocus=function(){t.accessibilityManager.focus()});var v=this.parseEventsOfWrapper();return e.createElement("div",j4({className:xL("recharts-wrapper",o),style:_4({position:"relative",cursor:"default",width:i,height:a},u)},v,{ref:function(e){t.container=e},role:"region"}),e.createElement(FF,j4({},f,{width:i,height:a,title:s,desc:c}),this.renderClipPath(),IF(r,h)),this.renderLegend(),this.renderTooltip())}}],o&&N4(n.prototype,o),i&&N4(n,i),Object.defineProperty(n,"prototype",{writable:!1}),s}(e.Component),R4(n,"displayName",r),R4(n,"defaultProps",_4({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),R4(n,"getDerivedStateFromProps",(function(e,t){var n=e.data,r=e.children,o=e.width,i=e.height,a=e.layout,u=e.stackOffset,l=e.margin;if(kL(t.updateId)){var s=Y4(e);return _4(_4(_4({},s),{},{updateId:0},v(_4(_4({props:e},s),{},{updateId:0}),t)),{},{prevData:n,prevWidth:o,prevHeight:i,prevLayout:a,prevStackOffset:u,prevMargin:l,prevChildren:r})}if(n!==t.prevData||o!==t.prevWidth||i!==t.prevHeight||a!==t.prevLayout||u!==t.prevStackOffset||!sF(l,t.prevMargin)){var c=Y4(e),d={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},f=_4(_4({},H4(t,n,a)),{},{updateId:t.updateId+1}),h=_4(_4(_4({},c),d),f);return _4(_4(_4({},h),v(_4({props:e},h),t)),{},{prevData:n,prevWidth:o,prevHeight:i,prevLayout:a,prevStackOffset:u,prevMargin:l,prevChildren:r})}if(!PF(r,t.prevChildren)){var p=!kL(n)?t.updateId:t.updateId+1;return _4(_4({updateId:p},v(_4(_4({props:e},t),{},{updateId:p}),t)),{},{prevChildren:r})}return null})),R4(n,"renderActiveDot",(function(t,n){var r;return r=e.isValidElement(t)?e.cloneElement(t,n):dx(t)?t(n):e.createElement(FJ,n),e.createElement(WF,{className:"recharts-active-dot",key:n.key},r)})),n},Z4=K4({chartName:"LineChart",GraphicalChild:p3,axisComponents:[{axisType:"xAxis",AxisComp:X3},{axisType:"yAxis",AxisComp:G3}],formatAxisMap:Y2}),Q4=K4({chartName:"BarChart",GraphicalChild:z2,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:X3},{axisType:"yAxis",AxisComp:G3}],formatAxisMap:Y2}),J4=K4({chartName:"PieChart",GraphicalChild:b1,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:C0},{axisType:"radiusAxis",AxisComp:m0}],formatAxisMap:function(e,t,n,r,o){var i=e.width,a=e.height,u=e.startAngle,l=e.endAngle,s=iF(e.cx,i,i/2),c=iF(e.cy,a,a/2),d=gQ(i,a,n),f=iF(e.innerRadius,d,0),h=iF(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(kL(a.range))"angleAxis"===r?i=[u,l]:"radiusAxis"===r&&(i=[f,h]),v&&(i=[i[1],i[0]]);else{var p=hQ(i=a.range,2);u=p[0],l=p[1]}var m=XZ(a,o),b=m.realScaleType,g=m.scale;g.domain(d).range(i),KZ(g);var y=JZ(g,dQ(dQ({},a),{},{realScaleType:b})),w=dQ(dQ(dQ({},a),y),{},{range:i,radius:h,realScaleType:b,scale:g,cx:s,cy:c,innerRadius:f,outerRadius:h,startAngle:u,endAngle:l});return dQ(dQ({},e),{},fQ({},n,w))}),{})},defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),e6=K4({chartName:"ScatterChart",GraphicalChild:Y3,defaultTooltipEventType:"item",validateTooltipEventTypes:["item"],axisComponents:[{axisType:"xAxis",AxisComp:X3},{axisType:"yAxis",AxisComp:G3},{axisType:"zAxis",AxisComp:E3}],formatAxisMap:Y2}),t6=K4({chartName:"AreaChart",GraphicalChild:T3,axisComponents:[{axisType:"xAxis",AxisComp:X3},{axisType:"yAxis",AxisComp:G3}],formatAxisMap:Y2});const n6={height:"h-0",width:"w-0"},r6={height:"h-1",width:"w-1"},o6={height:"h-2",width:"w-2"},i6={height:"h-3",width:"w-3"},a6={height:"h-4",width:"w-4"},u6={height:"h-5",width:"w-5"},l6={height:"h-6",width:"w-6"},s6={height:"h-7",width:"w-7"},c6={height:"h-9",width:"w-9"},d6={paddingLeft:"pl-0",paddingTop:"pt-0",paddingRight:"pr-0",paddingBottom:"pb-0",paddingX:"px-0",paddingY:"py-0",paddingAll:"p-0",marginLeft:"ml-0",marginTop:"mt-0",marginRight:"mr-0",marginBottom:"mb-0",negativeMarginLeft:"-ml-0",negativeMarginRight:"-mr-0",negativeMarginTop:"-mt-0",negativeMarginBottom:"-mb-0",left:"left-0",right:"right-0",top:"top-0",bottom:"bottom-0",spaceX:"space-x-0"},f6={paddingLeft:"pl-px",paddingTop:"pt-px",paddingRight:"pr-px",paddingBottom:"pb-px",paddingX:"px-px",paddingY:"py-px",paddingAll:"p-px",marginLeft:"ml-px",marginTop:"mt-px",marginRight:"mr-px",marginBottom:"mb-px",negativeMarginLeft:"-ml-px",negativeMarginRight:"-mr-px",negativeMarginTop:"-mt-px",negativeMarginBottom:"-mb-px",left:"left-px",right:"right-px",top:"top-px",bottom:"bottom-px",spaceX:"space-x-px"},h6={paddingLeft:"pl-0.5",paddingTop:"pt-0.5",paddingRight:"pr-0.5",paddingBottom:"pb-0.5",paddingX:"px-0.5",paddingY:"py-0.5",paddingAll:"p-0.5",marginLeft:"ml-0.5",marginTop:"mt-0.5",marginRight:"mr-0.5",marginBottom:"mb-0.5",negativeMarginLeft:"-ml-0.5",negativeMarginRight:"-mr-0.5",negativeMarginTop:"-mt-0.5",negativeMarginBottom:"-mb-0.5",left:"left-0.5",right:"right-0.5",top:"top-0.5",bottom:"bottom-0.5",spaceX:"space-x-0.5"},v6={paddingLeft:"pl-1",paddingTop:"pt-1",paddingRight:"pr-1",paddingBottom:"pb-1",paddingX:"px-1",paddingY:"py-1",paddingAll:"p-1",marginLeft:"ml-1",marginTop:"mt-1",marginRight:"mr-1",marginBottom:"mb-1",negativeMarginLeft:"-ml-1",negativeMarginRight:"-mr-1",left:"left-1",right:"right-1",top:"top-1",bottom:"bottom-1",spaceX:"space-x-1"},p6={paddingLeft:"pl-1.5",paddingTop:"pt-1.5",paddingRight:"pr-1.5",paddingBottom:"pb-1.5",paddingX:"px-1.5",paddingY:"py-1.5",paddingAll:"p-1.5",marginLeft:"ml-1.5",marginTop:"mt-1.5",marginRight:"mr-1.5",marginBottom:"mb-1.5",negativeMarginLeft:"-ml-1.5",negativeMarginRight:"-mr-1.5",negativeMarginTop:"-mt-1.5",negativeMarginBottom:"-mb-1.5",left:"left-1.5",right:"right-1.5",top:"top-1.5",bottom:"bottom-1.5",spaceX:"space-x-1.5"},m6={paddingLeft:"pl-2",paddingTop:"pt-2",paddingRight:"pr-2",paddingBottom:"pb-2",paddingX:"px-2",paddingY:"py-2",paddingAll:"p-2",marginLeft:"ml-2",marginTop:"mt-2",marginRight:"mr-2",marginBottom:"mb-2",negativeMarginLeft:"-ml-2",negativeMarginRight:"-mr-2",negativeMarginTop:"-mt-2",negativeMarginBottom:"-mb-2",left:"left-2",right:"right-2",top:"left-2",bottom:"bottom-2",spaceX:"space-x-2"},b6={paddingLeft:"pl-2.5",paddingTop:"pt-2.5",paddingRight:"pr-2.5",paddingBottom:"pb-2.5",paddingX:"px-2.5",paddingY:"py-2.5",paddingAll:"p-2.5",marginLeft:"ml-2.5",marginTop:"mt-2.5",marginRight:"mr-2.5",marginBottom:"mb-2.5",negativeMarginLeft:"-ml-2.5",negativeMarginRight:"-mr-2.5",negativeMarginTop:"-mt-2.5",negativeMarginBottom:"-mb-2.5",left:"left-2.5",right:"right-2.5",top:"top-2.5",bottom:"bottom-2.5",spaceX:"space-x-2.5"},g6={paddingLeft:"pl-3",paddingTop:"pt-3",paddingRight:"pr-3",paddingBottom:"pb-3",paddingX:"px-3",paddingY:"py-3",paddingAll:"p-3",marginLeft:"ml-3",marginTop:"mt-3",marginRight:"mr-3",marginBottom:"mb-3",negativeMarginLeft:"-ml-3",negativeMarginRight:"-mr-3",negativeMarginTop:"-mt-3",negativeMarginBottom:"-mb-3",left:"left-3",right:"right-3",top:"top-3",bottom:"bottom-3",spaceX:"space-x-3"},y6={paddingLeft:"pl-3.5",paddingTop:"pt-3.5",paddingRight:"pr-3.5",paddingBottom:"pb-3.5",paddingX:"px-3.5",paddingY:"py-3.5",paddingAll:"p-3.5",marginLeft:"ml-3.5",marginTop:"mt-3.5",marginRight:"mr-3.5",marginBottom:"mb-3.5",negativeMarginLeft:"-ml-3.5",negativeMarginRight:"-mr-3.5",negativeMarginTop:"-mt-3.5",negativeMarginBottom:"-mb-3.5",left:"left-3.5",right:"right-3.5",top:"top-3.5",bottom:"bottom-3.5",spaceX:"space-x-3.5"},w6={paddingLeft:"pl-4",paddingTop:"pt-4",paddingRight:"pr-4",paddingBottom:"pb-4",paddingX:"px-4",paddingY:"py-4",paddingAll:"p-4",marginLeft:"ml-4",marginTop:"mt-4",marginRight:"mr-4",marginBottom:"mb-4",negativeMarginLeft:"-ml-4",negativeMarginRight:"-mr-4",negativeMarginTop:"-mt-4",negativeMarginBottom:"-mb-4",left:"left-4",right:"right-4",top:"top-4",bottom:"bottom-4",spaceX:"space-x-4"},x6={paddingLeft:"pl-6",paddingTop:"pt-6",paddingRight:"pr-6",paddingBottom:"pb-6",paddingX:"px-6",paddingY:"py-6",paddingAll:"p-6",marginLeft:"ml-6",marginTop:"mt-6",marginRight:"mr-6",marginBottom:"mb-6",negativeMarginLeft:"-ml-6",negativeMarginRight:"-mr-6",negativeMarginTop:"-mt-6",negativeMarginBottom:"-mb-6",left:"left-6",right:"right-6",top:"top-6",bottom:"bottom-6",spaceX:"space-x-6"},k6={paddingLeft:"pl-8",paddingTop:"pt-8",paddingRight:"pr-8",paddingBottom:"pb-8",paddingX:"px-8",paddingY:"py-8",paddingAll:"p-8",marginLeft:"ml-8",marginTop:"mt-8",marginRight:"mr-8",marginBottom:"mb-8",negativeMarginLeft:"-ml-8",negativeMarginRight:"-mr-8",negativeMarginTop:"-mt-8",negativeMarginBottom:"-mb-8",left:"left-8",right:"right-8",top:"top-8",bottom:"bottom-8",spaceX:"space-x-8"},O6={Increase:"increase",ModerateIncrease:"moderateIncrease",Decrease:"decrease",ModerateDecrease:"moderateDecrease",Unchanged:"unchanged"},j6="gray",S6="orange",N6="emerald",M6="blue",A6="rose",C6={XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl"},T6={Left:"left",Right:"right"},E6="top",P6="bottom",D6=500,I6=600,_6=500,R6=700,L6=300,F6=400,B6=500,z6=700,$6=[M6,"cyan","sky","indigo","violet","purple","fuchsia","slate",j6,"zinc","neutral","stone","red",S6,"amber","yellow","lime","green",N6,"teal","pink",A6],W6=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,[ye,e].concat(n)):q.apply(void 0,[function(){return function(e,t){for(var n in t)ke(e,n,t[n]);return e}(ye(),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"]}]}]}}),U6=(e,t)=>{if(t||e===O6.Unchanged)return e;switch(e){case O6.Increase:return O6.Decrease;case O6.ModerateIncrease:return O6.ModerateDecrease;case O6.Decrease:return O6.Increase;case O6.ModerateDecrease:return O6.ModerateIncrease}return""},H6=e=>e.toString(),V6=e=>e.reduce(((e,t)=>e+t),0);function q6(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function Y6(e){return t=>`tremor-${e}-${t}`}function X6(e,t){return"white"!==e&&"black"!==e&&"transparent"!==e&&t?{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}`}:{bgColor:`bg-${e}`,hoverBgColor:`hover:bg-${e}`,selectBgColor:`ui-selected:bg-${e}`,textColor:`text-${e}`,selectTextColor:`ui-selected:text-${e}`,hoverTextColor:`hover:text-${e}`,borderColor:`border-${e}`,selectBorderColor:`ui-selected:border-${e}`,hoverBorderColor:`hover:border-${e}`,ringColor:`ring-${e}`,strokeColor:`stroke-${e}`,fillColor:`fill-${e}`}}const G6=Y6("Legend"),K6=({name:t,color:n,onClick:r,activeLegend:o})=>{const i=!!r;return e.createElement("li",{className:W6(G6("legendItem"),"group inline-flex items-center truncate px-2 py-0.5 rounded-tremor-small transition ",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:W6("flex-none",X6(n,B6).textColor,o6.height,o6.width,p6.marginRight,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:W6("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))},Z6=e.forwardRef(((t,n)=>{const{categories:r,colors:o=$6,className:i,onClickLegendItem:a,activeLegend:u}=t,l=Cr(t,["categories","colors","className","onClickLegendItem","activeLegend"]);return e.createElement("ol",Object.assign({ref:n,className:W6(G6("root"),"flex flex-wrap overflow-hidden truncate",i)},l),r.map(((t,n)=>e.createElement(K6,{key:`item-${n}`,name:t,color:o[n],onClick:a,activeLegend:u}))))}));Z6.displayName="Legend";const Q6=({payload:t},n,r,o,i)=>{const a=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=a.current)||void 0===e?void 0:e.clientHeight)?Number(t)+20:60)}));const u=t.filter((e=>"none"!==e.type));return e.createElement("div",{ref:a,className:"flex items-center justify-end"},e.createElement(Z6,{categories:u.map((e=>e.value)),colors:u.map((e=>n.get(e.value))),onClickLegendItem:i,activeLegend:o}))},J6={left:"border-l",top:"border-t",right:"border-r",bottom:"border-b",all:"border"},e8={left:"border-l-2",top:"border-t-2",right:"border-r-2",bottom:"border-b-2",all:"border-2"},t8={left:"border-l-4",top:"border-t-4",right:"border-r-4",bottom:"border-b-4",all:"border-4"},n8=({children:t})=>e.createElement("div",{className:W6("rounded-tremor-default text-tremor-default","bg-tremor-background shadow-tremor-dropdown border-tremor-border","dark:bg-dark-tremor-background dark:shadow-dark-tremor-dropdown dark:border-dark-tremor-border",J6.all)},t),r8=({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:W6("shrink-0 rounded-tremor-full","border-tremor-background shadow-tremor-card","dark:border-dark-tremor-background dark:shadow-dark-tremor-card",X6(r,D6).bgColor,i6.height,i6.width,e8.all)}),e.createElement("p",{className:W6("text-right whitespace-nowrap","text-tremor-content","dark:text-dark-tremor-content")},n)),e.createElement("p",{className:W6("font-medium tabular-nums text-right whitespace-nowrap","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},t)),o8=({active:t,payload:n,label:r,categoryColors:o,valueFormatter:i})=>{if(t&&n){const t=n.filter((e=>"none"!==e.type));return e.createElement(n8,null,e.createElement("div",{className:W6("border-tremor-border","dark:border-dark-tremor-border",w6.paddingX,m6.paddingY,J6.bottom)},e.createElement("p",{className:W6("font-medium","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},r)),e.createElement("div",{className:W6(w6.paddingX,m6.paddingY,"space-y-1")},t.map((({value:t,name:n},r)=>{var a;return e.createElement(r8,{key:`id-${r}`,value:i(t),name:n,color:null!==(a=o.get(n))&&void 0!==a?a:M6})}))))}return null},i8=Y6("Flex"),a8={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},u8={start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},l8={row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},s8=e.forwardRef(((t,n)=>{const{flexDirection:r="row",justifyContent:o="between",alignItems:i="center",children:a,className:u}=t,l=Cr(t,["flexDirection","justifyContent","alignItems","children","className"]);return e.createElement("div",Object.assign({ref:n,className:W6(i8("root"),"flex w-full",l8[r],a8[o],u8[i],u)},l),a)}));s8.displayName="Flex";const c8=e.forwardRef(((t,n)=>{const{color:r,className:o,children:i}=t;return e.createElement("p",{ref:n,className:W6("text-tremor-default",r?X6(r,B6).textColor:W6("text-tremor-content","dark:text-dark-tremor-content"),o)},i)}));c8.displayName="Text";const d8=({noDataText:t="No data"})=>e.createElement(s8,{alignItems:"center",justifyContent:"center",className:W6("w-full h-full border border-dashed rounded-tremor-default","border-tremor-border","dark:border-dark-tremor-border")},e.createElement(c8,{className:W6("text-tremor-content","dark:text-dark-tremor-content")},t)),f8=(e,t)=>{const n=new Map;return e.forEach(((e,r)=>{n.set(e,t[r])})),n},h8=(e,t,n)=>[e?"auto":null!=t?t:0,null!=n?n:"auto"];function v8(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)||!v8(e[o],t[o]))return!1;return!0}function p8(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 m8=e.forwardRef(((t,n)=>{const{data:r=[],categories:o=[],index:i,stack:a=!1,colors:u=$6,valueFormatter:l=H6,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:g=!0,showGradient:y=!0,autoMinValue:w=!1,curveType:x="linear",minValue:k,maxValue:O,connectNulls:j=!1,allowDecimals:S=!0,noDataText:N,className:M,onValueChange:A,customTooltip:C}=t,T=Cr(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","customTooltip"]),E=C,[P,D]=e.useState(60),[I,_]=e.useState(void 0),[R,L]=e.useState(void 0),F=f8(o,u),B=h8(w,k,O),z=!!A;function $(e){z&&(e===R&&!I||p8(r,e)&&I&&I.dataKey===e?(L(void 0),null==A||A(null)):(L(e),null==A||A({eventType:"category",categoryClicked:e})),_(void 0))}return e.createElement("div",Object.assign({ref:n,className:W6("w-full h-80",M)},T),e.createElement(oV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(t6,{data:r,onClick:z&&(R||I)?()=>{_(void 0),L(void 0),null==A||A(null)}:void 0},g?e.createElement(J5,{className:W6("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,e.createElement(X3,{padding:{left:20,right:20},hide:!c,dataKey:i,tick:{transform:"translate(0, 6)"},ticks:s?[r[0][i],r[r.length-1][i]]:void 0,fill:"",stroke:"",className:W6("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),interval:s?"preserveStartEnd":h,tickLine:!1,axisLine:!1,minTickGap:5}),e.createElement(G3,{width:f,hide:!d,axisLine:!1,tickLine:!1,type:"number",domain:B,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:W6("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:l,allowDecimals:S}),e.createElement(wH,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:m?({active:t,payload:n,label:r})=>E?e.createElement(E,{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:j6})})),active:t,label:r}):e.createElement(o8,{active:t,payload:n,label:r,valueFormatter:l,categoryColors:F}):e.createElement(e.Fragment,null),position:{y:0}}),b?e.createElement(M$,{verticalAlign:"top",height:P,content:({payload:e})=>Q6({payload:e},F,D,R,z?e=>$(e):void 0)}):null,o.map((t=>{var n,r;return e.createElement("defs",{key:t},y?e.createElement("linearGradient",{className:X6(null!==(n=F.get(t))&&void 0!==n?n:j6,B6).textColor,id:F.get(t),x1:"0",y1:"0",x2:"0",y2:"1"},e.createElement("stop",{offset:"5%",stopColor:"currentColor",stopOpacity:I||R&&R!==t?.15:.4}),e.createElement("stop",{offset:"95%",stopColor:"currentColor",stopOpacity:0})):e.createElement("linearGradient",{className:X6(null!==(r=F.get(t))&&void 0!==r?r:j6,B6).textColor,id:F.get(t),x1:"0",y1:"0",x2:"0",y2:"1"},e.createElement("stop",{stopColor:"currentColor",stopOpacity:I||R&&R!==t?.1:.3})))})),o.map((t=>{var n;return e.createElement(T3,{className:X6(null!==(n=F.get(t))&&void 0!==n?n:j6,B6).strokeColor,strokeOpacity:I||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(FJ,{className:W6("stroke-tremor-background dark:stroke-dark-tremor-background",A?"cursor-pointer":"",X6(null!==(n=F.get(c))&&void 0!==n?n:j6,B6).fillColor),cx:o,cy:i,r:5,fill:"",stroke:a,strokeLinecap:u,strokeLinejoin:l,strokeWidth:s,onClick:(e,n)=>function(e,t){t.stopPropagation(),z&&(e.index===(null==I?void 0:I.index)&&e.dataKey===(null==I?void 0:I.dataKey)||p8(r,e.dataKey)&&R&&R===e.dataKey?(L(void 0),_(void 0),null==A||A(null)):(L(e.dataKey),_({index:e.index,dataKey:e.dataKey}),null==A||A(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 p8(r,t)&&!(I||R&&R!==t)||(null==I?void 0:I.index)===f&&(null==I?void 0:I.dataKey)===t?e.createElement(FJ,{key:f,cx:s,cy:c,r:5,stroke:i,fill:"",strokeLinecap:a,strokeLinejoin:u,strokeWidth:l,className:W6("stroke-tremor-background dark:stroke-dark-tremor-background",A?"cursor-pointer":"",X6(null!==(o=F.get(d))&&void 0!==o?o:j6,B6).fillColor)}):e.createElement(e.Fragment,{key:f})},key:t,name:t,type:x,dataKey:t,stroke:"",fill:`url(#${F.get(t)})`,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:v,animationDuration:p,stackId:a?"a":void 0,connectNulls:j})})),A?o.map((t=>e.createElement(p3,{className:W6("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;$(n)}}))):null):e.createElement(d8,{noDataText:N})))}));m8.displayName="AreaChart";const b8=e.forwardRef(((t,n)=>{const{data:r=[],categories:o=[],index:i,colors:a=$6,valueFormatter:u=H6,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:g=!0,showLegend:y=!0,showGridLines:w=!0,autoMinValue:x=!1,minValue:k,maxValue:O,allowDecimals:j=!0,noDataText:S,onValueChange:N,customTooltip:M,className:A}=t,C=Cr(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","customTooltip","className"]),T=M,[E,P]=e.useState(60),D=f8(o,a),[I,_]=e.useState(void 0),[R,L]=e.useState(void 0),F=!!N;function B(e,t,n){var r,o,i,a;n.stopPropagation(),N&&(v8(I,Object.assign(Object.assign({},e.payload),{value:e.value}))?(L(void 0),_(void 0),null==N||N(null)):(L(null===(o=null===(r=e.tooltipPayload)||void 0===r?void 0:r[0])||void 0===o?void 0:o.dataKey),_(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 z=h8(x,k,O);return e.createElement("div",Object.assign({ref:n,className:W6("w-full h-80",A)},C),e.createElement(oV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(Q4,{data:r,stackOffset:c?"expand":"none",layout:"vertical"===l?"vertical":"horizontal",onClick:F&&(R||I)?()=>{_(void 0),L(void 0),null==N||N(null)}:void 0},w?e.createElement(J5,{className:W6("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:"vertical"!==l,vertical:"vertical"===l}):null,"vertical"!==l?e.createElement(X3,{padding:{left:20,right:20},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:W6("mt-4 text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1}):e.createElement(X3,{hide:!v,type:"number",tick:{transform:"translate(-3, 0)"},domain:z,fill:"",stroke:"",className:W6("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,tickFormatter:u,minTickGap:5,allowDecimals:j}),"vertical"!==l?e.createElement(G3,{width:m,hide:!p,axisLine:!1,tickLine:!1,type:"number",domain:z,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:W6("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:c?e=>`${(100*e).toString()} %`:u,allowDecimals:j}):e.createElement(G3,{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:W6("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content")}),e.createElement(wH,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{fill:"#d1d5db",opacity:"0.15"},content:g?({active:t,payload:n,label:r})=>T?e.createElement(T,{payload:null==n?void 0:n.map((e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=D.get(e.dataKey))&&void 0!==t?t:j6})})),active:t,label:r}):e.createElement(o8,{active:t,payload:n,label:r,valueFormatter:u,categoryColors:D}):e.createElement(e.Fragment,null),position:{y:0}}),y?e.createElement(M$,{verticalAlign:"top",height:E,content:({payload:e})=>Q6({payload:e},D,P,R,F?e=>{return t=e,void(F&&(t!==R||I?(L(t),null==N||N({eventType:"category",categoryClicked:t})):(L(void 0),null==N||N(null)),_(void 0)));var t}:void 0)}):null,o.map((t=>{var n;return e.createElement(z2,{className:W6(X6(null!==(n=D.get(t))&&void 0!==n?n:j6,D6).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)=>{const{x:o,y:i,width:a,height:u,fillOpacity:l,name:s,payload:c,value:d}=t;return e.createElement("rect",{x:o,y:i,width:a,height:u,opacity:n||r&&r!==s?v8(n,Object.assign(Object.assign({},c),{value:d}))?l:.3:l})})(t,I,R),onClick:B})}))):e.createElement(d8,{noDataText:S})))}));b8.displayName="BarChart";const g8=({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(n8,null,e.createElement("div",{className:W6(w6.paddingX,m6.paddingY)},e.createElement(r8,{value:r(t.value),name:t.name,color:t.payload.color})))}return null},y8=(e,t)=>e.map(((e,n)=>{const r=n<t.length?t[n]:j6;return Object.assign(Object.assign({},e),{color:r,className:X6(null!=r?r:j6,D6).fillColor,fill:""})})),w8=t=>{const{cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:a,endAngle:u,className:l}=t;return e.createElement("g",null,e.createElement(aJ,{cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:a,endAngle:u,className:l,fill:"",opacity:.3,style:{outline:"none"}}))},x8=e.forwardRef(((t,n)=>{const{data:r=[],category:o="value",index:i="name",colors:a=$6,variant:u="donut",valueFormatter:l=H6,label:s,showLabel:c=!0,animationDuration:d=900,showAnimation:f=!1,showTooltip:h=!0,noDataText:v,onValueChange:p,customTooltip:m,className:b}=t,g=Cr(t,["data","category","index","colors","variant","valueFormatter","label","showLabel","animationDuration","showAnimation","showTooltip","noDataText","onValueChange","customTooltip","className"]),y=m,w="donut"==u,x=((e,t,n,r)=>e||t(((e,t)=>V6(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:W6("w-full h-40",b)},g),e.createElement(oV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(J4,{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:W6("fill-tremor-content-emphasis","dark:fill-dark-tremor-content-emphasis"),x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle"},x):null,e.createElement(b1,{className:W6("stroke-tremor-background dark:stroke-dark-tremor-background",p?"cursor-pointer":"cursor-default"),data:y8(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:w8,style:{outline:"none"}}),e.createElement(wH,{wrapperStyle:{outline:"none"},isAnimationActive:!1,content:h?({active:t,payload:n})=>{var r;return y?e.createElement(y,{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:j6})})),active:t,label:null===(r=null==n?void 0:n[0])||void 0===r?void 0:r.name}):e.createElement(g8,{active:t,payload:n,valueFormatter:l})}:e.createElement(e.Fragment,null)})):e.createElement(d8,{noDataText:v})))}));x8.displayName="DonutChart";const k8=e.forwardRef(((t,n)=>{const{data:r=[],categories:o=[],index:i,colors:a=$6,valueFormatter:u=H6,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:g=!1,curveType:y="linear",minValue:w,maxValue:x,connectNulls:k=!1,allowDecimals:O=!0,noDataText:j,className:S,onValueChange:N,customTooltip:M}=t,A=Cr(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","customTooltip"]),C=M,[T,E]=e.useState(60),[P,D]=e.useState(void 0),[I,_]=e.useState(void 0),R=f8(o,a),L=h8(g,w,x),F=!!N;function B(e){F&&(e===I&&!P||p8(r,e)&&P&&P.dataKey===e?(_(void 0),null==N||N(null)):(_(e),null==N||N({eventType:"category",categoryClicked:e})),D(void 0))}return e.createElement("div",Object.assign({ref:n,className:W6("w-full h-80",S)},A),e.createElement(oV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(Z4,{data:r,onClick:F&&(I||P)?()=>{D(void 0),_(void 0),null==N||N(null)}:void 0},b?e.createElement(J5,{className:W6("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,e.createElement(X3,{padding:{left:20,right:20},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:W6("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:5}),e.createElement(G3,{width:d,hide:!c,axisLine:!1,tickLine:!1,type:"number",domain:L,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:W6("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:u,allowDecimals:O}),e.createElement(wH,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:p?({active:t,payload:n,label:r})=>C?e.createElement(C,{payload:null==n?void 0:n.map((e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=R.get(e.dataKey))&&void 0!==t?t:j6})})),active:t,label:r}):e.createElement(o8,{active:t,payload:n,label:r,valueFormatter:u,categoryColors:R}):e.createElement(e.Fragment,null),position:{y:0}}),m?e.createElement(M$,{verticalAlign:"top",height:T,content:({payload:e})=>Q6({payload:e},R,E,I,F?e=>B(e):void 0)}):null,o.map((t=>{var n;return e.createElement(p3,{className:W6(X6(null!==(n=R.get(t))&&void 0!==n?n:j6,B6).strokeColor),strokeOpacity:P||I&&I!==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(FJ,{className:W6("stroke-tremor-background dark:stroke-dark-tremor-background",N?"cursor-pointer":"",X6(null!==(n=R.get(c))&&void 0!==n?n:j6,B6).fillColor),cx:o,cy:i,r:5,fill:"",stroke:a,strokeLinecap:u,strokeLinejoin:l,strokeWidth:s,onClick:(e,n)=>function(e,t){t.stopPropagation(),F&&(e.index===(null==P?void 0:P.index)&&e.dataKey===(null==P?void 0:P.dataKey)||p8(r,e.dataKey)&&I&&I===e.dataKey?(_(void 0),D(void 0),null==N||N(null)):(_(e.dataKey),D({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 p8(r,t)&&!(P||I&&I!==t)||(null==P?void 0:P.index)===f&&(null==P?void 0:P.dataKey)===t?e.createElement(FJ,{key:f,cx:s,cy:c,r:5,stroke:i,fill:"",strokeLinecap:a,strokeLinejoin:u,strokeWidth:l,className:W6("stroke-tremor-background dark:stroke-dark-tremor-background",N?"cursor-pointer":"",X6(null!==(o=R.get(d))&&void 0!==o?o:j6,B6).fillColor)}):e.createElement(e.Fragment,{key:f})},key:t,name:t,type:y,dataKey:t,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:v,animationDuration:h,connectNulls:k})})),N?o.map((t=>e.createElement(p3,{className:W6("cursor-pointer"),strokeOpacity:0,key:t,name:t,type:y,dataKey:t,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:k,onClick:(e,t)=>{t.stopPropagation();const{name:n}=e;B(n)}}))):null):e.createElement(d8,{noDataText:j})))}));k8.displayName="LineChart";const O8=({children:t})=>e.createElement("div",{className:W6("rounded-tremor-default text-tremor-default","bg-tremor-background shadow-tremor-dropdown border-tremor-border","dark:bg-dark-tremor-background dark:shadow-dark-tremor-dropdown dark:border-dark-tremor-border",J6.all)},t),j8=({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:W6("text-right whitespace-nowrap","text-tremor-content","dark:text-dark-tremor-content")},n)),e.createElement("p",{className:W6("font-medium tabular-nums text-right whitespace-nowrap","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},t)),S8=({label:t,active:n,payload:r,valueFormatter:o,axis:i,category:a,categoryColors:u})=>{var l,s;return n&&r?e.createElement(O8,null,e.createElement("div",{className:W6("flex items-center space-x-2","border-tremor-border","dark:border-dark-tremor-border",w6.paddingX,m6.paddingY,J6.bottom)},e.createElement("span",{className:W6("shrink-0 rounded-tremor-full","border-tremor-background shadow-tremor-card","dark:border-dark-tremor-background dark:shadow-dark-tremor-card",X6(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:M6,D6).bgColor,i6.height,i6.width,e8.all)}),e.createElement("p",{className:W6("font-medium","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},t)),e.createElement("div",{className:W6(w6.paddingX,m6.paddingY,"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:H6;return e.createElement(j8,{key:`id-${r}`,value:o&&s?s(t):`${t}`,name:n})})))):null},N8=e.forwardRef(((t,n)=>{const{data:r=[],x:o,y:i,size:a,category:u,colors:l=$6,showOpacity:s=!1,sizeRange:c=[1,1e3],valueFormatter:d={x:H6,y:H6,size:H6},startEndOnly:f=!1,showXAxis:h=!0,showYAxis:v=!0,yAxisWidth:p=56,intervalType:m="equidistantPreserveStart",animationDuration:b=900,showAnimation:g=!1,showTooltip:y=!0,showLegend:w=!0,showGridLines:x=!0,autoMinXValue:k=!1,minXValue:O,maxXValue:j,autoMinYValue:S=!1,minYValue:N,maxYValue:M,allowDecimals:A=!0,noDataText:C,onValueChange:T,customTooltip:E,className:P}=t,D=Cr(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","className"]),I=E,[_,R]=e.useState(60),[L,F]=e.useState(void 0),[B,z]=e.useState(void 0),$=!!T;function W(e,t,n){n.stopPropagation(),$&&(v8(L,e.node)?(z(void 0),F(void 0),null==T||T(null)):(F(e.node),z(e.payload[u]),null==T||T(Object.assign({eventType:"bubble",categoryClicked:e.payload[u]},e.payload))))}const U=((e,t)=>{if(!t)return[];const n=new Set;return e.forEach((e=>{n.add(e[t])})),Array.from(n)})(r,u),H=f8(U,l),V=h8(k,O,j),q=h8(S,N,M);return e.createElement("div",Object.assign({ref:n,className:W6("w-full h-80",P)},D),e.createElement(oV,{className:"h-full w-full"},(null==r?void 0:r.length)?e.createElement(e6,{onClick:$&&(B||L)?()=>{F(void 0),z(void 0),null==T||T(null)}:void 0,margin:{left:20,right:20}},x?e.createElement(J5,{className:W6("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!0}):null,o?e.createElement(X3,{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:W6("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,tickFormatter:d.x,axisLine:!1,minTickGap:5,domain:V,allowDataOverflow:!0}):null,i?e.createElement(G3,{width:p,hide:!v,axisLine:!1,tickLine:!1,dataKey:i,type:"number",name:i,domain:q,tick:{transform:"translate(-3, 0)"},tickFormatter:d.y,fill:"",stroke:"",className:W6("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),allowDecimals:A,allowDataOverflow:!0}):null,e.createElement(wH,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:y?({active:t,payload:n,label:r})=>{var l,s,c,f;return I?e.createElement(I,{payload:null==n?void 0:n.map((e=>{var t,o,i;return Object.assign(Object.assign({},e),{color:null!==(i=H.get(u?null===(o=null===(t=null==n?void 0:n[0])||void 0===t?void 0:t.payload)||void 0===o?void 0:o[u]:r))&&void 0!==i?i:j6})})),active:t,label: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}):e.createElement(S8,{active:t,payload:n,label:u?null===(f=null===(c=null==n?void 0:n[0])||void 0===c?void 0:c.payload)||void 0===f?void 0:f[u]:r,valueFormatter:d,axis:{x:o,y:i,size:a},category:u,categoryColors:H})}:e.createElement(e.Fragment,null)}),a?e.createElement(E3,{dataKey:a,type:"number",range:c,name:a}):null,U.map((t=>{var n,o;return e.createElement(Y3,{className:W6(X6(null!==(n=H.get(t))&&void 0!==n?n:j6,B6).fillColor,s?X6(null!==(o=H.get(t))&&void 0!==o?o:j6,B6).strokeColor:"",T?"cursor-pointer":""),fill:`url(#${H.get(t)})`,fillOpacity:s?.7:1,key:t,name:t,data:u?r.filter((e=>e[u]===t)):r,isAnimationActive:g,animationDuration:b,shape:t=>((t,n,r)=>{const{cx:o,cy:i,width:a,node:u,fillOpacity:l,name:s}=t;return e.createElement(FJ,{cx:o,cy:i,r:a/2,opacity:n||r&&r!==s?v8(n,u)?l:.3:l})})(t,L,B),onClick:W})})),w?e.createElement(M$,{verticalAlign:"top",height:_,content:({payload:e})=>Q6({payload:e},H,R,B,$?e=>{return t=e,void($&&(t!==B||L?(z(t),null==T||T({eventType:"category",categoryClicked:t})):(z(void 0),null==T||T(null)),F(void 0)));var t}:void 0)}):null):e.createElement(d8,{noDataText:C})))}));N8.displayName="ScatterChart";var M8="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function A8(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(!A8(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)&&!A8(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function C8(e){const t=r.useRef(e);return M8((()=>{t.current=e})),t}var T8="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;let E8=!1,P8=0;const D8=()=>"floating-ui-"+P8++;const I8=r["useId".toString()]||function(){const[e,t]=r.useState((()=>E8?D8():void 0));return T8((()=>{null==e&&t(D8())}),[]),r.useEffect((()=>{E8||(E8=!0)}),[]),e};const _8=r.createContext(null),R8=r.createContext(null),L8=()=>{var e;return(null==(e=r.useContext(_8))?void 0:e.id)||null},F8=()=>r.useContext(R8);function B8(e){return(null==e?void 0:e.ownerDocument)||document}function z8(e){return B8(e).defaultView||window}function $8(e){return!!e&&e instanceof z8(e).Element}function W8(e){return!!e&&e instanceof z8(e).HTMLElement}function U8(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 H8(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 V8(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function q8(t){const n=e.useRef(t);return T8((()=>{n.current=t})),n}const Y8="data-floating-ui-safe-polygon";function X8(e,t,n){return n&&!V8(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function G8(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 z8(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 K8(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 Z8=r["useInsertionEffect".toString()]||(e=>e());function Q8(e){const t=r.useRef((()=>{}));return Z8((()=>{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 J8(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 e9={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},t9={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"};function n9(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);A8(d,i)||f(i);const h=r.useRef(null),v=r.useRef(null),p=r.useRef(s),m=C8(u),b=C8(a),[g,y]=r.useState(null),[w,x]=r.useState(null),k=r.useCallback((e=>{h.current!==e&&(h.current=e,y(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&&!A8(p.current,t)&&(p.current=t,o.flushSync((()=>{c(t)})))}))}),[d,t,n,b]);M8((()=>{!1===l&&p.current.isPositioned&&(p.current.isPositioned=!1,c((e=>({...e,isPositioned:!1}))))}),[l]);const S=r.useRef(!1);M8((()=>(S.current=!0,()=>{S.current=!1})),[]),M8((()=>{if(g&&w){if(m.current)return m.current(g,w,j);j()}}),[g,w,j,m]);const N=r.useMemo((()=>({reference:h,floating:v,setReference:k,setFloating:O})),[k,O]),M=r.useMemo((()=>({reference:g,floating:w})),[g,w]);return r.useMemo((()=>({...s,update:j,refs:N,elements:M,reference:k,floating:O})),[s,j,N,M,k,O])}(e),u=F8(),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=$8(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;a.refs.setReference(t)}),[a.refs]),v=r.useCallback((e=>{($8(e)||null===e)&&(l.current=e,f(e)),($8(a.refs.reference.current)||null===a.refs.reference.current||null!==e&&!$8(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=Q8(n),g=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 T8((()=>{const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===i));e&&(e.context=g)})),r.useMemo((()=>({...a,context:g,refs:p,reference:v,positionReference:h})),[a,p,g,v,h])}function r9(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 o9=t=>{const[n,o]=e.useState(!1),[i,a]=e.useState(),{x:u,y:l,refs:s,strategy:c,context:d}=n9({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),Rt({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=F8(),b=L8(),g=q8(i),y=q8(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||!g.current||!s)return;function e(){M()&&c(!1)}const t=B8(v).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[v,s,c,n,g,d,M]);const A=r.useCallback((function(e){void 0===e&&(e=!0);const t=X8(y.current,"close",w.current);t&&!k.current?(clearTimeout(x.current),x.current=setTimeout((()=>c(!1)),t)):e&&(clearTimeout(x.current),c(!1))}),[y,c]),C=r.useCallback((()=>{N.current(),k.current=void 0}),[]),T=r.useCallback((()=>{if(S.current){const e=B8(p.floating.current).body;e.style.pointerEvents="",e.removeAttribute(Y8),S.current=!1}}),[p]);return r.useEffect((()=>{if(n&&$8(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&&!V8(w.current)||u>0&&0===X8(y.current,"open"))return;d.current.openEvent=e;const t=X8(y.current,"open",w.current);t?x.current=setTimeout((()=>{c(!0)}),t):c(!0)}function o(n){if(t())return;N.current();const r=B8(v);if(clearTimeout(O.current),g.current){s||clearTimeout(x.current),k.current=g.current({...e,tree:m,x:n.clientX,y:n.clientY,onClose(){T(),C(),A()}});const t=k.current;return r.addEventListener("mousemove",t),void(N.current=()=>{r.removeEventListener("mousemove",t)})}A()}function i(n){t()||null==g.current||g.current({...e,tree:m,x:n.clientX,y:n.clientY,onClose(){T(),C(),A()}})(n)}}),[h,v,n,e,a,u,l,A,C,T,c,s,m,y,g,d]),T8((()=>{var e;if(n&&s&&null!=(e=g.current)&&e.Ne.blockPointerEvents&&M()){const e=B8(v).body;if(e.setAttribute(Y8,""),e.style.pointerEvents="none",S.current=!0,$8(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,g,d,M]),T8((()=>{s||(w.current=void 0,C(),T())}),[s,C,T]),r.useEffect((()=>()=>{C(),clearTimeout(x.current),clearTimeout(O.current),T()}),[n,C,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}}),A(!1)}}}}),[f,n,u,s,c,A])}(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=B8(l).defaultView||window;function t(){!n&&W8(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}(B8(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&&J8(i.current.openEvent,s)||(i.current.openEvent=e.nativeEvent,o(!0))},onBlur(e){h.current=!1;const t=e.relatedTarget,n=$8(t)&&t.hasAttribute("data-floating-ui-focus-guard")&&"outside"===t.getAttribute("data-type");v.current=setTimeout((()=>{G8(u.floating.current,t)||G8(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:g=!0}=void 0===t?{}:t;const y=F8(),w=null!=L8(),x=Q8("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}}(g);return r.useEffect((()=>{if(!n||!d)return;function e(e){if("Escape"===e.key){const e=y?K8(y.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(W8(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=y&&K8(y.nodesRef.current,a).some((t=>{var n;return J8(e,null==(n=t.context)?void 0:n.elements.floating)}));if(J8(e,s)||J8(e,l)||r)return;const u=y?K8(y.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.Ae||(e=!1)})),!e)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:U8(e)||H8(e)}}),o(!1)}function r(){o(!1)}c.current.Me=j,c.current.Ae=S;const h=B8(s);f&&h.addEventListener("keydown",e),k&&h.addEventListener(v,t);let p=[];return b&&($8(l)&&(p=un(l)),$8(s)&&(p=p.concat(un(s))),!$8(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,y,a,n,o,b,d,j,S,w]),r.useEffect((()=>{O.current=!1}),[k,v]),r.useMemo((()=>d?{reference:{[e9[m]]:()=>{p&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),o(!1))}},floating:{[t9[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=I8(),u=I8();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=>r9(t,e,"reference")),t),o=r.useCallback((t=>r9(t,e,"floating")),t),i=r.useCallback((t=>r9(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}},i9=({text:t,open:n,x:r,y:o,refs:i,strategy:a,getFloatingProps:u})=>n&&t?e.createElement("div",Object.assign({className:W6("max-w-xs text-sm z-20 rounded-tremor-default","text-white bg-tremor-background-emphasis","text-white dark:bg-dark-tremor-background-subtle",b6.paddingX,v6.paddingY),ref:i.setFloating,style:{position:a,top:null!=o?o:0,left:null!=r?r:0}},u()),t):null;i9.displayName="Tooltip";const a9="text-xs",u9="text-sm",l9="text-base",s9="text-lg",c9="text-xl",d9={xs:{paddingX:m6.paddingX,paddingY:h6.paddingY,fontSize:a9},sm:{paddingX:b6.paddingX,paddingY:h6.paddingY,fontSize:u9},md:{paddingX:g6.paddingX,paddingY:h6.paddingY,fontSize:l9},lg:{paddingX:y6.paddingX,paddingY:h6.paddingY,fontSize:s9},xl:{paddingX:w6.paddingX,paddingY:v6.paddingY,fontSize:c9}},f9={xs:{height:a6.height,width:a6.width},sm:{height:a6.height,width:a6.width},md:{height:a6.height,width:a6.width},lg:{height:u6.height,width:u6.width},xl:{height:l6.height,width:l6.width}},h9=Y6("Badge"),v9=e.forwardRef(((t,n)=>{const{color:r,icon:o,size:i=C6.SM,tooltip:a,className:u,children:l}=t,s=Cr(t,["color","icon","size","tooltip","className","children"]),c=o||null,{tooltipProps:d,getReferenceProps:f}=o9();return e.createElement("span",Object.assign({ref:q6([n,d.refs.setReference]),className:W6(h9("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-full",r?W6(X6(r,D6).bgColor,X6(r,B6).textColor,"bg-opacity-20 dark:bg-opacity-25"):W6("bg-tremor-brand-muted text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted dark:text-dark-tremor-brand-emphasis"),d9[i].paddingX,d9[i].paddingY,d9[i].fontSize,u)},f,s),e.createElement(i9,Object.assign({text:a},d)),c?e.createElement(c,{className:W6(h9("icon"),"shrink-0",v6.negativeMarginLeft,p6.marginRight,f9[i].height,f9[i].width)}):null,e.createElement("p",{className:W6(h9("text"),"text-sm whitespace-nowrap")},l))}));v9.displayName="Badge";const p9={xs:{paddingX:m6.paddingX,paddingY:h6.paddingY,fontSize:a9},sm:{paddingX:b6.paddingX,paddingY:v6.paddingY,fontSize:u9},md:{paddingX:g6.paddingX,paddingY:p6.paddingY,fontSize:l9},lg:{paddingX:y6.paddingX,paddingY:p6.paddingY,fontSize:s9},xl:{paddingX:y6.paddingX,paddingY:p6.paddingY,fontSize:c9}},m9={xs:{paddingX:m6.paddingX,paddingY:h6.paddingY,fontSize:a9},sm:{paddingX:b6.paddingX,paddingY:h6.paddingY,fontSize:u9},md:{paddingX:g6.paddingX,paddingY:h6.paddingY,fontSize:l9},lg:{paddingX:y6.paddingX,paddingY:h6.paddingY,fontSize:s9},xl:{paddingX:w6.paddingX,paddingY:v6.paddingY,fontSize:c9}},b9={xs:{height:a6.height,width:a6.width},sm:{height:a6.height,width:a6.width},md:{height:a6.height,width:a6.width},lg:{height:u6.height,width:u6.width},xl:{height:l6.height,width:l6.width}},g9={[O6.Increase]:{bgColor:X6(N6,D6).bgColor,textColor:X6(N6,B6).textColor},[O6.ModerateIncrease]:{bgColor:X6(N6,D6).bgColor,textColor:X6(N6,B6).textColor},[O6.Decrease]:{bgColor:X6(A6,D6).bgColor,textColor:X6(A6,B6).textColor},[O6.ModerateDecrease]:{bgColor:X6(A6,D6).bgColor,textColor:X6(A6,B6).textColor},[O6.Unchanged]:{bgColor:X6(S6,D6).bgColor,textColor:X6(S6,B6).textColor}},y9={[O6.Increase]:t=>{var n=Cr(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{fill:"currentColor",d:"M13 7.828V20h-2V7.828l-5.364 5.364-1.414-1.414L12 4l7.778 7.778-1.414 1.414L13 7.828z"}))},[O6.ModerateIncrease]:t=>{var n=Cr(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{fill:"currentColor",d:"M16.004 9.414l-8.607 8.607-1.414-1.414L14.589 8H7.004V6h11v11h-2V9.414z"}))},[O6.Decrease]:t=>{var n=Cr(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{fill:"currentColor",d:"M13 16.172l5.364-5.364 1.414 1.414L12 20l-7.778-7.778 1.414-1.414L11 16.172V4h2v12.172z"}))},[O6.ModerateDecrease]:t=>{var n=Cr(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{fill:"currentColor",d:"M14.59 16.004L5.982 7.397l1.414-1.414 8.607 8.606V7.004h2v11h-11v-2z"}))},[O6.Unchanged]:t=>{var n=Cr(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{fill:"currentColor",d:"M16.172 11l-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2z"}))}},w9=Y6("BadgeDelta"),x9=e.forwardRef(((t,n)=>{const{deltaType:r=O6.Increase,isIncreasePositive:o=!0,size:i=C6.SM,tooltip:a,children:u,className:l}=t,s=Cr(t,["deltaType","isIncreasePositive","size","tooltip","children","className"]),c=y9[r],d=U6(r,o),f=u?m9:p9,{tooltipProps:h,getReferenceProps:v}=o9();return e.createElement("span",Object.assign({ref:q6([n,h.refs.setReference]),className:W6(w9("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-full bg-opacity-20 dark:bg-opacity-25",g9[d].bgColor,g9[d].textColor,f[i].paddingX,f[i].paddingY,f[i].fontSize,l)},v,s),e.createElement(i9,Object.assign({text:a},h)),e.createElement(c,{className:W6(w9("icon"),"shrink-0",u?W6(v6.negativeMarginLeft,p6.marginRight):b9[i].height,b9[i].width)}),u?e.createElement("p",{className:W6(w9("text"),"text-sm whitespace-nowrap")},u):null)}));x9.displayName="BadgeDelta";const k9={xs:{paddingX:p6.paddingX,paddingY:p6.paddingY},sm:{paddingX:p6.paddingX,paddingY:p6.paddingY},md:{paddingX:m6.paddingX,paddingY:m6.paddingY},lg:{paddingX:m6.paddingX,paddingY:m6.paddingY},xl:{paddingX:b6.paddingX,paddingY:b6.paddingY}},O9={xs:{height:i6.height,width:i6.width},sm:{height:u6.height,width:u6.width},md:{height:u6.height,width:u6.width},lg:{height:s6.height,width:s6.width},xl:{height:c6.height,width:c6.width}},j9={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:J6.all,ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:e8.all,ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:J6.all,ring:"ring-2",shadow:""}},S9=Y6("Icon"),N9={Simple:"simple",Light:"light",Shadow:"shadow",Solid:"solid",Outlined:"outlined"},M9=e.forwardRef(((t,n)=>{const{icon:r,variant:o=N9.Simple,tooltip:i,size:a=C6.SM,color:u,className:l}=t,s=Cr(t,["icon","variant","tooltip","size","color","className"]),c=r,d=((e,t)=>{switch(e){case"simple":return{textColor:t?X6(t,B6).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?X6(t,B6).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?W6(X6(t,D6).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?X6(t,B6).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?W6(X6(t,D6).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?X6(t,B6).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?W6(X6(t,D6).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?X6(t,B6).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?W6(X6(t,D6).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?X6(t,L6).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?W6(X6(t,L6).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(o,u),{tooltipProps:f,getReferenceProps:h}=o9();return e.createElement("span",Object.assign({ref:q6([n,f.refs.setReference]),className:W6(S9("root"),"inline-flex flex-shrink-0 items-center",d.bgColor,d.textColor,d.borderColor,d.ringColor,j9[o].rounded,j9[o].border,j9[o].shadow,j9[o].ring,k9[a].paddingX,k9[a].paddingY,l)},h,s),e.createElement(i9,Object.assign({text:i},f)),e.createElement(c,{className:W6(S9("icon"),"shrink-0",O9[a].height,O9[a].width)}))}));function A9(e,t){return A9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A9(e,t)}M9.displayName="Icon";var C9=!1,T9=e.createContext(null),E9="unmounted",P9="exited",D9="entering",I9="entered",_9="exiting",R9=function(n){var r,o;function i(e,t){var r;r=n.call(this,e,t)||this;var o,i=t&&!t.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?i?(o=P9,r.appearStatus=D9):o=I9:o=e.unmountOnExit||e.mountOnEnter?E9:P9,r.state={status:o},r.nextCallback=null,r}o=n,(r=i).prototype=Object.create(o.prototype),r.prototype.constructor=r,A9(r,o),i.getDerivedStateFromProps=function(e,t){return e.in&&t.status===E9?{status:P9}:null};var a=i.prototype;return a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==D9&&n!==I9&&(t=D9):n!==D9&&n!==I9||(t=_9)}this.updateStatus(!1,t)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},a.updateStatus=function(e,n){if(void 0===e&&(e=!1),null!==n)if(this.cancelNextCallback(),n===D9){if(this.props.unmountOnExit||this.props.mountOnEnter){var r=this.props.nodeRef?this.props.nodeRef.current:t.findDOMNode(this);r&&function(e){e.scrollTop}(r)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===P9&&this.setState({status:E9})},a.performEnter=function(e){var n=this,r=this.props.enter,o=this.context?this.context.isMounting:e,i=this.props.nodeRef?[o]:[t.findDOMNode(this),o],a=i[0],u=i[1],l=this.getTimeouts(),s=o?l.appear:l.enter;!e&&!r||C9?this.safeSetState({status:I9},(function(){n.props.onEntered(a)})):(this.props.onEnter(a,u),this.safeSetState({status:D9},(function(){n.props.onEntering(a,u),n.onTransitionEnd(s,(function(){n.safeSetState({status:I9},(function(){n.props.onEntered(a,u)}))}))})))},a.performExit=function(){var e=this,n=this.props.exit,r=this.getTimeouts(),o=this.props.nodeRef?void 0:t.findDOMNode(this);n&&!C9?(this.props.onExit(o),this.safeSetState({status:_9},(function(){e.props.onExiting(o),e.onTransitionEnd(r.exit,(function(){e.safeSetState({status:P9},(function(){e.props.onExited(o)}))}))}))):this.safeSetState({status:P9},(function(){e.props.onExited(o)}))},a.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},a.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},a.onTransitionEnd=function(e,n){this.setNextCallback(n);var r=this.props.nodeRef?this.props.nodeRef.current:t.findDOMNode(this),o=null==e&&!this.props.addEndListener;if(r&&!o){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],a=i[0],u=i[1];this.props.addEndListener(a,u)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},a.render=function(){var t=this.state.status;if(t===E9)return null;var n=this.props,r=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var 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}(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return e.createElement(T9.Provider,{value:null},"function"==typeof r?r(t,o):e.cloneElement(e.Children.only(r),o))},i}(e.Component);function L9(){}R9.contextType=T9,R9.propTypes={},R9.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:L9,onEntering:L9,onEntered:L9,onExit:L9,onExiting:L9,onExited:L9},R9.UNMOUNTED=E9,R9.EXITED=P9,R9.ENTERING=D9,R9.ENTERED=I9,R9.EXITING=_9;var F9=R9;const B9=t=>{var n=Cr(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"}))},z9={xs:{height:a6.height,width:a6.width},sm:{height:u6.height,width:u6.width},md:{height:u6.height,width:u6.width},lg:{height:l6.height,width:l6.width},xl:{height:l6.height,width:l6.width}},$9=(e,t)=>{switch(e){case"primary":return{textColor:t?X6("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?X6("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?X6(t,D6).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?X6(t,I6).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?X6(t,_6).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?X6(t,R6).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?X6(t,B6).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?X6(t,B6).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:X6("transparent").bgColor,hoverBgColor:t?W6(X6(t,D6).hoverBgColor,"hover:bg-opacity-20 dark:hover:bg-opacity-20"):"hover:bg-tremor-brand-faint dark:hover:bg-dark-tremor-brand-faint",borderColor:t?X6(t,_6).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?X6(t,B6).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?X6(t,z6).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:X6("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},W9=Y6("Button"),U9=({loading:t,iconSize:n,iconPosition:r,Icon:o,needMargin:i,transitionState:a})=>{const u=i?r===T6.Left?W6(v6.negativeMarginLeft,p6.marginRight):W6(v6.negativeMarginRight,p6.marginLeft):"",l=W6(n6.width,n6.height),s={default:l,entering:l,entered:n,exiting:n,exited:l};return t?e.createElement(B9,{className:W6(W9("icon"),"animate-spin shrink-0",u,s.default,s[a]),style:{transition:"width 150ms"}}):e.createElement(o,{className:W6(W9("icon"),"shrink-0",n,u)})},H9=e.forwardRef(((t,n)=>{const{icon:r,iconPosition:o=T6.Left,size:i=C6.SM,color:a,variant:u="primary",disabled:l,loading:s=!1,loadingText:c,children:d,tooltip:f,className:h}=t,v=Cr(t,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),p=r,m=s||l,b=void 0!==p||s,g=s&&c,y=!(!d&&!g),w=W6(z9[i].height,z9[i].width),x="light"!==u?W6("rounded-tremor-default","shadow-tremor-input","dark:shadow-dark-tremor-input",J6.all):"",k=$9(u,a),O=(e=>"light"!==e?{xs:{paddingX:b6.paddingX,paddingY:p6.paddingY,fontSize:a9},sm:{paddingX:w6.paddingX,paddingY:m6.paddingY,fontSize:u9},md:{paddingX:w6.paddingX,paddingY:m6.paddingY,fontSize:l9},lg:{paddingX:w6.paddingX,paddingY:b6.paddingY,fontSize:s9},xl:{paddingX:w6.paddingX,paddingY:g6.paddingY,fontSize:c9}}:{xs:{paddingX:"",paddingY:"",fontSize:a9},sm:{paddingX:"",paddingY:"",fontSize:u9},md:{paddingX:"",paddingY:"",fontSize:l9},lg:{paddingX:"",paddingY:"",fontSize:s9},xl:{paddingX:"",paddingY:"",fontSize:c9}})(u)[i],{tooltipProps:j,getReferenceProps:S}=o9(300);return e.createElement(F9,{in:s,timeout:50},(t=>e.createElement("button",Object.assign({ref:q6([n,j.refs.setReference]),className:W6(W9("root"),"flex-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":W6($9(u,a).hoverTextColor,$9(u,a).hoverBgColor,$9(u,a).hoverBorderColor),h),disabled:m},S,v),e.createElement(i9,Object.assign({text:f},j)),b&&o!==T6.Right?e.createElement(U9,{loading:s,iconSize:w,iconPosition:o,Icon:p,transitionState:t,needMargin:y}):null,g||d?e.createElement("span",{className:W6(W9("text"),"text-sm whitespace-nowrap")},g?c:d):null,b&&o===T6.Right?e.createElement(U9,{loading:s,iconSize:w,iconPosition:o,Icon:p,transitionState:t,needMargin:y}):null)))}));H9.displayName="Button";var V9=Object.defineProperty,q9=(e,t,n)=>(((e,t,n)=>{t in e?V9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let Y9=new class{constructor(){q9(this,"current",this.detect()),q9(this,"handoffState","pending"),q9(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}},X9=(t,n)=>{Y9.isServer?e.useEffect(t,n):e.useLayoutEffect(t,n)};function G9(t){let n=e.useRef(t);return X9((()=>{n.current=t}),[t]),n}function K9(t,n){let[r,o]=e.useState(t),i=G9(t);return X9((()=>o(i.current)),[i,o,...n]),r}function Z9(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function Q9(){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 Z9((()=>{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=Q9();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 J9(){let[t]=e.useState(Q9);return e.useEffect((()=>()=>t.dispose()),[t]),t}let e7=function(t){let n=G9(t);return e.useCallback(((...e)=>n.current(...e)),[n])};function t7(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in r&&(e=>e.useSyncExternalStore)(r)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=r.useState(Y9.isHandoffComplete);return t&&!1===Y9.isHandoffComplete&&n(!1),r.useEffect((()=>{!0!==t&&n(!0)}),[t]),r.useEffect((()=>Y9.handoff()),[]),!e&&t}var n7;let r7=null!=(n7=e.useId)?n7:function(){let t=t7(),[n,r]=e.useState(t?()=>Y9.nextId():null);return X9((()=>{null===n&&r(Y9.nextId())}),[n]),null!=n?""+n:void 0};function o7(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,o7),r}function i7(e){return Y9.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let a7=["[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 u7=(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))(u7||{}),l7=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(l7||{}),s7=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(s7||{});function c7(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(a7)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var d7=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(d7||{});function f7(e,t=0){var n;return e!==(null==(n=i7(e))?void 0:n.body)&&o7(t,{0:()=>e.matches(a7),1(){let t=e;for(;null!==t;){if(t.matches(a7))return!0;t=t.parentElement}return!1}})}var h7=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(h7||{});"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 v7=["textarea","input"].join(",");function p7(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 m7(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?p7(e):e:c7(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,v7))&&n}(u)&&u.select(),2}function b7(t,n,r){let o=G9(n);e.useEffect((()=>{function e(e){o.current(e)}return document.addEventListener(t,e,r),()=>document.removeEventListener(t,e,r)}),[t,r])}function g7(t,n,r){let o=G9(n);e.useEffect((()=>{function e(e){o.current(e)}return window.addEventListener(t,e,r),()=>window.removeEventListener(t,e,r)}),[t,r])}function y7(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!f7(i,d7.Loose)&&-1!==i.tabIndex&&e.preventDefault(),n(e,i)}e.useEffect((()=>{requestAnimationFrame((()=>{o.current=r}))}),[r]);let a=e.useRef(null);b7("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),b7("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),b7("click",(e=>{a.current&&(i(e,(()=>a.current)),a.current=null)}),!0),b7("touchend",(e=>i(e,(()=>e.target instanceof HTMLElement?e.target:null))),!0),g7("blur",(e=>i(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}function w7(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 x7(t,n){let[r,o]=e.useState((()=>w7(t)));return X9((()=>{o(w7(t))}),[t.type,t.as]),X9((()=>{r||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&o("button")}),[r,n]),r}let k7=Symbol();function O7(e,t=!0){return Object.assign(e,{[k7]:t})}function j7(...t){let n=e.useRef(t);e.useEffect((()=>{n.current=t}),[t]);let r=e7((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[k7])))?void 0:r}var S7=(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))(S7||{});function N7(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=null!=r?r:-1,i=(()=>{switch(e.focus){case 0:return n.findIndex((e=>!t.resolveDisabled(e)));case 1:{let e=n.slice().reverse().findIndex(((e,n,r)=>!(-1!==o&&r.length-n-1>=o)&&!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 2:return n.findIndex(((e,n)=>!(n<=o)&&!t.resolveDisabled(e)));case 3:{let e=n.slice().reverse().findIndex((e=>!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 4:return n.findIndex((n=>t.resolveId(n)===e.id));case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}})();return-1===i?r:i}function M7(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var A7=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(A7||{}),C7=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(C7||{});function T7({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:a}){let u=P7(t,e);if(i)return E7(u,n,r,a);let l=null!=o?o:0;if(2&l){let{static:e=!1,...t}=u;if(e)return E7(t,n,r,a)}if(1&l){let{unmount:e=!0,...t}=u;return o7(e?0:1,{0:()=>null,1:()=>E7({...t,hidden:!0,style:{display:"none"}},n,r,a)})}return E7(u,n,r,a)}function E7(t,n={},r,o){let{as:i=r,children:a,refName:u="ref",...l}=_7(t,["unmount","static"]),s=void 0!==t.ref?{[u]:t.ref}:{},c="function"==typeof a?a(n):a;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(n));let d={};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&&(d["data-headlessui-state"]=t.join(" "))}if(i===e.Fragment&&Object.keys(I7(l)).length>0){if(!e.isValidElement(c)||Array.isArray(c)&&c.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(l).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=c.props,n="function"==typeof(null==t?void 0:t.className)?(...e)=>M7(null==t?void 0:t.className(...e),l.className):M7(null==t?void 0:t.className,l.className),r=n?{className:n}:{};return e.cloneElement(c,Object.assign({},P7(c.props,I7(_7(l,["ref"]))),d,s,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}}(c.ref,s.ref),r))}return e.createElement(i,Object.assign({},_7(l,["ref"]),i!==e.Fragment&&s,i!==e.Fragment&&d),c)}function P7(...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 D7(t){var n;return Object.assign(e.forwardRef(t),{displayName:null!=(n=t.displayName)?n:t.name})}function I7(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function _7(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function R7(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 L7(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))B7(n,F7(t,r),o);return n}function F7(e,t){return e?e+"["+t+"]":t}function B7(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())B7(e,F7(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,""]):L7(n,t,e)}var z7=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(z7||{});let $7=D7((function(e,t){let{features:n=1,...r}=e;return T7({ourProps:{ref:t,"aria-hidden":2==(2&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&n)&&2!=(2&n)&&{display:"none"}}},theirProps:r,slot:{},defaultTag:"div",name:"Hidden"})})),W7=e.createContext(null);W7.displayName="OpenClosedContext";var U7=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(U7||{});function H7(){return e.useContext(W7)}function V7({value:t,children:n}){return e.createElement(W7.Provider,{value:t},n)}var q7=(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))(q7||{});function Y7(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,e7((e=>(a||i(e),null==n?void 0:n(e))))]}function X7(t,n){let r=e.useRef([]),o=e7(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 G7(e){return[e.screenX,e.screenY]}function K7(){let t=e.useRef([-1,-1]);return{wasMoved(e){let n=G7(e);return(t.current[0]!==n[0]||t.current[1]!==n[1])&&(t.current=n,!0)},update(e){t.current=G7(e)}}}function Z7(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0||/Android/gi.test(window.navigator.userAgent)}function Q7(...t){return e.useMemo((()=>i7(...t)),[...t])}var J7=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(J7||{}),eee=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(eee||{}),tee=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(tee||{}),nee=(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))(nee||{});function ree(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=p7(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 oee={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;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;let n=e.activeOptionIndex;if(e.dataRef.current){let{isSelected:t}=e.dataRef.current,r=e.options.findIndex((e=>t(e.dataRef.current.value)));-1!==r&&(n=r)}return{...e,comboboxState:0,activeOptionIndex:n}},2(e,t){var n,r,o,i;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;let a=ree(e);if(null===a.activeOptionIndex){let e=a.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(a.activeOptionIndex=e)}let u=N7(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...a,activeOptionIndex:u,activationTrigger:null!=(i=t.trigger)?i:1}},3:(e,t)=>{var n,r;let o={id:t.id,dataRef:t.dataRef},i=ree(e,(e=>[...e,o]));null===e.activeOptionIndex&&null!=(n=e.dataRef.current)&&n.isSelected(t.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(o));let a={...e,...i,activationTrigger:1};return null!=(r=e.dataRef.current)&&r.Ce&&void 0===e.dataRef.current.value&&(a.activeOptionIndex=0),a},4:(e,t)=>{let n=ree(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}},5:(e,t)=>({...e,labelId:t.id})},iee=e.createContext(null);function aee(t){let n=e.useContext(iee);if(null===n){let e=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,aee),e}return n}iee.displayName="ComboboxActionsContext";let uee=e.createContext(null);function lee(t){let n=e.useContext(uee);if(null===n){let e=new Error(`<${t} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,lee),e}return n}function see(e,t){return o7(t.type,oee,e,t)}uee.displayName="ComboboxDataContext";let cee=e.Fragment;let dee=A7.RenderStrategy|A7.Static;let fee=D7((function(t,n){let{value:r,defaultValue:o,onChange:i,form:a,name:u,by:l=((e,t)=>e===t),disabled:s=!1,Ce:c=!1,nullable:d=!1,multiple:f=!1,...h}=t,[v=(f?[]:void 0),p]=Y7(r,i,o),[m,b]=e.useReducer(see,{dataRef:e.createRef(),comboboxState:c?0:1,options:[],activeOptionIndex:null,activationTrigger:1,labelId:null}),g=e.useRef(!1),y=e.useRef({static:!1,hold:!1}),w=e.useRef(null),x=e.useRef(null),k=e.useRef(null),O=e.useRef(null),j=e7("string"==typeof l?(e,t)=>{let n=l;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:l),S=e.useCallback((e=>o7(N.mode,{1:()=>v.some((t=>j(t,e))),0:()=>j(v,e)})),[v]),N=e.useMemo((()=>({...m,optionsPropsRef:y,labelRef:w,inputRef:x,buttonRef:k,optionsRef:O,value:v,defaultValue:o,disabled:s,mode:f?1:0,get activeOptionIndex(){if(g.current&&null===m.activeOptionIndex&&m.options.length>0){let e=m.options.findIndex((e=>!e.dataRef.current.disabled));if(-1!==e)return e}return m.activeOptionIndex},compare:j,isSelected:S,nullable:d,Ce:c})),[v,o,s,f,d,c,m]),M=e.useRef(null!==N.activeOptionIndex?N.options[N.activeOptionIndex]:null);e.useEffect((()=>{let e=null!==N.activeOptionIndex?N.options[N.activeOptionIndex]:null;M.current!==e&&(M.current=e)})),X9((()=>{m.dataRef.current=N}),[N]),y7([N.buttonRef,N.inputRef,N.optionsRef],(()=>L.closeCombobox()),0===N.comboboxState);let A=e.useMemo((()=>({open:0===N.comboboxState,disabled:s,activeIndex:N.activeOptionIndex,activeOption:null===N.activeOptionIndex?null:N.options[N.activeOptionIndex].dataRef.current.value,value:v})),[N,s,v]),C=e7((e=>{let t=N.options.find((t=>t.id===e));t&&R(t.dataRef.current.value)})),T=e7((()=>{if(null!==N.activeOptionIndex){let{dataRef:e,id:t}=N.options[N.activeOptionIndex];R(e.current.value),L.goToOption(S7.Specific,t)}})),E=e7((()=>{b({type:0}),g.current=!0})),P=e7((()=>{b({type:1}),g.current=!1})),D=e7(((e,t,n)=>(g.current=!1,e===S7.Specific?b({type:2,focus:S7.Specific,id:t,trigger:n}):b({type:2,focus:e,trigger:n})))),I=e7(((e,t)=>(b({type:3,id:e,dataRef:t}),()=>{var t;(null==(t=M.current)?void 0:t.id)===e&&(g.current=!0),b({type:4,id:e})}))),_=e7((e=>(b({type:5,id:e}),()=>b({type:5,id:null})))),R=e7((e=>o7(N.mode,{0:()=>null==p?void 0:p(e),1(){let t=N.value.slice(),n=t.findIndex((t=>j(t,e)));return-1===n?t.push(e):t.splice(n,1),null==p?void 0:p(t)}}))),L=e.useMemo((()=>({onChange:R,registerOption:I,registerLabel:_,goToOption:D,closeCombobox:P,openCombobox:E,selectActiveOption:T,selectOption:C})),[]),F=null===n?{}:{ref:n},B=e.useRef(null),z=J9();return e.useEffect((()=>{B.current&&void 0!==o&&z.addEventListener(B.current,"reset",(()=>{null==p||p(o)}))}),[B,p]),e.createElement(iee.Provider,{value:L},e.createElement(uee.Provider,{value:N},e.createElement(V7,{value:o7(N.comboboxState,{0:U7.Open,1:U7.Closed})},null!=u&&null!=v&&L7({[u]:v}).map((([t,n],r)=>e.createElement($7,{features:z7.Hidden,ref:0===r?e=>{var t;B.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0,...I7({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:a,name:t,value:n})}))),T7({ourProps:F,theirProps:h,slot:A,defaultTag:cee,name:"Combobox"}))))})),hee=D7((function(t,n){var r;let o=lee("Combobox.Button"),i=aee("Combobox.Button"),a=j7(o.buttonRef,n),u=r7(),{id:l=`headlessui-combobox-button-${u}`,...s}=t,c=J9(),d=e7((e=>{switch(e.key){case q7.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 q7.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&(i.openCombobox(),c.nextFrame((()=>{o.value||i.goToOption(S7.Last)}))),c.nextFrame((()=>{var e;return null==(e=o.inputRef.current)?void 0:e.focus({preventScroll:!0})}));case q7.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=e7((e=>{if(R7(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=K9((()=>{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 T7({ourProps:{ref:a,id:l,type:x7(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"})})),vee=D7((function(t,n){var r,o,i,a;let u=r7(),{id:l=`headlessui-combobox-input-${u}`,onChange:s,displayValue:c,type:d="text",...f}=t,h=lee("Combobox.Input"),v=aee("Combobox.Input"),p=j7(h.inputRef,n),m=Q7(h.inputRef),b=e.useRef(!1),g=J9(),y=e7((()=>{v.onChange(null),h.optionsRef.current&&(h.optionsRef.current.scrollTop=0),v.goToOption(S7.Nothing)})),w=function(){var e;return"function"==typeof c&&void 0!==h.value?null!=(e=c(h.value))?e:"":"string"==typeof h.value?h.value:""}();X7((([e,t],[n,r])=>{if(b.current)return;let o=h.inputRef.current;o&&((0===r&&1===t||e!==n)&&(o.value=e),requestAnimationFrame((()=>{if(b.current||!o||(null==m?void 0:m.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)})))}),[w,h.comboboxState,m]),X7((([e],[t])=>{if(0===e&&1===t){if(b.current)return;let e=h.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)}}),[h.comboboxState]);let x=e.useRef(!1),k=e7((()=>{x.current=!0})),O=e7((()=>{g.nextFrame((()=>{x.current=!1}))})),j=e7((e=>{switch(b.current=!0,e.key){case q7.Enter:if(b.current=!1,0!==h.comboboxState||x.current)return;if(e.preventDefault(),e.stopPropagation(),null===h.activeOptionIndex)return void v.closeCombobox();v.selectActiveOption(),0===h.mode&&v.closeCombobox();break;case q7.ArrowDown:return b.current=!1,e.preventDefault(),e.stopPropagation(),o7(h.comboboxState,{0:()=>{v.goToOption(S7.Next)},1:()=>{v.openCombobox()}});case q7.ArrowUp:return b.current=!1,e.preventDefault(),e.stopPropagation(),o7(h.comboboxState,{0:()=>{v.goToOption(S7.Previous)},1:()=>{v.openCombobox(),g.nextFrame((()=>{h.value||v.goToOption(S7.Last)}))}});case q7.Home:if(e.shiftKey)break;return b.current=!1,e.preventDefault(),e.stopPropagation(),v.goToOption(S7.First);case q7.PageUp:return b.current=!1,e.preventDefault(),e.stopPropagation(),v.goToOption(S7.First);case q7.End:if(e.shiftKey)break;return b.current=!1,e.preventDefault(),e.stopPropagation(),v.goToOption(S7.Last);case q7.PageDown:return b.current=!1,e.preventDefault(),e.stopPropagation(),v.goToOption(S7.Last);case q7.Escape:return b.current=!1,0!==h.comboboxState?void 0:(e.preventDefault(),h.optionsRef.current&&!h.optionsPropsRef.current.static&&e.stopPropagation(),h.nullable&&0===h.mode&&null===h.value&&y(),v.closeCombobox());case q7.Tab:if(b.current=!1,0!==h.comboboxState)return;0===h.mode&&v.selectActiveOption(),v.closeCombobox()}})),S=e7((e=>{null==s||s(e),h.nullable&&0===h.mode&&""===e.target.value&&y(),v.openCombobox()})),N=e7((()=>{b.current=!1})),M=K9((()=>{if(h.labelId)return[h.labelId].join(" ")}),[h.labelId]),A=e.useMemo((()=>({open:0===h.comboboxState,disabled:h.disabled})),[h]);return T7({ourProps:{ref:p,id:l,role:"combobox",type:d,"aria-controls":null==(r=h.optionsRef.current)?void 0:r.id,"aria-expanded":0===h.comboboxState,"aria-activedescendant":null===h.activeOptionIndex||null==(o=h.options[h.activeOptionIndex])?void 0:o.id,"aria-labelledby":M,"aria-autocomplete":"list",defaultValue:null!=(a=null!=(i=t.defaultValue)?i:void 0!==h.defaultValue?null==c?void 0:c(h.defaultValue):null)?a:h.defaultValue,disabled:h.disabled,onCompositionStart:k,onCompositionEnd:O,onKeyDown:j,onChange:S,onBlur:N},theirProps:f,slot:A,defaultTag:"input",name:"Combobox.Input"})})),pee=D7((function(t,n){let r=r7(),{id:o=`headlessui-combobox-label-${r}`,...i}=t,a=lee("Combobox.Label"),u=aee("Combobox.Label"),l=j7(a.labelRef,n);X9((()=>u.registerLabel(o)),[o]);let s=e7((()=>{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 T7({ourProps:{ref:l,id:o,onClick:s},theirProps:i,slot:c,defaultTag:"label",name:"Combobox.Label"})})),mee=D7((function(t,n){let r=r7(),{id:o=`headlessui-combobox-options-${r}`,hold:i=!1,...a}=t,u=lee("Combobox.Options"),l=j7(u.optionsRef,n),s=H7(),c=null!==s?(s&U7.Open)===U7.Open:0===u.comboboxState;X9((()=>{var e;u.optionsPropsRef.current.static=null!=(e=t.static)&&e}),[u.optionsPropsRef,t.static]),X9((()=>{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]),X9((()=>{if(!t||!o)return;let e=i7(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=K9((()=>{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})),[u]);return T7({ourProps:{"aria-labelledby":d,role:"listbox","aria-multiselectable":1===u.mode||void 0,id:o,ref:l},theirProps:a,slot:f,defaultTag:"ul",features:dee,visible:c,name:"Combobox.Options"})})),bee=D7((function(t,n){var r,o;let i=r7(),{id:a=`headlessui-combobox-option-${i}`,disabled:u=!1,value:l,...s}=t,c=lee("Combobox.Option"),d=aee("Combobox.Option"),f=null!==c.activeOptionIndex&&c.options[c.activeOptionIndex].id===a,h=c.isSelected(l),v=e.useRef(null),p=G9({disabled:u,value:l,domRef:v,textValue:null==(o=null==(r=v.current)?void 0:r.textContent)?void 0:o.toLowerCase()}),m=j7(n,v),b=e7((()=>d.selectOption(a)));X9((()=>d.registerOption(a,p)),[p,a]);let g=e.useRef(!c.Ce);X9((()=>{if(!c.Ce)return;let e=Q9();return e.requestAnimationFrame((()=>{g.current=!0})),e.dispose}),[]),X9((()=>{if(0!==c.comboboxState||!f||!g.current||0===c.activationTrigger)return;let e=Q9();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 y=e7((e=>{if(u)return e.preventDefault();b(),0===c.mode&&d.closeCombobox(),Z7()||requestAnimationFrame((()=>{var e;return null==(e=c.inputRef.current)?void 0:e.focus()}))})),w=e7((()=>{if(u)return d.goToOption(S7.Nothing);d.goToOption(S7.Specific,a)})),x=K7(),k=e7((e=>x.update(e))),O=e7((e=>{x.wasMoved(e)&&(u||f||d.goToOption(S7.Specific,a,0))})),j=e7((e=>{x.wasMoved(e)&&(u||f&&(c.optionsPropsRef.current.hold||d.goToOption(S7.Nothing)))})),S=e.useMemo((()=>({active:f,selected:h,disabled:u})),[f,h,u]);return T7({ourProps:{id:a,ref:m,role:"option",tabIndex:!0===u?void 0:-1,"aria-disabled":!0===u||void 0,"aria-selected":h,disabled:void 0,onClick:y,onFocus:w,onPointerEnter:k,onMouseEnter:k,onPointerMove:O,onMouseMove:O,onPointerLeave:j,onMouseLeave:j},theirProps:s,slot:S,defaultTag:"li",name:"Combobox.Option"})})),gee=Object.assign(fee,{Input:vee,Button:hee,Label:pee,Options:mee,Option:bee});var yee=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(yee||{});function wee(){let t=e.useRef(0);return g7("keydown",(e=>{"Tab"===e.key&&(t.current=e.shiftKey?1:0)}),!0),t}let xee=e.createContext(!1);function kee(){return e.useContext(xee)}let Oee=e.Fragment;let jee=e.Fragment,See=e.createContext(null);let Nee=e.createContext(null);let Mee=D7((function(n,r){let o=n,i=e.useRef(null),a=j7(O7((e=>{i.current=e})),r),u=Q7(i),l=function(t){let n=kee(),r=e.useContext(See),o=Q7(t),[i,a]=e.useState((()=>{if(!n&&null!==r||Y9.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}(i),[s]=e.useState((()=>{var e;return Y9.isServer?null:null!=(e=null==u?void 0:u.createElement("div"))?e:null})),c=e.useContext(Nee),d=t7();return X9((()=>{!l||!s||l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s))}),[l,s]),X9((()=>{if(s&&c)return c.register(s)}),[c,s]),function(t){let n=e7(t),r=e.useRef(!1);e.useEffect((()=>(r.current=!1,()=>{r.current=!0,Z9((()=>{r.current&&n()}))})),[n])}((()=>{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(T7({ourProps:{ref:a},theirProps:o,defaultTag:Oee,name:"Portal"}),s):null})),Aee=D7((function(t,n){let{target:r,...o}=t,i={ref:j7(n)};return e.createElement(See.Provider,{value:r},T7({ourProps:i,theirProps:o,defaultTag:jee,name:"Popover.Group"}))}));Object.assign(Mee,{Group:Aee});let Cee=e.createContext(null);function Tee(){let t=e.useContext(Cee);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,Tee),e}return t}let Eee=D7((function(e,t){let n=r7(),{id:r=`headlessui-description-${n}`,...o}=e,i=Tee(),a=j7(t);return X9((()=>i.register(r)),[r,i.register]),T7({ourProps:{ref:a,...i.props,id:r},theirProps:o,slot:i.slot||{},defaultTag:"p",name:i.name||"Description"})})),Pee=Object.assign(Eee,{});var Dee;let Iee=null!=(Dee=e.startTransition)?Dee:function(e){e()};var _ee=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(_ee||{}),Ree=(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))(Ree||{});let Lee={0:e=>({...e,disclosureState:o7(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}},Fee=e.createContext(null);function Bee(t){let n=e.useContext(Fee);if(null===n){let e=new Error(`<${t} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Bee),e}return n}Fee.displayName="DisclosureContext";let zee=e.createContext(null);function $ee(t){let n=e.useContext(zee);if(null===n){let e=new Error(`<${t} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,$ee),e}return n}zee.displayName="DisclosureAPIContext";let Wee=e.createContext(null);function Uee(e,t){return o7(t.type,Lee,e,t)}Wee.displayName="DisclosurePanelContext";let Hee=e.Fragment;let Vee=A7.RenderStrategy|A7.Static;let qee=D7((function(t,n){let{defaultOpen:r=!1,...o}=t,i=e.useRef(null),a=j7(n,O7((e=>{i.current=e}),void 0===t.as||t.as===e.Fragment)),u=e.useRef(null),l=e.useRef(null),s=e.useReducer(Uee,{disclosureState:r?0:1,linkedPanel:!1,buttonRef:l,panelRef:u,buttonId:null,panelId:null}),[{disclosureState:c,buttonId:d},f]=s,h=e7((e=>{f({type:1});let t=i7(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(Fee.Provider,{value:s},e.createElement(zee.Provider,{value:v},e.createElement(V7,{value:o7(c,{0:U7.Open,1:U7.Closed})},T7({ourProps:m,theirProps:o,slot:p,defaultTag:Hee,name:"Disclosure"}))))})),Yee=D7((function(t,n){let r=r7(),{id:o=`headlessui-disclosure-button-${r}`,...i}=t,[a,u]=Bee("Disclosure.Button"),l=e.useContext(Wee),s=null!==l&&l===a.panelId,c=e.useRef(null),d=j7(c,n,s?null:a.buttonRef);e.useEffect((()=>{if(!s)return u({type:2,buttonId:o}),()=>{u({type:2,buttonId:null})}}),[o,u,s]);let f=e7((e=>{var t;if(s){if(1===a.disclosureState)return;switch(e.key){case q7.Space:case q7.Enter:e.preventDefault(),e.stopPropagation(),u({type:0}),null==(t=a.buttonRef.current)||t.focus()}}else switch(e.key){case q7.Space:case q7.Enter:e.preventDefault(),e.stopPropagation(),u({type:0})}})),h=e7((e=>{if(e.key===q7.Space)e.preventDefault()})),v=e7((e=>{var n;R7(e.currentTarget)||t.disabled||(s?(u({type:0}),null==(n=a.buttonRef.current)||n.focus()):u({type:0}))})),p=e.useMemo((()=>({open:0===a.disclosureState})),[a]),m=x7(t,c);return T7({ourProps:s?{ref:d,type:m,onKeyDown:f,onClick:v}:{ref:d,id:o,type:m,"aria-expanded":0===a.disclosureState,"aria-controls":a.linkedPanel?a.panelId:void 0,onKeyDown:f,onKeyUp:h,onClick:v},theirProps:i,slot:p,defaultTag:"button",name:"Disclosure.Button"})})),Xee=D7((function(t,n){let r=r7(),{id:o=`headlessui-disclosure-panel-${r}`,...i}=t,[a,u]=Bee("Disclosure.Panel"),{close:l}=$ee("Disclosure.Panel"),s=j7(n,a.panelRef,(e=>{Iee((()=>u({type:e?4:5})))}));e.useEffect((()=>(u({type:3,panelId:o}),()=>{u({type:3,panelId:null})})),[o,u]);let c=H7(),d=null!==c?(c&U7.Open)===U7.Open:0===a.disclosureState,f=e.useMemo((()=>({open:0===a.disclosureState,close:l})),[a,l]),h={ref:s,id:o};return e.createElement(Wee.Provider,{value:a.panelId},T7({ourProps:h,theirProps:i,slot:f,defaultTag:"div",features:Vee,visible:d,name:"Disclosure.Panel"}))})),Gee=Object.assign(qee,{Button:Yee,Panel:Xee}),Kee=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Zee(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 Kee.test(a)&&(a=a.replace(Kee,"")),a}function Qee(t){let n=e.useRef(""),r=e.useRef("");return e7((()=>{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():Zee(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return Zee(e).trim()}(e).trim().toLowerCase();return n.current=o,r.current=i,i}))}var Jee=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Jee||{}),ete=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(ete||{}),tte=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(tte||{}),nte=(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))(nte||{});function rte(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=p7(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 ote={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=rte(e),o=N7(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=rte(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=rte(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})},ite=e.createContext(null);function ate(t){let n=e.useContext(ite);if(null===n){let e=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,ate),e}return n}ite.displayName="ListboxActionsContext";let ute=e.createContext(null);function lte(t){let n=e.useContext(ute);if(null===n){let e=new Error(`<${t} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,lte),e}return n}function ste(e,t){return o7(t.type,ote,e,t)}ute.displayName="ListboxDataContext";let cte=e.Fragment;let dte=A7.RenderStrategy|A7.Static;let fte=D7((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=j7(n),[p=(d?[]:void 0),m]=Y7(r,u,o),[b,g]=e.useReducer(ste,{dataRef:e.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),y=e.useRef({static:!1,hold:!1}),w=e.useRef(null),x=e.useRef(null),k=e.useRef(null),O=e7("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=>o7(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:y,labelRef:w,buttonRef:x,optionsRef:k})),[p,s,d,b]);X9((()=>{b.dataRef.current=S}),[S]),y7([S.buttonRef,S.optionsRef],((e,t)=>{var n;g({type:1}),f7(t,d7.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=e7((e=>{let t=S.options.find((t=>t.id===e));t&&I(t.dataRef.current.value)})),A=e7((()=>{if(null!==S.activeOptionIndex){let{dataRef:e,id:t}=S.options[S.activeOptionIndex];I(e.current.value),g({type:2,focus:S7.Specific,id:t})}})),C=e7((()=>g({type:0}))),T=e7((()=>g({type:1}))),E=e7(((e,t,n)=>e===S7.Specific?g({type:2,focus:S7.Specific,id:t,trigger:n}):g({type:2,focus:e,trigger:n}))),P=e7(((e,t)=>(g({type:5,id:e,dataRef:t}),()=>g({type:6,id:e})))),D=e7((e=>(g({type:7,id:e}),()=>g({type:7,id:null})))),I=e7((e=>o7(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)}}))),_=e7((e=>g({type:3,value:e}))),R=e7((()=>g({type:4}))),L=e.useMemo((()=>({onChange:I,registerOption:P,registerLabel:D,goToOption:E,closeListbox:T,openListbox:C,selectActiveOption:A,selectOption:M,search:_,clearSearch:R})),[]),F={ref:v},B=e.useRef(null),z=J9();return e.useEffect((()=>{B.current&&void 0!==o&&z.addEventListener(B.current,"reset",(()=>{null==m||m(o)}))}),[B,m]),e.createElement(ite.Provider,{value:L},e.createElement(ute.Provider,{value:S},e.createElement(V7,{value:o7(S.listboxState,{0:U7.Open,1:U7.Closed})},null!=a&&null!=p&&L7({[a]:p}).map((([t,n],r)=>e.createElement($7,{features:z7.Hidden,ref:0===r?e=>{var t;B.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0,...I7({key:t,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,name:t,value:n})}))),T7({ourProps:F,theirProps:f,slot:N,defaultTag:cte,name:"Listbox"}))))})),hte=D7((function(t,n){var r;let o=r7(),{id:i=`headlessui-listbox-button-${o}`,...a}=t,u=lte("Listbox.Button"),l=ate("Listbox.Button"),s=j7(u.buttonRef,n),c=J9(),d=e7((e=>{switch(e.key){case q7.Space:case q7.Enter:case q7.ArrowDown:e.preventDefault(),l.openListbox(),c.nextFrame((()=>{u.value||l.goToOption(S7.First)}));break;case q7.ArrowUp:e.preventDefault(),l.openListbox(),c.nextFrame((()=>{u.value||l.goToOption(S7.Last)}))}})),f=e7((e=>{if(e.key===q7.Space)e.preventDefault()})),h=e7((e=>{if(R7(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=K9((()=>{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 T7({ourProps:{ref:s,id:i,type:x7(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"})})),vte=D7((function(t,n){let r=r7(),{id:o=`headlessui-listbox-label-${r}`,...i}=t,a=lte("Listbox.Label"),u=ate("Listbox.Label"),l=j7(a.labelRef,n);X9((()=>u.registerLabel(o)),[o]);let s=e7((()=>{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 T7({ourProps:{ref:l,id:o,onClick:s},theirProps:i,slot:c,defaultTag:"label",name:"Listbox.Label"})})),pte=D7((function(t,n){var r;let o=r7(),{id:i=`headlessui-listbox-options-${o}`,...a}=t,u=lte("Listbox.Options"),l=ate("Listbox.Options"),s=j7(u.optionsRef,n),c=J9(),d=J9(),f=H7(),h=null!==f?(f&U7.Open)===U7.Open:0===u.listboxState;e.useEffect((()=>{var e;let t=u.optionsRef.current;t&&0===u.listboxState&&t!==(null==(e=i7(t))?void 0:e.activeElement)&&t.focus({preventScroll:!0})}),[u.listboxState,u.optionsRef]);let v=e7((e=>{switch(d.dispose(),e.key){case q7.Space:if(""!==u.searchQuery)return e.preventDefault(),e.stopPropagation(),l.search(e.key);case q7.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(),Q9().nextFrame((()=>{var e;return null==(e=u.buttonRef.current)?void 0:e.focus({preventScroll:!0})})));break;case o7(u.orientation,{vertical:q7.ArrowDown,horizontal:q7.ArrowRight}):return e.preventDefault(),e.stopPropagation(),l.goToOption(S7.Next);case o7(u.orientation,{vertical:q7.ArrowUp,horizontal:q7.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),l.goToOption(S7.Previous);case q7.Home:case q7.PageUp:return e.preventDefault(),e.stopPropagation(),l.goToOption(S7.First);case q7.End:case q7.PageDown:return e.preventDefault(),e.stopPropagation(),l.goToOption(S7.Last);case q7.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 q7.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(l.search(e.key),d.setTimeout((()=>l.clearSearch()),350))}})),p=K9((()=>{var e,t,n;return null!=(n=null==(e=u.labelRef.current)?void 0:e.id)?n:null==(t=u.buttonRef.current)?void 0:t.id}),[u.labelRef.current,u.buttonRef.current]),m=e.useMemo((()=>({open:0===u.listboxState})),[u]);return T7({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:dte,visible:h,name:"Listbox.Options"})})),mte=D7((function(t,n){let r=r7(),{id:o=`headlessui-listbox-option-${r}`,disabled:i=!1,value:a,...u}=t,l=lte("Listbox.Option"),s=ate("Listbox.Option"),c=null!==l.activeOptionIndex&&l.options[l.activeOptionIndex].id===o,d=l.isSelected(a),f=e.useRef(null),h=Qee(f),v=G9({disabled:i,value:a,domRef:f,get textValue(){return h()}}),p=j7(n,f);X9((()=>{if(0!==l.listboxState||!c||0===l.activationTrigger)return;let e=Q9();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]),X9((()=>s.registerOption(o,v)),[v,o]);let m=e7((e=>{if(i)return e.preventDefault();s.onChange(a),0===l.mode&&(s.closeListbox(),Q9().nextFrame((()=>{var e;return null==(e=l.buttonRef.current)?void 0:e.focus({preventScroll:!0})})))})),b=e7((()=>{if(i)return s.goToOption(S7.Nothing);s.goToOption(S7.Specific,o)})),g=K7(),y=e7((e=>g.update(e))),w=e7((e=>{g.wasMoved(e)&&(i||c||s.goToOption(S7.Specific,o,0))})),x=e7((e=>{g.wasMoved(e)&&(i||c&&s.goToOption(S7.Nothing))})),k=e.useMemo((()=>({active:c,selected:d,disabled:i})),[c,d,i]);return T7({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:y,onMouseEnter:y,onPointerMove:w,onMouseMove:w,onPointerLeave:x,onMouseLeave:x},theirProps:u,slot:k,defaultTag:"li",name:"Listbox.Option"})})),bte=Object.assign(fte,{Button:hte,Label:vte,Options:pte,Option:mte});var gte=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(gte||{}),yte=(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))(yte||{});let wte={0:e=>{let t={...e,popoverState:o7(e.popoverState,{0:1,1:0})};return 0===t.popoverState&&(t.Ce=!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}},xte=e.createContext(null);function kte(t){let n=e.useContext(xte);if(null===n){let e=new Error(`<${t} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,kte),e}return n}xte.displayName="PopoverContext";let Ote=e.createContext(null);function jte(t){let n=e.useContext(Ote);if(null===n){let e=new Error(`<${t} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,jte),e}return n}Ote.displayName="PopoverAPIContext";let Ste=e.createContext(null);function Nte(){return e.useContext(Ste)}Ste.displayName="PopoverGroupContext";let Mte=e.createContext(null);function Ate(e,t){return o7(t.type,wte,e,t)}Mte.displayName="PopoverPanelContext";let Cte=A7.RenderStrategy|A7.Static;let Tte=A7.RenderStrategy|A7.Static;let Ete=D7((function(t,n){var r;let{Ce:o=!1,...i}=t,a=e.useRef(null),u=j7(n,O7((e=>{a.current=e}))),l=e.useRef([]),s=e.useReducer(Ate,{Ce: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,g=Q7(null!=(r=a.current)?r:d),y=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=c7(),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=G9(f),x=G9(v),k=e.useMemo((()=>({buttonId:w,panelId:x,close:()=>b({type:1})})),[w,x,b]),O=Nte(),j=null==O?void 0:O.registerPopover,S=e7((()=>{var e;return null!=(e=null==O?void 0:O.isFocusWithinPopoverGroup())?e:(null==g?void 0:g.activeElement)&&((null==d?void 0:d.contains(g.activeElement))||(null==h?void 0:h.contains(g.activeElement)))}));e.useEffect((()=>null==j?void 0:j(k)),[j,k]);let[N,M]=function(){let t=e.useContext(Nee),n=e.useRef([]),r=e7((e=>(n.current.push(e),t&&t.register(e),()=>o(e)))),o=e7((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(Nee.Provider,{value:i},t)}),[i])]}(),A=function({defaultContainers:t=[],portals:n,mainTreeNodeRef:r}={}){var o;let i=e.useRef(null!=(o=null==r?void 0:r.current)?o:null),a=Q7(i),u=e7((()=>{var e;let r=[];for(let n of t)null!==n&&(n instanceof HTMLElement?r.push(n):"current"in n&&n.current instanceof HTMLElement&&r.push(n.current));if(null!=n&&n.current)for(let t of n.current)r.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)||r.some((e=>t.contains(e)))||r.push(t));return r}));return{resolveContainers:u,contains:e7((e=>u().some((t=>t.contains(e))))),mainTreeNodeRef:i,MainTreeNode:e.useMemo((()=>function(){return null!=r?null:e.createElement($7,{features:z7.Hidden,ref:i})}),[i,r])}}({mainTreeNodeRef:null==O?void 0:O.mainTreeNodeRef,portals:N,defaultContainers:[d,h]});(function(t,n,r,o){let i=G9(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])})(null==g?void 0:g.defaultView,"focus",(e=>{var t,n,r,o;e.target!==window&&e.target instanceof HTMLElement&&0===c&&(S()||d&&h&&(A.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),y7(A.resolveContainers,((e,t)=>{b({type:1}),f7(t,d7.Loose)||(e.preventDefault(),null==d||d.focus())}),0===c);let C=e7((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:C,isPortalled:y})),[C,y]),E=e.useMemo((()=>({open:0===c,close:C})),[c,C]),P={ref:u};return e.createElement(Mte.Provider,{value:null},e.createElement(xte.Provider,{value:s},e.createElement(Ote.Provider,{value:T},e.createElement(V7,{value:o7(c,{0:U7.Open,1:U7.Closed})},e.createElement(M,null,T7({ourProps:P,theirProps:i,slot:E,defaultTag:"div",name:"Popover"}),e.createElement(A.MainTreeNode,null))))))})),Pte=D7((function(t,n){let r=r7(),{id:o=`headlessui-popover-button-${r}`,...i}=t,[a,u]=kte("Popover.Button"),{isPortalled:l}=jte("Popover.Button"),s=e.useRef(null),c=`headlessui-focus-sentinel-${r7()}`,d=Nte(),f=null==d?void 0:d.closeOthers,h=null!==e.useContext(Mte);e.useEffect((()=>{if(!h)return u({type:3,buttonId:o}),()=>{u({type:3,buttonId:null})}}),[h,o,u]);let[v]=e.useState((()=>Symbol())),p=j7(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=j7(s,n),b=Q7(s),g=e7((e=>{var t,n,r;if(h){if(1===a.popoverState)return;switch(e.key){case q7.Space:case q7.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 q7.Space:case q7.Enter:e.preventDefault(),e.stopPropagation(),1===a.popoverState&&(null==f||f(a.buttonId)),u({type:0});break;case q7.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})}})),y=e7((e=>{h||e.key===q7.Space&&e.preventDefault()})),w=e7((e=>{var n,r;R7(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=e7((e=>{e.preventDefault(),e.stopPropagation()})),k=0===a.popoverState,O=e.useMemo((()=>({open:k})),[k]),j=x7(t,s),S=h?{ref:m,type:j,onKeyDown:g,onClick:w}:{ref:p,id:a.buttonId,type:j,"aria-expanded":0===a.popoverState,"aria-controls":a.panel?a.panelId:void 0,onKeyDown:g,onKeyUp:y,onClick:w,onMouseDown:x},N=wee(),M=e7((()=>{let e=a.panel;e&&o7(N.current,{[yee.Forwards]:()=>m7(e,u7.First),[yee.Backwards]:()=>m7(e,u7.Last)})===l7.Error&&m7(c7().filter((e=>"true"!==e.dataset.headlessuiFocusGuard)),o7(N.current,{[yee.Forwards]:u7.Next,[yee.Backwards]:u7.Previous}),{relativeTo:a.button})}));return e.createElement(e.Fragment,null,T7({ourProps:S,theirProps:i,slot:O,defaultTag:"button",name:"Popover.Button"}),k&&!h&&l&&e.createElement($7,{id:c,features:z7.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:M}))})),Dte=D7((function(t,n){let r=r7(),{id:o=`headlessui-popover-overlay-${r}`,...i}=t,[{popoverState:a},u]=kte("Popover.Overlay"),l=j7(n),s=H7(),c=null!==s?(s&U7.Open)===U7.Open:0===a,d=e7((e=>{if(R7(e.currentTarget))return e.preventDefault();u({type:1})}));return T7({ourProps:{ref:l,id:o,"aria-hidden":!0,onClick:d},theirProps:i,slot:e.useMemo((()=>({open:0===a})),[a]),defaultTag:"div",features:Cte,visible:c,name:"Popover.Overlay"})})),Ite=D7((function(t,n){let r=r7(),{id:o=`headlessui-popover-panel-${r}`,focus:i=!1,...a}=t,[u,l]=kte("Popover.Panel"),{close:s,isPortalled:c}=jte("Popover.Panel"),d=`headlessui-focus-sentinel-before-${r7()}`,f=`headlessui-focus-sentinel-after-${r7()}`,h=e.useRef(null),v=j7(h,n,(e=>{l({type:4,panel:e})})),p=Q7(h);X9((()=>(l({type:5,panelId:o}),()=>{l({type:5,panelId:null})})),[o,l]);let m=H7(),b=null!==m?(m&U7.Open)===U7.Open:0===u.popoverState,g=e7((e=>{var t;if(e.key===q7.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.Ce||!i||0!==u.popoverState||!h.current)return;let e=null==p?void 0:p.activeElement;h.current.contains(e)||m7(h.current,u7.First)}),[u.Ce,i,h,u.popoverState]);let y=e.useMemo((()=>({open:0===u.popoverState,close:s})),[u,s]),w={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},x=wee(),k=e7((()=>{let e=h.current;e&&o7(x.current,{[yee.Forwards]:()=>{var t;m7(e,u7.First)===l7.Error&&(null==(t=u.afterPanelSentinel.current)||t.focus())},[yee.Backwards]:()=>{var e;null==(e=u.button)||e.focus({preventScroll:!0})}})})),O=e7((()=>{let e=h.current;e&&o7(x.current,{[yee.Forwards]:()=>{var e;if(!u.button)return;let t=c7(),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)}m7(o,u7.First,{sorted:!1})},[yee.Backwards]:()=>{var t;m7(e,u7.Previous)===l7.Error&&(null==(t=u.button)||t.focus())}})}));return e.createElement(Mte.Provider,{value:o},b&&c&&e.createElement($7,{id:d,ref:u.beforePanelSentinel,features:z7.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:k}),T7({ourProps:w,theirProps:a,slot:y,defaultTag:"div",features:Tte,visible:b,name:"Popover.Panel"}),b&&c&&e.createElement($7,{id:f,ref:u.afterPanelSentinel,features:z7.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:O}))})),_te=D7((function(t,n){let r=e.useRef(null),o=j7(r,n),[i,a]=e.useState([]),u=function(){let t=e.useRef(null);return{mainTreeNodeRef:t,MainTreeNode:e.useMemo((()=>function(){return e.createElement($7,{features:z7.Hidden,ref:t})}),[t])}}(),l=e7((e=>{a((t=>{let n=t.indexOf(e);if(-1!==n){let e=t.slice();return e.splice(n,1),e}return t}))})),s=e7((e=>(a((t=>[...t,e])),()=>l(e)))),c=e7((()=>{var e;let t=i7(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=e7((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(Ste.Provider,{value:f},T7({ourProps:p,theirProps:v,slot:h,defaultTag:"div",name:"Popover.Group"}),e.createElement(u.MainTreeNode,null))})),Rte=Object.assign(Ete,{Button:Pte,Overlay:Dte,Panel:Ite,Group:_te}),Lte=e.createContext(null);function Fte(){let t=e.useContext(Lte);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,Fte),e}return t}let Bte=D7((function(e,t){let n=r7(),{id:r=`headlessui-label-${n}`,passive:o=!1,...i}=e,a=Fte(),u=j7(t);X9((()=>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),T7({ourProps:l,theirProps:i,slot:a.slot||{},defaultTag:"label",name:a.name||"Label"})})),zte=Object.assign(Bte,{}),$te=e.createContext(null);$te.displayName="GroupContext";let Wte=e.Fragment;let Ute=D7((function(t,n){let r=r7(),{id:o=`headlessui-switch-${r}`,checked:i,defaultChecked:a=!1,onChange:u,name:l,value:s,form:c,...d}=t,f=e.useContext($te),h=e.useRef(null),v=j7(h,n,null===f?null:f.setSwitch),[p,m]=Y7(i,u,a),b=e7((()=>null==m?void 0:m(!p))),g=e7((e=>{if(R7(e.currentTarget))return e.preventDefault();e.preventDefault(),b()})),y=e7((e=>{e.key===q7.Space?(e.preventDefault(),b()):e.key===q7.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=e7((e=>e.preventDefault())),x=e.useMemo((()=>({checked:p})),[p]),k={id:o,ref:v,role:"switch",type:x7(t,h),tabIndex:0,"aria-checked":p,"aria-labelledby":null==f?void 0:f.labelledby,"aria-describedby":null==f?void 0:f.describedby,onClick:g,onKeyUp:y,onKeyPress:w},O=J9();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($7,{features:z7.Hidden,...I7({as:"input",type:"checkbox",hidden:!0,readOnly:!0,form:c,checked:p,name:l,value:s})}),T7({ourProps:k,theirProps:d,slot:x,defaultTag:"button",name:"Switch"}))})),Hte=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=e7((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(Lte.Provider,{value:o},t.children)}),[n])]}(),[u,l]=function(){let[t,n]=e.useState([]);return[t.length>0?t.join(" "):void 0,e.useMemo((()=>function(t){let r=e7((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(Cee.Provider,{value:o},t.children)}),[n])]}(),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($te.Provider,{value:s},T7({ourProps:{},theirProps:c,defaultTag:Wte,name:"Switch.Group"}))))},Vte=Object.assign(Ute,{Group:Hte,Label:zte,Description:Pee});function qte({onFocus:t}){let[n,r]=e.useState(!0),o=function(){let t=e.useRef(!1);return X9((()=>(t.current=!0,()=>{t.current=!1})),[]),t}();return n?e.createElement($7,{as:"button",type:"button",features:z7.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 Yte=r.createContext(null);function Xte({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(Yte.Provider,{value:t},e)}function Gte(e){let t=r.useContext(Yte);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 Kte=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Kte||{}),Zte=(e=>(e[e.Less=-1]="Less",e[e.Equal=0]="Equal",e[e.Greater=1]="Greater",e))(Zte||{}),Qte=(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))(Qte||{});let Jte={0(e,t){var n;let r=p7(e.tabs,(e=>e.current)),o=p7(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=o7(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>o7(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(0===i.length)return a;let o=o7(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=p7([...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:p7([...e.panels,t.panel],(e=>e.current))},4:(e,t)=>({...e,panels:e.panels.filter((e=>e!==t.panel))})},ene=e.createContext(null);function tne(t){let n=e.useContext(ene);if(null===n){let e=new Error(`<${t} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,tne),e}return n}ene.displayName="TabsDataContext";let nne=e.createContext(null);function rne(t){let n=e.useContext(nne);if(null===n){let e=new Error(`<${t} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,rne),e}return n}function one(e,t){return o7(t.type,Jte,e,t)}nne.displayName="TabsActionsContext";let ine=e.Fragment;let ane=A7.RenderStrategy|A7.Static;let une=D7((function(t,n){var r,o;let i=r7(),{id:a=`headlessui-tabs-tab-${i}`,...u}=t,{orientation:l,activation:s,selectedIndex:c,tabs:d,panels:f}=tne("Tab"),h=rne("Tab"),v=tne("Tab"),p=e.useRef(null),m=j7(p,n);X9((()=>h.registerTab(p)),[h,p]);let b=Gte("tabs"),g=d.indexOf(p);-1===g&&(g=b);let y=g===c,w=e7((e=>{var t;let n=e();if(n===l7.Success&&"auto"===s){let e=null==(t=i7(p))?void 0:t.activeElement,n=v.tabs.findIndex((t=>t.current===e));-1!==n&&h.change(n)}return n})),x=e7((e=>{let t=d.map((e=>e.current)).filter(Boolean);if(e.key===q7.Space||e.key===q7.Enter)return e.preventDefault(),e.stopPropagation(),void h.change(g);switch(e.key){case q7.Home:case q7.PageUp:return e.preventDefault(),e.stopPropagation(),w((()=>m7(t,u7.First)));case q7.End:case q7.PageDown:return e.preventDefault(),e.stopPropagation(),w((()=>m7(t,u7.Last)))}return w((()=>o7(l,{vertical:()=>e.key===q7.ArrowUp?m7(t,u7.Previous|u7.WrapAround):e.key===q7.ArrowDown?m7(t,u7.Next|u7.WrapAround):l7.Error,horizontal:()=>e.key===q7.ArrowLeft?m7(t,u7.Previous|u7.WrapAround):e.key===q7.ArrowRight?m7(t,u7.Next|u7.WrapAround):l7.Error})))===l7.Success?e.preventDefault():void 0})),k=e.useRef(!1),O=e7((()=>{var e;k.current||(k.current=!0,null==(e=p.current)||e.focus({preventScroll:!0}),h.change(g),Z9((()=>{k.current=!1})))})),j=e7((e=>{e.preventDefault()})),S=e.useMemo((()=>({selected:y})),[y]);return T7({ourProps:{ref:m,onKeyDown:x,onMouseDown:j,onClick:O,id:a,role:"tab",type:x7(t,p),"aria-controls":null==(o=null==(r=f[g])?void 0:r.current)?void 0:o.id,"aria-selected":y,tabIndex:y?0:-1},theirProps:u,slot:S,defaultTag:"button",name:"Tabs.Tab"})})),lne=D7((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=j7(n),[h,v]=e.useReducer(one,{selectedIndex:null!=u?u:r,tabs:[],panels:[]}),p=e.useMemo((()=>({selectedIndex:h.selectedIndex})),[h.selectedIndex]),m=G9(a||(()=>{})),b=G9(h.tabs),g=e.useMemo((()=>({orientation:s,activation:c,...h})),[s,c,h]),y=e7((e=>(v({type:1,tab:e}),()=>v({type:2,tab:e})))),w=e7((e=>(v({type:3,panel:e}),()=>v({type:4,panel:e})))),x=e7((e=>{k.current!==e&&m.current(e),d||v({type:0,index:e})})),k=G9(d?t.selectedIndex:h.selectedIndex),O=e.useMemo((()=>({registerTab:y,registerPanel:w,change:x})),[]);X9((()=>{v({type:0,index:null!=u?u:r})}),[u]),X9((()=>{if(void 0===k.current||h.tabs.length<=0)return;let e=p7(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(Xte,null,e.createElement(nne.Provider,{value:O},e.createElement(ene.Provider,{value:g},g.tabs.length<=0&&e.createElement(qte,{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}}),T7({ourProps:j,theirProps:l,slot:p,defaultTag:ine,name:"Tabs"}))))})),sne=D7((function(e,t){let{orientation:n,selectedIndex:r}=tne("Tab.List");return T7({ourProps:{ref:j7(t),role:"tablist","aria-orientation":n},theirProps:e,slot:{selectedIndex:r},defaultTag:"div",name:"Tabs.List"})})),cne=D7((function(t,n){let{selectedIndex:r}=tne("Tab.Panels");return T7({ourProps:{ref:j7(n)},theirProps:t,slot:e.useMemo((()=>({selectedIndex:r})),[r]),defaultTag:"div",name:"Tabs.Panels"})})),dne=D7((function(t,n){var r,o,i,a;let u=r7(),{id:l=`headlessui-tabs-panel-${u}`,tabIndex:s=0,...c}=t,{selectedIndex:d,tabs:f,panels:h}=tne("Tab.Panel"),v=rne("Tab.Panel"),p=e.useRef(null),m=j7(p,n);X9((()=>v.registerPanel(p)),[v,p]);let b=Gte("panels"),g=h.indexOf(p);-1===g&&(g=b);let y=g===d,w=e.useMemo((()=>({selected:y})),[y]),x={ref:m,id:l,role:"tabpanel","aria-labelledby":null==(o=null==(r=f[g])?void 0:r.current)?void 0:o.id,tabIndex:y?s:-1};return y||null!=(i=c.unmount)&&!i||null!=(a=c.static)&&a?T7({ourProps:x,theirProps:c,slot:w,defaultTag:"div",features:ane,visible:y,name:"Tabs.Panel"}):e.createElement($7,{as:"span",...x})})),fne=Object.assign(une,{Group:lne,List:sne,Panels:cne,Panel:dne});const hne=t=>{var n=Cr(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"}))},vne=t=>{var n=Cr(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:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))};var pne=function(){return pne=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},pne.apply(this,arguments)};function mne(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 bne,gne={exports:{}},yne={};gne.exports=function(){if(bne)return yne;bne=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,Pe:!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 yne.Fragment=r,yne.jsx=u,yne.jsxs=u,yne}();var wne=gne.exports;function xne(e){return"multiple"===e.mode}function kne(e){return"range"===e.mode}function One(e){return"single"===e.mode}var jne={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 Sne=Object.freeze({__proto__:null,formatCaption:function(e,t){return Uu(e,"LLLL y",t)},formatDay:function(e,t){return Uu(e,"d",t)},formatMonthCaption:function(e,t){return Uu(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return Uu(e,"cccccc",t)},formatYearCaption:function(e,t){return Uu(e,"yyyy",t)}}),Nne=Object.freeze({__proto__:null,labelDay:function(e,t,n){return Uu(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 Uu(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var Mne=e.createContext(void 0);function Ane(e){var t,n,r=e.initialProps,o=function(){var e=jne,t=Lu,n=new Date;return{captionLayout:"buttons",classNames:e,formatters:Sne,labels:Nne,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=Ya(r):t&&(i=new Date(t,0,1)),o?a=qa(o):n&&(a=new Date(n,11,31)),{fromDate:i?_a(i):void 0,toDate:a?_a(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"),(One(r)||xne(r)||kne(r))&&(n=r.onSelect);var s=pne(pne(pne({},o),r),{captionLayout:l,classNames:pne(pne({},o.classNames),r.classNames),components:pne({},r.components),formatters:pne(pne({},o.formatters),r.formatters),fromDate:a,labels:pne(pne({},o.labels),r.labels),mode:r.mode||o.mode,modifiers:pne(pne({},o.modifiers),r.modifiers),modifiersClassNames:pne(pne({},o.modifiersClassNames),r.modifiersClassNames),onSelect:n,styles:pne(pne({},o.styles),r.styles),toDate:u});return wne.jsx(Mne.Provider,pne({value:s},{children:e.children}))}function Cne(){var t=e.useContext(Mne);if(!t)throw new Error("useDayPicker must be used within a DayPickerProvider.");return t}function Tne(e){var t=Cne(),n=t.locale,r=t.classNames,o=t.styles,i=t.formatters.formatCaption;return wne.jsx("div",pne({className:r.caption_label,style:o.caption_label,"aria-live":"polite",role:"presentation",id:e.id},{children:i(e.displayMonth,{locale:n})}))}function Ene(e){return wne.jsx("svg",pne({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:wne.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 Pne(e){var t,n,r=e.onChange,o=e.value,i=e.children,a=e.caption,u=e.className,l=e.style,s=Cne(),c=null!==(n=null===(t=s.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==n?n:Ene;return wne.jsxs("div",pne({className:u,style:l},{children:[wne.jsx("span",pne({className:s.classNames.vhidden},{children:e["aria-label"]})),wne.jsx("select",pne({name:e.name,"aria-label":e["aria-label"],className:s.classNames.dropdown,style:s.styles.dropdown,value:o,onChange:r},{children:i})),wne.jsxs("div",pne({className:s.classNames.caption_label,style:s.styles.caption_label,"aria-hidden":"true"},{children:[a,wne.jsx(c,{className:s.classNames.dropdown_icon,style:s.styles.dropdown_icon})]}))]}))}function Dne(e){var t,n=Cne(),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 wne.jsx(wne.Fragment,{});if(!o)return wne.jsx(wne.Fragment,{});var d=[];if(el(r,o))for(var f=Ya(r),h=r.getMonth();h<=o.getMonth();h++)d.push(nl(f,h));else for(f=Ya(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:Pne;return wne.jsx(v,pne({name:"months","aria-label":c(),className:l.dropdown_month,style:i.dropdown_month,onChange:function(t){var n=Number(t.target.value),r=nl(Ya(e.displayMonth),n);e.onChange(r)},value:e.displayMonth.getMonth(),caption:u(e.displayMonth,{locale:a})},{children:d.map((function(e){return wne.jsx("option",pne({value:e.getMonth()},{children:u(e,{locale:a})}),e.getMonth())}))}))}function Ine(e){var t,n=e.displayMonth,r=Cne(),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 wne.jsx(wne.Fragment,{});if(!i)return wne.jsx(wne.Fragment,{});for(var h=o.getFullYear(),v=i.getFullYear(),p=h;p<=v;p++)f.push(rl(Xa(new Date),p));var m=null!==(t=null==s?void 0:s.Dropdown)&&void 0!==t?t:Pne;return wne.jsx(m,pne({name:"years","aria-label":d(),className:l.dropdown_year,style:u.dropdown_year,onChange:function(t){var r=rl(Ya(n),Number(t.target.value));e.onChange(r)},value:n.getFullYear(),caption:c(n,{locale:a})},{children:f.map((function(e){return wne.jsx("option",pne({value:e.getFullYear()},{children:c(e,{locale:a})}),e.getFullYear())}))}))}function _ne(){var t=Cne(),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&&Ha(i,o)<0&&(o=Aa(i,-1*(l-1))),a&&Ha(o,a)<0&&(o=a),Ya(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=Ya(e);i(r),null===(n=t.onMonthChange)||void 0===n||n.call(t,r)}}]}var Rne=e.createContext(void 0);function Lne(e){var t=Cne(),n=_ne(),r=n[0],o=n[1],i=function(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,o=Ya(e),i=Ha(Ya(Aa(o,r)),o),a=[],u=0;u<i;u++){var l=Aa(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=Ya(e);if(!n)return Aa(u,a);if(!(Ha(n,e)<i))return Aa(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=Ya(e);if(!n)return Aa(a,-i);if(!(Ha(a,n)<=0))return Aa(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(Aa(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:u,nextMonth:a,isDateDisplayed:l};return wne.jsx(Rne.Provider,pne({value:s},{children:e.children}))}function Fne(){var t=e.useContext(Rne);if(!t)throw new Error("useNavigation must be used within a NavigationProvider");return t}function Bne(e){var t,n=Cne(),r=n.classNames,o=n.styles,i=n.components,a=Fne().goToMonth,u=function(t){a(Aa(t,e.displayIndex?-e.displayIndex:0))},l=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:Tne,s=wne.jsx(l,{id:e.id,displayMonth:e.displayMonth});return wne.jsxs("div",pne({className:r.caption_dropdowns,style:o.caption_dropdowns},{children:[wne.jsx("div",pne({className:r.vhidden},{children:s})),wne.jsx(Dne,{onChange:u,displayMonth:e.displayMonth}),wne.jsx(Ine,{onChange:u,displayMonth:e.displayMonth})]}))}function zne(e){return wne.jsx("svg",pne({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:wne.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 $ne(e){return wne.jsx("svg",pne({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:wne.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 Wne=e.forwardRef((function(e,t){var n=Cne(),r=n.classNames,o=n.styles,i=[r.button_reset,r.button];e.className&&i.push(e.className);var a=i.join(" "),u=pne(pne({},o.button_reset),o.button);return e.style&&Object.assign(u,e.style),wne.jsx("button",pne({},e,{ref:t,type:"button",className:a,style:u}))}));function Une(e){var t,n,r=Cne(),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 wne.jsx(wne.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:$ne,b=null!==(n=null==d?void 0:d.IconLeft)&&void 0!==n?n:zne;return wne.jsxs("div",pne({className:a.nav,style:u.nav},{children:[!e.hidePrevious&&wne.jsx(Wne,pne({name:"previous-month","aria-label":f,className:h,style:u.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick},{children:"rtl"===o?wne.jsx(m,{className:a.nav_icon,style:u.nav_icon}):wne.jsx(b,{className:a.nav_icon,style:u.nav_icon})})),!e.hideNext&&wne.jsx(Wne,pne({name:"next-month","aria-label":v,className:p,style:u.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick},{children:"rtl"===o?wne.jsx(b,{className:a.nav_icon,style:u.nav_icon}):wne.jsx(m,{className:a.nav_icon,style:u.nav_icon})}))]}))}function Hne(e){var t=Cne().numberOfMonths,n=Fne(),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 wne.jsx(Une,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:d,nextMonth:o,previousMonth:r,onPreviousClick:function(){r&&i(r)},onNextClick:function(){o&&i(o)}})}function Vne(e){var t,n,r=Cne(),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:Tne;return n=i?wne.jsx(s,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===u?wne.jsx(Bne,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===u?wne.jsxs(wne.Fragment,{children:[wne.jsx(Bne,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),wne.jsx(Hne,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):wne.jsxs(wne.Fragment,{children:[wne.jsx(s,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),wne.jsx(Hne,{displayMonth:e.displayMonth,id:e.id})]}),wne.jsx("div",pne({className:o.caption,style:a.caption},{children:n}))}function qne(e){var t=Cne(),n=t.footer,r=t.styles,o=t.classNames.tfoot;return n?wne.jsx("tfoot",pne({className:o,style:r.tfoot},{children:wne.jsx("tr",{children:wne.jsx("td",pne({colSpan:8},{children:n}))})})):wne.jsx(wne.Fragment,{})}function Yne(){var e=Cne(),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?Pa(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 wne.jsxs("tr",pne({style:n.head_row,className:t.head_row},{children:[r&&wne.jsx("td",{style:n.head_cell,className:t.head_cell}),s.map((function(e,r){return wne.jsx("th",pne({scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":l(e,{locale:o})},{children:u(e,{locale:o})}),r)}))]}))}function Xne(){var e,t=Cne(),n=t.classNames,r=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:Yne;return wne.jsx("thead",pne({style:r.head,className:n.head},{children:wne.jsx(i,{})}))}function Gne(e){var t=Cne(),n=t.locale,r=t.formatters.formatDay;return wne.jsx(wne.Fragment,{children:r(e.date,{locale:n})})}var Kne=e.createContext(void 0);function Zne(e){if(!xne(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return wne.jsx(Kne.Provider,pne({value:t},{children:e.children}))}return wne.jsx(Qne,{initialProps:e.initialProps,children:e.children})}function Qne(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?mne([],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 wne.jsx(Kne.Provider,pne({value:u},{children:n}))}function Jne(){var t=e.useContext(Kne);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}var ere,tre=e.createContext(void 0);function nre(e){if(!kne(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return wne.jsx(tre.Provider,pne({value:t},{children:e.children}))}return wne.jsx(rre,{initialProps:e.initialProps,children:e.children})}function rre(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-(La(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 wne.jsx(tre.Provider,pne({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 ore(){var t=e.useContext(tre);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function ire(e){return Array.isArray(e)?mne([],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"}(ere||(ere={}));var are=ere.Selected,ure=ere.Disabled,lre=ere.Hidden,sre=ere.Today,cre=ere.RangeEnd,dre=ere.RangeMiddle,fre=ere.RangeStart,hre=ere.Outside;var vre=e.createContext(void 0);function pre(e){var t=Cne(),n=function(e,t,n){var r,o=((r={})[are]=ire(e.selected),r[ure]=ire(e.disabled),r[lre]=ire(e.hidden),r[sre]=[e.today],r[cre]=[],r[dre]=[],r[fre]=[],r[hre]=[],r);return e.fromDate&&o[ure].push({before:e.fromDate}),e.toDate&&o[ure].push({after:e.toDate}),xne(e)?o[ure]=o[ure].concat(t.modifiers[ure]):kne(e)&&(o[ure]=o[ure].concat(n.modifiers[ure]),o[fre]=n.modifiers[fre],o[dre]=n.modifiers[dre],o[cre]=n.modifiers[cre]),o}(t,Jne(),ore()),r=function(e){var t={};return Object.entries(e).forEach((function(e){var n=e[0],r=e[1];t[n]=ire(r)})),t}(t.modifiers),o=pne(pne({},n),r);return wne.jsx(vre.Provider,pne({value:o},{children:e.children}))}function mre(){var t=e.useContext(vre);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function bre(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(Ua(t))return Wa(e,t);if(function(e){return Array.isArray(e)&&e.every(Ua)}(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?(La(o,r)<0&&(r=(n=[o,r])[0],o=n[1]),La(e,r)>=0&&La(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=La(t.before,e)>0,r=La(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)?La(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?La(t.before,e)>0:"function"==typeof t&&t(e)}))}function gre(e,t,n){var r=Object.keys(t).reduce((function(n,r){var o=t[r];return bre(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 yre=365;function wre(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:Fa,month:Aa,year:Ba,startOfWeek:function(e){return o.ISOWeek?Pa(e):Ea(e,{locale:d,weekStartsOn:l})},endOfWeek:function(e){return o.ISOWeek?Ka(e):Ga(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=gre(h,i);v=!p.disabled&&!p.hidden}return v?h:u.count>yre?u.lastFocused:wre(h,{moveBy:n,direction:r,context:o,modifiers:i,retry:pne(pne({},u),{count:u.count+1})})}var xre=e.createContext(void 0);function kre(t){var n=Fne(),r=mre(),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=Ya(e[0]),i=qa(e[e.length-1]),a=o;a<=i;){var u=gre(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=Cne(),v=function(e,t){if(i){var o=wre(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 wne.jsx(xre.Provider,pne({value:p},{children:t.children}))}function Ore(){var t=e.useContext(xre);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}var jre=e.createContext(void 0);function Sre(e){if(!One(e.initialProps)){var t={selected:void 0};return wne.jsx(jre.Provider,pne({value:t},{children:e.children}))}return wne.jsx(Nre,{initialProps:e.initialProps,children:e.children})}function Nre(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 wne.jsx(jre.Provider,pne({value:r},{children:n}))}function Mre(){var t=e.useContext(jre);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function Are(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(ere).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&n.push(o)}})),n}function Cre(t,n,r){var o,i,a,u=Cne(),l=Ore(),s=function(e,t){return gre(e,mre(),t)}(t,n),c=function(e,t){var n=Cne(),r=Mre(),o=Jne(),i=ore(),a=Ore(),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,g=a.focusEndOfWeek,y={onClick:function(a){var u,l,s,c;One(n)?null===(u=r.onDayClick)||void 0===u||u.call(r,e,t,a):xne(n)?null===(l=o.onDayClick)||void 0===l||l.call(o,e,t,a):kne(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(),g()}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 y}(t,s),d=function(){var e=Cne(),t=Mre(),n=Jne(),r=ore();return One(e)?t.selected:xne(e)?n.selected:kne(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=Are(u,s).join(" "),v=function(e,t){var n=pne({},e.styles.day);return Object.keys(t).forEach((function(t){var r;n=pne(pne({},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:Gne,b={style:v,className:h,children:wne.jsx(m,{date:t,displayMonth:n,activeModifiers:s}),role:"gridcell"},g=l.focusTarget&&Wa(l.focusTarget,t)&&!s.outside,y=l.focusedDay&&Wa(l.focusedDay,t),w=pne(pne(pne({},b),((o={disabled:s.disabled,role:"gridcell"})["aria-selected"]=s.selected,o.tabIndex=y||g?0:-1,o)),c);return{isButton:f,isHidden:p,activeModifiers:s,selectedDays:d,buttonProps:w,divProps:b}}function Tre(t){var n=e.useRef(null),r=Cre(t.date,t.displayMonth,n);return r.isHidden?wne.jsx("div",{role:"gridcell"}):r.isButton?wne.jsx(Wne,pne({name:"day",ref:n},r.buttonProps)):wne.jsx("div",pne({},r.divProps))}function Ere(e){var t=e.number,n=e.dates,r=Cne(),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 wne.jsx("span",pne({className:a.weeknumber,style:i.weeknumber},{children:s}));var c=l(Number(t),{locale:u});return wne.jsx(Wne,pne({name:"week-number","aria-label":c,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,n,e)}},{children:s}))}function Pre(e){var t,n,r,o=Cne(),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:Tre,c=null!==(n=null==l?void 0:l.WeekNumber)&&void 0!==n?n:Ere;return u&&(r=wne.jsx("td",pne({className:a.cell,style:i.cell},{children:wne.jsx(c,{number:e.weekNumber,dates:e.dates})}))),wne.jsxs("tr",pne({className:a.row,style:i.row},{children:[r,e.dates.map((function(t){return wne.jsx("td",pne({className:a.cell,style:i.cell,role:"presentation"},{children:wne.jsx(s,{displayMonth:e.displayMonth,date:t})}),qu(t))}))]}))}function Dre(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?Ka(t):Ga(t,n),o=(null==n?void 0:n.ISOWeek)?Pa(e):Ea(e,n),i=La(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)?Vu(t):Gu(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 Ire(e){var t,n,r,o=Cne(),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=Dre(Ya(e),qa(e),t);if(null==t?void 0:t.useFixedWeeks){var r=Ku(e,t);if(r<6){var o=n[n.length-1],i=o.dates[o.dates.length-1],a=Fa(i,6-r),u=Dre(Fa(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:Xne,m=null!==(n=null==c?void 0:c.Row)&&void 0!==n?n:Pre,b=null!==(r=null==c?void 0:c.Footer)&&void 0!==r?r:qne;return wne.jsxs("table",pne({id:e.id,className:a.table,style:u.table,role:"grid","aria-labelledby":e["aria-labelledby"]},{children:[!l&&wne.jsx(p,{}),wne.jsx("tbody",pne({className:a.tbody,style:u.tbody},{children:v.map((function(t){return wne.jsx(m,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))})),wne.jsx(b,{displayMonth:e.displayMonth})]}))}var _re="undefined"!=typeof window&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,Rre=!1,Lre=0;function Fre(){return"react-day-picker-".concat(++Lre)}function Bre(t){var n,r,o=Cne(),i=o.dir,a=o.classNames,u=o.styles,l=o.components,s=Fne().displayMonths,c=function(t){var n,r=null!=t?t:Rre?Fre():null,o=e.useState(r),i=o[0],a=o[1];return _re((function(){null===i&&a(Fre())}),[]),e.useEffect((function(){!1===Rre&&(Rre=!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=pne(pne({},h),u.caption_start)),p&&(f.push(a.caption_end),h=pne(pne({},h),u.caption_end)),m&&(f.push(a.caption_between),h=pne(pne({},h),u.caption_between));var b=null!==(r=null==l?void 0:l.Caption)&&void 0!==r?r:Vne;return wne.jsxs("div",pne({className:f.join(" "),style:h},{children:[wne.jsx(b,{id:c,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),wne.jsx(Ire,{id:d,"aria-labelledby":c,displayMonth:t.displayMonth})]}),t.displayIndex)}function zre(e){var t=Cne(),n=t.classNames,r=t.styles;return wne.jsx("div",pne({className:n.months,style:r.months},{children:e.children}))}function $re(t){var n,r,o=t.initialProps,i=Cne(),a=Ore(),u=Fne(),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=pne(pne({},i.styles.root),i.style),h=Object.keys(o).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var n;return pne(pne({},e),((n={})[t]=o[t],n))}),{}),v=null!==(r=null===(n=o.components)||void 0===n?void 0:n.Months)&&void 0!==r?r:zre;return wne.jsx("div",pne({className:d.join(" "),style:f,dir:i.dir,id:i.id,nonce:o.nonce,title:o.title,lang:o.lang},h,{children:wne.jsx(v,{children:u.displayMonths.map((function(e,t){return wne.jsx(Bre,{displayIndex:t,displayMonth:e},t)}))})}))}function Wre(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 wne.jsx(Ane,pne({initialProps:n},{children:wne.jsx(Lne,{children:wne.jsx(Sre,pne({initialProps:n},{children:wne.jsx(Zne,pne({initialProps:n},{children:wne.jsx(nre,pne({initialProps:n},{children:wne.jsx(pre,{children:wne.jsx(kre,{children:t})})}))}))}))})}))}function Ure(e){return wne.jsx(Wre,pne({},e,{children:wne.jsx($re,{initialProps:e})}))}const Hre=t=>{var n=Cr(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"},n),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"}))},Vre=t=>{var n=Cr(t,[]);return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"},n),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))},qre=t=>{var n=Cr(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",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 19l-7-7 7-7m8 14l-7-7 7-7"}))},Yre=t=>{var n=Cr(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",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 5l7 7-7 7M5 5l7 7-7 7"}))},Xre=t=>{var{onClick:n,icon:r}=t,o=Cr(t,["onClick","icon"]);const i=r;return e.createElement("button",Object.assign({type:"button",className:W6("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(M9,{onClick:n,icon:i,variant:"simple",color:"slate",size:"xs"}))};function Gre(t){var{mode:n,defaultMonth:r,selected:o,onSelect:i,locale:a,disabled:u,enableYearNavigation:l,classNames:s,weekStartsOn:c=0}=t,d=Cr(t,["mode","defaultMonth","selected","onSelect","locale","disabled","enableYearNavigation","classNames","weekStartsOn"]);return e.createElement(Ure,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=Cr(t,[]);return e.createElement(Hre,Object.assign({className:"h-4 w-4"},n))},IconRight:t=>{var n=Cr(t,[]);return e.createElement(Vre,Object.assign({className:"h-4 w-4"},n))},Caption:t=>{var n=Cr(t,[]);const{goToMonth:r,nextMonth:o,previousMonth:i,currentMonth:u}=Fne();return e.createElement("div",{className:"flex justify-between items-center"},e.createElement("div",{className:"flex items-center space-x-1"},l&&e.createElement(Xre,{onClick:()=>u&&r(Ba(u,-1)),icon:qre}),e.createElement(Xre,{onClick:()=>i&&r(i),icon:Hre})),e.createElement(c8,{className:"text-tremor-default tabular-nums capitalize text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis font-medium"},Uu(n.displayMonth,"LLLL yyy",{locale:a})),e.createElement("div",{className:"flex items-center space-x-1"},e.createElement(Xre,{onClick:()=>o&&r(o),icon:Vre}),l&&e.createElement(Xre,{onClick:()=>u&&r(Ba(u,1)),icon:Yre})))}}},d))}Gre.displayName="DateRangePicker";const Kre=Y6("DatePicker"),Zre=(t,n)=>{const r=void 0!==n,[o,i]=e.useState(t);return[r?n:o,e=>{r||i(e)}]},Qre=Y6("DateRangePicker"),Jre=[{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:Ya(ol())},{value:"y",text:"Year to Date",from:Xa(ol())}],eoe=(e,t,n,r)=>{const o=(null==n?void 0:n.code)||"en-US";if(!e&&!t)return"";if(e&&!t){if(r)return Uu(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 Uu(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`${Uu(e,r)} - ${Uu(t,r)}`;const n={month:"short",day:"numeric"};return`${e.toLocaleDateString(o,n)} - \n ${t.getDate()}, ${t.getFullYear()}`}{if(r)return`${Uu(e,r)} - ${Uu(t,r)}`;const n={year:"numeric",month:"short",day:"numeric"};return`${e.toLocaleDateString(o,n)} - \n ${t.toLocaleDateString(o,n)}`}}return""},toe=e=>["string","number"].includes(typeof e)?e:e instanceof Array?e.map(toe).join(""):"object"==typeof e&&e?toe(e.props.children):void 0;function noe(t){const n=new Map;return e.Children.map(t,(e=>{var t;n.set(e.props.value,null!==(t=toe(e))&&void 0!==t?t:e.props.value)})),n}function roe(t,n){return e.Children.map(n,(e=>{var n;if((null!==(n=toe(e))&&void 0!==n?n:e.props.value).toLowerCase().includes(t.toLowerCase()))return e}))}const ooe=(e,t,n=!1)=>W6(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-rose-500",n?"border-rose-500":"border-tremor-border dark:border-dark-tremor-border");function ioe(e){return null!=e&&""!==e}const aoe=ol(),uoe=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=Lu,enableClear:f=!0,displayFormat:h,className:v,enableYearNavigation:p=!1,weekStartsOn:m=0}=t,b=Cr(t,["value","defaultValue","onValueChange","minDate","maxDate","placeholder","disabled","locale","enableClear","displayFormat","className","enableYearNavigation","weekStartsOn"]),[g,y]=Zre(i,o),w=e.useMemo((()=>{const e=[];return u&&e.push({before:u}),l&&e.push({after:l}),e}),[u,l]),x=g?eoe(g,void 0,d,h):s,k=Ya(null!==(r=null!=g?g:l)&&void 0!==r?r:aoe),O=f&&!c;return e.createElement(Rte,Object.assign({ref:n,as:"div",className:W6("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)},b),e.createElement(Rte.Button,{disabled:c,className:W6("w-full outline-none text-left whitespace-nowrap truncate focus:ring-2 transition duration-100 rounded-tremor-default flex flex-nowrap","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",g6.paddingLeft,O?k6.paddingRight:w6.paddingRight,m6.paddingY,J6.all,ooe(ioe(g),c))},e.createElement(hne,{className:W6(Kre("calendarIcon"),"flex-none shrink-0","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",u6.height,u6.width,h6.negativeMarginLeft,m6.marginRight),"aria-hidden":"true"}),e.createElement("p",{className:"truncate"},x)),O&&g?e.createElement("button",{type:"button",className:W6("absolute outline-none inset-y-0 right-0 flex items-center transition duration-100",w6.marginRight),onClick:e=>{e.preventDefault(),null==a||a(void 0),y(void 0)}},e.createElement(vne,{className:W6("flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",a6.height,a6.width)})):null,e.createElement(Rte.Panel,{className:W6("absolute z-10 divide-y overflow-y-auto min-w-min left-0 outline-none rounded-tremor-default p-3","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",v6.marginTop,v6.marginBottom,J6.all)},(({close:t})=>e.createElement(Gre,{showOutsideDays:!0,mode:"single",defaultMonth:k,selected:g,weekStartsOn:m,onSelect:e=>{null==a||a(e),y(e),t()},locale:d,disabled:w,enableYearNavigation:p}))))}));uoe.displayName="DatePicker";const loe=t=>{var n=Cr(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",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))},soe=Y6("Select"),coe=e.forwardRef(((t,n)=>{const{defaultValue:r,value:o,onValueChange:i,placeholder:a="Select...",disabled:u=!1,icon:l,enableClear:s=!0,children:c,className:d}=t,f=Cr(t,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","children","className"]),[h,v]=Zre(r,o),p=l,m=e.useMemo((()=>noe(c)),[c]);return e.createElement(bte,Object.assign({as:"div",ref:n,defaultValue:h,value:h,onChange:e=>{null==i||i(e),v(e)},disabled:u,className:W6("w-full min-w-[10rem] relative text-tremor-default",d)},f),(({value:t})=>{var n;return e.createElement(e.Fragment,null,e.createElement(bte.Button,{className:W6("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100","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",p?"p-10 -ml-0.5":g6.paddingLeft,k6.paddingRight,m6.paddingY,J6.all,ooe(ioe(t),u))},p&&e.createElement("span",{className:W6("absolute inset-y-0 left-0 flex items-center ml-px",b6.paddingLeft)},e.createElement(p,{className:W6(soe("Icon"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",u6.height,u6.width)})),e.createElement("span",{className:"w-[90%] block truncate"},t&&null!==(n=m.get(t))&&void 0!==n?n:a),e.createElement("span",{className:W6("absolute inset-y-0 right-0 flex items-center",g6.marginRight)},e.createElement(loe,{className:W6(soe("arrowDownIcon"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",a6.height,a6.width)}))),s&&h?e.createElement("button",{type:"button",className:W6("absolute inset-y-0 right-0 flex items-center",k6.marginRight),onClick:e=>{e.preventDefault(),v(""),null==i||i("")}},e.createElement(vne,{className:W6(soe("clearIcon"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",a6.height,a6.width)})):null,e.createElement(bte.Options,{className:W6("absolute z-10 divide-y overflow-y-auto max-h-[228px] w-full left-0 outline-none rounded-tremor-default","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",v6.marginTop,v6.marginBottom,J6.all)},c))}))}));coe.displayName="Select";const doe=Y6("SelectItem"),foe=e.forwardRef(((t,n)=>{const{value:r,icon:o,className:i,children:a}=t,u=Cr(t,["value","icon","className","children"]),l=o;return e.createElement(bte.Option,Object.assign({className:W6(doe("root"),"flex justify-start items-center cursor-default text-tremor-default","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",b6.paddingX,b6.paddingY,i),ref:n,key:r,value:r},u),l&&e.createElement(l,{className:W6(doe("icon"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",u6.width,p6.marginRight)}),e.createElement("span",{className:"whitespace-nowrap truncate"},null!=a?a:r))}));foe.displayName="SelectItem";const hoe=ol(),voe=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=Lu,enableClear:p=!0,displayFormat:m,children:b,className:g,enableYearNavigation:y=!1,weekStartsOn:w=0}=t,x=Cr(t,["value","defaultValue","onValueChange","enableSelect","minDate","maxDate","placeholder","selectPlaceholder","disabled","locale","enableClear","displayFormat","children","className","enableYearNavigation","weekStartsOn"]),[k,O]=Zre(a,i),[j,S]=e.useState(!1),[N,M]=e.useState(!1),A=e.useMemo((()=>{const e=[];return s&&e.push({before:s}),c&&e.push({after:c}),e}),[s,c]),C=e.useMemo((()=>{const t=new Map;return b?e.Children.forEach(b,(e=>{var n;t.set(e.props.value,{text:null!==(n=toe(e))&&void 0!==n?n:e.props.value,from:e.props.from,to:e.props.to})})):Jre.forEach((e=>{t.set(e.value,{text:e.text,from:e.from,to:hoe})})),t}),[b]),T=e.useMemo((()=>{if(b)return noe(b);const e=new Map;return Jre.forEach((t=>e.set(t.value,t.text))),e}),[b]),E=(null==k?void 0:k.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 _a(e&&!t?e:za([e,t]))})(null==k?void 0:k.from,s,E,C),D=((e,t,n,r)=>{var o,i;if(n&&(e=_a(null!==(i=null===(o=r.get(n))||void 0===o?void 0:o.to)&&void 0!==i?i:ol())),e)return _a(e&&!t?e:$a([e,t]))})(null==k?void 0:k.to,c,E,C),I=P||D?eoe(P,D,v,m):d,_=Ya(null!==(o=null!==(r=null!=D?D:P)&&void 0!==r?r:c)&&void 0!==o?o:hoe),R=p&&!h;return e.createElement("div",Object.assign({ref:n,className:W6("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",g)},x),e.createElement(Rte,{as:"div",className:W6("w-full overflow-hidden",l?"rounded-l-tremor-default":"rounded-tremor-default",j&&"ring-2 ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted z-10")},e.createElement("div",{className:"relative w-full overflow-hidden"},e.createElement(Rte.Button,{onFocus:()=>S(!0),onBlur:()=>S(!1),disabled:h,className:W6("w-full outline-none text-left whitespace-nowrap truncate focus:ring-2 transition duration-100 rounded-l-tremor-default flex flex-nowrap","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",g6.paddingLeft,R?k6.paddingRight:w6.paddingRight,m6.paddingY,J6.all,ooe(ioe(P||D),h))},e.createElement(hne,{className:W6(Qre("calendarIcon"),"flex-none shrink-0","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",u6.height,u6.width,h6.negativeMarginLeft,m6.marginRight),"aria-hidden":"true"}),e.createElement("p",{className:"truncate"},I)),R&&P?e.createElement("button",{type:"button",className:W6("absolute outline-none inset-y-0 right-0 flex items-center transition duration-100",w6.marginRight),onClick:e=>{e.preventDefault(),null==u||u({}),O({})}},e.createElement(vne,{className:W6(Qre("clearIcon"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",a6.height,a6.width)})):null),e.createElement(Rte.Panel,{focus:!0,className:W6("absolute z-10 divide-y overflow-y-auto min-w-min left-0 outline-none rounded-tremor-default p-3","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",v6.marginTop,v6.marginBottom,J6.all)},e.createElement(Gre,Object.assign({mode:"range",showOutsideDays:!0,defaultMonth:_,selected:{from:P,to:D},onSelect:e=>{null==u||u({from:null==e?void 0:e.from,to:null==e?void 0:e.to}),O({from:null==e?void 0:e.from,to:null==e?void 0:e.to})},locale:v,disabled:A,enableYearNavigation:y,classNames:{day_range_middle:W6("!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(bte,{as:"div",className:W6("w-48 overflow-hidden -ml-px rounded-r-tremor-default",N&&"ring-2 ring-tremor-brand-muted dark:focus:ring-dark-tremor-brand-muted z-10"),value:E,onChange:e=>{const{from:t,to:n}=C.get(e),r=null!=n?n:hoe;null==u||u({from:t,to:r,selectValue:e}),O({from:t,to:r,selectValue:e})},disabled:h},(({value:t})=>{var n;return e.createElement(e.Fragment,null,e.createElement(bte.Button,{onFocus:()=>M(!0),onBlur:()=>M(!1),className:W6("w-full outline-none text-left whitespace-nowrap truncate rounded-r-tremor-default transition duration-100","border-tremor-border shadow-tremor-input text-tremor-content-emphasis focus:border-tremor-brand-subtle","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:text-dark-tremor-content-emphasis dark:focus:border-dark-tremor-brand-subtle",w6.paddingLeft,w6.paddingRight,m6.paddingY,J6.all,ooe(ioe(t),h))},t&&null!==(n=T.get(t))&&void 0!==n?n:f),e.createElement(bte.Options,{className:W6("absolute z-10 divide-y overflow-y-auto w-full inset-x-0 right-0 outline-none","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",v6.marginTop,v6.marginBottom,J6.all)},null!=b?b:Jre.map((t=>e.createElement(foe,{key:t.value,value:t.value},t.text)))))})))}));voe.displayName="DateRangePicker";const poe=e.forwardRef(((t,n)=>{const{value:r,className:o,children:i}=t,a=Cr(t,["value","className","children"]);return e.createElement(foe,Object.assign({ref:n,className:o,value:r},a),null!=i?i:r)}));poe.displayName="DateRangePickerItem";const moe=e.createContext(M6),boe=e.createContext(0),goe=e.createContext(void 0),yoe=e.createContext({selectedValue:void 0,handleValueChange:void 0}),woe=t=>{var n=Cr(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:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))},xoe=t=>{var n=Cr(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"}))},koe=Y6("MultiSelect"),Ooe=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}=t,f=Cr(t,["defaultValue","value","onValueChange","placeholder","placeholderSearch","disabled","icon","children","className"]),h=s,[v,p]=Zre(r,o),m=roe("",c),[b,g]=e.useState(""),y=(null!=v?v:[]).length>0,w=e.useMemo((()=>b?roe(b,c):m),[b,c,m]),x=()=>{g("")};return e.createElement(bte,Object.assign({as:"div",ref:n,defaultValue:v,value:v,onChange:e=>{null==i||i(e),p(e)},disabled:l,className:W6("w-full min-w-[10rem] relative text-tremor-default",d)},f,{multiple:!0}),(({value:t})=>e.createElement(e.Fragment,null,e.createElement(bte.Button,{className:W6("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100","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",h?"p-10 -ml-0.5":g6.paddingLeft,k6.paddingRight,p6.paddingY,J6.all,ooe(t.length>0,l))},h&&e.createElement("span",{className:W6("absolute inset-y-0 left-0 flex items-center ml-px",b6.paddingLeft)},e.createElement(h,{className:W6(koe("Icon"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",u6.height,u6.width)})),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"},m.filter((e=>t.includes(e.props.value))).map(((n,r)=>{var o;return e.createElement("div",{key:r,className:W6("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),p(r)}},e.createElement(xoe,{className:W6(koe("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:W6("absolute inset-y-0 right-0 flex items-center",b6.marginRight)},e.createElement(loe,{className:W6(koe("arrowDownIcon"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",a6.height,a6.width)}))),y&&!l?e.createElement("button",{type:"button",className:W6("absolute inset-y-0 right-0 flex items-center",k6.marginRight),onClick:e=>{e.preventDefault(),p([]),null==i||i([])}},e.createElement(vne,{className:W6(koe("clearIconAllItems"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",a6.height,a6.width)})):null,e.createElement(bte.Options,{className:W6("absolute z-10 divide-y overflow-y-auto max-h-[228px] w-full left-0 outline-none rounded-tremor-default","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",v6.marginTop,v6.marginBottom,J6.all)},e.createElement("div",{className:W6("flex items-center w-full","bg-tremor-background-muted","dark:bg-dark-tremor-background-muted",b6.paddingX)},e.createElement("span",null,e.createElement(woe,{className:W6("flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",m6.marginRight,a6.height,a6.width)})),e.createElement("input",{name:"search",type:"input",autoComplete:"off",placeholder:u,className:W6("w-full focus:outline-none focus:ring-none bg-transparent text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",m6.paddingY),onKeyDown:e=>{"Space"===e.code&&""!==e.target.value&&e.stopPropagation()},onChange:e=>g(e.target.value),value:b})),e.createElement(yoe.Provider,Object.assign({},{onBlur:{handleResetSearch:x}},{value:{selectedValue:t}}),w)))))}));Ooe.displayName="MultiSelect";const joe=Y6("MultiSelectItem"),Soe=e.forwardRef(((t,n)=>{const{value:r,className:o,children:i}=t,a=Cr(t,["value","className","children"]),{selectedValue:u}=e.useContext(yoe),l=((e,t)=>{for(let n=0;n<t.length;n++)if(t[n]===e)return!0;return!1})(r,u);return e.createElement(bte.Option,Object.assign({className:W6(joe("root"),"flex justify-start items-center cursor-default text-tremor-default","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",b6.paddingX,b6.paddingY,o),ref:n,key:r,value:r},a),e.createElement("input",{type:"checkbox",className:W6(joe("checkbox"),"flex-none focus:ring-none focus:outline-none cursor-pointer","accent-tremor-brand","dark:accent-dark-tremor-brand",b6.marginRight),checked:l,readOnly:!0}),e.createElement("span",{className:"whitespace-nowrap truncate"},null!=i?i:r))}));Soe.displayName="MultiSelectItem";const Noe=t=>{var n=Cr(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",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20 12H4"}))},Moe=t=>{var n=Cr(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",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))},Aoe=t=>{var n=Cr(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",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"}))},Coe=t=>{var n=Cr(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor"}),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))},Toe=t=>{var n=Cr(t,[]);return e.createElement("svg",Object.assign({},n,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor"}),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"}))},Eoe=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}=t,m=Cr(t,["value","defaultValue","type","placeholder","icon","error","errorMessage","disabled","stepper","makeInputClassName","className","onChange","onValueChange"]),[b,g]=e.useState(!1),[y,w]=e.useState(!1),x=e.useCallback((()=>w(!y)),[y,w]),k=u,O=e.useRef(null),j=ioe(r||o),S=e=>{var t,n;!1===e?null===(t=O.current)||void 0===t||t.blur():null===(n=O.current)||void 0===n||n.focus(),g(e)};return e.createElement(e.Fragment,null,e.createElement("div",{className:W6(f("root"),"relative w-full flex items-center min-w-[10rem] outline-none rounded-tremor-default","shadow-tremor-input","dark:shadow-dark-tremor-input",ooe(j,c,l),b&&W6("ring-2 transition duration-100","border-tremor-brand-subtle ring-tremor-brand-muted","dark:border-dark-tremor-brand-subtle dark:ring-dark-tremor-brand-muted"),J6.all,h),onClick:()=>{c||S(!0)},onFocus:()=>{S(!0)},onBlur:()=>{S(!1)}},k?e.createElement(k,{className:W6(f("icon"),"shrink-0","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",u6.height,u6.width,b6.marginLeft)}):null,e.createElement("input",Object.assign({ref:q6([O,n]),defaultValue:o,value:r,type:y?"text":i,className:W6(f("input"),"w-full focus:outline-none focus:ring-0 border-none bg-transparent text-tremor-default rounded-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",k?m6.paddingLeft:g6.paddingLeft,l?g6.paddingRight:w6.paddingRight,m6.paddingY,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)}},m)),"password"!==i||c?null:e.createElement("button",{className:W6(f("toggleButton"),"mr-2"),type:"button",onClick:()=>x()},y?e.createElement(Toe,{className:W6("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")}):e.createElement(Coe,{className:W6("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")})),l?e.createElement(Aoe,{className:W6(f("errorIcon"),"text-rose-500 shrink-0",b6.marginRight,u6.height,u6.width)}):null,null!=d?d:null),l&&s?e.createElement("p",{className:W6(f("errorMessage"),"text-sm text-rose-500 mt-1")},s):null)}));Eoe.displayName="BaseInput";const Poe="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",Doe="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",Ioe=e.forwardRef(((t,n)=>{const{onSubmit:r,enableStepper:o=!0,disabled:i,onValueChange:a,onChange:u}=t,l=Cr(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(Eoe,Object.assign({type:"number",ref:q6([s,n]),disabled:i,makeInputClassName:Y6("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:W6("flex justify-center align-middle")},e.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>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:W6(!i&&Doe,Poe,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},e.createElement(Noe,{"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.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:W6(!i&&Doe,Poe,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},e.createElement(Moe,{"data-testid":"step-up",className:(v?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},l))}));Ioe.displayName="NumberInput";const _oe=Y6("SearchSelect"),Roe=Y6("SearchSelect"),Loe=e.forwardRef(((t,n)=>{const{defaultValue:r,value:o,onValueChange:i,placeholder:a="Select...",disabled:u=!1,icon:l,enableClear:s=!0,children:c,className:d}=t,f=Cr(t,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","children","className"]),[h,v]=e.useState(""),[p,m]=Zre(r,o),b=l,g=e.useMemo((()=>noe(c)),[c]),y=e.useMemo((()=>roe(h,c)),[h,c]);return e.createElement(gee,Object.assign({as:"div",ref:n,defaultValue:p,value:p,onChange:e=>{null==i||i(e),m(e)},disabled:u,className:W6("w-full min-w-[10rem] relative text-tremor-default",d)},f),(({value:t})=>e.createElement(e.Fragment,null,e.createElement(gee.Button,{className:"w-full"},b&&e.createElement("span",{className:W6("absolute inset-y-0 left-0 flex items-center ml-px",b6.paddingLeft)},e.createElement(b,{className:W6(_oe("Icon"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",u6.height,u6.width)})),e.createElement(gee.Input,{className:W6("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 text-tremor-default pr-14","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",b?"p-10 -ml-0.5":g6.paddingLeft,m6.paddingY,J6.all,u?"placeholder:text-tremor-content-subtle dark:placeholder:text-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-tremor-content",ooe(ioe(t),u)),placeholder:a,onChange:e=>v(e.target.value),displayValue:e=>{var t;return null!==(t=g.get(e))&&void 0!==t?t:""}}),e.createElement("div",{className:W6("absolute inset-y-0 right-0 flex items-center",b6.paddingRight)},e.createElement(loe,{className:W6(_oe("arrowDownIcon"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",a6.height,a6.width)}))),s&&p?e.createElement("button",{type:"button",className:W6("absolute inset-y-0 right-0 flex items-center",k6.marginRight),onClick:e=>{e.preventDefault(),m(""),v(""),null==i||i("")}},e.createElement(vne,{className:W6(Roe("clearIcon"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",a6.height,a6.width)})):null,y.length>0&&e.createElement(gee.Options,{className:W6("absolute z-10 divide-y overflow-y-auto max-h-[228px] w-full left-0 outline-none rounded-tremor-default text-tremor-default","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",v6.marginTop,v6.marginBottom,J6.all)},y))))}));Loe.displayName="SearchSelect";const Foe=Y6("SearchSelectItem"),Boe=e.forwardRef(((t,n)=>{const{value:r,icon:o,className:i,children:a}=t,u=Cr(t,["value","icon","className","children"]),l=o;return e.createElement(gee.Option,Object.assign({className:W6(Foe("root"),"flex justify-start items-center cursor-default text-tremor-default","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",b6.paddingX,b6.paddingY,i),ref:n,key:r,value:r},u),l&&e.createElement(l,{className:W6(Foe("icon"),"flex-none","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",u6.height,u6.width,g6.marginRight)}),e.createElement("span",{className:"whitespace-nowrap truncate"},null!=a?a:r))}));Boe.displayName="SearchSelectItem";const zoe=Y6("TabList"),$oe=e.createContext("line"),Woe={line:W6("flex","border-tremor-border","dark:border-dark-tremor-border",w6.spaceX,J6.bottom),solid:W6("inline-flex p-0.5 rounded-tremor-default","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle",p6.spaceX)},Uoe=e.forwardRef(((t,n)=>{const{color:r,variant:o="line",children:i,className:a}=t,u=Cr(t,["color","variant","children","className"]);return e.createElement(fne.List,Object.assign({ref:n,className:W6(zoe("root"),"justify-start overflow-x-clip",Woe[o],a)},u),e.createElement($oe.Provider,{value:o},e.createElement(moe.Provider,{value:r},i)))}));Uoe.displayName="TabList";const Hoe=Y6("Tab");function Voe(e,t){switch(e){case"line":return W6("ui-selected:border-b-2 hover:border-b-2 border-transparent transition duration-100","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?X6(t,_6).selectBorderColor:"ui-selected:border-tremor-brand dark:ui-selected:border-dark-tremor-brand",f6.negativeMarginBottom,m6.paddingX,m6.paddingY);case"solid":return W6("border-transparent border rounded-tremor-small","ui-selected:border-tremor-border ui-selected:bg-tremor-background ui-selected:shadow-tremor-input hover:text-tremor-content-emphasis text-tremor-content","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:text-dark-tremor-content",b6.paddingX,v6.paddingY)}}const qoe=e.forwardRef(((t,n)=>{const{icon:r,className:o,children:i}=t,a=Cr(t,["icon","className","children"]),u=e.useContext($oe),l=e.useContext(moe),s=r;return e.createElement(fne,Object.assign({ref:n,className:W6(Hoe("root"),"flex whitespace-nowrap truncate max-w-xs outline-none focus:ring-0 text-tremor-default transition duration-100",l?X6(l,B6).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",Voe(u,l),o)},a),s?e.createElement(s,{className:W6(Hoe("icon"),"flex-none",u6.height,u6.width,i?m6.marginRight:"")}):null,i?e.createElement("span",null,i):null)}));qoe.displayName="Tab";const Yoe=Y6("TabGroup"),Xoe=e.forwardRef(((t,n)=>{const{defaultIndex:r,index:o,onIndexChange:i,children:a,className:u}=t,l=Cr(t,["defaultIndex","index","onIndexChange","children","className"]);return e.createElement(fne.Group,Object.assign({as:"div",ref:n,defaultIndex:r,selectedIndex:o,onChange:i,className:W6(Yoe("root"),"w-full",u)},l),a)}));Xoe.displayName="TabGroup";const Goe=Y6("TabPanel"),Koe=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]),{selectedValue:a}=e.useContext(yoe),u=a===e.useContext(boe);return e.createElement("div",Object.assign({ref:n,className:W6(Goe("root"),"w-full mt-2",u?"":"hidden",o),"aria-selected":u?"true":"false"},i),r)}));Koe.displayName="TabPanel";const Zoe=Y6("TabPanels"),Qoe=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement(fne.Panels,Object.assign({as:"div",ref:n,className:W6(Zoe("root"),"w-full",o)},i),(({selectedIndex:t})=>e.createElement(yoe.Provider,{value:{selectedValue:t}},e.Children.map(r,((t,n)=>e.createElement(boe.Provider,{value:n},t))))))}));Qoe.displayName="TabPanels";const Joe=Y6("TextInput"),eie=e.forwardRef(((t,n)=>{const{type:r="text"}=t,o=Cr(t,["type"]);return e.createElement(Eoe,Object.assign({ref:n,type:r,makeInputClassName:Joe},o))}));eie.displayName="TextInput";const tie=Y6("Switch"),nie=e.forwardRef(((t,n)=>{const{checked:r,defaultChecked:o=!1,onChange:i,color:a="blue",name:u,error:l,errorMessage:s,disabled:c,required:d,id:f}=t,h=Cr(t,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","id"]),[v,p]=Zre(o,r),[m,b]=e.useState(!1);return e.createElement(e.Fragment,null,e.createElement("div",Object.assign({ref:n,className:W6(tie("root"),"flex flex-col relative h-5")},h),e.createElement("input",{type:"checkbox",className:W6(tie("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:u,required:d,checked:v,onChange:e=>{e.preventDefault()}}),e.createElement(Vte,{checked:v,onChange:e=>{p(e),null==i||i(e)},disabled:c,className:W6(tie("switch"),"w-10 h-5 group relative inline-flex flex-shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",c?"opacity-0 cursor-not-allowed":""),onFocus:()=>b(!0),onBlur:()=>b(!1),id:f},e.createElement("span",{className:W6(tie("sr-only"),"sr-only")},"Switch ",v?"on":"off"),e.createElement("span",{"aria-hidden":"true",className:W6(tie("background"),v?X6(a,D6).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:W6(tie("round"),v?W6(X6(a,D6).bgColor,"translate-x-5 border-white"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-white","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",m?W6("ring-2 ring-blue-200"):"")}))),l&&s?e.createElement("p",{className:W6(tie("errorMessage"),"text-sm text-rose-500 mt-1 ")},s):null)}));nie.displayName="Switch";const rie=Y6("Accordion"),oie=e.createContext({isOpen:!1}),iie=e.forwardRef(((t,n)=>{var r;const{defaultOpen:o=!1,children:i,className:a}=t,u=Cr(t,["defaultOpen","children","className"]),l=null!==(r=e.useContext(goe))&&void 0!==r?r:W6(J6.all,"rounded-tremor-default");return e.createElement(Gee,Object.assign({as:"div",ref:n,className:W6(rie("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(oie.Provider,{value:{isOpen:t}},i)))}));iie.displayName="Accordion";const aie=Y6("AccordionBody"),uie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement(Gee.Panel,Object.assign({ref:n,className:W6(aie("root"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",w6.paddingX,g6.paddingBottom,o)},i),r)}));uie.displayName="AccordionBody";const lie=t=>{var n=Cr(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",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))},sie=Y6("AccordionHeader"),cie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]),{isOpen:a}=e.useContext(oie);return e.createElement(Gee.Button,Object.assign({ref:n,className:W6(sie("root"),"w-full flex items-center justify-between","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",w6.paddingX,g6.paddingY,o)},i),e.createElement("div",{className:W6(sie("children"),"flex flex-1 text-inherit",w6.marginRight)},r),e.createElement("div",null,e.createElement(lie,{className:W6(sie("arrowIcon"),"text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",v6.negativeMarginRight,a6.height,a6.width,a?"transition-all":"transition-all -rotate-180")})))}));cie.displayName="AccordionHeader";const die=Y6("AccordionList"),fie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]),a=e.Children.count(r);return e.createElement("div",Object.assign({ref:n,className:W6(die("root"),"rounded-tremor-default","shadow-tremor-card","dark:shadow-dark-tremor-card",o)},i),e.Children.map(r,((t,n)=>0===n?e.createElement(goe.Provider,{value:W6("rounded-t-tremor-default",J6.left,J6.top,J6.right,J6.bottom)},e.cloneElement(t)):n===a-1?e.createElement(goe.Provider,{value:W6("rounded-b-tremor-default",J6.left,J6.right,J6.bottom)},e.cloneElement(t)):e.createElement(goe.Provider,{value:W6(J6.left,J6.right,J6.bottom)},e.cloneElement(t)))))}));fie.displayName="AccordionList";const hie=Y6("Card"),vie=e=>{if(!e)return"";switch(e){case T6.Left:return t8.left;case E6:return t8.top;case T6.Right:return t8.right;case P6:return t8.bottom;default:return""}},pie=e.forwardRef(((t,n)=>{const{decoration:r="",decorationColor:o,children:i,className:a}=t,u=Cr(t,["decoration","decorationColor","children","className"]);return e.createElement("div",Object.assign({ref:n,className:W6(hie("root"),"relative w-full text-left ring-1 rounded-tremor-default","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?X6(o,_6).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",vie(r),x6.paddingAll,a)},u),i)}));pie.displayName="Card";const mie=Y6("Divider"),bie=e.forwardRef(((t,n)=>{const{className:r,children:o}=t,i=Cr(t,["className","children"]);return e.createElement("div",Object.assign({ref:n,className:W6(mie("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:W6("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),e.createElement("div",{className:W6("text-inherit whitespace-nowrap")},o),e.createElement("div",{className:W6("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):e.createElement("div",{className:W6("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))}));bie.displayName="Divider";const gie={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"},yie={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"},wie={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"},xie={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"},kie={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"},Oie={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"},jie={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"},Sie={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"},Nie=Y6("Col"),Mie=e.forwardRef(((t,n)=>{const{numColSpan:r=1,numColSpanSm:o,numColSpanMd:i,numColSpanLg:a,children:u,className:l}=t,s=Cr(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:W6(Nie("root"),(()=>{const e=c(r,kie),t=c(o,Oie),n=c(i,jie),u=c(a,Sie);return W6(e,t,n,u)})(),l)},s),u)}));Mie.displayName="Col";const Aie=Y6("Grid"),Cie=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",Tie=e.forwardRef(((t,n)=>{const{numItems:r=1,numItemsSm:o,numItemsMd:i,numItemsLg:a,children:u,className:l}=t,s=Cr(t,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),c=Cie(r,gie),d=Cie(o,yie),f=Cie(i,wie),h=Cie(a,xie),v=W6(c,d,f,h);return e.createElement("div",Object.assign({ref:n,className:W6(Aie("root"),"grid",v,l)},s),u)}));Tie.displayName="Grid";const Eie=Y6("List"),Pie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement("ul",Object.assign({ref:n,className:W6(Eie("root"),"w-full overflow-hidden divide-y","divide-tremor-border text-tremor-content","dark:divide-dark-tremor-border dark:text-dark-tremor-content",o)},i),r)}));Pie.displayName="List";const Die=Y6("ListItem"),Iie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("li",Object.assign({ref:n,className:W6(Die("root"),"w-full flex justify-between items-center truncate tabular-nums text-tremor-default",m6.paddingY,o)},i),r))}));Iie.displayName="ListItem";const _ie=Y6("Table"),Rie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement("div",{className:W6(_ie("root"),"overflow-auto",o)},e.createElement("table",Object.assign({ref:n,className:W6(_ie("table"),"w-full tabular-nums text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},i),r))}));Rie.displayName="Table";const Lie=Y6("TableBody"),Fie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("tbody",Object.assign({ref:n,className:W6(Lie("root"),"align-top overflow-x-auto divide-y","divide-tremor-border","dark:divide-dark-tremor-border",o)},i),r))}));Fie.displayName="TableBody";const Bie=Y6("TableCell"),zie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("td",Object.assign({ref:n,className:W6(Bie("root"),"align-middle whitespace-nowrap tabular-nums text-left",w6.paddingAll,o)},i),r))}));zie.displayName="TableCell";const $ie=Y6("TableFoot"),Wie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("tfoot",Object.assign({ref:n,className:W6($ie("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))}));Wie.displayName="TableFoot";const Uie=Y6("TableFooterCell"),Hie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("th",Object.assign({ref:n,className:W6(Uie("root"),"text-tremor-content font-medium","dark:text-dark-tremor-content",d6.top,w6.paddingX,y6.paddingY,o)},i),r))}));Hie.displayName="TableFooterCell";const Vie=Y6("TableHead"),qie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("thead",Object.assign({ref:n,className:W6(Vie("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",o)},i),r))}));qie.displayName="TableHead";const Yie=Y6("TableHeaderCell"),Xie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("th",Object.assign({ref:n,className:W6(Yie("root"),"sticky whitespace-nowrap text-left font-semibold","text-tremor-content","dark:text-dark-tremor-content",d6.top,w6.paddingX,y6.paddingY,o)},i),r))}));Xie.displayName="TableHeaderCell";const Gie=Y6("TableRow"),Kie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement(e.Fragment,null,e.createElement("tr",Object.assign({ref:n,className:W6(Gie("row"),o)},i),r))}));Kie.displayName="TableRow";const Zie=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement("b",Object.assign({ref:n,className:W6("text-inherit font-bold",o)},i),r)}));Zie.displayName="Bold";const Qie=Y6("Callout"),Jie=e.forwardRef(((t,n)=>{const{title:r,icon:o,color:i,className:a,children:u}=t,l=Cr(t,["title","icon","color","className","children"]),s=o;return e.createElement("div",Object.assign({ref:n,className:W6(Qie("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default",i?W6(X6(i,D6).bgColor,X6(i,R6).borderColor,X6(i,z6).textColor,"dark:bg-opacity-10 bg-opacity-10"):W6("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"),g6.paddingY,g6.paddingRight,w6.paddingLeft,t8.left,a)},l),e.createElement("div",{className:W6(Qie("header"),"flex items-start")},s?e.createElement(s,{className:W6(Qie("icon"),"flex-none",u6.height,u6.width,p6.marginRight)}):null,e.createElement("h4",{className:W6(Qie("title"),"font-semibold")},r)),e.createElement("p",{className:W6(Qie("body"),"overflow-y-auto",u?m6.marginTop:"")},u))}));Jie.displayName="Callout";const eae=e.forwardRef(((t,n)=>{const{children:r,className:o}=t,i=Cr(t,["children","className"]);return e.createElement("i",Object.assign({ref:n,className:W6("italic text-inherit",o)},i),r)}));eae.displayName="Italic";const tae=e.forwardRef(((t,n)=>{const{color:r,children:o,className:i}=t,a=Cr(t,["color","children","className"]);return e.createElement("p",Object.assign({ref:n,className:W6("font-semibold text-tremor-metric",r?X6(r,z6).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",i)},a),o)}));tae.displayName="Metric";const nae=e.forwardRef(((t,n)=>{const{color:r,children:o,className:i}=t,a=Cr(t,["color","children","className"]);return e.createElement("p",Object.assign({ref:n,className:W6(r?X6(r,F6).textColor:"text-tremor-content-subtle dark:text-dark-tremor-content-subtle",i)},a),o)}));nae.displayName="Subtitle";const rae=e.forwardRef(((t,n)=>{const{color:r,children:o,className:i}=t,a=Cr(t,["color","children","className"]);return e.createElement("p",Object.assign({ref:n,className:W6("font-medium text-tremor-title",r?X6(r,z6).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",i)},a),o)}));rae.displayName="Title";const oae=Y6("BarList"),iae=e.forwardRef(((t,n)=>{const{data:r=[],color:o,valueFormatter:i=H6,showAnimation:a=!1,className:u}=t,l=Cr(t,["data","color","valueFormatter","showAnimation","className"]),s=(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))),c=c6.height;return e.createElement("div",Object.assign({ref:n,className:W6(oae("root"),"flex justify-between",x6.spaceX,u)},l),e.createElement("div",{className:W6(oae("bars"),"relative w-full")},r.map(((t,n)=>{var i,u,l;const d=t.icon;return e.createElement("div",{key:null!==(i=t.key)&&void 0!==i?i:t.name,className:W6(oae("bar"),"flex items-center rounded-tremor-small bg-opacity-30",c,t.color||o?X6(null!==(u=t.color)&&void 0!==u?u:o,D6).bgColor:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle dark:bg-opacity-30",n===r.length-1?d6.marginBottom:m6.marginBottom),style:{width:`${s[n]}%`,transition:a?"all 1s":""}},e.createElement("div",{className:W6("absolute max-w-full flex",m6.left)},d?e.createElement(d,{className:W6(oae("barIcon"),"flex-none","text-tremor-content","dark:text-dark-tremor-content",u6.height,u6.width,b6.marginRight)}):null,t.href?e.createElement("a",{href:t.href,target:null!==(l=t.target)&&void 0!==l?l:"_blank",rel:"noreferrer",className:W6(oae("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},t.name):e.createElement("p",{className:W6(oae("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},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:W6(oae("labelWrapper"),"flex justify-end items-center",c,n===r.length-1?d6.marginBottom:m6.marginBottom)},e.createElement("p",{className:W6(oae("labelText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},i(t.value)))}))))}));iae.displayName="BarList";const aae=Y6("CategoryBar"),uae=({values:t})=>{const n=V6(t);let r=0,o=0;return e.createElement("div",{className:W6(aae("labels"),"relative flex w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",m6.marginBottom,u6.height)},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:W6(a?"block":"hidden","left-1/2 translate-x-1/2")},r))})),e.createElement("div",{className:W6("absolute bottom-0 flex items-center",d6.left)},"0"),e.createElement("div",{className:W6("absolute bottom-0 flex items-center",d6.right)},n))},lae=e.forwardRef(((t,n)=>{const{values:r=[],colors:o=$6,markerValue:i,showLabels:a=!0,tooltip:u,showAnimation:l=!1,className:s}=t,c=Cr(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=X6(n[o],D6).bgColor;if(r+=i,r>=e)return a}return""})(i,r,o),{tooltipProps:f,getReferenceProps:h}=o9();return e.createElement(e.Fragment,null,e.createElement(i9,Object.assign({text:u},f)),e.createElement("div",Object.assign({ref:n,className:W6(aae("root"),s)},c),a?e.createElement(uae,{values:r}):null,e.createElement("div",{className:W6(aae("barWrapper"),"relative w-full flex items-center",o6.height)},e.createElement("div",{className:W6("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:W6(aae("categoryBar"),"h-full",X6(i,D6).bgColor),style:{width:`${t}%`}})}))),void 0!==i?e.createElement("div",Object.assign({ref:f.refs.setReference,className:W6(aae("markerWrapper"),"absolute right-1/2 -translate-x-1/2",u6.width),style:{left:`${i}%`,transition:l?"all 1s":""}},h),e.createElement("div",{className:W6(aae("marker"),"ring-2 mx-auto rounded-tremor-full","ring-tremor-brand-inverted","dark:ring-dark-tremor-brand-inverted",d,a6.height,r6.width)})):null)))}));lae.displayName="CategoryBar";const sae={[O6.Increase]:{bgColor:X6(N6,D6).bgColor},[O6.ModerateIncrease]:{bgColor:X6(N6,D6).bgColor},[O6.Decrease]:{bgColor:X6(A6,D6).bgColor},[O6.ModerateDecrease]:{bgColor:X6(A6,D6).bgColor},[O6.Unchanged]:{bgColor:X6(S6,D6).bgColor}},cae=Y6("DeltaBar"),dae=e.forwardRef(((t,n)=>{const{value:r,isIncreasePositive:o=!0,showAnimation:i=!1,className:a,tooltip:u}=t,l=Cr(t,["value","isIncreasePositive","showAnimation","className","tooltip"]),s=U6((e=>e>=0?O6.Increase:O6.Decrease)(r),o),{tooltipProps:c,getReferenceProps:d}=o9();return e.createElement(e.Fragment,null,e.createElement(i9,Object.assign({text:u},c)),e.createElement("div",Object.assign({ref:n,className:W6(cae("root"),"relative flex items-center w-full rounded-tremor-full","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle",o6.height,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:W6(cae("negativeDeltaBar"),"rounded-l-tremor-full",sae[s].bgColor),style:{width:`${Math.abs(r)}%`,transition:i?"all 1s":""}},d)):null),e.createElement("div",{className:W6(cae("separator"),"ring-2 z-10 rounded-tremor-full","ring-tremor-brand-inverted bg-tremor-background-emphasis","dark:ring-dark-tremor-brand-inverted dark:bg-dark-tremor-background-emphasis",a6.height,r6.width)}),e.createElement("div",{className:W6(cae("positiveDeltaBarWrapper"),"flex justify-start h-full w-1/2")},r>=0?e.createElement("div",Object.assign({ref:c.refs.setReference,className:W6(cae("positiveDeltaBar"),"rounded-r-tremor-full",sae[s].bgColor),style:{width:`${Math.abs(r)}%`,transition:i?"all 1s":""}},d)):null)))}));dae.displayName="DeltaBar";const fae=Y6("MarkerBar"),hae=e.forwardRef(((t,n)=>{const{value:r,minValue:o,maxValue:i,markerTooltip:a,rangeTooltip:u,showAnimation:l=!1,color:s,className:c}=t,d=Cr(t,["value","minValue","maxValue","markerTooltip","rangeTooltip","showAnimation","color","className"]),{tooltipProps:f,getReferenceProps:h}=o9(),{tooltipProps:v,getReferenceProps:p}=o9();return e.createElement("div",Object.assign({ref:n,className:W6(fae("root"),"relative flex items-center w-full rounded-tremor-full","bg-tremor-background-subtle","dark:bg-dark-tremor-background-subtle",o6.height,c)},d),void 0!==o&&void 0!==i?e.createElement(e.Fragment,null,e.createElement(i9,Object.assign({text:u},v)),e.createElement("div",Object.assign({ref:v.refs.setReference,className:W6(fae("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(i9,Object.assign({text:a},f)),e.createElement("div",Object.assign({ref:f.refs.setReference,className:W6(fae("markerWrapper"),"absolute right-1/2 -translate-x-1/2",u6.width),style:{left:`${r}%`,transition:l?"all 1s":""}},h),e.createElement("div",{className:W6(fae("marker"),"ring-2 mx-auto rounded-tremor-full","ring-tremor-brand-inverted","dark:ring-dark-tremor-brand-inverted",s?X6(s,D6).bgColor:"dark:bg-dark-tremor-brand bg-tremor-brand",a6.height,r6.width)})))}));hae.displayName="MarkerBar";const vae=Y6("ProgressBar"),pae=e.forwardRef(((t,n)=>{const{value:r,label:o,color:i,tooltip:a,showAnimation:u=!1,className:l}=t,s=Cr(t,["value","label","color","tooltip","showAnimation","className"]),{tooltipProps:c,getReferenceProps:d}=o9();return e.createElement(e.Fragment,null,e.createElement(i9,Object.assign({text:a},c)),e.createElement("div",Object.assign({ref:n,className:W6(vae("root"),"flex items-center w-full",l)},s),e.createElement("div",Object.assign({ref:c.refs.setReference,className:W6(vae("progressBarWrapper"),"relative flex items-center w-full rounded-tremor-full bg-opacity-20",i?X6(i,D6).bgColor:"bg-tremor-brand-muted/50 dark:bg-dark-tremor-brand-muted",o6.height)},d),e.createElement("div",{className:W6(vae("progressBar"),"flex-col h-full rounded-tremor-full",i?X6(i,D6).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand"),style:{width:`${r}%`,transition:u?"all 1s":""}})),o?e.createElement("div",{className:W6(vae("labelWrapper"),"w-16 truncate text-right","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",m6.marginLeft)},e.createElement("p",{className:W6(vae("label"),"shrink-0 whitespace-nowrap truncate text-tremor-default")},o)):null))}));pae.displayName="ProgressBar";const mae=Y6("ProgressBar"),bae={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}},gae=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=Cr(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:bae[o].radius,m=null!=c?c:bae[o].strokeWidth,b=p-m/2,g=2*b*Math.PI,y=g-h/100*g,{tooltipProps:w,getReferenceProps:x}=o9();return e.createElement(e.Fragment,null,e.createElement(i9,Object.assign({text:l},w)),e.createElement("div",Object.assign({ref:n,className:W6(mae("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:W6("transition-colors ease-linear",u?`${X6(u,D6).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:g+" "+g,strokeDashoffset:y,fill:"transparent",stroke:"",strokeLinecap:"round",className:W6("transition-colors ease-linear",u?X6(u,D6).strokeColor:"stroke-tremor-brand dark:stroke-dark-tremor-brand",a?"transition-all duration-300 ease-in-out":"")}):null),e.createElement("div",{className:W6("absolute flex")},d)))}));gae.displayName="ProgressCircle";const yae=Y6("Tracker"),wae=e.forwardRef(((t,n)=>{const{color:r,tooltip:o}=t,i=Cr(t,["color","tooltip"]),{tooltipProps:a,getReferenceProps:u}=o9();return e.createElement("div",Object.assign({ref:q6([n,a.refs.setReference]),className:W6(yae("trackingBlock"),"w-full h-full rounded-tremor-small",X6(null!=r?r:"gray",D6).bgColor)},i,u),e.createElement(i9,Object.assign({text:o},a)))}));wae.displayName="TrackerBlock";const xae=e.forwardRef(((t,n)=>{const{data:r=[],className:o}=t,i=Cr(t,["data","className"]);return e.createElement("div",Object.assign({ref:n,className:W6(yae("root"),"w-full flex items-center h-10",h6.spaceX,o)},i),r.map(((t,n)=>{var r;return e.createElement(wae,{key:null!==(r=t.key)&&void 0!==r?r:n,color:t.color,tooltip:t.tooltip})})))}));function kae(...e){return Oe(T(e))}xae.displayName="Tracker";var Oae=async({clientKey:e})=>{try{return e?await(await fetch("https://api-dev.liberty.percyai.io/key_service/v1/jwt/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientKey:e})})).json():void 0}catch(xee){return void console.error("Error requesting token:",xee)}},jae=D("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"}}),Sae=r.forwardRef((({className:e,variant:t,size:n,asChild:o=!1,...i},a)=>r.createElement(o?j:"button",{className:kae(jae({variant:t,size:n,className:e})),ref:a,...i})));Sae.displayName="Button";var Nae=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:kae("rounded-xl border bg-card text-card-foreground shadow",e),...t})));Nae.displayName="Card";var Mae=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:kae("flex flex-col space-y-1.5 p-6",e),...t})));Mae.displayName="CardHeader";var Aae=r.forwardRef((({className:e,...t},n)=>r.createElement("h3",{ref:n,className:kae("font-semibold leading-none tracking-tight",e),...t})));Aae.displayName="CardTitle";var Cae=r.forwardRef((({className:e,...t},n)=>r.createElement("p",{ref:n,className:kae("text-sm text-muted-foreground",e),...t})));Cae.displayName="CardDescription";var Tae=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:kae("p-6 pt-0",e),...t})));Tae.displayName="CardContent";var Eae=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:kae("flex items-center p-6 pt-0",e),...t})));Eae.displayName="CardFooter";var Pae=r.forwardRef((({className:e,...t},n)=>r.createElement(Re,{ref:n,className:kae("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t})));Pae.displayName=Re.displayName;var Dae=r.forwardRef((({className:e,...t},n)=>r.createElement(Le,{ref:n,className:kae("aspect-square h-full w-full",e),...t})));Dae.displayName=Le.displayName;var Iae=r.forwardRef((({className:e,...t},n)=>r.createElement(Fe,{ref:n,className:kae("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t})));Iae.displayName=Fe.displayName;var _ae=r.forwardRef((({className:e,value:t,...n},o)=>r.createElement(Ze,{ref:o,className:kae("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)}%)`}}))));_ae.displayName=Ze.displayName;var Rae=r.forwardRef((({className:e,sideOffset:t=4,...n},o)=>r.createElement(vr,{ref:o,sideOffset:t,className:kae("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})));Rae.displayName=vr.displayName;var Lae=({className:e,...t})=>r.createElement(qo,{className:kae(e),...t});Lae.displayName=qo.displayName;var Fae=r.forwardRef((({className:e,...t},n)=>r.createElement(Yo,{className:kae("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})));Fae.displayName=Yo.displayName;var Bae=D("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"}}),zae=r.forwardRef((({side:e="right",className:t,children:n,...o},i)=>r.createElement(Lae,null,r.createElement(Fae,null),r.createElement(Xo,{ref:i,className:kae(Bae({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"))))));zae.displayName=Xo.displayName;var $ae=r.forwardRef((({className:e,...t},n)=>r.createElement(Go,{ref:n,className:kae("text-lg font-semibold text-foreground",e),...t})));$ae.displayName=Go.displayName;var Wae=r.forwardRef((({className:e,...t},n)=>r.createElement(Ko,{ref:n,className:kae("text-sm text-muted-foreground",e),...t})));Wae.displayName=Ko.displayName;var Uae=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{className:"w-full overflow-auto"},r.createElement("table",{ref:n,className:kae("w-full caption-bottom text-sm",e),...t}))));Uae.displayName="Table";var Hae=r.forwardRef((({className:e,...t},n)=>r.createElement("thead",{ref:n,className:kae("[&_tr]:border-b",e),...t})));Hae.displayName="TableHeader";var Vae=r.forwardRef((({className:e,...t},n)=>r.createElement("tbody",{ref:n,className:kae("[&_tr:last-child]:border-0",e),...t})));Vae.displayName="TableBody";var qae=r.forwardRef((({className:e,...t},n)=>r.createElement("tfoot",{ref:n,className:kae("bg-primary font-medium text-primary-foreground",e),...t})));qae.displayName="TableFooter";var Yae=r.forwardRef((({className:e,...t},n)=>r.createElement("tr",{ref:n,className:kae("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})));Yae.displayName="TableRow";var Xae=r.forwardRef((({className:e,...t},n)=>r.createElement("th",{ref:n,className:kae("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})));Xae.displayName="TableHead";var Gae=r.forwardRef((({className:e,...t},n)=>r.createElement("td",{ref:n,className:kae("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})));Gae.displayName="TableCell";var Kae=r.forwardRef((({className:e,...t},n)=>r.createElement("caption",{ref:n,className:kae("mt-4 text-sm text-muted-foreground",e),...t})));Kae.displayName="TableCaption";var Zae=r.forwardRef((({className:e,...t},n)=>r.createElement(Qi,{ref:n,className:kae("border-b",e),...t})));Zae.displayName="AccordionItem";var Qae=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Ji,{className:"flex"},r.createElement(ea,{ref:o,className:kae("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"})))));Qae.displayName=ea.displayName;var Jae=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(ta,{ref:o,className:kae("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))));Jae.displayName=ta.displayName;var eue=D("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"}}),tue=r.forwardRef((({className:e,variant:t,...n},o)=>r.createElement("div",{ref:o,role:"alert",className:kae(eue({variant:t}),e),...n})));tue.displayName="Alert";var nue=r.forwardRef((({className:e,...t},n)=>r.createElement("h5",{ref:n,className:kae("mb-1 font-medium leading-none tracking-tight",e),...t})));nue.displayName="AlertTitle";var rue=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:kae("text-sm [&_p]:leading-relaxed",e),...t})));rue.displayName="AlertDescription";var oue=va,iue=pa,aue=({className:e,...t})=>r.createElement(ma,{className:kae(e),...t});aue.displayName=ma.displayName;var uue=r.forwardRef((({className:e,...t},n)=>r.createElement(ba,{className:kae("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})));uue.displayName=ba.displayName;var lue=r.forwardRef((({className:e,...t},n)=>r.createElement(aue,null,r.createElement(uue,null),r.createElement(ga,{ref:n,className:kae("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}))));lue.displayName=ga.displayName;var sue=({className:e,...t})=>r.createElement("div",{className:kae("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});sue.displayName="AlertDialogFooter";var cue=r.forwardRef((({className:e,...t},n)=>r.createElement(xa,{ref:n,className:kae("text-lg font-semibold",e),...t})));cue.displayName=xa.displayName;var due=r.forwardRef((({className:e,...t},n)=>r.createElement(ka,{ref:n,className:kae("text-sm text-muted-foreground",e),...t})));due.displayName=ka.displayName;var fue=r.forwardRef((({className:e,...t},n)=>r.createElement(ya,{ref:n,className:kae(jae(),e),...t})));fue.displayName=ya.displayName;var hue=r.forwardRef((({className:e,...t},n)=>r.createElement(wa,{ref:n,className:kae(jae({variant:"outline"}),"mt-2 sm:mt-0",e),...t})));hue.displayName=wa.displayName;var vue=r.forwardRef((({className:e,...t},n)=>r.createElement(yl,{ref:n,className:kae("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(wl,{className:kae("flex items-center justify-center text-current")},r.createElement(ni,{className:"h-4 w-4"})))));vue.displayName=yl.displayName;var pue=({className:e,...t})=>r.createElement(qo,{className:kae(e),...t});pue.displayName=qo.displayName;var mue=r.forwardRef((({className:e,...t},n)=>r.createElement(Yo,{ref:n,className:kae("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})));mue.displayName=Yo.displayName;var bue=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(pue,null,r.createElement(mue,null),r.createElement(Xo,{ref:o,className:kae("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"))))));bue.displayName=Xo.displayName;var gue=r.forwardRef((({className:e,...t},n)=>r.createElement(Go,{ref:n,className:kae("text-lg font-semibold leading-none tracking-tight",e),...t})));gue.displayName=Go.displayName;var yue=r.forwardRef((({className:e,...t},n)=>r.createElement(Ko,{ref:n,className:kae("text-sm text-muted-foreground",e),...t})));yue.displayName=Ko.displayName;var wue=r.forwardRef((({className:e,...t},n)=>r.createElement(Mc,{ref:n,className:kae("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));wue.displayName=Mc.displayName;var xue=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(Mc.Input,{ref:n,className:kae("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}))));xue.displayName=Mc.Input.displayName;var kue=r.forwardRef((({className:e,...t},n)=>r.createElement(Mc.List,{ref:n,className:kae("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));kue.displayName=Mc.List.displayName;var Oue=r.forwardRef(((e,t)=>r.createElement(Mc.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));Oue.displayName=Mc.Empty.displayName;var jue=r.forwardRef((({className:e,...t},n)=>r.createElement(Mc.Group,{ref:n,className:kae("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})));jue.displayName=Mc.Group.displayName;var Sue=r.forwardRef((({className:e,...t},n)=>r.createElement(Mc.Separator,{ref:n,className:kae("-mx-1 h-px bg-border",e),...t})));Sue.displayName=Mc.Separator.displayName;var Nue=r.forwardRef((({className:e,...t},n)=>r.createElement(Mc.Item,{ref:n,className:kae("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})));Nue.displayName=Mc.Item.displayName;var Mue=r.forwardRef((({className:e,inset:t,children:n,...o},i)=>r.createElement(kf,{ref:i,className:kae("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"}))));Mue.displayName=kf.displayName;var Aue=r.forwardRef((({className:e,...t},n)=>r.createElement(Of,{ref:n,className:kae("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})));Aue.displayName=Of.displayName;var Cue=r.forwardRef((({className:e,...t},n)=>r.createElement(vf,null,r.createElement(pf,{ref:n,className:kae("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}))));Cue.displayName=pf.displayName;var Tue=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(bf,{ref:o,className:kae("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})));Tue.displayName=bf.displayName;var Eue=r.forwardRef((({className:e,children:t,checked:n,...o},i)=>r.createElement(gf,{ref:i,className:kae("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(wf,null,r.createElement(ni,{className:"h-4 w-4"}))),t)));Eue.displayName=gf.displayName;var Pue=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(yf,{ref:o,className:kae("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(wf,null,r.createElement(ci,{className:"h-4 w-4 fill-current"}))),t)));Pue.displayName=yf.displayName;var Due=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(mf,{ref:o,className:kae("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n})));Due.displayName=mf.displayName;var Iue=r.forwardRef((({className:e,...t},n)=>r.createElement(xf,{ref:n,className:kae("-mx-1 my-1 h-px bg-border",e),...t})));Iue.displayName=xf.displayName;var _ue=r.forwardRef((({className:e,inset:t,children:n,...o},i)=>r.createElement(Ff,{ref:i,className:kae("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"}))));_ue.displayName=Ff.displayName;var Rue=r.forwardRef((({className:e,...t},n)=>r.createElement(Bf,{ref:n,className:kae("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})));Rue.displayName=Bf.displayName;var Lue=r.forwardRef((({className:e,sideOffset:t=4,...n},o)=>r.createElement(Tf,null,r.createElement(Ef,{ref:o,sideOffset:t,className:kae("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}))));Lue.displayName=Ef.displayName;var Fue=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(Df,{ref:o,className:kae("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})));Fue.displayName=Df.displayName;var Bue=r.forwardRef((({className:e,children:t,checked:n,...o},i)=>r.createElement(If,{ref:i,className:kae("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)));Bue.displayName=If.displayName;var zue=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(_f,{ref:o,className:kae("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)));zue.displayName=_f.displayName;var $ue=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(Pf,{ref:o,className:kae("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n})));$ue.displayName=Pf.displayName;var Wue=r.forwardRef((({className:e,...t},n)=>r.createElement(Lf,{ref:n,className:kae("-mx-1 my-1 h-px bg-muted",e),...t})));Wue.displayName=Lf.displayName;var Uue=D("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Hue=r.forwardRef((({className:e,...t},n)=>r.createElement($f,{ref:n,className:kae(Uue(),e),...t})));Hue.displayName=$f.displayName;var Vue=r.createContext({}),que=()=>{let t=r.useContext(Vue),n=r.useContext(Yue),{getFieldState:o,formState:i}=e.useContext(zf),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}},Yue=r.createContext({}),Xue=r.forwardRef((({className:e,...t},n)=>{let o=r.useId();return r.createElement(Yue.Provider,{value:{id:o}},r.createElement("div",{ref:n,className:kae("space-y-2",e),...t}))}));Xue.displayName="FormItem";var Gue=r.forwardRef((({className:e,...t},n)=>{let{error:o,formItemId:i}=que();return r.createElement(Hue,{ref:n,className:kae(o&&"text-destructive",e),htmlFor:i,...t})}));Gue.displayName="FormLabel";var Kue=r.forwardRef((({...e},t)=>{let{error:n,formItemId:o,formDescriptionId:i,formMessageId:a}=que();return r.createElement(j,{ref:t,id:o,"aria-describedby":n?`${i} ${a}`:`${i}`,"aria-invalid":!!n,...e})}));Kue.displayName="FormControl";var Zue=r.forwardRef((({className:e,...t},n)=>{let{formDescriptionId:o}=que();return r.createElement("p",{ref:n,id:o,className:kae("text-[0.8rem] text-muted-foreground",e),...t})}));Zue.displayName="FormDescription";var Que=r.forwardRef((({className:e,children:t,...n},o)=>{let{error:i,formMessageId:a}=que(),u=i?String(i?.message):t;return u?r.createElement("p",{ref:o,id:a,className:kae("text-[0.8rem] font-medium text-destructive",e),...n},u):null}));Que.displayName="FormMessage";var Jue=r.forwardRef((({className:e,type:t,...n},o)=>r.createElement("input",{type:t,className:kae("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})));Jue.displayName="Input";var ele=r.forwardRef((({className:e,...t},n)=>r.createElement(ih,{ref:n,className:kae("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",e),...t})));ele.displayName=ih.displayName;var tle=r.forwardRef((({className:e,...t},n)=>r.createElement(ah,{ref:n,className:kae("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})));tle.displayName=ah.displayName;var nle=r.forwardRef((({className:e,inset:t,children:n,...o},i)=>r.createElement(ph,{ref:i,className:kae("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"}))));nle.displayName=ph.displayName;var rle=r.forwardRef((({className:e,...t},n)=>r.createElement(mh,{ref:n,className:kae("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})));rle.displayName=mh.displayName;var ole=r.forwardRef((({className:e,align:t="start",alignOffset:n=-4,sideOffset:o=8,...i},a)=>r.createElement(uh,null,r.createElement(lh,{ref:a,align:t,alignOffset:n,sideOffset:o,className:kae("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}))));ole.displayName=lh.displayName;var ile=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(ch,{ref:o,className:kae("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})));ile.displayName=ch.displayName;var ale=r.forwardRef((({className:e,children:t,checked:n,...o},i)=>r.createElement(dh,{ref:i,className:kae("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(hh,null,r.createElement(ni,{className:"h-4 w-4"}))),t)));ale.displayName=dh.displayName;var ule=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(fh,{ref:o,className:kae("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(hh,null,r.createElement(ci,{className:"h-4 w-4 fill-current"}))),t)));ule.displayName=fh.displayName;var lle=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(sh,{ref:o,className:kae("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n})));lle.displayName=sh.displayName;var sle=r.forwardRef((({className:e,...t},n)=>r.createElement(vh,{ref:n,className:kae("-mx-1 my-1 h-px bg-muted",e),...t})));sle.displayName=vh.displayName;var cle=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(rv,{ref:o,className:kae("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n},t,r.createElement(ple,null))));cle.displayName=rv.displayName;var dle=r.forwardRef((({className:e,...t},n)=>r.createElement(ov,{ref:n,className:kae("group flex flex-1 list-none items-center justify-center space-x-1",e),...t})));dle.displayName=ov.displayName;var fle=D("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"),hle=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(iv,{ref:o,className:kae(fle(),"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"}))));hle.displayName=iv.displayName;var vle=r.forwardRef((({className:e,...t},n)=>r.createElement(uv,{ref:n,className:kae("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})));vle.displayName=uv.displayName;var ple=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{className:kae("absolute left-0 top-full flex justify-center")},r.createElement(lv,{className:kae("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}))));ple.displayName=lv.displayName;var mle=r.forwardRef((({className:e,...t},n)=>r.createElement(av,{ref:n,className:kae("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"}))));mle.displayName=av.displayName;var ble=r.forwardRef((({className:e,align:t="center",sideOffset:n=4,...o},i)=>r.createElement(Ov,null,r.createElement(jv,{ref:i,align:t,sideOffset:n,className:kae("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}))));ble.displayName=jv.displayName;var gle=r.forwardRef((({className:e,...t},n)=>r.createElement(Uv,{className:kae("grid gap-2",e),...t,ref:n})));gle.displayName=Uv.displayName;var yle=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Hv,{ref:o,className:kae("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(Vv,{className:"flex items-center justify-center"},r.createElement(ni,{className:"h-3.5 w-3.5 fill-primary"})))));yle.displayName=Hv.displayName;var wle=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Np,{ref:o,className:kae("relative overflow-hidden",e),...n},r.createElement(Mp,{className:"h-full w-full rounded-[inherit]"},t),r.createElement(xle,null),r.createElement(Ap,null))));wle.displayName=Np.displayName;var xle=r.forwardRef((({className:e,orientation:t="vertical",...n},o)=>r.createElement(tp,{ref:o,orientation:t,className:kae("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(fp,{className:"relative flex-1 rounded-full bg-border"}))));xle.displayName=tp.displayName;var kle=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(pm,{ref:o,className:kae("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(mm,{asChild:!0},r.createElement(ei,{className:"h-4 w-4 opacity-50"})))));kle.displayName=pm.displayName;var Ole=r.forwardRef((({className:e,children:t,position:n="popper",...o},i)=>r.createElement(bm,null,r.createElement(gm,{ref:i,className:kae("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(ym,{className:kae("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t)))));Ole.displayName=gm.displayName;var jle=r.forwardRef((({className:e,...t},n)=>r.createElement(wm,{ref:n,className:kae("px-2 py-1.5 text-sm font-semibold",e),...t})));jle.displayName=wm.displayName;var Sle=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(xm,{ref:o,className:kae("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(Om,null,r.createElement(ni,{className:"h-4 w-4"}))),r.createElement(km,null,t))));Sle.displayName=xm.displayName;var Nle=r.forwardRef((({className:e,...t},n)=>r.createElement(jm,{ref:n,className:kae("-mx-1 my-1 h-px bg-muted",e),...t})));Nle.displayName=jm.displayName;var Mle=r.forwardRef((({className:e,orientation:t="horizontal",decorative:n=!0,...o},i)=>r.createElement(Cm,{ref:i,decorative:n,orientation:t,className:kae("shrink-0 bg-border","horizontal"===t?"h-[1px] w-full":"h-full w-[1px]",e),...o})));Mle.displayName=Cm.displayName;var Ale=r.forwardRef((({className:e,...t},n)=>r.createElement(nb,{ref:n,className:kae("relative flex w-full touch-none select-none items-center",e),...t},r.createElement(rb,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20"},r.createElement(ob,{className:"absolute h-full bg-primary"})),r.createElement(ib,{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"}))));Ale.displayName=nb.displayName;var Cle=r.forwardRef((({className:e,...t},n)=>r.createElement(vb,{className:kae("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(pb,{className:kae("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")}))));Cle.displayName=vb.displayName;var Tle=r.forwardRef((({className:e,...t},n)=>r.createElement(Sb,{ref:n,className:kae("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t})));Tle.displayName=Sb.displayName;var Ele=r.forwardRef((({className:e,...t},n)=>r.createElement(Nb,{ref:n,className:kae("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})));Ele.displayName=Nb.displayName;var Ple=r.forwardRef((({className:e,...t},n)=>r.createElement(Mb,{ref:n,className:kae("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));Ple.displayName=Mb.displayName;var Dle=r.forwardRef((({className:e,...t},n)=>r.createElement("textarea",{className:kae("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})));Dle.displayName="Textarea";var Ile=r.forwardRef((({className:e,...t},n)=>r.createElement(rg,{ref:n,className:kae("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})));Ile.displayName=rg.displayName;var _le=D("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"}}),Rle=r.forwardRef((({className:e,variant:t,...n},o)=>r.createElement(og,{ref:o,className:kae(_le({variant:t}),e),...n})));Rle.displayName=og.displayName;var Lle=r.forwardRef((({className:e,...t},n)=>r.createElement(ug,{ref:n,className:kae("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})));Lle.displayName=ug.displayName;var Fle=r.forwardRef((({className:e,...t},n)=>r.createElement(lg,{ref:n,className:kae("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"}))));Fle.displayName=lg.displayName;var Ble=r.forwardRef((({className:e,...t},n)=>r.createElement(ig,{ref:n,className:kae("text-sm font-semibold [&+div]:text-xs",e),...t})));Ble.displayName=ig.displayName;var zle=r.forwardRef((({className:e,...t},n)=>r.createElement(ag,{ref:n,className:kae("text-sm opacity-90",e),...t})));zle.displayName=ag.displayName;var $le=D("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"}}),Wle=r.forwardRef((({className:e,variant:t,size:n,...o},i)=>r.createElement(sg,{ref:i,className:kae($le({variant:t,size:n,className:e})),...o})));Wle.displayName=sg.displayName;var Ule=(e=>(e.buyer="buyer",e.seller="seller",e.buyerSeller="buyer-seller",e.broker="broker",e))(Ule||{}),Hle=class{};Hle.ESTIMATES_ENDPOINT_URL="https://api-dev.liberty.percyai.io/property/v1/estimates",Hle.ESTIMATED_VALUES_HEADER_TITLE="Estimated Values",Hle.ESTIMATED_VALUES_DIALOG_TITLE="How estimated values work",Hle.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.",Hle.ESTIMATED_VALUES_BUTTON_DESCRIPTION="Contact Mortgage Consultant",Hle.FORM_TITLE="Learn more about my options",Hle.FORM_DESCRIPTION="Get more insights on how your property valuation",Hle.FORM_FIRST_NAME_LABEL="First Name *",Hle.FORM_FIRST_NAME_PLACEHOLDER="Enter First Name",Hle.FORM_EMAIL_ADDRESS_LABEL="Email Address *",Hle.FORM_EMAIL_ADDRESS_PLACEHOLDER="Enter Email Adress",Hle.FORM_LAST_NAME_LABEL="Last Name *",Hle.FORM_LAST_NAME_PLACEHOLDER="Enter Last Name",Hle.FORM_PHONE_NUMBER_LABEL="Phone Number *",Hle.FORM_PHONE_NUMBER_PLACEHOLDER="Enter Phone Number",Hle.FORM_USER_TYPE_LABEL="I am: *",Hle.FORM_USER_TYPE_PLACEHOLDER="Please tell us who you are.",Hle.FORM_AGENT_CHECK_BOX_DESCRIPTION="Are you currently working with a",Hle.FORM_AGENT_CHECK_BOX_AGENT_TYPE="Agent",Hle.FORM_AGENT_CHECK_BOX_BROKERAGE_NAME="Percy Realty",Hle.FORM_AGENT_NAME_PLACEHOLDER="Enter Agent's Name",Hle.FORM_ACTION_BUTTOM="Submit",Hle.FIRST_NAME_REQUIRED_VALIDATION_MESSAGE="First Name is required.",Hle.EMAIL_ADDRESS_REQUIRED_VALIDATION_MESSAGE="Email address is required.",Hle.EMAIL_ADDRESS_FORMAT_VALIDATION_MESSAGE="Email address format is wrong.",Hle.LAST_NAME_REQUIRED_VALIDATION_MESSAGE="Last Name is required.",Hle.PHONE_NUMBER_REQUIRED_VALIDATION_MESSAGE="Phone Number is required.",Hle.PHONE_NUMBER_FORMAT_VALIDATION_MESSAGE="Phone Number format is wrong.",Hle.IAM_REQUIRED_VALIDATION_MESSAGE="Please select an option.",Hle.HOME_ADDRESS_REQUIRED_VALIDATION_MESSAGE="Home Address is required.",Hle.ON_ERROR_OCCURRED="An error occurred while submitting the form. Please try again.",Hle.BUYER="A Buyer",Hle.SELLER="A Seller",Hle.BUYER_SELLER="A Buyer and Seller",Hle.BROKER="A Broker/Agent",Hle.PERIOD_1="Immediately",Hle.PERIOD_2="1 to 3 Months",Hle.PERIOD_3="3 to 6 Months",Hle.PERIOD_4="6 to 12 Months",Hle.PERIOD_5="12+ Months",Hle.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL="Message",Hle.DYNAMIC_VALUES_BUYER_MESSAGE_PLACEHOLDER="Hello, I am interested in learning more about this property.",Hle.DYNAMIC_VALUES_BROKER_MESSAGE_PLACEHOLDER="Hello, I am interested in learning more about this buyer.",Hle.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_LABEL="Home Address *",Hle.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_PLACEHOLDER="Enter Home Address",Hle.DYNAMIC_VALUES_SELLER_APROXIMATE_VALUE_LABEL="Property's Approximate Value",Hle.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_LABEL="Time Frame for Selling",Hle.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_PLACEHOLDER="Please select a time frame",Hle.sellerBuyerSharedContent=[{label:Hle.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_LABEL,type:"text",placeholder:Hle.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_PLACEHOLDER},{label:Hle.DYNAMIC_VALUES_SELLER_APROXIMATE_VALUE_LABEL,type:"number",placeholder:""},{label:Hle.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_LABEL,type:"select",placeholder:Hle.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_PLACEHOLDER}],Hle.DYNAMIC_VALUES={buyer:[{label:Hle.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL,type:"textarea",placeholder:Hle.DYNAMIC_VALUES_BUYER_MESSAGE_PLACEHOLDER}],seller:Hle.sellerBuyerSharedContent,"buyer-seller":Hle.sellerBuyerSharedContent,broker:[{label:Hle.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL,type:"textarea",placeholder:Hle.DYNAMIC_VALUES_BROKER_MESSAGE_PLACEHOLDER}]};var Vle=Hle,qle=Ry(Ule,{required_error:Vle.IAM_REQUIRED_VALIDATION_MESSAGE});_y({firstName:Py().min(2,{message:Vle.FIRST_NAME_REQUIRED_VALIDATION_MESSAGE}),emailAdress:Py({required_error:Vle.EMAIL_ADDRESS_REQUIRED_VALIDATION_MESSAGE}).email({message:Vle.EMAIL_ADDRESS_FORMAT_VALIDATION_MESSAGE}),lastName:Py().min(2,{message:Vle.LAST_NAME_REQUIRED_VALIDATION_MESSAGE}),phoneNumber:Py().min(2,{message:Vle.PHONE_NUMBER_REQUIRED_VALIDATION_MESSAGE}),iam:qle,agent:Dy().optional(),agentName:Py().optional(),dynamicValues:Iy(_y({homeAddress:Py().min(2,{message:Vle.HOME_ADDRESS_REQUIRED_VALIDATION_MESSAGE}).optional(),value:Py().optional()})).optional()});var Yle=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 Xle({children:e}){return r.createElement("div",{className:kae("flex justify-center w-full")},e)}function Gle({trigger:e,content:t,title:n,asChild:o=!1,actionButtomLabel:i=Yle.ACTION_OK_BUTTON_LABEL}){return r.createElement(oue,null,r.createElement(iue,{asChild:o},e),r.createElement(lue,{className:kae("flex flex-col gap-2 p-6","h-screen lg:h-auto md:h-auto overflow-y-auto")},n&&r.createElement(cue,null,n),t,r.createElement(sue,null,r.createElement(fue,null,i))))}function Kle({title:e,infoTitle:t,icon:n,infoDescription:o,titleDescription:i,showInfo:a=!0}){let u=r.cloneElement(n,{className:"w-6 h-6"});return r.createElement("div",{className:kae("flex flex-col items-start")},r.createElement("div",{className:kae("flex flex-row items-center gap-1")},r.createElement("div",{className:kae("flex flex-col items-center bg-slate-50 rounded-[100px] p-2")},u),r.createElement("h3",{className:kae("font-semibold leading-8 text-xl md:text-2xl lg:text-2xl text-gray-700")},e),a&&r.createElement(Gle,{asChild:!0,title:t,trigger:r.createElement(hg,{className:kae("w-5 h-5 text-gray-400")}),content:o})),i&&r.createElement("p",{className:kae("text-gray-400 ml-[50px] text-xs md:text-sm lg:text-sm")},i))}function Zle({icon:e,infoDescription:t,title:n,titleDescription:o,infoTitle:i,actions:a,showInfo:u=!0,showActions:l=!1}){return r.createElement("div",{className:kae("flex flex-col md:flex-row lg:flex-row justify-between items-stretch py-3 shadow-sm pr-1 ")},r.createElement(Kle,{title:n,titleDescription:o,infoTitle:i,icon:e,infoDescription:t,showInfo:u}),l&&a&&a)}Yle.ACTION_OK_BUTTON_LABEL="OK",Yle.DESCRIPTION_YEARS_LABEL="Years",Yle.YEAR=" year",Yle.PLURAL="s ",Yle.AND=" and ",Yle.MONTH=" month",Yle.RATE=" rate",Yle.HOME_GUIDE_URL="https://homeguide.com/costs/home-addition-cost",Yle.HOME_GUIDE="homeguide.com 2020",Yle.EL_ISSA="El Issa, 2019",Yle.EL_ISSA_URL="https://www.nerdwallet.com/blog/average-credit-card-debt-household/",Yle.TICAS="TICAS, Student Debt and the Class of 2018",Yle.TICAS_URL="https://ticas.org/wp-content/uploads/2019/09/classof2018.pdf",Yle.NO_DATA_AVAILABLE_LABEL="No Data Available",Yle.ACTION_BUTTON_BEST_OPTION_LABEL="Which option is best for me?",Yle.LEARN_MORE_LABEL="Learn more about this",Yle.EDIT_DETAILS_LABEL="Edit Details",Yle.WHY_PAY_MORE_LABEL="Why Pay More?",Yle.EARLY_LOAN_LABEL="Early Loan Payoff Information",Yle.ASK_AGENT_LABEL="Ask an Agent",Yle.CONFIGURATION_ERROR_LABEL="Configuration Error",Yle.CONFIGURATION_ERROR_KEY_EXPIRED_LABEL="Key is expired",Yle.EQUITY_MORTGAGE_DETAILS_HEADER_TITLE="Equity In Your Home",Yle.EQUITY_MORTGAGE_DETAILS_DESCRIPTION="Equity is your home's worth to you!",Yle.EQUITY_MORTGAGE_DETAILS_ALL_GOOD_BUTTON="All Good",Yle.EQUITY_MORTGAGE_DETAILS_BANNER_TITLE="Verify Your Mortgage Details",Yle.EQUITY_MORTGAGE_DETAILS_TITLE="Estimated Equity Today",Yle.EQUITY_MORTGAGE_DETAILS_HOW_CALCULATED="How is this calculated?",Yle.EQUITY_MORTGAGE_DETAILS_DISCLAIMER="Disclaimer",Yle.EDIT_MORTGAGE_DETAILS_FORM_TITLE="Edit Mortgage Info",Yle.EDIT_MORTGAGE_DETAILS_LOAN_START_DATE_LABEL="Loan Start Date",Yle.EDIT_MORTGAGE_DETAILS_LOAN_TERM_LABEL="Loan Term",Yle.EDIT_MORTGAGE_DETAILS_INTEREST_RATE_LABEL="Interest Rate",Yle.EDIT_MORTGAGE_DETAILS_ORIGINAL_LOAN_AMOUNT_LABEL="Original Loan Amount",Yle.EDIT_MORTGAGE_DETAILS_BALANCE_LABEL="Estimated Mortgage Balance",Yle.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.",Yle.HOW_CALCULATE_TITLE="How Is My Net Worth Calculated?",Yle.HOW_CALCULATE_DESCRIPTION='Your net worth ("equity") is made up of two things.',Yle.HOW_CALCULATE_HOME_VALUE_LABEL="Home Value",Yle.HOW_CALCULATE_LOAN_BALANCE_LABEL="Loan Balance",Yle.HOW_CALCULATE_YOUR_NET_WORTH_LABEL="Your Net Worth",Yle.HOW_CALCULATE_INFORMATION_SUBTITLE="Where does this information come from?",Yle.HOW_CALCULATE_NOTE_DESCRIPTION="Note: Only the first lien mortgage and resale are used to calculate the balance of your loan.",Yle.PAY_LITTLE_EXTRA_HEADER_TITLE="Pay A Little Extra",Yle.PAY_LITTLE_EXTRA_SUBTITLE="How much more can you pay per month?",Yle.PAY_LITTLE_EXTRA_CALCULATION_IF_YOU_PAY="If you pay just ",Yle.PAY_LITTLE_EXTRA_CALCULATION_MORE=" more each month, you could save",Yle.PAY_LITTLE_EXTRA_CALCULATION_DESCRIPTION="in interest over the rest of your loan",Yle.PAY_LITTLE_EXTRA_INFO_DESCRIPTION="You would also be done with the loan and no longer making payments 10 years and 2 months earlier!",Yle.PAY_LITTLE_EXTRA_PAYING_EXTRA="Paying extra can be an easy way to save.",Yle.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.",Yle.PAY_LITTLE_EXTRA_PAYING_EXTRA_BEST_PART="The best part is that there's no paperwork, fees or headaches.",Yle.PAY_LITTLE_EXTRA_PAYING_EXTRA_IMPORTANT_TIP="*Important Tip* ",Yle.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).",Yle.PAY_LITTLE_EXTRA_LENGTH_LOAN_REMAIN_MESSAGE="The length of your loan would remain unchanged with this extra payment.",Yle.CONTACT_AGENT_TITLE="We Might Have The Perferct Buyer For Your Home",Yle.CONTACT_AGENT_DESCRIPTION="Click the button and we'll look though our buyer database for you.",Yle.REFINANCE_OPTIONS_HEADER_TITLE="Refinance Options",Yle.REFINANCE_OPTIONS_HEADER_SUBTITLE="With a refinance of your loan, you could save",Yle.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 ',Yle.REFINANCE_OPTIONS_FIFTEEN_YEAR_FIXED_LABEL="15 Year Fixed",Yle.REFINANCE_OPTIONS_THIRTY_YEAR_FIXED_LABEL="30 Year Fixed",Yle.REFINANCE_OPTIONS_NO_SAVINGS_MESSAGE="No net loss or savings",Yle.REFINANCE_OPTIONS_LOSS_LABEL="loss",Yle.REFINANCE_OPTIONS_SAVINGS_LABEL="savings",Yle.REFINANCE_OPTIONS_PAYMENTS_NOCHANGE_MESSAGE="Payment will not change",Yle.REFINANCE_OPTIONS_NO_CHANGE_LABEL="No Change",Yle.REFINANCE_OPTIONS_GO_UP_LABEL="Go Up",Yle.REFINANCE_OPTIONS_GO_DOWN_LABEL="Go Down",Yle.REFINANCE_OPTIONS_UP_LABEL="up",Yle.REFINANCE_OPTIONS_DOWN_LABEL="down",Yle.USING_YOUR_EQUITY_HEADER_TITLE="Using Your Equity",Yle.USING_EQUITY_BUY_NEW_HOME="Buy a new home",Yle.USING_EQUITY_GET_MORE_SQUARE_FOOTAGE="Get more square footage, a larger yard, or switch neighborhoods - you have options!",Yle.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.",Yle.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.",Yle.USING_EQUITY_SELL_CASH_DESCRIPTION_3="You could also downsize into a cheaper home using a portion of your equity and save the rest.",Yle.USING_EQUITY_CONSULT_TAX_ADVISOR="Always consult a professional tax advisor to understand implications for your specific situation.",Yle.USING_EQUITY_RENTAL_INCOME="Possibly use rental income to cover some or all of your new mortgage payment.",Yle.USING_EQUITY_EXPENSES_DEDUCTED="Consult your professional tax advisor to see if expenses related to this property can be deducted.",Yle.USING_EQUITY_LANDLORD="Consider if you have time to be a landlord (or if you should hire a property manager).",Yle.USING_EQUITY_CONSULT_A_LOAN_OFFICER="Consult a loan officer",Yle.USING_EQUITY_BUY_INVESMENT_PROPERTY="Buy an investment property",Yle.USING_EQUITY_INVESMENT_PROPERTY="Investment Property",Yle.USING_EQUITY_SELL_CASH="Sell & pocket cash",Yle.USING_EQUITY_HOME_IMPROVEMENTS="Make home improvements",Yle.USING_EQUITY_LIVABLE_SPACE="Add more livable space",Yle.USING_EQUITY_EMERGENCY_FUND="Create emergency fund",Yle.USING_EQUITY_CREDIT_CARD_DEBT="Eliminate credit card debt",Yle.USING_EQUITY_VACATION="Splurge on a dream vacation",Yle.USING_EQUITY_STUDENT_LOANS="Pay down student loans",Yle.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.",Yle.USING_EQUITY_HOME_INPROVEMENTS_TAX_DEDUCTIBLE="Equity used for home improvements is still tax-deductible in many cases. (Always consult a professional tax advisor)",Yle.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.",Yle.USING_EQUITY_HOME_INPROVEMENTS_GARAGE_SUNROOM="The lowest value improvements are sunroom, swimming pools, and bathroom additions.",Yle.USING_EQUITY_HOME_INPROVEMENTS_GARAGE_SOURCE="Source: HGTV.",Yle.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. ",Yle.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.",Yle.USING_EQUITY_EMERGENCY_FUND_DESCRIPTION_3="Make sure to stay disciplined and only use the money for true emergencies.",Yle.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.",Yle.USING_EQUITY_LIVABLE_SPACE_DESCRIPTION_1='"The majority of additions add value and offer a 50% return on investment." ',Yle.USING_EQUITY_LIVABLE_SPACE_DESCRIPTION_2="If local ordinances allow it could be used as a rental.",Yle.USING_EQUITY_LIVABLE_SPACE_DESCRIPTION_3="Qualifies as a home improvement so equity interest is tax-deductible.",Yle.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. ",Yle.USING_EQUITY_STUDENT_LOANS_DESCRIPTION_1="Home equity rates are often (but not always) less than student loans.",Yle.USING_EQUITY_STUDENT_LOANS_DESCRIPTION_2="Paying off student loans is a great way to establish credit history.",Yle.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.",Yle.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]. ",Yle.USING_EQUITY_CREDIT_DEBT_DESCRIPTION_1="Home equity rates are often substantially lower than those on credit cards",Yle.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.",Yle.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.",Yle.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:",Yle.LOAN_AMOUNT_CANNOT_EXCEED="The remaining loan amount cannot exceed the initial loan principal.",Yle.VALUE_GREATER_THAN_ZERO="The value must be greater than 0.",Yle.EXCELENT_INVESTMENT="Excellent Investment",Yle.MODERATE_INVESTMENT="Moderate Investment",Yle.POOR_INVESTMENT="Poor Investment",Yle.EXCELENT_INVESTMENT_DESCRIPTION="High potential, recommended for consideration.",Yle.MODERATE_INVESTMENT_DESCRIPTION="Average potential, consider with caution.",Yle.POOR_INVESTMENT_DESCRIPTION="Low potential, strongly advised to avoid.";var Qle=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(!1);r.useEffect((()=>{u.current&&new $y({apiKey:e??"AIzaSyCDNlq-LeVQGoubUXL_a8p6LYPXR5Bjs_Q"}).importLibrary("maps").then((()=>{t.center||(t.center={lat:39.8283,lng:-98.5795}),u.current&&f(u.current,t)}))}),[]);let f=(e,t)=>{s(new window.google.maps.Map(e,{...t,zoomControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT}})),n&&v(n),h(o),d(!0)},h=(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 window.google.maps.Marker({position:r.getCenter(),map:l,icon:n})},v=({center:e,geoJson:t})=>{if(!l||!t)return;e&&(l.setCenter(e),new window.google.maps.Marker({position:e,map:l}));let n=new window.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:v,setMarkers:h,zoomHandler:(e,t)=>{l&&(l.setCenter(e),l.setZoom(t))},isMapReady:c}};function Jle({message:e=Yle.NO_DATA_AVAILABLE_LABEL,mapHeight:t="420px"}){let n="text-gray-500";return React.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)"}},React.createElement(pg,{strokeWidth:.4,size:96,className:kae(n)}),React.createElement("p",{className:kae(n)},e))}var ese=["#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"];function tse(){return r.createElement("div",{className:kae("absolute top-4 left-4 bg-white bg-opacity-70 p-2 shadow-lg flex flex-col")},r.createElement("div",{className:kae("flex justify-between")},r.createElement("div",{className:kae("text-left text-xs")},"Active"),r.createElement("div",{className:kae("text-right text-xs")},"Very Active")),r.createElement("div",{className:kae("flex flex-col items-center space-y-2")},r.createElement("div",{className:kae("flex")},ese.map(((e,t)=>r.createElement("div",{key:t,className:kae("w-4 h-4"),style:{backgroundColor:e}}))))))}Uu(new Date,"yyyy-MM-dd"),Uu(new Date,"yyyy-MM-dd"),e.forwardRef((({linkTextColor:t="text-gray-500",icon:n,text:r},o)=>e.createElement("div",{ref:o,className:kae("flex flex-row items-center gap-2")},n&&e.cloneElement(n,{className:kae("h-4 w-4",t,n.props.className)}),e.createElement("p",{className:kae("text-sm hover:cursor-pointer",t)},r))));var nse=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:g,update:y,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}=(({clientKey:e,apiKey:t,loadingInitialState:n="loading"})=>{let[o,i]=r.useState((()=>"loading"===n)),[a,u]=r.useState(),l=!!e;r.useEffect((()=>{!a?.token&&e&&async function(){let t=await Oae({clientKey:e});u(t)}()}),[a]);let s=r.useCallback((async n=>{let{url:r,requestInit:o}=n,{headers:s,...c}=o??{},d=a,f={"Content-Type":"application/json",...d?.token&&{Authorization:`Bearer ${d?.token}`},...t&&{"x-api-key":t},...s};try{if(l&&!a?.token||!l&&!t)return;i(!0),!a?.token&&e&&(d=await Oae({clientKey:e}));let n=await(await fetch(r,{headers:f,...c})).json();return i(!1),d?.token&&u(d),n}catch(b){return void console.error(`Error requesting ${r}`,b)}finally{i(!1)}}),[a,e,t]);return{isLoading:o,tokens:a,request:s,isExternal:l}})({clientKey:a,apiKey:u}),v=r.useMemo((()=>({zoom:n,draggable:!1,scrollwheel:!1,fullscreenControl:!1,gestureHandling:"none",zoomControl:o,mapId:""})),[n,o]),{mapRef:p,setGeojson:m,isMapReady:b}=Qle({mapOptions:v,apiKey:i});return r.useEffect((()=>{let n=!0;return b&&async function(){let r=((e,t)=>e?.config?e.config.find((e=>e.name===t)):{})(h?.meta,"color");if(e&&t&&n&&b){let o=new URL(t);o.searchParams.set("zipcode",e),r?.value&&o.searchParams.set("colors",r?.value);try{let e=await d({url:o.toString()});e?.data||c(!0),e&&n&&m(e.data)}catch(Aee){console.error("Error fetching heatmap data:",Aee)}}}(),()=>{n=!1}}),[a,u,b]),r.createElement("div",{className:kae("flex flex-col bg-white")},r.createElement(Zle,{title:"Heat Map",infoDescription:"The best way to visualize the distribution of data in a geographical area.",infoTitle:"Heat Map",icon:r.createElement(vg,null)}),r.createElement(Xle,null,r.createElement("div",{className:kae("w-full justify-center m-3 lg:m-8 md:m-8")},r.createElement("div",{className:kae("relative rounded-lg overflow-hidden w-full",{"animate-pulse rounded-lg bg-primary/10":f}),style:{maxHeight:l,height:l}},r.createElement("div",{ref:p,className:kae("w-full h-full")}),r.createElement(tse,null),s&&r.createElement(Jle,null)))))}),{props:{zipcode:"string",url:"string",zoomLevel:"number",zoomControl:"boolean",googleApiKey:"string",clientKey:"string",apiKey:"string"}});customElements&&customElements.define("heat-map",nse)}));
17
24
  //# sourceMappingURL=heatmap.min.js.map