@percy.ai/heatmap 0.0.2 → 0.0.3

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")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).React,e.ReactDOM)}(this,(function(e,t){function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r=n(e),o=n(t),i=Object.defineProperty,a=(e,t,n)=>(((e,t,n)=>{t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const 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}},u={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)},c={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:u},d=Symbol.for("r2wc.render"),f=Symbol.for("r2wc.connected"),p=Symbol.for("r2wc.context"),h=Symbol.for("r2wc.props");function v(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 x({root:t,ReactComponent:n},r){const o=e.createElement(n,r);t.render(o)}function w({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 r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.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 C(...t){return e.useCallback(k(...t),t)}m=b.createRoot,b.hydrateRoot;const N=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,y({},o,{ref:n}),e.isValidElement(t)?e.cloneElement(t,void 0,r):null)}return e.createElement(S,y({},o,{ref:n}),r)}));N.displayName="Slot";const S=e.forwardRef(((t,n)=>{const{children:r,...o}=t;return e.isValidElement(r)?e.cloneElement(r,{...O(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 _=({children:t})=>e.createElement(e.Fragment,null,t);function M(t){return e.isValidElement(t)&&t.type===_}function O(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function A(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=A(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function j(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=A(e))&&(r&&(r+=" "),r+=t);return r}const E=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,T=j,D=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return T(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]})),s=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,...s}[t]):{...i,...s}[t]===n}))?[...e,n,r]:e}),[]);return T(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)};function F(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=P(e))&&(r&&(r+=" "),r+=t);return r}function P(e){if("string"==typeof e)return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=P(e[r]))&&(n&&(n+=" "),n+=t);return n}var R="-";function I(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];B(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(),z(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 r=n[e]||[];return t&&o[e]?[].concat(r,o[e]):r}}}function z(e,t){if(0===e.length)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),o=r?z(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 L=/^\[(.+)\]$/;function B(e,t,n,r){e.forEach((function(e){if("string"!=typeof e){if("function"==typeof e)return e.isThemeGetter?void B(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((function(e){var o=e[0];B(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 H(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 W(e){var t=e.separator||":",n=1===t.length,r=t[0],o=t.length;return function(e){for(var i,a=[],s=0,l=0,u=0;u<e.length;u++){var c=e[u];if(0===s){if(c===r&&(n||e.slice(u,u+o)===t)){a.push(e.slice(l,u)),l=u+o;continue}if("/"===c){i=u;continue}}"["===c?s++:"]"===c&&s--}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 K(){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:H(e.cacheSize),splitModifiers:W(e),...I(e)}}(l),o=r.cache.get,i=r.cache.set,a=s,s(e)};function s(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,s=t.maybePostfixModifierPosition,l=r(s?a.substring(0,s):a),u=Boolean(s);if(!l){if(!s)return{isTailwindClass:!1,originalClassName:e};if(!(l=r(a)))return{isTailwindClass:!1,originalClassName:e};u=!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:u}})).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(F.apply(null,arguments))}}function Z(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",he)}function ne(e){return pe(e,"size",ve)}function re(e){return pe(e,"position",ve)}function oe(e){return pe(e,"url",me)}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 be(e)||pe(e,"number",be)}function ue(e){return q.test(e)}function ce(){return!0}function de(e){return Y.test(e)}function fe(e){return pe(e,"",ge)}function pe(e,t,n){var r=q.exec(e);return!!r&&(r[1]?r[1]===t:n(r[2]))}function he(e){return J.test(e)}function ve(){return!1}function me(e){return e.startsWith("url(")}function be(e){return Number.isInteger(Number(e))}function ge(e){return Q.test(e)}function xe(){var e=Z("colors"),t=Z("spacing"),n=Z("blur"),r=Z("brightness"),o=Z("borderColor"),i=Z("borderRadius"),a=Z("borderSpacing"),s=Z("borderWidth"),l=Z("contrast"),u=Z("grayscale"),c=Z("hueRotate"),d=Z("invert"),f=Z("gap"),p=Z("gradientColorStops"),h=Z("gradientColorStopPositions"),v=Z("inset"),m=Z("margin"),b=Z("opacity"),g=Z("padding"),x=Z("saturate"),w=Z("scale"),y=Z("sepia"),k=Z("skew"),C=Z("space"),N=Z("translate"),S=function(){return["auto",ue,t]},_=function(){return[ue,t]},M=function(){return["",ee]},O=function(){return["auto",ae,ue]},A=function(){return["","0",ue]},j=function(){return[ae,ie]},E=function(){return[ae,ue]};return{cacheSize:500,theme:{colors:[ce],spacing:[ee],blur:["none","",de,ue],brightness:j(),borderColor:[e],borderRadius:["none","","full",de,ue],borderSpacing:_(),borderWidth:M(),contrast:j(),grayscale:A(),hueRotate:E(),invert:A(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[se,te],inset:S(),margin:S(),opacity:j(),padding:_(),saturate:j(),scale:j(),sepia:A(),skew:E(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],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"],[ue])}],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:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],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",ue]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",le]}],"grid-cols":[{"grid-cols":[ce]}],"col-start-end":[{col:["auto",{span:["full",le]},ue]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[ce]}],"row-start-end":[{row:["auto",{span:[le]},ue]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ue]}],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":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",ue,t]}],"min-w":[{"min-w":["min","max","fit",ue,ee]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[de]},de,ue]}],h:[{h:[ue,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",ue,ee]}],"max-h":[{"max-h":[ue,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",ue]}],"line-clamp":[{"line-clamp":["none",ae,ie]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ue,ee]}],"list-image":[{"list-image":["none",ue]}],"list-style-type":[{list:["none","disc","decimal",ue]}],"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",ue,ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue]}],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",ue]}],"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:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"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":[b]}],"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":[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":[ue,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,ue]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"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",ue]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",ue]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[le,ue]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"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",ue]}],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",ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",ue]}],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=K(xe);function ye(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 s(n){const{scope:r,children:o,...s}=n,l=(null==r?void 0:r[t][a])||i,u=e.useMemo((()=>s),Object.values(s));return e.createElement(l.Provider,{value:u},o)}return r=[...r,o],s.displayName=n+"Provider",[s,function(r,s){const l=(null==s?void 0:s[t][a])||i,u=e.useContext(l);if(u)return u;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},ke(o,...n)]}function ke(...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 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 Ne=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{};function Se(){return Se=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},Se.apply(this,arguments)}const _e=["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?N:n;return e.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.createElement(a,Se({},i,{ref:r}))}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});function Me(e,n){e&&t.flushSync((()=>e.dispatchEvent(n)))}const Oe="Avatar",[Ae,je]=ye(Oe),[Ee,Te]=Ae(Oe);const De=e.forwardRef(((t,n)=>{const{t:r,...o}=t,[i,a]=e.useState("idle");return e.createElement(Ee,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:a},e.createElement(_e.span,y({},o,{ref:n})))})),Fe=e.forwardRef(((t,n)=>{const{t:r,src:o,onLoadingStatusChange:i=(()=>{}),...a}=t,s=Te("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),u=Ce((e=>{i(e),s.onImageLoadingStatusChange(e)}));return Ne((()=>{"idle"!==l&&u(l)}),[l,u]),"loaded"===l?e.createElement(_e.img,y({},a,{ref:n,src:o})):null})),Pe=e.forwardRef(((t,n)=>{const{t:r,delayMs:o,...i}=t,a=Te("AvatarFallback",r),[s,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]),s&&"loaded"!==a.imageLoadingStatus?e.createElement(_e.span,y({},i,{ref:n})):null})),Re="Progress",Ie=100,[ze,Le]=ye(Re),[Be,$e]=ze(Re),He=e.forwardRef(((t,n)=>{const{o:r,value:o,max:i,getValueLabel:a=Ue,...s}=t,l=Ke(i)?i:Ie,u=Ze(o,l)?o:null,c=Ve(u)?a(u,l):void 0;return e.createElement(Be,{scope:r,value:u,max:l},e.createElement(_e.div,y({"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Ve(u)?u:void 0,"aria-valuetext":c,role:"progressbar","data-state":We(u,l),"data-value":null!=u?u:void 0,"data-max":l},s,{ref:n})))}));He.propTypes={max(e,t,n){const r=e[t],o=String(r);return r&&!Ke(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=Ke(e.max)?e.max:Ie;return null==r||Ze(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 Ue(e,t){return`${Math.round(e/t*100)}%`}function We(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Ve(e){return"number"==typeof e}function Ke(e){return Ve(e)&&!isNaN(e)&&e>0}function Ze(e,t){return Ve(e)&&!isNaN(e)&&e<=t&&e>=0}const qe=He,Ge=e.forwardRef(((t,n)=>{var r;const{o,...i}=t,a=$e("ProgressIndicator",o);return e.createElement(_e.div,y({"data-state":We(a.value,a.max),"data-value":null!==(r=a.value)&&void 0!==r?r:void 0,"data-max":a.max},i,{ref:n}))}));function Xe(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 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 r;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:u,...c}=t,d=e.useContext(tt),[f,p]=e.useState(null),h=null!==(r=null==f?void 0:f.ownerDocument)&&void 0!==r?r:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,v]=e.useState({}),m=C(n,(e=>p(e))),b=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=b.indexOf(g),w=f?b.indexOf(f):-1,y=d.layersWithOutsidePointerEventsDisabled.size>0,k=w>=x,N=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Ce(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(){ot(Je,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==u||u())}),h),S=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Ce(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){ot(Qe,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==s||s(e),null==l||l(e),e.defaultPrevented||null==u||u())}),h);return function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=Ce(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&&u&&(e.preventDefault(),u()))}),h),e.useEffect((()=>{if(f)return o&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(et=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),rt(),()=>{o&&1===d.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=et)}}),[f,h,o,d]),e.useEffect((()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),rt())}),[f,d]),e.useEffect((()=>{const e=()=>v({});return document.addEventListener(Ye,e),()=>document.removeEventListener(Ye,e)}),[]),e.createElement(_e.div,Se({},c,{ref:m,style:{pointerEvents:y?k?"auto":"none":void 0,...t.style},onFocusCapture:Xe(t.onFocusCapture,S.onFocusCapture),onBlurCapture:Xe(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Xe(t.onPointerDownCapture,N.onPointerDownCapture)}))}));function rt(){const e=new CustomEvent(Ye);document.dispatchEvent(e)}function ot(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?Me(o,i):o.dispatchEvent(i)}const it=nt,at=e.forwardRef(((t,n)=>{const r=e.useContext(tt),o=e.useRef(null),i=C(n,o);return e.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),e.createElement(_e.div,Se({},t,{ref:i}))})),st=r["useId".toString()]||(()=>{});let lt=0;function ut(e){const[t,n]=r.useState(st());return Ne((()=>{e||n((e=>null!=e?e:String(lt++)))}),[e]),e||(t?`radix-${t}`:"")}const ct=["top","right","bottom","left"],dt=Math.min,ft=Math.max,pt=Math.round,ht=Math.floor,vt=e=>({x:e,y:e}),mt={left:"right",right:"left",bottom:"top",top:"bottom"},bt={start:"end",end:"start"};function gt(e,t,n){return ft(e,dt(t,n))}function xt(e,t){return"function"==typeof e?e(t):e}function wt(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function kt(e){return"x"===e?"y":"x"}function Ct(e){return"y"===e?"height":"width"}function Nt(e){return["top","bottom"].includes(wt(e))?"y":"x"}function St(e){return kt(Nt(e))}function _t(e){return e.replace(/start|end/g,(e=>bt[e]))}function Mt(e){return e.replace(/left|right|bottom|top/g,(e=>mt[e]))}function Ot(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 At(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function jt(e,t,n){let{reference:r,floating:o}=e;const i=Nt(t),a=St(t),s=Ct(a),l=wt(t),u="y"===i,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(yt(t)){case"start":p[a]-=f*(n&&u?-1:1);break;case"end":p[a]+=f*(n&&u?-1:1)}return p}async function Et(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=xt(t,e),h=Ot(p),v=s[f?"floating"===d?"reference":"floating":d],m=At(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(v)))||n?v:v.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),b="floating"===d?{...a.floating,x:r,y:o}:a.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),x=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},w=At(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:g,strategy:l}):b);return{top:(m.top-w.top+h.top)/x.y,bottom:(w.bottom-m.bottom+h.bottom)/x.y,left:(m.left-w.left+h.left)/x.x,right:(w.right-m.right+h.right)/x.x}}const Tt=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s}=t,{element:l,padding:u=0}=xt(e,t)||{};if(null==l)return{};const c=Ot(u),d={x:n,y:r},f=St(o),p=Ct(f),h=await a.getDimensions(l),v="y"===f,m=v?"top":"left",b=v?"bottom":"right",g=v?"clientHeight":"clientWidth",x=i.reference[p]+i.reference[f]-d[f]-i.floating[p],w=d[f]-i.reference[f],y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l));let k=y?y[g]:0;k&&await(null==a.isElement?void 0:a.isElement(y))||(k=s.floating[g]||i.floating[p]);const C=x/2-w/2,N=k/2-h[p]/2-1,S=dt(c[m],N),_=dt(c[b],N),M=S,O=k-h[p]-_,A=k/2-h[p]/2+C,j=gt(M,A,O),E=null!=yt(o)&&A!=j&&i.reference[p]/2-(A<M?S:_)-h[p]/2<0?A<M?M-A:O-A:0;return{[f]:d[f]-E,data:{[f]:j,centerOffset:A-j+E}}}}),Dt=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:s,elements:l}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...v}=xt(e,t),m=wt(r),b=wt(a)===a,g=await(null==s.isRTL?void 0:s.isRTL(l.floating)),x=d||(b||!h?[Mt(a)]:function(e){const t=Mt(e);return[_t(e),t,_t(t)]}(a));d||"none"===p||x.push(...function(e,t,n,r){const o=yt(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[]}}(wt(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(_t)))),i}(a,h,p,g));const w=[a,...x],y=await Et(t,v),k=[];let C=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&k.push(y[m]),c){const e=function(e,t,n){void 0===n&&(n=!1);const r=yt(e),o=St(e),i=Ct(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Mt(a)),[a,Mt(a)]}(r,i,g);k.push(y[e[0]],y[e[1]])}if(C=[...C,{placement:r,overflows:k}],!k.every((e=>e<=0))){var N,S;const e=((null==(N=o.flip)?void 0:N.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(S=C.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 _;const e=null==(_=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:_[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function Ft(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pt(e){return ct.some((t=>e[t]>=0))}const Rt=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=xt(e,t);switch(r){case"referenceHidden":{const e=Ft(await Et(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Pt(e)}}}case"escaped":{const e=Ft(await Et(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Pt(e)}}}default:return{}}}}};const It=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=wt(n),s=yt(n),l="y"===Nt(n),u=["left","top"].includes(a)?-1:1,c=i&&l?-1:1,d=xt(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},zt=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:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=xt(e,t),u={x:n,y:r},c=await Et(t,l),d=Nt(wt(o)),f=kt(d);let p=u[f],h=u[d];if(i){const e="y"===f?"bottom":"right";p=gt(p+c["y"===f?"top":"left"],p,p-c[e])}if(a){const e="y"===d?"bottom":"right";h=gt(h+c["y"===d?"top":"left"],h,h-c[e])}const v=s.fn({...t,[f]:p,[d]:h});return{...v,data:{x:v.x-n,y:v.y-r}}}}},Lt=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=xt(e,t),c={x:n,y:r},d=Nt(o),f=kt(d);let p=c[f],h=c[d];const v=xt(s,t),m="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};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;p<t?p=t:p>n&&(p=n)}if(u){var b,g;const e="y"===f?"width":"height",t=["top","left"].includes(wt(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);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},Bt=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=(()=>{}),...s}=xt(e,t),l=await Et(t,s),u=wt(n),c=yt(n),d="y"===Nt(n),{width:f,height:p}=r.floating;let h,v;"top"===u||"bottom"===u?(h=u,v=c===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(v=u,h="end"===c?"top":"bottom");const m=p-l[h],b=f-l[v],g=!t.middlewareData.shift;let x=m,w=b;if(d){const e=f-l.left-l.right;w=c||g?dt(b,e):e}else{const e=p-l.top-l.bottom;x=c||g?dt(m,e):e}if(g&&!c){const e=ft(l.left,0),t=ft(l.right,0),n=ft(l.top,0),r=ft(l.bottom,0);d?w=f-2*(0!==e||0!==t?e+t:ft(l.left,l.right)):x=p-2*(0!==n||0!==r?n+r:ft(l.top,l.bottom))}await a({...t,availableWidth:w,availableHeight:x});const y=await o.getDimensions(i.floating);return f!==y.width||p!==y.height?{reset:{rects:!0}}:{}}}};function $t(e){return Wt(e)?(e.nodeName||"").toLowerCase():"#document"}function Ht(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ut(e){var t;return null==(t=(Wt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Wt(e){return e instanceof Node||e instanceof Ht(e).Node}function Vt(e){return e instanceof Element||e instanceof Ht(e).Element}function Kt(e){return e instanceof HTMLElement||e instanceof Ht(e).HTMLElement}function Zt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Ht(e).ShadowRoot)}function qt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Gt(e){return["table","td","th"].includes($t(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($t(e))}function Qt(e){return Ht(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"===$t(e))return e;const t=e.assignedSlot||e.parentNode||Zt(e)&&e.host||Ut(e);return Zt(t)?t.host:t}function nn(e){const t=tn(e);return Jt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kt(t)&&qt(t)?t:nn(t)}function rn(e,t){var n;void 0===t&&(t=[]);const r=nn(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Ht(r);return o?t.concat(i,i.visualViewport||[],qt(r)?r:[]):t.concat(r,rn(r))}function on(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Kt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=pt(n)!==i||pt(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function an(e){return Vt(e)?e:e.contextElement}function sn(e){const t=an(e);if(!Kt(t))return vt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=on(t);let a=(i?pt(n.width):n.width)/r,s=(i?pt(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ln=vt(0);function un(e){const t=Ht(e);return Yt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ln}function cn(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=an(e);let a=vt(1);t&&(r?Vt(r)&&(a=sn(r)):a=sn(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ht(e))&&t}(i,n,r)?un(i):vt(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=Ht(i),t=r&&Vt(r)?Ht(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=sn(n),t=n.getBoundingClientRect(),r=Qt(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=o,u+=i,n=Ht(n).frameElement}}return At({width:c,height:d,x:l,y:u})}function dn(e){return cn(Ut(e)).left+en(e).scrollLeft}function fn(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ht(e),r=Ut(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Yt();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Ut(e),n=en(e),r=e.ownerDocument.body,o=ft(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ft(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+dn(e);const s=-n.scrollTop;return"rtl"===Qt(r).direction&&(a+=ft(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Ut(e));else if(Vt(t))r=function(e,t){const n=cn(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Kt(e)?sn(e):vt(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=un(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return At(r)}function pn(e,t){const n=tn(e);return!(n===t||!Vt(n)||Jt(n))&&("fixed"===Qt(n).position||pn(n,t))}function hn(e,t,n){const r=Kt(t),o=Ut(t),i="fixed"===n,a=cn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=vt(0);if(r||!r&&!i)if(("body"!==$t(t)||qt(o))&&(s=en(t)),r){const e=cn(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=dn(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function vn(e,t){return Kt(e)&&"fixed"!==Qt(e).position?t?t(e):e.offsetParent:null}function mn(e,t){const n=Ht(e);if(!Kt(e))return n;let r=vn(e,t);for(;r&&Gt(r)&&"static"===Qt(r).position;)r=vn(r,t);return r&&("html"===$t(r)||"body"===$t(r)&&"static"===Qt(r).position&&!Xt(r))?n:r||function(e){let t=tn(e);for(;Kt(t)&&!Jt(t);){if(Xt(t))return t;t=tn(t)}return null}(e)||n}const bn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Kt(n),i=Ut(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=vt(1);const l=vt(0);if((o||!o&&"fixed"!==r)&&(("body"!==$t(n)||qt(i))&&(a=en(n)),Kt(n))){const e=cn(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:Ut,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=rn(e).filter((e=>Vt(e)&&"body"!==$t(e))),o=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||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||qt(a)&&!n&&pn(e,a))?r=r.filter((e=>e!==a)):o=t,a=tn(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=fn(t,n,o);return e.top=ft(r.top,e.top),e.right=dt(r.right,e.right),e.bottom=dt(r.bottom,e.bottom),e.left=ft(r.left,e.left),e}),fn(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:mn,getElementRects:async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||mn,i=this.getDimensions;return{reference:hn(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 on(e)},getScale:sn,isElement:Vt,isRTL:function(e){return"rtl"===Qt(e).direction}};function gn(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=an(e),c=o||i?[...u?rn(u):[],...rn(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=u&&s?function(e,t){let n,r=null;const o=Ut(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p={rootMargin:-ht(c)+"px "+-ht(o.clientWidth-(u+d))+"px "+-ht(o.clientHeight-(c+f))+"px "+-ht(u)+"px",threshold:ft(0,dt(1,l))||1};let h=!0;function v(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(v,{...p,root:o.ownerDocument})}catch(m){r=new IntersectionObserver(v,p)}r.observe(e)}(!0),i}(u,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{h&&h.observe(t)}))),n()})),u&&!l&&h.observe(u),h.observe(t));let v=l?cn(e):null;return l&&function t(){const r=cn(e);!v||r.x===v.x&&r.y===v.y&&r.width===v.width&&r.height===v.height||n();v=r,f=requestAnimationFrame(t)}(),n(),()=>{c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const xn=(e,t,n)=>{const r=new Map,o={platform:bn,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=jt(u,r,l),f=r,p={},h=0;for(let v=0;v<s.length;v++){const{name:n,fn:i}=s[v],{x:m,y:b,data:g,reset:x}=await i({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});c=null!=m?m:c,d=null!=b?b:d,p={...p,[n]:{...p[n],...g}},x&&h<=50&&(h++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(u=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:c,y:d}=jt(u,f,l))),v=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})},wn=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?Tt({element:n.current,padding:r}).fn(t):{}:n?Tt({element:n,padding:r}).fn(t):{};var o}});var yn="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function kn(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(!kn(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)&&!kn(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 Nn(e,t){const n=Cn(e);return Math.round(t*n)/n}function Sn(e){const t=r.useRef(e);return yn((()=>{t.current=e})),t}function _n(t){const[n,r]=e.useState(void 0);return Ne((()=>{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 Mn="Popper",[On,An]=ye(Mn),[jn,En]=On(Mn),Tn=e.forwardRef(((t,n)=>{const{i:r,virtualRef:o,...i}=t,a=En("PopperAnchor",r),s=e.useRef(null),l=C(n,s);return e.useEffect((()=>{a.onAnchorChange((null==o?void 0:o.current)||s.current)})),o?null:e.createElement(_e.div,Se({},i,{ref:l}))})),Dn="PopperContent",[Fn,Pn]=On(Dn),Rn=e.forwardRef(((t,n)=>{var i,a,s,l,u,c,d,f;const{i:p,side:h="bottom",sideOffset:v=0,align:m="center",alignOffset:b=0,arrowPadding:g=0,collisionBoundary:x=[],collisionPadding:w=0,sticky:y="partial",hideWhenDetached:k=!1,avoidCollisions:N=!0,onPlaced:S,..._}=t,M=En(Dn,p),[O,A]=e.useState(null),j=C(n,(e=>A(e))),[E,T]=e.useState(null),D=_n(E),F=null!==(i=null==D?void 0:D.width)&&void 0!==i?i:0,P=null!==(a=null==D?void 0:D.height)&&void 0!==a?a:0,R=h+("center"!==m?"-"+m:""),I="number"==typeof w?w:{top:0,right:0,bottom:0,left:0,...w},z=Array.isArray(x)?x:[x],L=z.length>0,B={padding:I,boundary:z.filter(In),altBoundary:L},{refs:$,floatingStyles:H,placement:U,isPositioned:W,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:u=!0,whileElementsMounted:c,open:d}=e,[f,p]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=r.useState(i);kn(h,i)||v(i);const[m,b]=r.useState(null),[g,x]=r.useState(null),w=r.useCallback((e=>{e!=N.current&&(N.current=e,b(e))}),[b]),y=r.useCallback((e=>{e!==S.current&&(S.current=e,x(e))}),[x]),k=s||m,C=l||g,N=r.useRef(null),S=r.useRef(null),_=r.useRef(f),M=Sn(c),O=Sn(a),A=r.useCallback((()=>{if(!N.current||!S.current)return;const e={placement:t,strategy:n,middleware:h};O.current&&(e.platform=O.current),xn(N.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};j.current&&!kn(_.current,t)&&(_.current=t,o.flushSync((()=>{p(t)})))}))}),[h,t,n,O]);yn((()=>{!1===d&&_.current.isPositioned&&(_.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const j=r.useRef(!1);yn((()=>(j.current=!0,()=>{j.current=!1})),[]),yn((()=>{if(k&&(N.current=k),C&&(S.current=C),k&&C){if(M.current)return M.current(k,C,A);A()}}),[k,C,A,M]);const E=r.useMemo((()=>({reference:N,floating:S,setReference:w,setFloating:y})),[w,y]),T=r.useMemo((()=>({reference:k,floating:C})),[k,C]),D=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!T.floating)return e;const t=Nn(T.floating,f.x),r=Nn(T.floating,f.y);return u?{...e,transform:"translate("+t+"px, "+r+"px)",...Cn(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,u,T.floating,f.x,f.y]);return r.useMemo((()=>({...f,update:A,refs:E,elements:T,floatingStyles:D})),[f,A,E,T,D])}({strategy:"fixed",placement:R,whileElementsMounted:gn,elements:{reference:M.anchor},middleware:[It({mainAxis:v+P,alignmentAxis:b}),N&&zt({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?Lt():void 0,...B}),N&&Dt({...B}),Bt({...B,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&&wn({element:E,padding:g}),zn({arrowWidth:F,arrowHeight:P}),k&&Rt({strategy:"referenceHidden"})]}),[K,Z]=Ln(U),q=Ce(S);Ne((()=>{W&&(null==q||q())}),[W,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===(u=V.arrow)||void 0===u?void 0:u.centerOffset),[J,Q]=e.useState();return Ne((()=>{O&&Q(window.getComputedStyle(O).zIndex)}),[O]),e.createElement("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:W?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--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(Fn,{scope:p,placedSide:K,onArrowChange:T,arrowX:G,arrowY:X,shouldHideArrow:Y},e.createElement(_e.div,Se({"data-side":K,"data-align":Z},_,{ref:j,style:{..._.style,animation:W?void 0:"none",opacity:null!==(f=V.hide)&&void 0!==f&&f.referenceHidden?0:void 0}}))))}));function In(e){return null!==e}const zn=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,c=0!==(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=Ln(s),v={start:"0%",center:"50%",end:"100%"}[h],m=(null!==(r=null===(o=u.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,b=(null!==(i=null===(a=u.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let g="",x="";return"bottom"===p?(g=c?v:`${m}px`,x=-f+"px"):"top"===p?(g=c?v:`${m}px`,x=`${l.floating.height+f}px`):"right"===p?(g=-f+"px",x=c?v:`${b}px`):"left"===p&&(g=`${l.floating.width+f}px`,x=c?v:`${b}px`),{data:{x:g,y:x}}}});function Ln(e){const[t,n="center"]=e.split("-");return[t,n]}const Bn=Tn,$n=Rn,Hn=e.forwardRef(((n,r)=>{var o;const{container:i=(null===globalThis||void 0===globalThis||null===(o=globalThis.document)||void 0===o?void 0:o.body),...a}=n;return i?t.createPortal(e.createElement(_e.div,Se({},a,{ref:r})),i):null}));const Un=n=>{const{present:r,children:o}=n,i=function(n){const[r,o]=e.useState(),i=e.useRef({}),a=e.useRef(n),s=e.useRef("none"),l=n?"mounted":"unmounted",[u,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=Wn(i.current);s.current="mounted"===u?e:"none"}),[u]),Ne((()=>{const e=i.current,t=a.current;if(t!==n){const r=s.current,o=Wn(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]),Ne((()=>{if(r){const e=e=>{const n=Wn(i.current).includes(e.animationName);e.target===r&&n&&t.flushSync((()=>c("ANIMATION_END")))},n=e=>{e.target===r&&(s.current=Wn(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(u),ref:e.useCallback((e=>{e&&(i.current=getComputedStyle(e)),o(e)}),[])}}(r),a="function"==typeof o?o({present:i.isPresent}):e.Children.only(o),s=C(i.ref,a.ref);return"function"==typeof o||i.isPresent?e.cloneElement(a,{ref:s}):null};function Wn(e){return(null==e?void 0:e.animationName)||"none"}function Vn({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=Ce(n);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==t,s=a?t:o,l=Ce(r);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])]}Un.displayName="Presence";const Kn=e.forwardRef(((t,n)=>e.createElement(_e.span,Se({},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}})))),Zn=Kn,[qn,Gn]=ye("Tooltip",[An]),Xn=An(),Yn="tooltip.open",[Jn,Qn]=qn("TooltipProvider"),er="Tooltip",[tr,nr]=qn(er),[rr,or]=qn("TooltipPortal",{forceMount:void 0}),ir="TooltipContent",ar=e.forwardRef(((t,n)=>{const r=or(ir,t.u),{forceMount:o=r.forceMount,side:i="top",...a}=t,s=nr(ir,t.u);return e.createElement(Un,{present:o||s.open},s.disableHoverableContent?e.createElement(cr,y({side:i},a,{ref:n})):e.createElement(sr,y({side:i},a,{ref:n})))})),sr=e.forwardRef(((t,n)=>{const r=nr(ir,t.u),o=Qn(ir,t.u),i=e.useRef(null),a=C(n,i),[s,l]=e.useState(null),{trigger:u,onClose:c}=r,d=i.current,{onPointerInTransitChange:f}=o,p=e.useCallback((()=>{l(null),f(!1)}),[f]),h=e.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=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,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){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)}([...o,...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(i),f(!0)}),[f]);return e.useEffect((()=>()=>p()),[p]),e.useEffect((()=>{if(u&&d){const e=e=>h(e,d),t=e=>h(e,u);return u.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[u,d,h,p]),e.useEffect((()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.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,s=t[i].y,l=t[a].x,u=t[a].y;s>r!=u>r&&n<(l-e)*(r-s)/(u-s)+e&&(o=!o)}return o}(n,s);r?p():o&&(p(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,d,s,c,p]),e.createElement(cr,y({},t,{ref:a}))})),[lr,ur]=qn(er,{isInside:!1}),cr=e.forwardRef(((t,n)=>{const{u:r,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=t,u=nr(ir,r),c=Xn(r),{onClose:d}=u;return e.useEffect((()=>(document.addEventListener(Yn,d),()=>document.removeEventListener(Yn,d))),[d]),e.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(u.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,d]),e.createElement(nt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d},e.createElement($n,y({"data-state":u.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(_,null,o),e.createElement(lr,{scope:r,isInside:!0},e.createElement(Zn,{id:u.contentId,role:"tooltip"},i||o))))}));const dr=ar,fr="focusScope.autoFocusOnMount",pr="focusScope.autoFocusOnUnmount",hr={bubbles:!1,cancelable:!0},vr=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[l,u]=e.useState(null),c=Ce(i),d=Ce(a),f=e.useRef(null),p=C(n,(e=>u(e))),h=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){function e(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:xr(f.current,{select:!0})}function t(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||xr(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)||xr(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,h.paused]),e.useEffect((()=>{if(l){wr.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(fr,hr);l.addEventListener(fr,c),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(xr(r,{select:t}),document.activeElement!==n)return}((e=mr(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&xr(l))}return()=>{l.removeEventListener(fr,c),setTimeout((()=>{const e=new CustomEvent(pr,hr);l.addEventListener(pr,d),l.dispatchEvent(e),e.defaultPrevented||xr(null!=t?t:document.body,{select:!0}),l.removeEventListener(pr,d),wr.remove(h)}),0)}}var e}),[l,c,d,h]);const v=e.useCallback((e=>{if(!r&&!o)return;if(h.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=mr(e),n=br(t,e),r=br(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&xr(i,{select:!0})):(e.preventDefault(),r&&xr(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,h.paused]);return e.createElement(_e.div,Se({tabIndex:-1},s,{ref:p,onKeyDown:v}))}));function mr(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 br(e,t){for(const n of e)if(!gr(n,{upTo:t}))return n}function gr(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 xr(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 wr=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=yr(e,t),e.unshift(t)},remove(t){var n;e=yr(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function yr(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}let kr=0;function Cr(){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:Nr()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:Nr()),kr++,()=>{1===kr&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),kr--}}),[])}function Nr(){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 Sr=function(){return Sr=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},Sr.apply(this,arguments)};function _r(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 Mr(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 Or="right-scroll-bar-position",Ar="width-before-scroll-bar";function jr(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]).callback=o,i.facade;var r,o,i}function Er(e){return e}function Tr(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Er);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=Sr({async:!0,ssr:!1},e),t}var Dr=function(e){var t=e.sideCar,n=_r(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,Sr({},n))};function Fr(e,t){return e.useMedium(t),Dr}Dr.isSideCarExport=!0;var Pr=Tr(),Rr=function(){},Ir=r.forwardRef((function(e,t){var n=r.useRef(null),o=r.useState({onScrollCapture:Rr,onWheelCapture:Rr,onTouchMoveCapture:Rr}),i=o[0],a=o[1],s=e.forwardProps,l=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,v=e.inert,m=e.allowPinchZoom,b=e.as,g=void 0===b?"div":b,x=_r(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=p,y=jr([n,t]),k=Sr(Sr({},x),i);return r.createElement(r.Fragment,null,d&&r.createElement(w,{sideCar:Pr,removeScrollBar:c,shards:f,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!m,lockRef:n}),s?r.cloneElement(r.Children.only(l),Sr(Sr({},k),{ref:y})):r.createElement(g,Sr({},k,{className:u,ref:y}),l))}));Ir.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ir.classNames={fullWidth:Ar,zeroRight:Or};function zr(){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 Lr=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=zr())&&(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)}}},Br=function(){var e,t=(e=Lr(),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}},$r={left:0,top:0,right:0,gap:0},Hr=function(e){return parseInt(e||"",10)||0},Ur=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return $r;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Hr(n),Hr(r),Hr(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Wr=Br(),Vr=function(e,t,n,r){var o=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(r,";\n padding-right: ").concat(s,"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(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Or," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Ar," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Or," .").concat(Or," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Ar," .").concat(Ar," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Kr=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o,a=r.useMemo((function(){return Ur(i)}),[i]);return r.createElement(Wr,{styles:Vr(a,!t,i,n?"":"!important")})},Zr=!1;if("undefined"!=typeof window)try{var qr=Object.defineProperty({},"passive",{get:function(){return Zr=!0,!0}});window.addEventListener("test",qr,qr),window.removeEventListener("test",qr,qr)}catch(DI){Zr=!1}var Gr=!!Zr&&{passive:!1},Xr=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])},Yr=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Jr(e,n)){var r=Qr(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Jr=function(e,t){return"v"===e?function(e){return Xr(e,"overflowY")}(t):function(e){return Xr(e,"overflowX")}(t)},Qr=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},eo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},to=function(e){return[e.deltaX,e.deltaY]},no=function(e){return e&&"current"in e?e.current:e},ro=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},oo=0,io=[];var ao=Fr(Pr,(function(e){var t=r.useRef([]),n=r.useRef([0,0]),o=r.useRef(),i=r.useState(oo++)[0],a=r.useState((function(){return Br()}))[0],s=r.useRef(e);r.useEffect((function(){s.current=e}),[e]),r.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=Mr([e.lockRef.current],(e.shards||[]).map(no),!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!s.current.allowPinchZoom;var r,i=eo(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],u="deltaY"in e?e.deltaY:a[1]-i[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=Yr(d,c);if(!f)return!0;if(f?r=d:(r="v"===d?"h":"v",f=Yr(d,c)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||u)&&(o.current=r),!r)return!0;var p=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,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,f=0;do{var p=Qr(e,s),h=p[0],v=p[1]-p[2]-i*h;(h||v)&&Jr(e,s)&&(d+=v,f+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(o&&0===d||!o&&a>d)||!c&&(o&&0===f||!o&&-a>f))&&(u=!0),u}(p,t,e,"h"===p?l:u,!0)}),[]),u=r.useCallback((function(e){var n=e;if(io.length&&io[io.length-1]===a){var r="deltaY"in n?to(n):eo(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=(s.current.shards||[]).map(no).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?l(n,i[0]):!s.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=eo(e),o.current=void 0}),[]),f=r.useCallback((function(t){c(t.type,to(t),t.target,l(t,e.lockRef.current))}),[]),p=r.useCallback((function(t){c(t.type,eo(t),t.target,l(t,e.lockRef.current))}),[]);r.useEffect((function(){return io.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Gr),document.addEventListener("touchmove",u,Gr),document.addEventListener("touchstart",d,Gr),function(){io=io.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,Gr),document.removeEventListener("touchmove",u,Gr),document.removeEventListener("touchstart",d,Gr)}}),[]);var h=e.removeScrollBar,v=e.inert;return r.createElement(r.Fragment,null,v?r.createElement(a,{styles:ro(i)}):null,h?r.createElement(Kr,{gapMode:"margin"}):null)})),so=r.forwardRef((function(e,t){return r.createElement(Ir,Sr({},e,{ref:t,sideCar:ao}))}));so.classNames=Ir.classNames;var lo=so,uo=new WeakMap,co=new WeakMap,fo={},po=0,ho=function(e){return e&&(e.host||ho(e.parentNode))},vo=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=ho(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]);fo[n]||(fo[n]=new WeakMap);var i=fo[n],a=[],s=new Set,l=new Set(o),u=function(e){e&&!s.has(e)&&(s.add(e),u(e.parentNode))};o.forEach(u);var c=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))c(e);else{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(uo.get(e)||0)+1,u=(i.get(e)||0)+1;uo.set(e,l),i.set(e,u),a.push(e),1===l&&o&&co.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}}))};return c(t),s.clear(),po++,function(){a.forEach((function(e){var t=uo.get(e)-1,o=i.get(e)-1;uo.set(e,t),i.set(e,o),t||(co.has(e)||e.removeAttribute(r),co.delete(e)),o||e.removeAttribute(n)})),--po||(uo=new WeakMap,uo=new WeakMap,co=new WeakMap,fo={})}},mo=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]"))),vo(r,o,n,"aria-hidden")):function(){return null}};const bo="Dialog",[go,xo]=ye(bo),[wo,yo]=go(bo),ko=e.forwardRef(((t,n)=>{const{k:r,...o}=t,i=yo("DialogTrigger",r),a=C(n,i.triggerRef);return e.createElement(_e.button,y({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":zo(i.open)},o,{ref:a,onClick:Xe(t.onClick,i.onOpenToggle)}))})),Co="DialogPortal",[No,So]=go(Co,{forceMount:void 0}),_o="DialogOverlay",Mo=e.forwardRef(((t,n)=>{const r=So(_o,t.k),{forceMount:o=r.forceMount,...i}=t,a=yo(_o,t.k);return a.modal?e.createElement(Un,{present:o||a.open},e.createElement(Oo,y({},i,{ref:n}))):null})),Oo=e.forwardRef(((t,n)=>{const{k:r,...o}=t,i=yo(_o,r);return e.createElement(lo,{as:N,allowPinchZoom:!0,shards:[i.contentRef]},e.createElement(_e.div,y({"data-state":zo(i.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))})),Ao="DialogContent",jo=e.forwardRef(((t,n)=>{const r=So(Ao,t.k),{forceMount:o=r.forceMount,...i}=t,a=yo(Ao,t.k);return e.createElement(Un,{present:o||a.open},a.modal?e.createElement(Eo,y({},i,{ref:n})):e.createElement(To,y({},i,{ref:n})))})),Eo=e.forwardRef(((t,n)=>{const r=yo(Ao,t.k),o=e.useRef(null),i=C(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return mo(e)}),[]),e.createElement(Do,y({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xe(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=r.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()))}))})),To=e.forwardRef(((t,n)=>{const r=yo(Ao,t.k),o=e.useRef(!1),i=e.useRef(!1);return e.createElement(Do,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)||(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 s=e.target;(null===(a=r.triggerRef.current)||void 0===a?void 0:a.contains(s))&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}}))})),Do=e.forwardRef(((t,n)=>{const{k:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=yo(Ao,r),u=C(n,e.useRef(null));return Cr(),e.createElement(e.Fragment,null,e.createElement(vr,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a},e.createElement(nt,y({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":zo(l.open)},s,{ref:u,onDismiss:()=>l.onOpenChange(!1)}))),!1)})),Fo="DialogTitle",Po=e.forwardRef(((t,n)=>{const{k:r,...o}=t,i=yo(Fo,r);return e.createElement(_e.h2,y({id:i.titleId},o,{ref:n}))})),Ro=e.forwardRef(((t,n)=>{const{k:r,...o}=t,i=yo("DialogDescription",r);return e.createElement(_e.p,y({id:i.descriptionId},o,{ref:n}))})),Io=e.forwardRef(((t,n)=>{const{k:r,...o}=t,i=yo("DialogClose",r);return e.createElement(_e.button,y({type:"button"},o,{ref:n,onClick:Xe(t.onClick,(()=>i.onOpenChange(!1)))}))}));function zo(e){return e?"open":"closed"}const[Lo,Bo]=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:Ao,titleName:Fo,docsSlug:"dialog"}),$o=t=>{const{k:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),u=e.useRef(null),[c=!1,d]=Vn({prop:o,defaultProp:i,onChange:a});return e.createElement(wo,{scope:n,triggerRef:l,contentRef:u,contentId:ut(),titleId:ut(),descriptionId:ut(),open:c,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:s},r)},Ho=ko,Uo=t=>{const{k:n,forceMount:r,children:o,container:i}=t,a=yo(Co,n);return e.createElement(No,{scope:n,forceMount:r},e.Children.map(o,(t=>e.createElement(Un,{present:r||a.open},e.createElement(Hn,{asChild:!0,container:i},t)))))},Wo=Mo,Vo=jo,Ko=Po,Zo=Ro,qo=Io;function Go(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 Xo=["color"],Yo=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Go(t,Xo);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"}))})),Jo=["color"],Qo=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Go(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:"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"}))})),ei=["color"],ti=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Go(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:o,fillRule:"evenodd",clipRule:"evenodd"}))})),ni=["color"],ri=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Go(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:o,fillRule:"evenodd",clipRule:"evenodd"}))})),oi=["color"],ii=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Go(t,oi);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"}))})),ai=["color"],si=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Go(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:o}))})),li=["color"],ui=e.forwardRef((function(t,n){var r=t.color,o=void 0===r?"currentColor":r,i=Go(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:o,fillRule:"evenodd",clipRule:"evenodd"}))}));function ci(t){const n=t+"CollectionProvider",[r,o]=ye(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=t+"CollectionSlot",l=t+"CollectionItemSlot",u="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=C(n,a(s,r).collectionRef);return e.createElement(N,{ref:i},o)})),ItemSlot:e.forwardRef(((t,n)=>{const{scope:r,children:o,...i}=t,s=e.useRef(null),c=C(n,s),d=a(l,r);return e.useEffect((()=>(d.itemMap.set(s,{ref:s,...i}),()=>{d.itemMap.delete(s)}))),e.createElement(N,{[u]:"",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(`[${u}]`)),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 di="Collapsible",[fi,pi]=ye(di),[hi,vi]=fi(di),mi=e.forwardRef(((t,n)=>{const{C:r,open:o,defaultOpen:i,disabled:a,onOpenChange:s,...l}=t,[u=!1,c]=Vn({prop:o,defaultProp:i,onChange:s});return e.createElement(hi,{scope:r,disabled:a,contentId:ut(),open:u,onOpenToggle:e.useCallback((()=>c((e=>!e))),[c])},e.createElement(_e.div,Se({"data-state":yi(u),"data-disabled":a?"":void 0},l,{ref:n})))})),bi=e.forwardRef(((t,n)=>{const{C:r,...o}=t,i=vi("CollapsibleTrigger",r);return e.createElement(_e.button,Se({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},o,{ref:n,onClick:Xe(t.onClick,i.onOpenToggle)}))})),gi="CollapsibleContent",xi=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=vi(gi,t.C);return e.createElement(Un,{present:r||i.open},(({present:t})=>e.createElement(wi,Se({},o,{ref:n,present:t}))))})),wi=e.forwardRef(((t,n)=>{const{C:r,present:o,children:i,...a}=t,s=vi(gi,r),[l,u]=e.useState(o),c=e.useRef(null),d=C(n,c),f=e.useRef(0),p=f.current,h=e.useRef(0),v=h.current,m=s.open||l,b=e.useRef(m),g=e.useRef();return e.useEffect((()=>{const e=requestAnimationFrame((()=>b.current=!1));return()=>cancelAnimationFrame(e)}),[]),Ne((()=>{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,h.current=t.width,b.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationName=g.current.animationName),u(o)}}),[s.open,o]),e.createElement(_e.div,Se({"data-state":yi(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m},a,{ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style}}),m&&i)}));function yi(e){return e?"open":"closed"}const ki=mi,Ci=bi,Ni=xi,Si=e.createContext(void 0);function _i(t){const n=e.useContext(Si);return t||n||"ltr"}const Mi="Accordion",Oi=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ai,ji,Ei]=ci(Mi),[Ti,Di]=ye(Mi,[Ei,pi]),Fi=pi();e.forwardRef(((t,n)=>{const{type:r,...o}=t,i=o,a=o;return e.createElement(Ai.Provider,{scope:t.N},"multiple"===r?e.createElement(Bi,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[Pi,Ri]=Ti(Mi),[Ii,zi]=Ti(Mi,{collapsible:!1}),Li=e.forwardRef(((t,n)=>{const{value:r,defaultValue:o,onValueChange:i=(()=>{}),collapsible:a=!1,...s}=t,[l,u]=Vn({prop:r,defaultProp:o,onChange:i});return e.createElement(Pi,{scope:t.N,value:l?[l]:[],onItemOpen:u,onItemClose:e.useCallback((()=>a&&u("")),[a,u])},e.createElement(Ii,{scope:t.N,collapsible:a},e.createElement(Ui,y({},s,{ref:n}))))})),Bi=e.forwardRef(((t,n)=>{const{value:r,defaultValue:o,onValueChange:i=(()=>{}),...a}=t,[s=[],l]=Vn({prop:r,defaultProp:o,onChange:i}),u=e.useCallback((e=>l(((t=[])=>[...t,e]))),[l]),c=e.useCallback((e=>l(((t=[])=>t.filter((t=>t!==e))))),[l]);return e.createElement(Pi,{scope:t.N,value:s,onItemOpen:u,onItemClose:c},e.createElement(Ii,{scope:t.N,collapsible:!0},e.createElement(Ui,y({},a,{ref:n}))))})),[$i,Hi]=Ti(Mi),Ui=e.forwardRef(((t,n)=>{const{N:r,disabled:o,dir:i,orientation:a="vertical",...s}=t,l=C(e.useRef(null),n),u=ji(r),c="ltr"===_i(i),d=Xe(t.onKeyDown,(e=>{var t;if(!Oi.includes(e.key))return;const n=e.target,r=u().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 s=o;const l=i-1,d=()=>{s=o+1,s>l&&(s=0)},f=()=>{s=o-1,s<0&&(s=l)};switch(e.key){case"Home":s=0;break;case"End":s=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[s%i].ref.current)||void 0===t||t.focus()}));return e.createElement($i,{scope:r,disabled:o,direction:i,orientation:a},e.createElement(Ai.Slot,{scope:r},e.createElement(_e.div,y({},s,{"data-orientation":a,ref:l,onKeyDown:o?void 0:d}))))})),Wi="AccordionItem",[Vi,Ki]=Ti(Wi),Zi="AccordionTrigger";function qi(e){return e?"open":"closed"}const Gi=e.forwardRef(((t,n)=>{const{N:r,value:o,...i}=t,a=Hi(Wi,r),s=Ri(Wi,r),l=Fi(r),u=ut(),c=o&&s.value.includes(o)||!1,d=a.disabled||t.disabled;return e.createElement(Vi,{scope:r,open:c,disabled:d,triggerId:u},e.createElement(ki,y({"data-orientation":a.orientation,"data-state":qi(c)},l,i,{ref:n,disabled:d,open:c,onOpenChange:e=>{e?s.onItemOpen(o):s.onItemClose(o)}})))})),Xi=e.forwardRef(((t,n)=>{const{N:r,...o}=t,i=Hi(Mi,r),a=Ki("AccordionHeader",r);return e.createElement(_e.h3,y({"data-orientation":i.orientation,"data-state":qi(a.open),"data-disabled":a.disabled?"":void 0},o,{ref:n}))})),Yi=e.forwardRef(((t,n)=>{const{N:r,...o}=t,i=Hi(Mi,r),a=Ki(Zi,r),s=zi(Zi,r),l=Fi(r);return e.createElement(Ai.ItemSlot,{scope:r},e.createElement(Ci,y({"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId},l,o,{ref:n})))})),Ji=e.forwardRef(((t,n)=>{const{N:r,...o}=t,i=Hi(Mi,r),a=Ki("AccordionContent",r),s=Fi(r);return e.createElement(Ni,y({role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation},s,o,{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",[xo]),ta=xo(),na=e.forwardRef(((t,n)=>{const{S:r,...o}=t,i=ta(r);return e.createElement(Ho,y({},i,o,{ref:n}))})),ra=e.forwardRef(((t,n)=>{const{S:r,...o}=t,i=ta(r);return e.createElement(Wo,y({},i,o,{ref:n}))})),oa="AlertDialogContent",[ia,aa]=Qi(oa),sa=e.forwardRef(((t,n)=>{const{S:r,children:o,...i}=t,a=ta(r),s=C(n,e.useRef(null)),l=e.useRef(null);return e.createElement(Lo,{contentName:oa,titleName:la,docsSlug:"alert-dialog"},e.createElement(ia,{scope:r,cancelRef:l},e.createElement(Vo,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(_,null,o),!1)))})),la="AlertDialogTitle",ua=e.forwardRef(((t,n)=>{const{S:r,...o}=t,i=ta(r);return e.createElement(Ko,y({},i,o,{ref:n}))})),ca=e.forwardRef(((t,n)=>{const{S:r,...o}=t,i=ta(r);return e.createElement(Zo,y({},i,o,{ref:n}))})),da=t=>{const{S:n,...r}=t,o=ta(n);return e.createElement($o,y({},o,r,{modal:!0}))},fa=na,pa=t=>{const{S:n,...r}=t,o=ta(n);return e.createElement(Uo,y({},o,r))},ha=ra,va=sa,ma=e.forwardRef(((t,n)=>{const{S:r,...o}=t,i=ta(r);return e.createElement(qo,y({},i,o,{ref:n}))})),ba=e.forwardRef(((t,n)=>{const{S:r,...o}=t,{cancelRef:i}=aa("AlertDialogCancel",r),a=ta(r),s=C(n,i);return e.createElement(qo,y({},a,o,{ref:s}))})),ga=ua,xa=ca;var wa,ya=function(){return ya=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},ya.apply(this,arguments)},ka=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 r=function(){var t=e.useContext(ka);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 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"}(wa||(wa={})),wa.Selected,wa.Disabled,wa.Hidden,wa.Today,wa.RangeEnd,wa.RangeMiddle,wa.RangeStart,wa.Outside,e.createContext(void 0),e.createContext(void 0),e.createContext(void 0);const Na="Checkbox",[Sa,_a]=ye(Na),[Ma,Oa]=Sa(Na),Aa=e.forwardRef(((t,n)=>{const{_:r,name:o,checked:i,defaultChecked:a,required:s,disabled:l,value:u="on",onCheckedChange:c,...d}=t,[f,p]=e.useState(null),h=C(n,(e=>p(e))),v=e.useRef(!1),m=!f||Boolean(f.closest("form")),[b=!1,g]=Vn({prop:i,defaultProp:a,onChange:c}),x=e.useRef(b);return e.useEffect((()=>{const e=null==f?void 0:f.form;if(e){const t=()=>g(x.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,g]),e.createElement(Ma,{scope:r,state:b,disabled:l},e.createElement(_e.button,y({type:"button",role:"checkbox","aria-checked":Ea(b)?"mixed":b,"aria-required":s,"data-state":Ta(b),"data-disabled":l?"":void 0,disabled:l,value:u},d,{ref:h,onKeyDown:Xe(t.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:Xe(t.onClick,(e=>{g((e=>!!Ea(e)||!e)),m&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())}))})),m&&e.createElement(ja,{control:f,bubbles:!v.current,name:o,value:u,checked:b,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))})),ja=t=>{const{control:n,checked:r,bubbles:o=!0,...i}=t,a=e.useRef(null),s=Ca(r),l=_n(n);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==r&&n){const t=new Event("click",{bubbles:o});e.indeterminate=Ea(r),n.call(e,!Ea(r)&&r),e.dispatchEvent(t)}}),[s,r,o]),e.createElement("input",y({type:"checkbox","aria-hidden":!0,defaultChecked:!Ea(r)&&r},i,{tabIndex:-1,ref:a,style:{...t.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Ea(e){return"indeterminate"===e}function Ta(e){return Ea(e)?"indeterminate":e?"checked":"unchecked"}const Da=Aa,Fa=e.forwardRef(((t,n)=>{const{_:r,forceMount:o,...i}=t,a=Oa("CheckboxIndicator",r);return e.createElement(Un,{present:o||Ea(a.state)||!0===a.state},e.createElement(_e.span,y({"data-state":Ta(a.state),"data-disabled":a.disabled?"":void 0},i,{ref:n,style:{pointerEvents:"none",...t.style}})))}));function Pa(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 Ra(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Ia(...t){return e.useCallback(Ra(...t),t)}function za(...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 La=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{},Ba=r["useId".toString()]||(()=>{});let $a=0;function Ha(e){const[t,n]=r.useState(Ba());return La((()=>{e||n((e=>null!=e?e:String($a++)))}),[e]),e||(t?`radix-${t}`:"")}function Ua(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 Wa({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=Ua(n);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==t,s=a?t:o,l=Ua(r);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:r,...o}=t,i=e.Children.toArray(r),a=i.find(qa);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(Ka,Se({},o,{ref:n}),e.isValidElement(t)?e.cloneElement(t,void 0,r):null)}return e.createElement(Ka,Se({},o,{ref:n}),r)}));Va.displayName="Slot";const Ka=e.forwardRef(((t,n)=>{const{children:r,...o}=t;return e.isValidElement(r)?e.cloneElement(r,{...Ga(o,r.props),ref:Ra(n,r.ref)}):e.Children.count(r)>1?e.Children.only(null):null}));Ka.displayName="SlotClone";const Za=({children:t})=>e.createElement(e.Fragment,null,t);function qa(t){return e.isValidElement(t)&&t.type===Za}function Ga(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 Xa=["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?Va:n;return e.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.createElement(a,Se({},i,{ref:r}))}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});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:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=t,c=e.useContext(ts),[d,f]=e.useState(null),[,p]=e.useState({}),h=Ia(n,(e=>f(e))),v=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(m),g=d?v.indexOf(d):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,w=g>=b,y=function(t){const n=Ua(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(){os(Ja,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==s||s(e),e.defaultPrevented||null==l||l())})),k=function(t){const n=Ua(t),r=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!r.current){os(Qa,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==s||s(e),e.defaultPrevented||null==l||l())}));return function(t){const n=Ua(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&&(es=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),rs(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(document.body.style.pointerEvents=es)}}),[d,r,c]),e.useEffect((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),rs())}),[d,c]),e.useEffect((()=>{const e=()=>p({});return document.addEventListener(Ya,e),()=>document.removeEventListener(Ya,e)}),[]),e.createElement(Xa.div,Se({},u,{ref:h,style:{pointerEvents:x?w?"auto":"none":void 0,...t.style},onFocusCapture:Pa(t.onFocusCapture,k.onFocusCapture),onBlurCapture:Pa(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Pa(t.onPointerDownCapture,y.onPointerDownCapture)}))}));function rs(){const e=new CustomEvent(Ya);document.dispatchEvent(e)}function os(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 is="focusScope.autoFocusOnMount",as="focusScope.autoFocusOnUnmount",ss={bubbles:!1,cancelable:!0},ls=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[l,u]=e.useState(null),c=Ua(i),d=Ua(a),f=e.useRef(null),p=Ia(n,(e=>u(e))),h=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){function e(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:fs(f.current,{select:!0})}function t(e){!h.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)}}}),[o,l,h.paused]),e.useEffect((()=>{if(l){ps.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(is,ss);l.addEventListener(is,c),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(fs(r,{select:t}),document.activeElement!==n)return}((e=us(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&fs(l))}return()=>{l.removeEventListener(is,c),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(h)}),0)}}var e}),[l,c,d,h]);const v=e.useCallback((e=>{if(!r&&!o)return;if(h.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=us(e),n=cs(t,e),r=cs(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&fs(i,{select:!0})):(e.preventDefault(),r&&fs(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,h.paused]);return e.createElement(Xa.div,Se({tabIndex:-1},s,{ref:p,onKeyDown:v}))}));function us(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 cs(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=hs(e,t),e.unshift(t)},remove(t){var n;e=hs(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function hs(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const vs=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(Xa.div,Se({},a,{ref:r})),i):null}));const ms=n=>{const{present:r,children:o}=n,i=function(n){const[r,o]=e.useState(),i=e.useRef({}),a=e.useRef(n),s=e.useRef("none"),l=n?"mounted":"unmounted",[u,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=bs(i.current);s.current="mounted"===u?e:"none"}),[u]),La((()=>{const e=i.current,t=a.current;if(t!==n){const r=s.current,o=bs(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]),La((()=>{if(r){const e=e=>{const n=bs(i.current).includes(e.animationName);e.target===r&&n&&t.flushSync((()=>c("ANIMATION_END")))},n=e=>{e.target===r&&(s.current=bs(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(u),ref:e.useCallback((e=>{e&&(i.current=getComputedStyle(e)),o(e)}),[])}}(r),a="function"==typeof o?o({present:i.isPresent}):e.Children.only(o),s=Ia(i.ref,a.ref);return"function"==typeof o||i.isPresent?e.cloneElement(a,{ref:s}):null};function bs(e){return(null==e?void 0:e.animationName)||"none"}ms.displayName="Presence";let gs=0;function xs(){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 ws=Tr(),ys=function(){},ks=r.forwardRef((function(e,t){var n=r.useRef(null),o=r.useState({onScrollCapture:ys,onWheelCapture:ys,onTouchMoveCapture:ys}),i=o[0],a=o[1],s=e.forwardProps,l=e.children,u=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,h=e.noIsolation,v=e.inert,m=e.allowPinchZoom,b=e.as,g=void 0===b?"div":b,x=_r(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=p,y=jr([n,t]),k=Sr(Sr({},x),i);return r.createElement(r.Fragment,null,d&&r.createElement(w,{sideCar:ws,removeScrollBar:c,shards:f,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!m,lockRef:n}),s?r.cloneElement(r.Children.only(l),Sr(Sr({},k),{ref:y})):r.createElement(g,Sr({},k,{className:u,ref:y}),l))}));ks.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ks.classNames={fullWidth:Ar,zeroRight:Or};var Cs=!1;if("undefined"!=typeof window)try{var Ns=Object.defineProperty({},"passive",{get:function(){return Cs=!0,!0}});window.addEventListener("test",Ns,Ns),window.removeEventListener("test",Ns,Ns)}catch(DI){Cs=!1}var Ss=!!Cs&&{passive:!1},_s=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Ms(e,n)){var r=Os(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Ms=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)},Os=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},As=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},js=function(e){return[e.deltaX,e.deltaY]},Es=function(e){return e&&"current"in e?e.current:e},Ts=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Ds=0,Fs=[];var Ps=Fr(ws,(function(e){var t=r.useRef([]),n=r.useRef([0,0]),o=r.useRef(),i=r.useState(Ds++)[0],a=r.useState((function(){return Br()}))[0],s=r.useRef(e);r.useEffect((function(){s.current=e}),[e]),r.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=Mr([e.lockRef.current],(e.shards||[]).map(Es),!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!s.current.allowPinchZoom;var r,i=As(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],u="deltaY"in e?e.deltaY:a[1]-i[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=_s(d,c);if(!f)return!0;if(f?r=d:(r="v"===d?"h":"v",f=_s(d,c)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||u)&&(o.current=r),!r)return!0;var p=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,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,f=0;do{var p=Os(e,s),h=p[0],v=p[1]-p[2]-i*h;(h||v)&&Ms(e,s)&&(d+=v,f+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(o&&0===d||!o&&a>d)||!c&&(o&&0===f||!o&&-a>f))&&(u=!0),u}(p,t,e,"h"===p?l:u,!0)}),[]),u=r.useCallback((function(e){var n=e;if(Fs.length&&Fs[Fs.length-1]===a){var r="deltaY"in n?js(n):As(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=(s.current.shards||[]).map(Es).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?l(n,i[0]):!s.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=As(e),o.current=void 0}),[]),f=r.useCallback((function(t){c(t.type,js(t),t.target,l(t,e.lockRef.current))}),[]),p=r.useCallback((function(t){c(t.type,As(t),t.target,l(t,e.lockRef.current))}),[]);r.useEffect((function(){return Fs.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Ss),document.addEventListener("touchmove",u,Ss),document.addEventListener("touchstart",d,Ss),function(){Fs=Fs.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,Ss),document.removeEventListener("touchmove",u,Ss),document.removeEventListener("touchstart",d,Ss)}}),[]);var h=e.removeScrollBar,v=e.inert;return r.createElement(r.Fragment,null,v?r.createElement(a,{styles:Ts(i)}):null,h?r.createElement(Kr,{gapMode:"margin"}):null)})),Rs=r.forwardRef((function(e,t){return r.createElement(ks,Sr({},e,{ref:t,sideCar:Ps}))}));Rs.classNames=ks.classNames;var Is=Rs;const zs="Dialog",[Ls,Bs]=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 s(n){const{scope:r,children:o,...s}=n,l=(null==r?void 0:r[t][a])||i,u=e.useMemo((()=>s),Object.values(s));return e.createElement(l.Provider,{value:u},o)}return r=[...r,o],s.displayName=n+"Provider",[s,function(r,s){const l=(null==s?void 0:s[t][a])||i,u=e.useContext(l);if(u)return u;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},za(o,...n)]}(zs),[$s,Hs]=Ls(zs),Us="DialogPortal",[Ws,Vs]=Ls(Us,{forceMount:void 0}),Ks="DialogOverlay",Zs=e.forwardRef(((t,n)=>{const r=Vs(Ks,t.k),{forceMount:o=r.forceMount,...i}=t,a=Hs(Ks,t.k);return a.modal?e.createElement(ms,{present:o||a.open},e.createElement(qs,Se({},i,{ref:n}))):null})),qs=e.forwardRef(((t,n)=>{const{k:r,...o}=t,i=Hs(Ks,r);return e.createElement(Is,{as:Va,allowPinchZoom:!0,shards:[i.contentRef]},e.createElement(Xa.div,Se({"data-state":el(i.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))})),Gs="DialogContent",Xs=e.forwardRef(((t,n)=>{const r=Vs(Gs,t.k),{forceMount:o=r.forceMount,...i}=t,a=Hs(Gs,t.k);return e.createElement(ms,{present:o||a.open},a.modal?e.createElement(Ys,Se({},i,{ref:n})):e.createElement(Js,Se({},i,{ref:n})))})),Ys=e.forwardRef(((t,n)=>{const r=Hs(Gs,t.k),o=e.useRef(null),i=Ia(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return mo(e)}),[]),e.createElement(Qs,Se({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Pa(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Pa(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:Pa(t.onFocusOutside,(e=>e.preventDefault()))}))})),Js=e.forwardRef(((t,n)=>{const r=Hs(Gs,t.k),o=e.useRef(!1);return e.createElement(Qs,Se({},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()}}))})),Qs=e.forwardRef(((t,n)=>{const{k:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=Hs(Gs,r),u=Ia(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:xs()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:xs()),gs++,()=>{1===gs&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),gs--}}),[]),e.createElement(e.Fragment,null,e.createElement(ls,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a},e.createElement(ns,Se({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":el(l.open)},s,{ref:u,onDismiss:()=>l.onOpenChange(!1)}))),!1)}));function el(e){return e?"open":"closed"}const tl=t=>{const{k:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),u=e.useRef(null),[c=!1,d]=Wa({prop:o,defaultProp:i,onChange:a});return e.createElement($s,{scope:n,triggerRef:l,contentRef:u,contentId:Ha(),titleId:Ha(),descriptionId:Ha(),open:c,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:s},r)},nl=t=>{const{k:n,forceMount:r,children:o,container:i}=t,a=Hs(Us,n);return e.createElement(Ws,{scope:n,forceMount:r},e.Children.map(o,(t=>e.createElement(ms,{present:r||a.open},e.createElement(vs,{asChild:!0,container:i},t)))))},rl=Zs,ol=Xs;var il="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function al(e){return e&&e.M&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sl=1,ll=.9,ul=.3,cl=.1,dl=0,fl=.999,pl=.9999,hl=.99,vl=/[\\\/\-_+.# \t"@\[\(\{&]/,ml=/[\\\/\-_+.# \t"@\[\(\{&]/g;function bl(e,t,n,r,o,i){if(i===t.length)return o===e.length?sl:hl;for(var a,s,l,u=r.charAt(i),c=n.indexOf(u,o),d=0;c>=0;)(a=bl(e,t,n,r,c+1,i+1))>d&&(c===o?a*=sl:vl.test(e.charAt(c-1))?(a*=ll,(l=e.slice(o,c-1).match(ml))&&o>0&&(a*=Math.pow(fl,l.length))):vl.test(e.slice(o,c-1))?(a*=dl,o>0&&(a*=Math.pow(fl,c-o))):(a*=ul,o>0&&(a*=Math.pow(fl,c-o))),e.charAt(c)!==t.charAt(i)&&(a*=pl)),a<cl&&n.charAt(c-1)===r.charAt(i+1)&&n.charAt(c-1)!==r.charAt(i)&&(s=bl(e,t,n,r,c+1,i+2))*cl>a&&(a=s*cl),a>d&&(d=a),c=n.indexOf(u,c+1);return d}var gl=al((function(e,t){return bl(e,t,e.toLowerCase(),t.toLowerCase(),0,0)})),xl='[cmdk-group=""]',wl='[cmdk-group-items=""]',yl='[cmdk-item=""]',kl=`${yl}:not([aria-disabled="true"])`,Cl="cmdk-item-select",Nl="data-value",Sl=(e,t)=>gl(e,t),_l=r.createContext(void 0),Ml=()=>r.useContext(_l),Ol=r.createContext(void 0),Al=()=>r.useContext(Ol),jl=r.createContext(void 0),El=r.forwardRef(((e,t)=>{let n=r.useRef(null),o=Vl((()=>({search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}}))),i=Vl((()=>new Set)),a=Vl((()=>new Map)),s=Vl((()=>new Map)),l=Vl((()=>new Set)),u=Ul(e),{label:c,children:d,value:f,onValueChange:p,filter:h,shouldFilter:v,...m}=e,b=r.useId(),g=r.useId(),x=r.useId(),w=Gl();Wl((()=>{if(void 0!==f){let e=f.trim().toLowerCase();o.current.value=e,w(6,M),y.emit()}}),[f]);let y=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(),w(1,S);else if("value"===e){if(void 0!==(null==(r=u.current)?void 0:r.value))return void(null==(a=(i=u.current).onValueChange)||a.call(i,t));n||w(5,M)}y.emit()}},emit:()=>{l.current.forEach((e=>e()))}})),[]),k=r.useMemo((()=>({value:(e,t)=>{t!==s.current.get(e)&&(s.current.set(e,t),o.current.filtered.items.set(e,C(t)),w(2,(()=>{N(),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]))),w(3,(()=>{_(),N(),o.current.value||S(),y.emit()})),()=>{s.current.delete(e),i.current.delete(e),o.current.filtered.items.delete(e),w(4,(()=>{_(),S(),y.emit()}))}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{s.current.delete(e),a.current.delete(e)}),filter:()=>u.current.shouldFilter,label:c||e["aria-label"],listId:b,inputId:x,labelId:g})),[]);function C(e){var t;let n=(null==(t=u.current)?void 0:t.filter)??Sl;return e?n(e,o.current.search):0}function N(){if(!n.current||!o.current.search||!1===u.current.shouldFilter)return;let e=o.current.filtered.items,t=[];o.current.filtered.groups.forEach((n=>{let r=a.current.get(n),o=0;r.forEach((t=>{let n=e.get(t);o=Math.max(n,o)})),t.push([n,o])}));let r=n.current.querySelector('[cmdk-list-sizer=""]');A().sort(((t,n)=>{let r=t.getAttribute(Nl),o=n.getAttribute(Nl);return(e.get(o)??0)-(e.get(r)??0)})).forEach((e=>{let t=e.closest(wl);t?t.appendChild(e.parentElement===t?e:e.closest(`${wl} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${wl} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=n.current.querySelector(`${xl}[${Nl}="${e[0]}"]`);null==t||t.parentElement.appendChild(t)}))}function S(){let e=A().find((e=>!e.ariaDisabled)),t=null==e?void 0:e.getAttribute(Nl);y.setState("value",t||void 0)}function _(){if(!o.current.search||!1===u.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=C(s.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=O();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(xl))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function O(){return n.current.querySelector(`${yl}[aria-selected="true"]`)}function A(){return Array.from(n.current.querySelectorAll(kl))}function j(e){let t=A()[e];t&&y.setState("value",t.getAttribute(Nl))}function E(e){var t;let n=O(),r=A(),o=r.findIndex((e=>e===n)),i=r[o+e];null!=(t=u.current)&&t.loop&&(i=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),i&&y.setState("value",i.getAttribute(Nl))}function T(e){let t,n=O(),r=null==n?void 0:n.closest(xl);for(;r&&!t;)r=e>0?$l(r,xl):Hl(r,xl),t=null==r?void 0:r.querySelector(kl);t?y.setState("value",t.getAttribute(Nl)):E(e)}let D=()=>j(A().length-1),F=e=>{e.preventDefault(),e.metaKey?D():e.altKey?T(1):E(1)},P=e=>{e.preventDefault(),e.metaKey?j(0):e.altKey?T(-1):E(-1)};return r.createElement("div",{ref:Kl([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&&F(e);break;case"ArrowDown":F(e);break;case"p":case"k":e.ctrlKey&&P(e);break;case"ArrowUp":P(e);break;case"Home":e.preventDefault(),j(0);break;case"End":e.preventDefault(),D();break;case"Enter":{e.preventDefault();let t=O();if(t){let e=new Event(Cl);t.dispatchEvent(e)}}}}},r.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:Xl},c),r.createElement(Ol.Provider,{value:y},r.createElement(_l.Provider,{value:k},d)))})),Tl=r.forwardRef(((e,t)=>{let n=r.useId(),o=r.useRef(null),i=r.useContext(jl),a=Ml(),s=Ul(e);Wl((()=>a.item(n,i)),[]);let l=ql(n,o,[e.value,e.children,o]),u=Al(),c=Zl((e=>e.value&&e.value===l.current)),d=Zl((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(r.useEffect((()=>{let t=o.current;if(t&&!e.disabled)return t.addEventListener(Cl,f),()=>t.removeEventListener(Cl,f)}),[d,e.onSelect,e.disabled]),!d)return null;let{disabled:p,value:h,onSelect:v,...m}=e;return r.createElement("div",{ref:Kl([o,t]),...m,"cmdk-item":"",role:"option","aria-disabled":p||void 0,"aria-selected":c||void 0,"data-selected":c||void 0,onPointerMove:p?void 0:function(){u.setState("value",l.current,!0)},onClick:p?void 0:f},e.children)})),Dl=r.forwardRef(((e,t)=>{let{heading:n,children:o,...i}=e,a=r.useId(),s=r.useRef(null),l=r.useRef(null),u=r.useId(),c=Ml(),d=Zl((e=>!1===c.filter()||(!e.search||e.filtered.groups.has(a))));Wl((()=>c.group(a)),[]),ql(a,s,[e.value,e.heading,l]);let f=r.createElement(jl.Provider,{value:a},o);return r.createElement("div",{ref:Kl([s,t]),...i,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&r.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),r.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},f))})),Fl=r.forwardRef(((e,t)=>{let{alwaysRender:n,...o}=e,i=r.useRef(null),a=Zl((e=>!e.search));return n||a?r.createElement("div",{ref:Kl([i,t]),...o,"cmdk-separator":"",role:"separator"}):null})),Pl=r.forwardRef(((e,t)=>{let{onValueChange:n,...o}=e,i=null!=e.value,a=Al(),s=Zl((e=>e.search)),l=Ml();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:s,onChange:e=>{i||a.setState("search",e.target.value),null==n||n(e.target.value)}})})),Rl=r.forwardRef(((e,t)=>{let{children:n,...o}=e,i=r.useRef(null),a=r.useRef(null),s=Ml();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:Kl([i,t]),...o,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:s.listId,"aria-labelledby":s.inputId},r.createElement("div",{ref:a,"cmdk-list-sizer":""},n))})),Il=r.forwardRef(((e,t)=>{let{open:n,onOpenChange:o,container:i,...a}=e;return r.createElement(tl,{open:n,onOpenChange:o},r.createElement(nl,{container:i},r.createElement(rl,{"cmdk-overlay":""}),r.createElement(ol,{"aria-label":e.label,"cmdk-dialog":""},r.createElement(El,{ref:t,...a}))))})),zl=r.forwardRef(((e,t)=>{let n=r.useRef(!0),o=Zl((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"})})),Ll=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))})),Bl=Object.assign(El,{List:Rl,Item:Tl,Input:Pl,Group:Dl,Separator:Fl,Dialog:Il,Empty:zl,Loading:Ll});function $l(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Hl(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Ul(e){let t=r.useRef(e);return Wl((()=>{t.current=e})),t}var Wl=typeof window>"u"?r.useEffect:r.useLayoutEffect;function Vl(e){let t=r.useRef();return void 0===t.current&&(t.current=e()),t}function Kl(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function Zl(e){let t=Al(),n=()=>e(t.snapshot());return r.useSyncExternalStore(t.subscribe,n,n)}function ql(e,t,n){let o=r.useRef(),i=Ml();return Wl((()=>{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(Nl,a),o.current=a})),o}var Gl=()=>{let[e,t]=r.useState(),n=Vl((()=>new Map));return Wl((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}},Xl={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Yl="rovingFocusGroup.onEntryFocus",Jl={bubbles:!1,cancelable:!0},Ql="RovingFocusGroup",[eu,tu,nu]=ci(Ql),[ru,ou]=ye(Ql,[nu]),[iu,au]=ru(Ql),su=e.forwardRef(((t,n)=>e.createElement(eu.Provider,{scope:t.O},e.createElement(eu.Slot,{scope:t.O},e.createElement(lu,Se({},t,{ref:n})))))),lu=e.forwardRef(((t,n)=>{const{O:r,orientation:o,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,...d}=t,f=e.useRef(null),p=C(n,f),h=_i(a),[v=null,m]=Vn({prop:s,defaultProp:l,onChange:u}),[b,g]=e.useState(!1),x=Ce(c),w=tu(r),y=e.useRef(!1),[k,N]=e.useState(0);return e.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(Yl,x),()=>e.removeEventListener(Yl,x)}),[x]),e.createElement(iu,{scope:r,orientation:o,dir:h,loop:i,currentTabStopId:v,onItemFocus:e.useCallback((e=>m(e)),[m]),onItemShiftTab:e.useCallback((()=>g(!0)),[]),onFocusableItemAdd:e.useCallback((()=>N((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>N((e=>e-1))),[])},e.createElement(_e.div,Se({tabIndex:b||0===k?-1:0,"data-orientation":o},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&&!b){const t=new CustomEvent(Yl,Jl);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));du([e.find((e=>e.active)),e.find((e=>e.id===v)),...e].filter(Boolean).map((e=>e.ref.current)))}}y.current=!1})),onBlur:Xe(t.onBlur,(()=>g(!1)))})))})),uu=e.forwardRef(((t,n)=>{const{O:r,focusable:o=!0,active:i=!1,tabStopId:a,...s}=t,l=ut(),u=a||l,c=au("RovingFocusGroupItem",r),d=c.currentTabStopId===u,f=tu(r),{onFocusableItemAdd:p,onFocusableItemRemove:h}=c;return e.useEffect((()=>{if(o)return p(),()=>h()}),[o,p,h]),e.createElement(eu.ItemSlot,{scope:r,id:u,focusable:o,active:i},e.createElement(_e.span,Se({tabIndex:d?0:-1,"data-orientation":c.orientation},s,{ref:n,onMouseDown:Xe(t.onMouseDown,(e=>{o?c.onItemFocus(u):e.preventDefault()})),onFocus:Xe(t.onFocus,(()=>c.onItemFocus(u))),onKeyDown:Xe(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:cu[r]}(e,c.orientation,c.dir);if(void 0!==t){e.preventDefault();let o=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=c.loop?(r=i+1,(n=o).map(((e,t)=>n[(r+t)%n.length]))):o.slice(i+1)}setTimeout((()=>du(o)))}var n,r}))})))})),cu={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function du(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}const fu=su,pu=uu,hu=["Enter"," "],vu=["ArrowUp","PageDown","End"],mu=["ArrowDown","PageUp","Home",...vu],bu={ltr:[...hu,"ArrowRight"],rtl:[...hu,"ArrowLeft"]},gu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xu="Menu",[wu,yu,ku]=ci(xu),[Cu,Nu]=ye(xu,[ku,An,ou]),Su=An(),_u=ou(),[Mu,Ou]=Cu(xu),[Au,ju]=Cu(xu),Eu=e.forwardRef(((t,n)=>{const{A:r,...o}=t,i=Su(r);return e.createElement(Bn,Se({},i,o,{ref:n}))})),Tu="MenuPortal",[Du,Fu]=Cu(Tu,{forceMount:void 0}),Pu="MenuContent",[Ru,Iu]=Cu(Pu),zu=e.forwardRef(((t,n)=>{const r=Fu(Pu,t.A),{forceMount:o=r.forceMount,...i}=t,a=Ou(Pu,t.A),s=ju(Pu,t.A);return e.createElement(wu.Provider,{scope:t.A},e.createElement(Un,{present:o||a.open},e.createElement(wu.Slot,{scope:t.A},s.modal?e.createElement(Lu,Se({},i,{ref:n})):e.createElement(Bu,Se({},i,{ref:n})))))})),Lu=e.forwardRef(((t,n)=>{const r=Ou(Pu,t.A),o=e.useRef(null),i=C(n,o);return e.useEffect((()=>{const e=o.current;if(e)return mo(e)}),[]),e.createElement($u,Se({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Xe(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))})),Bu=e.forwardRef(((t,n)=>{const r=Ou(Pu,t.A);return e.createElement($u,Se({},t,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)}))})),$u=e.forwardRef(((t,n)=>{const{A:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,disableOutsideScroll:v,...m}=t,b=Ou(Pu,r),g=ju(Pu,r),x=Su(r),w=_u(r),y=yu(r),[k,S]=e.useState(null),_=e.useRef(null),M=C(n,_,b.onContentChange),O=e.useRef(0),A=e.useRef(""),j=e.useRef(0),E=e.useRef(null),T=e.useRef("right"),D=e.useRef(0),F=v?lo:e.Fragment,P=v?{as:N,allowPinchZoom:!0}:void 0,R=e=>{var t,n;const r=A.current+e,o=y().filter((e=>!e.disabled)),i=document.activeElement,a=null===(t=o.find((e=>e.ref.current===i)))||void 0===t?void 0:t.textValue,s=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=(s=e,l=Math.max(i,0),s.map(((e,t)=>s[(l+t)%s.length])));var s,l;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===s)))||void 0===n?void 0:n.ref.current;!function e(t){A.current=t,window.clearTimeout(O.current),""!==t&&(O.current=window.setTimeout((()=>e("")),1e3))}(r),l&&setTimeout((()=>l.focus()))};e.useEffect((()=>()=>window.clearTimeout(O.current)),[]),Cr();const I=e.useCallback((e=>{var t,n;return T.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,s=t[i].y,l=t[a].x,u=t[a].y;s>r!=u>r&&n<(l-e)*(r-s)/(u-s)+e&&(o=!o)}return o}(n,t)}(e,null===(n=E.current)||void 0===n?void 0:n.area)}),[]);return e.createElement(Ru,{scope:r,searchRef:A,onItemEnter:e.useCallback((e=>{I(e)&&e.preventDefault()}),[I]),onItemLeave:e.useCallback((e=>{var t;I(e)||(null===(t=_.current)||void 0===t||t.focus(),S(null))}),[I]),onTriggerLeave:e.useCallback((e=>{I(e)&&e.preventDefault()}),[I]),pointerGraceTimerRef:j,onPointerGraceIntentChange:e.useCallback((e=>{E.current=e}),[])},e.createElement(F,P,e.createElement(vr,{asChild:!0,trapped:i,onMountAutoFocus:Xe(a,(e=>{var t;e.preventDefault(),null===(t=_.current)||void 0===t||t.focus()})),onUnmountAutoFocus:s},e.createElement(nt,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h},e.createElement(fu,Se({asChild:!0},w,{dir:g.dir,orientation:"vertical",loop:o,currentTabStopId:k,onCurrentTabStopIdChange:S,onEntryFocus:Xe(u,(e=>{g.isUsingKeyboardRef.current||e.preventDefault()}))}),e.createElement($n,Se({role:"menu","aria-orientation":"vertical","data-state":ic(b.open),"data-radix-menu-content":"",dir:g.dir},x,m,{ref:M,style:{outline:"none",...m.style},onKeyDown:Xe(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=_.current;if(e.target!==o)return;if(!mu.includes(e.key))return;e.preventDefault();const i=y().filter((e=>!e.disabled)).map((e=>e.ref.current));vu.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(O.current),A.current="")})),onPointerMove:Xe(t.onPointerMove,lc((e=>{const t=e.target,n=D.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>D.current?"right":"left";T.current=t,D.current=e.clientX}})))})))))))})),Hu=e.forwardRef(((t,n)=>{const{A:r,...o}=t;return e.createElement(_e.div,Se({},o,{ref:n}))})),Uu="MenuItem",Wu="menu.itemSelect",Vu=e.forwardRef(((t,n)=>{const{disabled:r=!1,onSelect:o,...i}=t,a=e.useRef(null),s=ju(Uu,t.A),l=Iu(Uu,t.A),u=C(n,a),c=e.useRef(!1);return e.createElement(Ku,Se({},i,{ref:u,disabled:r,onClick:Xe(t.onClick,(()=>{const e=a.current;if(!r&&e){const t=new CustomEvent(Wu,{bubbles:!0,cancelable:!0});e.addEventListener(Wu,(e=>null==o?void 0:o(e)),{once:!0}),Me(e,t),t.defaultPrevented?c.current=!1:s.onClose()}})),onPointerDown:e=>{var n;null===(n=t.onPointerDown)||void 0===n||n.call(t,e),c.current=!0},onPointerUp:Xe(t.onPointerUp,(e=>{var t;c.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:Xe(t.onKeyDown,(e=>{const t=""!==l.searchRef.current;r||t&&" "===e.key||hu.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),Ku=e.forwardRef(((t,n)=>{const{A:r,disabled:o=!1,textValue:i,...a}=t,s=Iu(Uu,r),l=_u(r),u=e.useRef(null),c=C(n,u),[d,f]=e.useState(!1),[p,h]=e.useState("");return e.useEffect((()=>{const e=u.current;var t;e&&h((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[a.children]),e.createElement(wu.ItemSlot,{scope:r,disabled:o,textValue:null!=i?i:p},e.createElement(pu,Se({asChild:!0},l,{focusable:!o}),e.createElement(_e.div,Se({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0},a,{ref:c,onPointerMove:Xe(t.onPointerMove,lc((e=>{if(o)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus()}}))),onPointerLeave:Xe(t.onPointerLeave,lc((e=>s.onItemLeave(e)))),onFocus:Xe(t.onFocus,(()=>f(!0))),onBlur:Xe(t.onBlur,(()=>f(!1)))}))))})),Zu=e.forwardRef(((t,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=t;return e.createElement(Ju,{scope:t.A,checked:r},e.createElement(Vu,Se({role:"menuitemcheckbox","aria-checked":ac(r)?"mixed":r},i,{ref:n,"data-state":sc(r),onSelect:Xe(i.onSelect,(()=>null==o?void 0:o(!!ac(r)||!r)),{checkForDefaultPrevented:!1})})))})),[qu,Gu]=Cu("MenuRadioGroup",{value:void 0,onValueChange:()=>{}}),Xu=e.forwardRef(((t,n)=>{const{value:r,...o}=t,i=Gu("MenuRadioItem",t.A),a=r===i.value;return e.createElement(Ju,{scope:t.A,checked:a},e.createElement(Vu,Se({role:"menuitemradio","aria-checked":a},o,{ref:n,"data-state":sc(a),onSelect:Xe(o.onSelect,(()=>{var e;return null===(e=i.onValueChange)||void 0===e?void 0:e.call(i,r)}),{checkForDefaultPrevented:!1})})))})),Yu="MenuItemIndicator",[Ju,Qu]=Cu(Yu,{checked:!1}),ec=e.forwardRef(((t,n)=>{const{A:r,forceMount:o,...i}=t,a=Qu(Yu,r);return e.createElement(Un,{present:o||ac(a.checked)||!0===a.checked},e.createElement(_e.span,Se({},i,{ref:n,"data-state":sc(a.checked)})))})),tc=e.forwardRef(((t,n)=>{const{A:r,...o}=t;return e.createElement(_e.div,Se({role:"separator","aria-orientation":"horizontal"},o,{ref:n}))})),[nc,rc]=Cu("MenuSub"),oc="MenuSubTrigger";function ic(e){return e?"open":"closed"}function ac(e){return"indeterminate"===e}function sc(e){return ac(e)?"indeterminate":e?"checked":"unchecked"}function lc(e){return t=>"mouse"===t.pointerType?e(t):void 0}const uc=Eu,cc=t=>{const{A:n,forceMount:r,children:o,container:i}=t,a=Ou(Tu,n);return e.createElement(Du,{scope:n,forceMount:r},e.createElement(Un,{present:r||a.open},e.createElement(Hn,{asChild:!0,container:i},o)))},dc=zu,fc=Hu,pc=Vu,hc=Zu,vc=Xu,mc=ec,bc=tc,gc=e.forwardRef(((t,n)=>{const r=Ou(oc,t.A),o=ju(oc,t.A),i=rc(oc,t.A),a=Iu(oc,t.A),s=e.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=a,c={A:t.A},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),u(null)}}),[l,u]),e.createElement(Eu,Se({asChild:!0},c),e.createElement(Ku,Se({id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":ic(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:Xe(t.onPointerMove,lc((e=>{a.onItemEnter(e),e.defaultPrevented||t.disabled||r.open||s.current||(a.onPointerGraceIntentChange(null),s.current=window.setTimeout((()=>{r.onOpenChange(!0),d()}),100))}))),onPointerLeave:Xe(t.onPointerLeave,lc((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,s=i?-5:5,u=n[i?"left":"right"],c=n[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+s,y:e.clientY},{x:u,y:n.top},{x:c,y:n.top},{x:c,y:n.bottom},{x:u,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||bu[o.dir].includes(e.key)&&(r.onOpenChange(!0),null===(i=r.content)||void 0===i||i.focus(),e.preventDefault())}))})))})),xc=e.forwardRef(((t,n)=>{const r=Fu(Pu,t.A),{forceMount:o=r.forceMount,...i}=t,a=Ou(Pu,t.A),s=ju(Pu,t.A),l=rc("MenuSubContent",t.A),u=e.useRef(null),c=C(n,u);return e.createElement(wu.Provider,{scope:t.A},e.createElement(Un,{present:o||a.open},e.createElement(wu.Slot,{scope:t.A},e.createElement($u,Se({id:l.contentId,"aria-labelledby":l.triggerId},i,{ref:c,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;s.isUsingKeyboardRef.current&&(null===(t=u.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=gu[s.dir].includes(e.key);var r;t&&n&&(a.onOpenChange(!1),null===(r=l.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))})),wc="ContextMenu",[yc,kc]=ye(wc,[Nu]),Cc=Nu(),[Nc,Sc]=yc(wc),_c=t=>{const{j:n,...r}=t,o=Cc(n);return e.createElement(cc,y({},o,r))},Mc=e.forwardRef(((t,n)=>{const{j:r,...o}=t,i=Sc("ContextMenuContent",r),a=Cc(r),s=e.useRef(!1);return e.createElement(dc,y({},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&&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)"}}))})),Oc=e.forwardRef(((t,n)=>{const{j:r,...o}=t,i=Cc(r);return e.createElement(fc,y({},i,o,{ref:n}))})),Ac=e.forwardRef(((t,n)=>{const{j:r,...o}=t,i=Cc(r);return e.createElement(pc,y({},i,o,{ref:n}))})),jc=e.forwardRef(((t,n)=>{const{j:r,...o}=t,i=Cc(r);return e.createElement(hc,y({},i,o,{ref:n}))})),Ec=e.forwardRef(((t,n)=>{const{j:r,...o}=t,i=Cc(r);return e.createElement(vc,y({},i,o,{ref:n}))})),Tc=e.forwardRef(((t,n)=>{const{j:r,...o}=t,i=Cc(r);return e.createElement(mc,y({},i,o,{ref:n}))})),Dc=e.forwardRef(((t,n)=>{const{j:r,...o}=t,i=Cc(r);return e.createElement(bc,y({},i,o,{ref:n}))})),Fc=e.forwardRef(((t,n)=>{const{j:r,...o}=t,i=Cc(r);return e.createElement(gc,y({},i,o,{ref:n}))})),Pc=e.forwardRef(((t,n)=>{const{j:r,...o}=t,i=Cc(r);return e.createElement(xc,y({},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)"}}))})),Rc="DropdownMenu",[Ic,zc]=ye(Rc,[Nu]),Lc=Nu(),[Bc,$c]=Ic(Rc),Hc=t=>{const{T:n,...r}=t,o=Lc(n);return e.createElement(cc,y({},o,r))},Uc=e.forwardRef(((t,n)=>{const{T:r,...o}=t,i=$c("DropdownMenuContent",r),a=Lc(r),s=e.useRef(!1);return e.createElement(dc,y({id:i.contentId,"aria-labelledby":i.triggerId},a,o,{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,r=2===t.button||n;i.modal&&!r||(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)"}}))})),Wc=e.forwardRef(((t,n)=>{const{T:r,...o}=t,i=Lc(r);return e.createElement(fc,y({},i,o,{ref:n}))})),Vc=e.forwardRef(((t,n)=>{const{T:r,...o}=t,i=Lc(r);return e.createElement(pc,y({},i,o,{ref:n}))})),Kc=e.forwardRef(((t,n)=>{const{T:r,...o}=t,i=Lc(r);return e.createElement(hc,y({},i,o,{ref:n}))})),Zc=e.forwardRef(((t,n)=>{const{T:r,...o}=t,i=Lc(r);return e.createElement(vc,y({},i,o,{ref:n}))})),qc=e.forwardRef(((t,n)=>{const{T:r,...o}=t,i=Lc(r);return e.createElement(mc,y({},i,o,{ref:n}))})),Gc=e.forwardRef(((t,n)=>{const{T:r,...o}=t,i=Lc(r);return e.createElement(bc,y({},i,o,{ref:n}))})),Xc=e.forwardRef(((t,n)=>{const{T:r,...o}=t,i=Lc(r);return e.createElement(gc,y({},i,o,{ref:n}))})),Yc=e.forwardRef(((t,n)=>{const{T:r,...o}=t,i=Lc(r);return e.createElement(xc,y({},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)"}}))})),Jc=e.createContext(null),Qc=e.forwardRef(((t,n)=>e.createElement(_e.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()}})))),ed="Menubar",[td,nd,rd]=ci(ed),[od,id]=ye(ed,[rd,ou]),ad=Nu(),sd=ou(),[ld,ud]=od(ed),cd=e.forwardRef(((t,n)=>{const{D:r,value:o,onValueChange:i,defaultValue:a,loop:s=!0,dir:l,...u}=t,c=_i(l),d=sd(r),[f="",p]=Vn({prop:o,onChange:i,defaultProp:a}),[h,v]=e.useState(null);return e.createElement(ld,{scope:r,value:f,onMenuOpen:e.useCallback((e=>{p(e),v(e)}),[p]),onMenuClose:e.useCallback((()=>p("")),[p]),onMenuToggle:e.useCallback((e=>{p((t=>Boolean(t)?"":e)),v(e)}),[p]),dir:c,loop:s},e.createElement(td.Provider,{scope:r},e.createElement(td.Slot,{scope:r},e.createElement(fu,y({asChild:!0},d,{orientation:"horizontal",loop:s,dir:c,currentTabStopId:h,onCurrentTabStopIdChange:v}),e.createElement(_e.div,y({role:"menubar"},u,{ref:n}))))))})),[dd,fd]=od("MenubarMenu"),pd="MenubarTrigger",hd=e.forwardRef(((t,n)=>{const{D:r,disabled:o=!1,...i}=t,a=sd(r),s=ad(r),l=ud(pd,r),u=fd(pd,r),c=e.useRef(null),d=C(n,c,u.triggerRef),[f,p]=e.useState(!1),h=l.value===u.value;return e.createElement(td.ItemSlot,{scope:r,value:u.value,disabled:o},e.createElement(pu,y({asChild:!0},a,{focusable:!o,tabStopId:u.value}),e.createElement(uc,y({asChild:!0},s),e.createElement(_e.button,y({type:"button",role:"menuitem",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":h,"aria-controls":h?u.contentId:void 0,"data-highlighted":f?"":void 0,"data-state":h?"open":"closed","data-disabled":o?"":void 0,disabled:o},i,{ref:d,onPointerDown:Xe(t.onPointerDown,(e=>{o||0!==e.button||!1!==e.ctrlKey||(l.onMenuOpen(u.value),h||e.preventDefault())})),onPointerEnter:Xe(t.onPointerEnter,(()=>{var e;Boolean(l.value)&&!h&&(l.onMenuOpen(u.value),null===(e=c.current)||void 0===e||e.focus())})),onKeyDown:Xe(t.onKeyDown,(e=>{o||(["Enter"," "].includes(e.key)&&l.onMenuToggle(u.value),"ArrowDown"===e.key&&l.onMenuOpen(u.value),["Enter"," ","ArrowDown"].includes(e.key)&&(u.wasKeyboardTriggerOpenRef.current=!0,e.preventDefault()))})),onFocus:Xe(t.onFocus,(()=>p(!0))),onBlur:Xe(t.onBlur,(()=>p(!1)))})))))})),vd="MenubarContent",md=e.forwardRef(((t,n)=>{const{D:r,align:o="start",...i}=t,a=ad(r),s=ud(vd,r),l=fd(vd,r),u=nd(r),c=e.useRef(!1);return e.createElement(dc,y({id:l.contentId,"aria-labelledby":l.triggerId,"data-radix-menubar-content":""},a,i,{ref:n,align:o,onCloseAutoFocus:Xe(t.onCloseAutoFocus,(e=>{var t;Boolean(s.value)||c.current||(null===(t=l.triggerRef.current)||void 0===t||t.focus());c.current=!1,e.preventDefault()})),onFocusOutside:Xe(t.onFocusOutside,(e=>{const t=e.target;u().some((e=>{var n;return null===(n=e.ref.current)||void 0===n?void 0:n.contains(t)}))&&e.preventDefault()})),onInteractOutside:Xe(t.onInteractOutside,(()=>{c.current=!0})),onEntryFocus:e=>{l.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:Xe(t.onKeyDown,(e=>{if(["ArrowRight","ArrowLeft"].includes(e.key)){const r=e.target,o=r.hasAttribute("data-radix-menubar-subtrigger"),i=r.closest("[data-radix-menubar-content]")!==e.currentTarget,a=("rtl"===s.dir?"ArrowRight":"ArrowLeft")===e.key;if(!a&&o)return;if(i&&a)return;let c=u().filter((e=>!e.disabled)).map((e=>e.value));a&&c.reverse();const d=c.indexOf(l.value);c=s.loop?(n=d+1,(t=c).map(((e,r)=>t[(n+r)%t.length]))):c.slice(d+1);const[f]=c;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 bd=cd,gd=hd,xd=t=>{const{D:n,...r}=t,o=ad(n);return e.createElement(cc,y({},o,r))},wd=md,yd=e.forwardRef(((t,n)=>{const{D:r,...o}=t,i=ad(r);return e.createElement(fc,y({},i,o,{ref:n}))})),kd=e.forwardRef(((t,n)=>{const{D:r,...o}=t,i=ad(r);return e.createElement(pc,y({},i,o,{ref:n}))})),Cd=e.forwardRef(((t,n)=>{const{D:r,...o}=t,i=ad(r);return e.createElement(hc,y({},i,o,{ref:n}))})),Nd=e.forwardRef(((t,n)=>{const{D:r,...o}=t,i=ad(r);return e.createElement(vc,y({},i,o,{ref:n}))})),Sd=e.forwardRef(((t,n)=>{const{D:r,...o}=t,i=ad(r);return e.createElement(mc,y({},i,o,{ref:n}))})),_d=e.forwardRef(((t,n)=>{const{D:r,...o}=t,i=ad(r);return e.createElement(bc,y({},i,o,{ref:n}))})),Md=e.forwardRef(((t,n)=>{const{D:r,...o}=t,i=ad(r);return e.createElement(gc,y({"data-radix-menubar-subtrigger":""},i,o,{ref:n}))})),Od=e.forwardRef(((t,n)=>{const{D:r,...o}=t,i=ad(r);return e.createElement(xc,y({},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)"}}))})),Ad="NavigationMenu",[jd,Ed,Td]=ci(Ad),[Dd,Fd,Pd]=ci(Ad),[Rd,Id]=ye(Ad,[Td,Pd]),[zd,Ld]=Rd(Ad),[Bd,$d]=Rd(Ad),Hd=e.forwardRef(((t,n)=>{const{F:r,value:o,onValueChange:i,defaultValue:a,delayDuration:s=200,skipDelayDuration:l=300,orientation:u="horizontal",dir:c,...d}=t,[f,p]=e.useState(null),h=C(n,(e=>p(e))),v=_i(c),m=e.useRef(0),b=e.useRef(0),g=e.useRef(0),[x,w]=e.useState(!0),[k="",N]=Vn({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((()=>N("")),150)}),[N]),_=e.useCallback((e=>{window.clearTimeout(b.current),N(e)}),[N]),M=e.useCallback((e=>{k===e?window.clearTimeout(b.current):m.current=window.setTimeout((()=>{window.clearTimeout(b.current),N(e)}),s)}),[k,N,s]);return e.useEffect((()=>()=>{window.clearTimeout(m.current),window.clearTimeout(b.current),window.clearTimeout(g.current)}),[]),e.createElement(Ud,{scope:r,isRootMenu:!0,value:k,dir:v,orientation:u,rootNavigationMenu:f,onTriggerEnter:e=>{window.clearTimeout(m.current),x?M(e):_(e)},onTriggerLeave:()=>{window.clearTimeout(m.current),S()},onContentEnter:()=>window.clearTimeout(b.current),onContentLeave:S,onItemSelect:e=>{N((t=>t===e?"":e))},onItemDismiss:()=>N("")},e.createElement(_e.nav,y({"aria-label":"Main","data-orientation":u,dir:v},d,{ref:h})))})),Ud=t=>{const{scope:n,isRootMenu:r,rootNavigationMenu:o,dir:i,orientation:a,children:s,value:l,onItemSelect:u,onItemDismiss:c,onTriggerEnter:d,onTriggerLeave:f,onContentEnter:p,onContentLeave:h}=t,[v,m]=e.useState(null),[b,g]=e.useState(new Map),[x,w]=e.useState(null);return e.createElement(zd,{scope:n,isRootMenu:r,rootNavigationMenu:o,value:l,previousValue:Ca(l),baseId:ut(),dir:i,orientation:a,viewport:v,onViewportChange:m,indicatorTrack:x,onIndicatorTrackChange:w,onTriggerEnter:Ce(d),onTriggerLeave:Ce(f),onContentEnter:Ce(p),onContentLeave:Ce(h),onItemSelect:Ce(u),onItemDismiss:Ce(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(jd.Provider,{scope:n},e.createElement(Bd,{scope:n,items:b},s)))},Wd=e.forwardRef(((t,n)=>{const{F:r,...o}=t,i=Ld("NavigationMenuList",r),a=e.createElement(_e.ul,y({"data-orientation":i.orientation},o,{ref:n}));return e.createElement(_e.div,{style:{position:"relative"},ref:i.onIndicatorTrackChange},e.createElement(jd.Slot,{scope:r},i.isRootMenu?e.createElement(sf,{asChild:!0},a):a))})),[Vd,Kd]=Rd("NavigationMenuItem"),Zd="NavigationMenuTrigger",qd=e.forwardRef(((t,n)=>{const{F:r,disabled:o,...i}=t,a=Ld(Zd,t.F),s=Kd(Zd,t.F),l=e.useRef(null),u=C(l,s.triggerRef,n),c=pf(a.baseId,s.value),d=hf(a.baseId,s.value),f=e.useRef(!1),p=e.useRef(!1),h=s.value===a.value;return e.createElement(e.Fragment,null,e.createElement(jd.ItemSlot,{scope:r,value:s.value},e.createElement(uf,{asChild:!0},e.createElement(_e.button,y({id:c,disabled:o,"data-disabled":o?"":void 0,"data-state":ff(h),"aria-expanded":h,"aria-controls":d},i,{ref:u,onPointerEnter:Xe(t.onPointerEnter,(()=>{p.current=!1,s.wasEscapeCloseRef.current=!1})),onPointerMove:Xe(t.onPointerMove,vf((()=>{o||p.current||s.wasEscapeCloseRef.current||f.current||(a.onTriggerEnter(s.value),f.current=!0)}))),onPointerLeave:Xe(t.onPointerLeave,vf((()=>{o||(a.onTriggerLeave(),f.current=!1)}))),onClick:Xe(t.onClick,(()=>{a.onItemSelect(s.value),p.current=h})),onKeyDown:Xe(t.onKeyDown,(e=>{const t={horizontal:"ArrowDown",vertical:"rtl"===a.dir?"ArrowLeft":"ArrowRight"}[a.orientation];h&&e.key===t&&(s.onEntryKeyDown(),e.preventDefault())}))})))),h&&e.createElement(e.Fragment,null,e.createElement(Zn,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:e=>{const t=s.contentRef.current,n=e.relatedTarget,r=n===l.current,o=null==t?void 0:t.contains(n);!r&&o||s.onFocusProxyEnter(r?"start":"end")}}),a.viewport&&e.createElement("span",{"aria-owns":d})))})),Gd="NavigationMenuIndicator",Xd=e.forwardRef(((n,r)=>{const{forceMount:o,...i}=n,a=Ld(Gd,n.F),s=Boolean(a.value);return a.indicatorTrack?t.createPortal(e.createElement(Un,{present:o||s},e.createElement(Yd,y({},i,{ref:r}))),a.indicatorTrack):null})),Yd=e.forwardRef(((t,n)=>{const{F:r,...o}=t,i=Ld(Gd,r),a=Ed(r),[s,l]=e.useState(null),[u,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 p=()=>{s&&c({size:d?s.offsetWidth:s.offsetHeight,offset:d?s.offsetLeft:s.offsetTop})};return df(s,p),df(i.indicatorTrack,p),u?e.createElement(_e.div,y({"aria-hidden":!0,"data-state":f?"visible":"hidden","data-orientation":i.orientation},o,{ref:n,style:{position:"absolute",...d?{left:0,width:u.size+"px",transform:`translateX(${u.offset}px)`}:{top:0,height:u.size+"px",transform:`translateY(${u.offset}px)`},...o.style}})):null})),Jd="NavigationMenuContent",Qd=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Ld(Jd,t.F),a=Kd(Jd,t.F),s=C(a.contentRef,n),l=a.value===i.value,u={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...o};return i.viewport?e.createElement(ef,y({forceMount:r},u,{ref:s})):e.createElement(Un,{present:r||l},e.createElement(nf,y({"data-state":ff(l)},u,{ref:s,onPointerEnter:Xe(t.onPointerEnter,i.onContentEnter),onPointerLeave:Xe(t.onPointerLeave,vf(i.onContentLeave)),style:{pointerEvents:!l&&i.isRootMenu?"none":void 0,...u.style}})))})),ef=e.forwardRef(((e,t)=>{const n=Ld(Jd,e.F),{onViewportContentChange:r,onViewportContentRemove:o}=n;return Ne((()=>{r(e.value,{ref:t,...e})}),[e,t,r]),Ne((()=>()=>o(e.value)),[e.value,o]),null})),tf="navigationMenu.rootContentDismiss",nf=e.forwardRef(((t,n)=>{const{F:r,value:o,triggerRef:i,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:l,onContentFocusOutside:u,...c}=t,d=Ld(Jd,r),f=e.useRef(null),p=C(f,n),h=pf(d.baseId,o),v=hf(d.baseId,o),m=Ed(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(tf,t),()=>e.removeEventListener(tf,t)}}),[d.isRootMenu,t.value,i,g,l]);const x=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(sf,{asChild:!0},e.createElement(nt,y({id:v,"aria-labelledby":h,"data-motion":x,"data-orientation":d.orientation},c,{ref:p,onDismiss:()=>{var e;const t=new Event(tf,{bubbles:!0,cancelable:!0});null===(e=f.current)||void 0===e||e.dispatchEvent(t)},onFocusOutside:Xe(t.onFocusOutside,(e=>{var t;u();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,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: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),r=document.activeElement,o=t.findIndex((e=>e===r));var n;if(cf(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:Xe(t.onEscapeKeyDown,(e=>{s.current=!0}))})))})),rf="NavigationMenuViewport",of=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=Ld(rf,t.F),a=Boolean(i.value);return e.createElement(Un,{present:r||a},e.createElement(af,y({},o,{ref:n})))})),af=e.forwardRef(((t,n)=>{const{F:r,children:o,...i}=t,a=Ld(rf,r),s=C(n,a.onViewportChange),l=$d(Jd,t.F),[u,c]=e.useState(null),[d,f]=e.useState(null),p=u?(null==u?void 0:u.width)+"px":void 0,h=u?(null==u?void 0:u.height)+"px":void 0,v=Boolean(a.value),m=v?a.value:a.previousValue;return df(d,(()=>{d&&c({width:d.offsetWidth,height:d.offsetHeight})})),e.createElement(_e.div,y({"data-state":ff(v),"data-orientation":a.orientation},i,{ref:s,style:{pointerEvents:!v&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":p,"--radix-navigation-menu-viewport-height":h,...i.style},onPointerEnter:Xe(t.onPointerEnter,a.onContentEnter),onPointerLeave:Xe(t.onPointerLeave,vf(a.onContentLeave))}),Array.from(l.items).map((([t,{ref:n,forceMount:r,...o}])=>{const i=m===t;return e.createElement(Un,{key:t,present:r||i},e.createElement(nf,y({},o,{ref:k(n,(e=>{i&&e&&f(e)}))})))})))})),sf=e.forwardRef(((t,n)=>{const{F:r,...o}=t,i=Ld("FocusGroup",r);return e.createElement(Dd.Provider,{scope:r},e.createElement(Dd.Slot,{scope:r},e.createElement(_e.div,y({dir:i.dir},o,{ref:n}))))})),lf=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],uf=e.forwardRef(((t,n)=>{const{F:r,...o}=t,i=Fd(r),a=Ld("FocusGroupItem",r);return e.createElement(Dd.ItemSlot,{scope:r},e.createElement(_e.button,y({},o,{ref:n,onKeyDown:Xe(t.onKeyDown,(e=>{if(["Home","End",...lf].includes(e.key)){let t=i().map((e=>e.ref.current));if(["rtl"===a.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),lf.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 df(e,t){const n=Ce(t);Ne((()=>{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 ff(e){return e?"open":"closed"}function pf(e,t){return`${e}-trigger-${t}`}function hf(e,t){return`${e}-content-${t}`}function vf(e){return t=>"mouse"===t.pointerType?e(t):void 0}const mf=Hd,bf=Wd,gf=qd,xf=Xd,wf=Qd,yf=of,kf="Popover",[Cf,Nf]=ye(kf,[An]),Sf=An(),[_f,Mf]=Cf(kf),Of="PopoverPortal",[Af,jf]=Cf(Of,{forceMount:void 0}),Ef="PopoverContent",Tf=e.forwardRef(((t,n)=>{const r=jf(Ef,t.P),{forceMount:o=r.forceMount,...i}=t,a=Mf(Ef,t.P);return e.createElement(Un,{present:o||a.open},a.modal?e.createElement(Df,y({},i,{ref:n})):e.createElement(Ff,y({},i,{ref:n})))})),Df=e.forwardRef(((t,n)=>{const r=Mf(Ef,t.P),o=e.useRef(null),i=C(n,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return mo(e)}),[]),e.createElement(lo,{as:N,allowPinchZoom:!0},e.createElement(Pf,y({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xe(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),a.current||null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Xe(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:Xe(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),Ff=e.forwardRef(((t,n)=>{const r=Mf(Ef,t.P),o=e.useRef(!1),i=e.useRef(!1);return e.createElement(Pf,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)||(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 s=e.target;(null===(a=r.triggerRef.current)||void 0===a?void 0:a.contains(s))&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}}))})),Pf=e.forwardRef(((t,n)=>{const{P:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:d,...f}=t,p=Mf(Ef,r),h=Sf(r);return Cr(),e.createElement(vr,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a},e.createElement(nt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1)},e.createElement($n,y({"data-state":(v=p.open,v?"open":"closed"),role:"dialog",id:p.contentId},h,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 v}));const Rf=t=>{const{P:n,forceMount:r,children:o,container:i}=t,a=Mf(Of,n);return e.createElement(Af,{scope:n,forceMount:r},e.createElement(Un,{present:r||a.open},e.createElement(Hn,{asChild:!0,container:i},o)))},If=Tf,zf="Radio",[Lf,Bf]=ye(zf),[$f,Hf]=Lf(zf),Uf=e.forwardRef(((t,n)=>{const{R:r,name:o,checked:i=!1,required:a,disabled:s,value:l="on",onCheck:u,...c}=t,[d,f]=e.useState(null),p=C(n,(e=>f(e))),h=e.useRef(!1),v=!d||Boolean(d.closest("form"));return e.createElement($f,{scope:r,checked:i,disabled:s},e.createElement(_e.button,y({type:"button",role:"radio","aria-checked":i,"data-state":Kf(i),"data-disabled":s?"":void 0,disabled:s,value:l},c,{ref:p,onClick:Xe(t.onClick,(e=>{i||null==u||u(),v&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),v&&e.createElement(Vf,{control:d,bubbles:!h.current,name:o,value:l,checked:i,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))})),Wf=e.forwardRef(((t,n)=>{const{R:r,forceMount:o,...i}=t,a=Hf("RadioIndicator",r);return e.createElement(Un,{present:o||a.checked},e.createElement(_e.span,y({"data-state":Kf(a.checked),"data-disabled":a.disabled?"":void 0},i,{ref:n})))})),Vf=t=>{const{control:n,checked:r,bubbles:o=!0,...i}=t,a=e.useRef(null),s=Ca(r),l=_n(n);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[s,r,o]),e.createElement("input",y({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 Kf(e){return e?"checked":"unchecked"}const Zf=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],qf="RadioGroup",[Gf,Xf]=ye(qf,[ou,Bf]),Yf=ou(),Jf=Bf(),[Qf,ep]=Gf(qf),tp=e.forwardRef(((t,n)=>{const{I:r,name:o,defaultValue:i,value:a,required:s=!1,disabled:l=!1,orientation:u,dir:c,loop:d=!0,onValueChange:f,...p}=t,h=Yf(r),v=_i(c),[m,b]=Vn({prop:a,defaultProp:i,onChange:f});return e.createElement(Qf,{scope:r,name:o,required:s,disabled:l,value:m,onValueChange:b},e.createElement(fu,y({asChild:!0},h,{orientation:u,dir:v,loop:d}),e.createElement(_e.div,y({role:"radiogroup","aria-required":s,"aria-orientation":u,"data-disabled":l?"":void 0,dir:v},p,{ref:n}))))})),np=tp,rp=e.forwardRef(((t,n)=>{const{I:r,disabled:o,...i}=t,a=ep("RadioGroupItem",r),s=a.disabled||o,l=Yf(r),u=Jf(r),c=e.useRef(null),d=C(n,c),f=a.value===i.value,p=e.useRef(!1);return e.useEffect((()=>{const e=e=>{Zf.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(pu,y({asChild:!0},l,{focusable:!s,active:f}),e.createElement(Uf,y({disabled:s,required:a.required,checked:f},u,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=c.current)||void 0===e||e.click())}))})))})),op=e.forwardRef(((t,n)=>{const{I:r,...o}=t,i=Jf(r);return e.createElement(Wf,y({},i,o,{ref:n}))}));function ip(e,[t,n]){return Math.min(n,Math.max(t,e))}const ap="ScrollArea",[sp,lp]=ye(ap),[up,cp]=sp(ap),dp=e.forwardRef(((t,n)=>{const{L:r,type:o="hover",dir:i,scrollHideDelay:a=600,...s}=t,[l,u]=e.useState(null),[c,d]=e.useState(null),[f,p]=e.useState(null),[h,v]=e.useState(null),[m,b]=e.useState(null),[g,x]=e.useState(0),[w,k]=e.useState(0),[N,S]=e.useState(!1),[_,M]=e.useState(!1),O=C(n,(e=>u(e))),A=_i(i);return e.createElement(up,{scope:r,type:o,dir:A,scrollHideDelay:a,scrollArea:l,viewport:c,onViewportChange:d,content:f,onContentChange:p,scrollbarX:h,onScrollbarXChange:v,scrollbarXEnabled:N,onScrollbarXEnabledChange:S,scrollbarY:m,onScrollbarYChange:b,scrollbarYEnabled:_,onScrollbarYEnabledChange:M,onCornerWidthChange:x,onCornerHeightChange:k},e.createElement(_e.div,y({dir:A},s,{ref:O,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":w+"px",...t.style}})))})),fp=e.forwardRef(((t,n)=>{const{L:r,children:o,...i}=t,a=cp("ScrollAreaViewport",r),s=C(n,e.useRef(null),a.onViewportChange);return e.createElement(e.Fragment,null,e.createElement("style",{dangerouslySetInnerHTML:{B:"[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(_e.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"}},o)))})),pp="ScrollAreaScrollbar",hp=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=cp(pp,t.L),{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(vp,y({},o,{ref:n,forceMount:r})):"scroll"===i.type?e.createElement(mp,y({},o,{ref:n,forceMount:r})):"auto"===i.type?e.createElement(bp,y({},o,{ref:n,forceMount:r})):"always"===i.type?e.createElement(gp,y({},o,{ref:n})):null})),vp=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=cp(pp,t.L),[a,s]=e.useState(!1);return e.useEffect((()=>{const e=i.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),s(!0)},r=()=>{t=window.setTimeout((()=>s(!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(Un,{present:r||a},e.createElement(bp,y({"data-state":a?"visible":"hidden"},o,{ref:n})))})),mp=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=cp(pp,t.L),a="horizontal"===t.orientation,s=Ip((()=>u("SCROLL_END")),100),[l,u]=(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((()=>u("HIDE")),i.scrollHideDelay);return()=>window.clearTimeout(e)}}),[l,i.scrollHideDelay,u]),e.useEffect((()=>{const e=i.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(u("SCROLL"),s()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[i.viewport,a,u,s]),e.createElement(Un,{present:r||"hidden"!==l},e.createElement(gp,y({"data-state":"hidden"===l?"hidden":"visible"},o,{ref:n,onPointerEnter:Xe(t.onPointerEnter,(()=>u("POINTER_ENTER"))),onPointerLeave:Xe(t.onPointerLeave,(()=>u("POINTER_LEAVE")))})))})),bp=e.forwardRef(((t,n)=>{const r=cp(pp,t.L),{forceMount:o,...i}=t,[a,s]=e.useState(!1),l="horizontal"===t.orientation,u=Ip((()=>{if(r.viewport){const e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;s(l?e:t)}}),10);return zp(r.viewport,u),zp(r.content,u),e.createElement(Un,{present:o||a},e.createElement(gp,y({"data-state":a?"visible":"hidden"},i,{ref:n})))})),gp=e.forwardRef(((t,n)=>{const{orientation:r="vertical",...o}=t,i=cp(pp,t.L),a=e.useRef(null),s=e.useRef(0),[l,u]=e.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=Ep(l.viewport,l.content),d={...o,sizes:l,onSizesChange:u,hasThumb:Boolean(c>0&&c<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:e=>s.current=e};function f(e,t){return function(e,t,n,r="ltr"){const o=Tp(n),i=o/2,a=t||i,s=o-a,l=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,d="ltr"===r?[0,c]:[-1*c,0];return Fp([l,u],d)(e)}(e,s.current,l,t)}return"horizontal"===r?e.createElement(xp,y({},d,{ref:n,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=Dp(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(wp,y({},d,{ref:n,onThumbPositionChange:()=>{if(i.viewport&&a.current){const e=Dp(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})),xp=e.forwardRef(((t,n)=>{const{sizes:r,onSizesChange:o,...i}=t,a=cp(pp,t.L),[s,l]=e.useState(),u=e.useRef(null),c=C(n,u,a.onScrollbarXChange);return e.useEffect((()=>{u.current&&l(getComputedStyle(u.current))}),[u]),e.createElement(Cp,y({"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":Tp(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),Pp(r,n)&&e.preventDefault()}},onResize:()=>{u.current&&a.viewport&&s&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:jp(s.paddingLeft),paddingEnd:jp(s.paddingRight)}})}}))})),wp=e.forwardRef(((t,n)=>{const{sizes:r,onSizesChange:o,...i}=t,a=cp(pp,t.L),[s,l]=e.useState(),u=e.useRef(null),c=C(n,u,a.onScrollbarYChange);return e.useEffect((()=>{u.current&&l(getComputedStyle(u.current))}),[u]),e.createElement(Cp,y({"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":Tp(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),Pp(r,n)&&e.preventDefault()}},onResize:()=>{u.current&&a.viewport&&s&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:jp(s.paddingTop),paddingEnd:jp(s.paddingBottom)}})}}))})),[yp,kp]=sp(pp),Cp=e.forwardRef(((t,n)=>{const{L:r,sizes:o,hasThumb:i,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:l,onThumbPositionChange:u,onDragScroll:c,onWheelScroll:d,onResize:f,...p}=t,h=cp(pp,r),[v,m]=e.useState(null),b=C(n,(e=>m(e))),g=e.useRef(null),x=e.useRef(""),w=h.viewport,k=o.content-o.viewport,N=Ce(d),S=Ce(u),_=Ip(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==v?void 0:v.contains(t))&&N(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[w,v,k,N]),e.useEffect(S,[o,S]),zp(v,_),zp(h.content,_),e.createElement(yp,{scope:r,scrollbar:v,hasThumb:i,onThumbChange:Ce(a),onThumbPointerUp:Ce(s),onThumbPositionChange:S,onThumbPointerDown:Ce(l)},e.createElement(_e.div,y({},p,{ref:b,style:{position:"absolute",...p.style},onPointerDown:Xe(t.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),g.current=v.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M(e)}})),onPointerMove:Xe(t.onPointerMove,M),onPointerUp:Xe(t.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=x.current,g.current=null}))})))})),Np="ScrollAreaThumb",Sp=e.forwardRef(((t,n)=>{const{forceMount:r,...o}=t,i=kp(Np,t.L);return e.createElement(Un,{present:r||i.hasThumb},e.createElement(_p,y({ref:n},o)))})),_p=e.forwardRef(((t,n)=>{const{L:r,style:o,...i}=t,a=cp(Np,r),s=kp(Np,r),{onThumbPositionChange:l}=s,u=C(n,(e=>s.onThumbChange(e))),c=e.useRef(),d=Ip((()=>{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=Rp(e,l);c.current=t,l()}};return l(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[a.viewport,d,l]),e.createElement(_e.div,y({"data-state":s.hasThumb?"visible":"hidden"},i,{ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:Xe(t.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;s.onThumbPointerDown({x:n,y:r})})),onPointerUp:Xe(t.onPointerUp,s.onThumbPointerUp)}))})),Mp="ScrollAreaCorner",Op=e.forwardRef(((t,n)=>{const r=cp(Mp,t.L),o=Boolean(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&o?e.createElement(Ap,y({},t,{ref:n})):null})),Ap=e.forwardRef(((t,n)=>{const{L:r,...o}=t,i=cp(Mp,r),[a,s]=e.useState(0),[l,u]=e.useState(0),c=Boolean(a&&l);return zp(i.scrollbarX,(()=>{var e;const t=(null===(e=i.scrollbarX)||void 0===e?void 0:e.offsetHeight)||0;i.onCornerHeightChange(t),u(t)})),zp(i.scrollbarY,(()=>{var e;const t=(null===(e=i.scrollbarY)||void 0===e?void 0:e.offsetWidth)||0;i.onCornerWidthChange(t),s(t)})),c?e.createElement(_e.div,y({},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 jp(e){return e?parseInt(e,10):0}function Ep(e,t){const n=e/t;return isNaN(n)?0:n}function Tp(e){const t=Ep(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Dp(e,t,n="ltr"){const r=Tp(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-r,l=ip(e,"ltr"===n?[0,a]:[-1*a,0]);return Fp([0,a],[0,s])(l)}function Fp(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 Pp(e,t){return e>0&&e<t}const Rp=(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,s=n.top!==i.top;(a||s)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Ip(t,n){const r=Ce(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 zp(e,t){const n=Ce(t);Ne((()=>{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 Lp=dp,Bp=fp,$p=Op,Hp=[" ","Enter","ArrowUp","ArrowDown"],Up=[" ","Enter"],Wp="Select",[Vp,Kp,Zp]=ci(Wp),[qp,Gp]=ye(Wp,[Zp,An]),Xp=An(),[Yp,Jp]=qp(Wp),[Qp,eh]=qp(Wp),th=e.forwardRef(((t,n)=>{const{H:r,disabled:o=!1,...i}=t,a=Xp(r),s=Jp("SelectTrigger",r),l=s.disabled||o,u=C(n,s.onTriggerChange),c=Kp(r),[d,f,p]=_h((e=>{const t=c().filter((e=>!e.disabled)),n=t.find((e=>e.value===s.value)),r=Mh(t,e,n);void 0!==r&&s.onValueChange(r.value)})),h=()=>{l||(s.onOpenChange(!0),p())};return e.createElement(Bn,y({asChild:!0},a),e.createElement(_e.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:u,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&&(h(),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||Hp.includes(e.key)&&(h(),e.preventDefault())}))})))})),nh=e.forwardRef(((t,n)=>{const{H:r,children:o,...i}=t;return e.createElement(_e.span,y({"aria-hidden":!0},i,{ref:n}),o||"▼")})),rh="SelectContent",oh=e.forwardRef(((n,r)=>{const o=Jp(rh,n.H),[i,a]=e.useState();if(Ne((()=>{a(new DocumentFragment)}),[]),!o.open){const r=i;return r?t.createPortal(e.createElement(ah,{scope:n.H},e.createElement(Vp.Slot,{scope:n.H},e.createElement("div",null,n.children))),r):null}return e.createElement(lh,y({},n,{ref:r}))})),ih=10,[ah,sh]=qp(rh),lh=e.forwardRef(((t,n)=>{const{H:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:l,sideOffset:u,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:h,sticky:v,hideWhenDetached:m,avoidCollisions:b,...g}=t,x=Jp(rh,r),[w,k]=e.useState(null),[S,_]=e.useState(null),M=C(n,(e=>k(e))),[O,A]=e.useState(null),[j,E]=e.useState(null),T=Kp(r),[D,F]=e.useState(!1),P=e.useRef(!1);e.useEffect((()=>{if(w)return mo(w)}),[w]),Cr();const R=e.useCallback((e=>{const[t,...n]=T().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}}),[T,S]),I=e.useCallback((()=>R([O,w])),[R,O,w]);e.useEffect((()=>{D&&I()}),[D,I]);const{onOpenChange:z,triggerPointerDownPosRef:L}=x;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=L.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(i=L.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)||z(!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})}}}),[w,z,L]),e.useEffect((()=>{const e=()=>z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[z]);const[B,$]=_h((e=>{const t=T().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=Mh(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),H=e.useCallback(((e,t,n)=>{const r=!P.current&&!n;(void 0!==x.value&&x.value===t||r)&&(A(e),r&&(P.current=!0))}),[x.value]),U=e.useCallback((()=>null==w?void 0:w.focus()),[w]),W=e.useCallback(((e,t,n)=>{const r=!P.current&&!n;(void 0!==x.value&&x.value===t||r)&&E(e)}),[x.value]),V="popper"===o?ch:uh,K=V===ch?{side:l,sideOffset:u,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:h,sticky:v,hideWhenDetached:m,avoidCollisions:b}:{};return e.createElement(ah,{scope:r,content:w,viewport:S,onViewportChange:_,itemRefCallback:H,selectedItem:O,onItemLeave:U,itemTextRefCallback:W,focusSelectedItem:I,selectedItemText:j,position:o,isPositioned:D,searchRef:B},e.createElement(lo,{as:N,allowPinchZoom:!0},e.createElement(vr,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Xe(i,(e=>{var t;null===(t=x.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:()=>x.onOpenChange(!1)},e.createElement(V,y({role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:e=>e.preventDefault()},g,K,{onPlaced:()=>F(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:Xe(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=T().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()}}))}))))))})),uh=e.forwardRef(((t,n)=>{const{H:r,onPlaced:o,...i}=t,a=Jp(rh,r),s=sh(rh,r),[l,u]=e.useState(null),[c,d]=e.useState(null),f=C(n,(e=>d(e))),p=Kp(r),h=e.useRef(!1),v=e.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:g,focusSelectedItem:x}=s,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,s=e.width+a,u=Math.max(s,t.width),c=window.innerWidth-ih,d=ip(i,[ih,c-u]);l.style.minWidth=s+"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,s=e.width+a,u=Math.max(s,t.width),c=window.innerWidth-ih,d=ip(i,[ih,c-u]);l.style.minWidth=s+"px",l.style.right=d+"px"}const i=p(),s=window.innerHeight-2*ih,u=m.scrollHeight,d=window.getComputedStyle(c),f=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),x=parseInt(d.borderBottomWidth,10),w=f+v+u+parseInt(d.paddingBottom,10)+x,y=Math.min(5*b.offsetHeight,w),k=window.getComputedStyle(m),C=parseInt(k.paddingTop,10),N=parseInt(k.paddingBottom,10),S=e.top+e.height/2-ih,_=s-S,M=b.offsetHeight/2,O=f+v+(b.offsetTop+M),A=w-O;if(O<=S){const e=b===i[i.length-1].ref.current;l.style.bottom="0px";const t=c.clientHeight-m.offsetTop-m.offsetHeight,n=O+Math.max(_,M+(e?N:0)+t+x);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?C:0)+M)+A;l.style.height=t+"px",m.scrollTop=O-S+m.offsetTop}l.style.margin=`${ih}px 0`,l.style.minHeight=y+"px",l.style.maxHeight=s+"px",null==o||o(),requestAnimationFrame((()=>h.current=!0))}}),[p,a.trigger,a.valueNode,l,c,m,b,g,a.dir,o]);Ne((()=>w()),[w]);const[k,N]=e.useState();Ne((()=>{c&&N(window.getComputedStyle(c).zIndex)}),[c]);const S=e.useCallback((e=>{e&&!0===v.current&&(w(),null==x||x(),v.current=!1)}),[w,x]);return e.createElement(dh,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:S},e.createElement("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k}},e.createElement(_e.div,y({},i,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))})),ch=e.forwardRef(((t,n)=>{const{H:r,align:o="start",collisionPadding:i=ih,...a}=t,s=Xp(r);return e.createElement($n,y({},s,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)"}}))})),[dh,fh]=qp(rh,{}),ph="SelectViewport",hh=e.forwardRef(((t,n)=>{const{H:r,...o}=t,i=sh(ph,r),a=fh(ph,r),s=C(n,i.onViewportChange),l=e.useRef(0);return e.createElement(e.Fragment,null,e.createElement("style",{dangerouslySetInnerHTML:{B:"[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(Vp.Slot,{scope:r},e.createElement(_e.div,y({"data-radix-select-viewport":"",role:"presentation"},o,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:Xe(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*ih,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),s=o-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}))}))))})),[vh,mh]=qp("SelectGroup"),bh=e.forwardRef(((t,n)=>{const{H:r,...o}=t,i=mh("SelectLabel",r);return e.createElement(_e.div,y({id:i.id},o,{ref:n}))})),gh="SelectItem",[xh,wh]=qp(gh),yh=e.forwardRef(((t,n)=>{const{H:r,value:o,disabled:i=!1,textValue:a,...s}=t,l=Jp(gh,r),u=sh(gh,r),c=l.value===o,[d,f]=e.useState(null!=a?a:""),[p,h]=e.useState(!1),v=C(n,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,o,i)})),m=ut(),b=()=>{i||(l.onValueChange(o),l.onOpenChange(!1))};return e.createElement(xh,{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(Vp.ItemSlot,{scope:r,value:o,disabled:i,textValue:d},e.createElement(_e.div,y({role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},s,{ref:v,onFocus:Xe(s.onFocus,(()=>h(!0))),onBlur:Xe(s.onBlur,(()=>h(!1))),onPointerUp:Xe(s.onPointerUp,b),onPointerMove:Xe(s.onPointerMove,(e=>{var t;i?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Xe(s.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:Xe(s.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(Up.includes(e.key)&&b()," "===e.key&&e.preventDefault())}))}))))})),kh="SelectItemText",Ch=e.forwardRef(((n,r)=>{const{H:o,className:i,style:a,...s}=n,l=Jp(kh,o),u=sh(kh,o),c=wh(kh,o),d=eh(kh,o),[f,p]=e.useState(null),h=C(r,(e=>p(e)),c.onItemTextChange,(e=>{var t;return null===(t=u.itemTextRefCallback)||void 0===t?void 0:t.call(u,e,c.value,c.disabled)})),v=null==f?void 0:f.textContent,m=e.useMemo((()=>e.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},v)),[c.disabled,c.value,v]),{onNativeOptionAdd:b,onNativeOptionRemove:g}=d;return Ne((()=>(b(m),()=>g(m))),[b,g,m]),e.createElement(e.Fragment,null,e.createElement(_e.span,y({id:c.textId},s,{ref:h})),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren?t.createPortal(s.children,l.valueNode):null)})),Nh=e.forwardRef(((t,n)=>{const{H:r,...o}=t;return wh("SelectItemIndicator",r).isSelected?e.createElement(_e.span,y({"aria-hidden":!0},o,{ref:n})):null})),Sh=e.forwardRef(((t,n)=>{const{H:r,...o}=t;return e.createElement(_e.div,y({"aria-hidden":!0},o,{ref:n}))}));function _h(t){const n=Ce(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 Mh(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=(a=e,s=Math.max(o,0),a.map(((e,t)=>a[(s+t)%a.length])));var a,s;1===r.length&&(i=i.filter((e=>e!==n)));const l=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}e.forwardRef(((t,n)=>{const{value:r,...o}=t,i=e.useRef(null),a=C(n,i),s=Ca(r);return e.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(s!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}}),[s,r]),e.createElement(Kn,{asChild:!0},e.createElement("select",y({},o,{ref:a,defaultValue:r})))})).displayName="BubbleSelect";const Oh=th,Ah=nh,jh=t=>e.createElement(Hn,y({asChild:!0},t)),Eh=oh,Th=hh,Dh=bh,Fh=yh,Ph=Ch,Rh=Nh,Ih=Sh,zh="horizontal",Lh=["horizontal","vertical"],Bh=e.forwardRef(((t,n)=>{const{decorative:r,orientation:o=zh,...i}=t,a=$h(o)?o:zh,s=r?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return e.createElement(_e.div,y({"data-orientation":a},s,i,{ref:n}))}));function $h(e){return Lh.includes(e)}Bh.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!$h(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 \`${zh}\`.`}(o,n)):null}};const Hh=Bh,Uh=["PageUp","PageDown"],Wh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Vh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Kh="Slider",[Zh,qh,Gh]=ci(Kh),[Xh,Yh]=ye(Kh,[Gh]),[Jh,Qh]=Xh(Kh),ev=e.forwardRef(((t,n)=>{const{name:r,min:o=0,max:i=100,step:a=1,orientation:s="horizontal",disabled:l=!1,minStepsBetweenThumbs:u=0,defaultValue:c=[o],value:d,onValueChange:f=(()=>{}),onValueCommit:p=(()=>{}),inverted:h=!1,...v}=t,[m,b]=e.useState(null),g=C(n,(e=>b(e))),x=e.useRef(new Set),w=e.useRef(0),k="horizontal"===s,N=!m||Boolean(m.closest("form")),S=k?rv:ov,[_=[],M]=Vn({prop:d,defaultProp:c,onChange:e=>{var t;null===(t=[...x.current][w.current])||void 0===t||t.focus(),f(e)}}),O=e.useRef(_);function A(e,t,{commit:n}={commit:!1}){const r=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-o)/a)*a+o,r),l=ip(s,[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,u*a)){w.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&p(r),t?r:e}return e}))}return e.createElement(Jh,{scope:t.U,disabled:l,min:o,max:i,valueIndexToChangeRef:w,thumbs:x.current,values:_,orientation:s},e.createElement(Zh.Provider,{scope:t.U},e.createElement(Zh.Slot,{scope:t.U},e.createElement(S,y({"aria-disabled":l,"data-disabled":l?"":void 0},v,{ref:g,onPointerDown:Xe(v.onPointerDown,(()=>{l||(O.current=_)})),min:o,max:i,inverted:h,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)}(_,e);A(e,t)},onSlideMove:l?void 0:function(e){A(e,w.current)},onSlideEnd:l?void 0:function(){const e=O.current[w.current];_[w.current]!==e&&p(_)},onHomeKeyDown:()=>!l&&A(o,0,{commit:!0}),onEndKeyDown:()=>!l&&A(i,_.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=Uh.includes(e.key)||e.shiftKey&&Wh.includes(e.key)?10:1,r=w.current;A(_[r]+a*n*t,r,{commit:!0})}}})))),N&&_.map(((t,n)=>e.createElement(fv,{key:n,name:r?r+(_.length>1?"[]":""):void 0,value:t}))))})),[tv,nv]=Xh(Kh,{startEdge:"left",endEdge:"right",size:"width",direction:1}),rv=e.forwardRef(((t,n)=>{const{min:r,max:o,dir:i,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:u,onStepKeyDown:c,...d}=t,[f,p]=e.useState(null),h=C(n,(e=>p(e))),v=e.useRef(),m=_i(i),b="ltr"===m,g=b&&!a||!b&&a;function x(e){const t=v.current||f.getBoundingClientRect(),n=hv([0,t.width],g?[r,o]:[o,r]);return v.current=t,n(e-t.left)}return e.createElement(tv,{scope:t.U,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width"},e.createElement(iv,y({dir:m,"data-orientation":"horizontal"},d,{ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=x(e.clientX);null==s||s(t)},onSlideMove:e=>{const t=x(e.clientX);null==l||l(t)},onSlideEnd:()=>{v.current=void 0,null==u||u()},onStepKeyDown:e=>{const t=Vh[g?"from-left":"from-right"].includes(e.key);null==c||c({event:e,direction:t?-1:1})}})))})),ov=e.forwardRef(((t,n)=>{const{min:r,max:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:u,...c}=t,d=e.useRef(null),f=C(n,d),p=e.useRef(),h=!i;function v(e){const t=p.current||d.current.getBoundingClientRect(),n=hv([0,t.height],h?[o,r]:[r,o]);return p.current=t,n(e-t.top)}return e.createElement(tv,{scope:t.U,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1},e.createElement(iv,y({"data-orientation":"vertical"},c,{ref:f,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=v(e.clientY);null==a||a(t)},onSlideMove:e=>{const t=v(e.clientY);null==s||s(t)},onSlideEnd:()=>{p.current=void 0,null==l||l()},onStepKeyDown:e=>{const t=Vh[h?"from-bottom":"from-top"].includes(e.key);null==u||u({event:e,direction:t?-1:1})}})))})),iv=e.forwardRef(((t,n)=>{const{U:r,onSlideStart:o,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:u,...c}=t,d=Qh(Kh,r);return e.createElement(_e.span,y({},c,{ref:n,onKeyDown:Xe(t.onKeyDown,(e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):Uh.concat(Wh).includes(e.key)&&(u(e),e.preventDefault())})),onPointerDown:Xe(t.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),d.thumbs.has(t)?t.focus():o(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))}))}))})),av=e.forwardRef(((t,n)=>{const{U:r,...o}=t,i=Qh("SliderTrack",r);return e.createElement(_e.span,y({"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation},o,{ref:n}))})),sv="SliderRange",lv=e.forwardRef(((t,n)=>{const{U:r,...o}=t,i=Qh(sv,r),a=nv(sv,r),s=C(n,e.useRef(null)),l=i.values.length,u=i.values.map((e=>pv(e,i.min,i.max))),c=l>1?Math.min(...u):0,d=100-Math.max(...u);return e.createElement(_e.span,y({"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0},o,{ref:s,style:{...t.style,[a.startEdge]:c+"%",[a.endEdge]:d+"%"}}))})),uv="SliderThumb",cv=e.forwardRef(((t,n)=>{const r=qh(t.U),[o,i]=e.useState(null),a=C(n,(e=>i(e))),s=e.useMemo((()=>o?r().findIndex((e=>e.ref.current===o)):-1),[r,o]);return e.createElement(dv,y({},t,{ref:a,index:s}))})),dv=e.forwardRef(((t,n)=>{const{U:r,index:o,...i}=t,a=Qh(uv,r),s=nv(uv,r),[l,u]=e.useState(null),c=C(n,(e=>u(e))),d=_n(l),f=a.values[o],p=void 0===f?0:pv(f,a.min,a.max),h=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(o,a.values.length),v=null==d?void 0:d[s.size],m=v?function(e,t,n){const r=e/2,o=hv([0,50],[0,r]);return(r-o(t)*n)*n}(v,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}% + ${m}px)`}},e.createElement(Zh.ItemSlot,{scope:t.U},e.createElement(_e.span,y({role:"slider","aria-label":t["aria-label"]||h,"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:Xe(t.onFocus,(()=>{a.valueIndexToChangeRef.current=o}))}))))})),fv=t=>{const{value:n,...r}=t,o=e.useRef(null),i=Ca(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",y({style:{display:"none"}},r,{ref:o,defaultValue:n}))};function pv(e,t,n){return ip(100/(n-t)*(e-t),[0,100])}function hv(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 vv=ev,mv=av,bv=lv,gv=cv,xv="Switch",[wv,yv]=ye(xv),[kv,Cv]=wv(xv),Nv=e.forwardRef(((t,n)=>{const{W:r,name:o,checked:i,defaultChecked:a,required:s,disabled:l,value:u="on",onCheckedChange:c,...d}=t,[f,p]=e.useState(null),h=C(n,(e=>p(e))),v=e.useRef(!1),m=!f||Boolean(f.closest("form")),[b=!1,g]=Vn({prop:i,defaultProp:a,onChange:c});return e.createElement(kv,{scope:r,checked:b,disabled:l},e.createElement(_e.button,y({type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":_v(b),"data-disabled":l?"":void 0,disabled:l,value:u},d,{ref:h,onClick:Xe(t.onClick,(e=>{g((e=>!e)),m&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())}))})),m&&e.createElement(Sv,{control:f,bubbles:!v.current,name:o,value:u,checked:b,required:s,disabled:l,style:{transform:"translateX(-100%)"}}))})),Sv=t=>{const{control:n,checked:r,bubbles:o=!0,...i}=t,a=e.useRef(null),s=Ca(r),l=_n(n);return e.useEffect((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==r&&n){const t=new Event("click",{bubbles:o});n.call(e,r),e.dispatchEvent(t)}}),[s,r,o]),e.createElement("input",y({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 _v(e){return e?"checked":"unchecked"}const Mv=Nv,Ov=e.forwardRef(((t,n)=>{const{W:r,...o}=t,i=Cv("SwitchThumb",r);return e.createElement(_e.span,y({"data-state":_v(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:n}))})),Av="Tabs",[jv,Ev]=ye(Av,[ou]),Tv=ou(),[Dv,Fv]=jv(Av),Pv=e.forwardRef(((t,n)=>{const{V:r,loop:o=!0,...i}=t,a=Fv("TabsList",r),s=Tv(r);return e.createElement(fu,y({asChild:!0},s,{orientation:a.orientation,dir:a.dir,loop:o}),e.createElement(_e.div,y({role:"tablist","aria-orientation":a.orientation},i,{ref:n})))}));function Rv(e,t){return`${e}-trigger-${t}`}function Iv(e,t){return`${e}-content-${t}`}const zv=Pv,Lv=e.forwardRef(((t,n)=>{const{V:r,value:o,disabled:i=!1,...a}=t,s=Fv("TabsTrigger",r),l=Tv(r),u=Rv(s.baseId,o),c=Iv(s.baseId,o),d=o===s.value;return e.createElement(pu,y({asChild:!0},l,{focusable:!i,active:d}),e.createElement(_e.button,y({type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u},a,{ref:n,onMouseDown:Xe(t.onMouseDown,(e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(o)})),onKeyDown:Xe(t.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(o)})),onFocus:Xe(t.onFocus,(()=>{const e="manual"!==s.activationMode;d||i||!e||s.onValueChange(o)}))})))})),Bv=e.forwardRef(((t,n)=>{const{V:r,value:o,forceMount:i,children:a,...s}=t,l=Fv("TabsContent",r),u=Rv(l.baseId,o),c=Iv(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(Un,{present:i||d},(({present:r})=>e.createElement(_e.div,y({"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!r,id:c,tabIndex:0},s,{ref:n,style:{...t.style,animationDuration:f.current?"0s":void 0}}),r&&a)))})),$v="ToastProvider",[Hv,Uv,Wv]=ci("Toast"),[Vv,Kv]=ye("Toast",[Wv]),[Zv,qv]=Vv($v),Gv=["F8"],Xv="toast.viewportPause",Yv="toast.viewportResume",Jv=e.forwardRef(((t,n)=>{const{K:r,hotkey:o=Gv,label:i="Notifications ({hotkey})",...a}=t,s=qv("ToastViewport",r),l=Uv(r),u=e.useRef(null),c=e.useRef(null),d=e.useRef(null),f=e.useRef(null),p=C(n,f,s.onViewportChange),h=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=s.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=u.current,t=f.current;if(v&&e&&t){const n=()=>{if(!s.isClosePausedRef.current){const e=new CustomEvent(Xv);t.dispatchEvent(e),s.isClosePausedRef.current=!0}},r=()=>{if(s.isClosePausedRef.current){const e=new CustomEvent(Yv);t.dispatchEvent(e),s.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)}}}),[v,s.isClosePausedRef]);const m=e.useCallback((({tabbingDirection:e})=>{const t=l().map((t=>{const n=t.ref.current,r=[n,...hm(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 s=m({tabbingDirection:a?"backwards":"forwards"}),l=s.findIndex((e=>e===n));var o,i;if(vm(s.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(at,{ref:u,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:v?void 0:"none"}},v&&e.createElement(Qv,{ref:c,onFocusFromOutsideViewport:()=>{vm(m({tabbingDirection:"forwards"}))}}),e.createElement(Hv.Slot,{scope:r},e.createElement(_e.ol,y({tabIndex:-1},a,{ref:p}))),v&&e.createElement(Qv,{ref:d,onFocusFromOutsideViewport:()=>{vm(m({tabbingDirection:"backwards"}))}}))})),Qv=e.forwardRef(((t,n)=>{const{K:r,onFocusFromOutsideViewport:o,...i}=t,a=qv("ToastFocusProxy",r);return e.createElement(Kn,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))&&o()}}))})),em="Toast",tm=e.forwardRef(((t,n)=>{const{forceMount:r,open:o,defaultOpen:i,onOpenChange:a,...s}=t,[l=!0,u]=Vn({prop:o,defaultProp:i,onChange:a});return e.createElement(Un,{present:r||l},e.createElement(om,y({open:l},s,{ref:n,onClose:()=>u(!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`),u(!1)}))})))})),[nm,rm]=Vv(em,{onClose(){}}),om=e.forwardRef(((n,r)=>{const{K:o,type:i="foreground",duration:a,open:s,onClose:l,onEscapeKeyDown:u,onPause:c,onResume:d,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:h,onSwipeEnd:v,...m}=n,b=qv(em,o),[g,x]=e.useState(null),w=C(r,(e=>x(e))),k=e.useRef(null),N=e.useRef(null),S=a||b.duration,_=e.useRef(0),M=e.useRef(S),O=e.useRef(0),{onToastAdd:A,onToastRemove:j}=b,E=Ce((()=>{var e;(null==g?void 0:g.contains(document.activeElement))&&(null===(e=b.viewport)||void 0===e||e.focus()),l()})),T=e.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout(O.current),_.current=(new Date).getTime(),O.current=window.setTimeout(E,e))}),[E]);e.useEffect((()=>{const e=b.viewport;if(e){const t=()=>{T(M.current),null==d||d()},n=()=>{const e=(new Date).getTime()-_.current;M.current=M.current-e,window.clearTimeout(O.current),null==c||c()};return e.addEventListener(Xv,n),e.addEventListener(Yv,t),()=>{e.removeEventListener(Xv,n),e.removeEventListener(Yv,t)}}}),[b.viewport,S,c,d,T]),e.useEffect((()=>{s&&!b.isClosePausedRef.current&&T(S)}),[s,S,b.isClosePausedRef,T]),e.useEffect((()=>(A(),()=>j())),[A,j]);const D=e.useMemo((()=>g?dm(g):null),[g]);return b.viewport?e.createElement(e.Fragment,null,D&&e.createElement(im,{K:o,role:"status","aria-live":"foreground"===i?"assertive":"polite","aria-atomic":!0},D),e.createElement(nm,{scope:o,onClose:E},t.createPortal(e.createElement(Hv.ItemSlot,{scope:o},e.createElement(it,{asChild:!0,onEscapeKeyDown:Xe(u,(()=>{b.isFocusedToastEscapeKeyDownRef.current||E(),b.isFocusedToastEscapeKeyDownRef.current=!1}))},e.createElement(_e.li,y({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":b.swipeDirection},m,{ref:w,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:Xe(n.onKeyDown,(e=>{"Escape"===e.key&&(null==u||u(e.nativeEvent),e.nativeEvent.defaultPrevented||(b.isFocusedToastEscapeKeyDownRef.current=!0,E()))})),onPointerDown:Xe(n.onPointerDown,(e=>{0===e.button&&(k.current={x:e.clientX,y:e.clientY})})),onPointerMove:Xe(n.onPointerMove,(e=>{if(!k.current)return;const t=e.clientX-k.current.x,n=e.clientY-k.current.y,r=Boolean(N.current),o=["left","right"].includes(b.swipeDirection),i=["left","up"].includes(b.swipeDirection)?Math.min:Math.max,a=o?i(0,t):0,s=o?0:i(0,n),l="touch"===e.pointerType?10:2,u={x:a,y:s},c={originalEvent:e,delta:u};r?(N.current=u,fm("toast.swipeMove",p,c,{discrete:!1})):pm(u,b.swipeDirection,l)?(N.current=u,fm("toast.swipeStart",f,c,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(n)>l)&&(k.current=null)})),onPointerUp:Xe(n.onPointerUp,(e=>{const t=N.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),N.current=null,k.current=null,t){const n=e.currentTarget,r={originalEvent:e,delta:t};pm(t,b.swipeDirection,b.swipeThreshold)?fm("toast.swipeEnd",v,r,{discrete:!0}):fm("toast.swipeCancel",h,r,{discrete:!0}),n.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})))),b.viewport))):null}));om.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){return new Error(`Invalid prop \`type\` supplied to \`${em}\`. Expected \`foreground | background\`.`)}return null}};const im=t=>{const{K:n,children:r,...o}=t,i=qv(em,n),[a,s]=e.useState(!1),[l,u]=e.useState(!1);return function(e=(()=>{})){const t=Ce(e);Ne((()=>{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((()=>u(!0)),1e3);return()=>window.clearTimeout(e)}),[]),l?null:e.createElement(Hn,{asChild:!0},e.createElement(Kn,o,a&&e.createElement(e.Fragment,null,i.label," ",r)))},am=e.forwardRef(((t,n)=>{const{K:r,...o}=t;return e.createElement(_e.div,y({},o,{ref:n}))})),sm=e.forwardRef(((t,n)=>{const{K:r,...o}=t;return e.createElement(_e.div,y({},o,{ref:n}))})),lm=e.forwardRef(((t,n)=>{const{altText:r,...o}=t;return r?e.createElement(cm,{altText:r,asChild:!0},e.createElement(um,y({},o,{ref:n}))):null}));lm.propTypes={altText:e=>e.altText?null:new Error("Missing prop `altText` expected on `ToastAction`")};const um=e.forwardRef(((t,n)=>{const{K:r,...o}=t,i=rm("ToastClose",r);return e.createElement(cm,{asChild:!0},e.createElement(_e.button,y({type:"button"},o,{ref:n,onClick:Xe(t.onClick,i.onClose)})))})),cm=e.forwardRef(((t,n)=>{const{K:r,altText:o,...i}=t;return e.createElement(_e.div,y({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0},i,{ref:n}))}));function dm(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(...dm(e))}})),t}function fm(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?Me(o,i):o.dispatchEvent(i)}const pm=(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 hm(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 vm(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}const mm=Jv,bm=tm,gm=am,xm=sm,wm=lm,ym=um,km=e.forwardRef(((t,n)=>{const{pressed:r,defaultPressed:o=!1,onPressedChange:i,...a}=t,[s=!1,l]=Vn({prop:r,onChange:i,defaultProp:o});return e.createElement(_e.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 Cm={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 Nm=(t,n)=>{const r=e.forwardRef((({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:a,children:s,...l},u)=>{return e.createElement("svg",{ref:u,...Cm,width:o,height:o,stroke:r,strokeWidth:a?24*Number(i)/Number(o):i,className:`lucide lucide-${c=t,c.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 c}));return r.displayName=`${t}`,r},Sm=Nm("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),_m=Nm("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 Mm,Om;!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}(Mm||(Mm={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(Om||(Om={}));const Am=Mm.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jm=e=>{switch(typeof e){case"undefined":return Am.undefined;case"string":return Am.string;case"number":return isNaN(e)?Am.nan:Am.number;case"boolean":return Am.boolean;case"function":return Am.function;case"bigint":return Am.bigint;case"symbol":return Am.symbol;case"object":return Array.isArray(e)?Am.array:null===e?Am.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?Am.promise:"undefined"!=typeof Map&&e instanceof Map?Am.map:"undefined"!=typeof Set&&e instanceof Set?Am.set:"undefined"!=typeof Date&&e instanceof Date?Am.date:Am.object;default:return Am.unknown}},Em=Mm.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 Tm 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,Mm.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()}}Tm.create=e=>new Tm(e);const Dm=(e,t)=>{let n;switch(e.code){case Em.invalid_type:n=e.received===Am.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Em.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Mm.jsonStringifyReplacer)}`;break;case Em.unrecognized_keys:n=`Unrecognized key(s) in object: ${Mm.joinValues(e.keys,", ")}`;break;case Em.invalid_union:n="Invalid input";break;case Em.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Mm.joinValues(e.options)}`;break;case Em.invalid_enum_value:n=`Invalid enum value. Expected ${Mm.joinValues(e.options)}, received '${e.received}'`;break;case Em.invalid_arguments:n="Invalid function arguments";break;case Em.invalid_return_type:n="Invalid function return type";break;case Em.invalid_date:n="Invalid date";break;case Em.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}"`:Mm.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Em.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 Em.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 Em.custom:n="Invalid input";break;case Em.invalid_intersection_types:n="Intersection results could not be merged";break;case Em.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Em.not_finite:n="Number must be finite";break;default:n=t.defaultError,Mm.assertNever(e)}return{message:n}};let Fm=Dm;function Pm(){return Fm}const Rm=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};let s="";const l=r.filter((e=>!!e)).slice().reverse();for(const u of l)s=u(a,{data:t,defaultError:s}).message;return{...o,path:i,message:o.message||s}};function Im(e,t){const n=Rm({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Pm(),Dm].filter((e=>!!e))});e.common.issues.push(n)}class zm{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 Lm;"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 zm.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 Lm;if("aborted"===o.status)return Lm;"dirty"===t.status&&e.dirty(),"dirty"===o.status&&e.dirty(),(void 0!==o.value||r.alwaysSet)&&(n[t.value]=o.value)}return{status:e.value,value:n}}}const Lm=Object.freeze({status:"aborted"}),Bm=e=>({status:"valid",value:e}),$m=e=>"aborted"===e.status,Hm=e=>"dirty"===e.status,Um=e=>"valid"===e.status,Wm=e=>"undefined"!=typeof Promise&&e instanceof Promise;var Vm;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(Vm||(Vm={}));class Km{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 Zm=(e,t)=>{if(Um(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 Tm(e.common.issues);return this._error=t,this._error}}};function qm(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 Gm{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 jm(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:jm(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new zm,ctx:{common:e.parent.common,data:e.data,parsedType:jm(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Wm(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:jm(e)},o=this._parseSync({data:e,path:r.path,parent:r});return Zm(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:jm(e)},r=this._parse({data:e,path:n.path,parent:n}),o=await(Wm(r)?r:Promise.resolve(r));return Zm(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:Em.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 Tb({schema:this,typeName:Bb.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Db.create(this,this._def)}nullable(){return Fb.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return bb.create(this,this._def)}promise(){return Eb.create(this,this._def)}or(e){return wb.create([this,e],this._def)}and(e){return kb.create(this,e,this._def)}transform(e){return new Tb({...qm(this._def),schema:this,typeName:Bb.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Pb({...qm(this._def),innerType:this,defaultValue:t,typeName:Bb.ZodDefault})}brand(){return new zb({typeName:Bb.ZodBranded,type:this,...qm(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Rb({...qm(this._def),innerType:this,catchValue:t,typeName:Bb.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Lb.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Xm=/^c[^\s-]{8,}$/i,Ym=/^[a-z][a-z0-9]*$/,Jm=/[0-9A-HJKMNP-TV-Z]{26}/,Qm=/^([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,eb=/^(([^<>()[\]\\.,;:\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,})+))$/,tb=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,nb=/^(((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}))$/,rb=/^(([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 ob extends Gm{constructor(){super(...arguments),this._regex=(e,t,n)=>this.refinement((t=>e.test(t)),{validation:t,code:Em.invalid_string,...Vm.errToObj(n)}),this.nonempty=e=>this.min(1,Vm.errToObj(e)),this.trim=()=>new ob({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new ob({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new ob({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==Am.string){const t=this._getOrReturnCtx(e);return Im(t,{code:Em.invalid_type,expected:Am.string,received:t.parsedType}),Lm}const t=new zm;let n;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),Im(n,{code:Em.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("max"===s.kind)e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),Im(n,{code:Em.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const r=e.data.length>s.value,o=e.data.length<s.value;(r||o)&&(n=this._getOrReturnCtx(e,n),r?Im(n,{code:Em.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&Im(n,{code:Em.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if("email"===s.kind)eb.test(e.data)||(n=this._getOrReturnCtx(e,n),Im(n,{validation:"email",code:Em.invalid_string,message:s.message}),t.dirty());else if("emoji"===s.kind)tb.test(e.data)||(n=this._getOrReturnCtx(e,n),Im(n,{validation:"emoji",code:Em.invalid_string,message:s.message}),t.dirty());else if("uuid"===s.kind)Qm.test(e.data)||(n=this._getOrReturnCtx(e,n),Im(n,{validation:"uuid",code:Em.invalid_string,message:s.message}),t.dirty());else if("cuid"===s.kind)Xm.test(e.data)||(n=this._getOrReturnCtx(e,n),Im(n,{validation:"cuid",code:Em.invalid_string,message:s.message}),t.dirty());else if("cuid2"===s.kind)Ym.test(e.data)||(n=this._getOrReturnCtx(e,n),Im(n,{validation:"cuid2",code:Em.invalid_string,message:s.message}),t.dirty());else if("ulid"===s.kind)Jm.test(e.data)||(n=this._getOrReturnCtx(e,n),Im(n,{validation:"ulid",code:Em.invalid_string,message:s.message}),t.dirty());else if("url"===s.kind)try{new URL(e.data)}catch(a){n=this._getOrReturnCtx(e,n),Im(n,{validation:"url",code:Em.invalid_string,message:s.message}),t.dirty()}else if("regex"===s.kind){s.regex.lastIndex=0;s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Im(n,{validation:"regex",code:Em.invalid_string,message:s.message}),t.dirty())}else if("trim"===s.kind)e.data=e.data.trim();else if("includes"===s.kind)e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),Im(n,{code:Em.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),t.dirty());else if("toLowerCase"===s.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===s.kind)e.data=e.data.toUpperCase();else if("startsWith"===s.kind)e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),Im(n,{code:Em.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty());else if("endsWith"===s.kind)e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),Im(n,{code:Em.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty());else if("datetime"===s.kind){((i=s).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),Im(n,{code:Em.invalid_string,validation:"datetime",message:s.message}),t.dirty())}else"ip"===s.kind?(r=e.data,("v4"!==(o=s.version)&&o||!nb.test(r))&&("v6"!==o&&o||!rb.test(r))&&(n=this._getOrReturnCtx(e,n),Im(n,{validation:"ip",code:Em.invalid_string,message:s.message}),t.dirty())):Mm.assertNever(s);var r,o,i;return{status:t.value,value:e.data}}_addCheck(e){return new ob({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Vm.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Vm.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Vm.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Vm.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Vm.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Vm.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Vm.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Vm.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,...Vm.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Vm.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...Vm.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Vm.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Vm.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Vm.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Vm.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Vm.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 ib(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)}ob.create=e=>{var t;return new ob({checks:[],typeName:Bb.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...qm(e)})};class ab extends Gm{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)!==Am.number){const t=this._getOrReturnCtx(e);return Im(t,{code:Em.invalid_type,expected:Am.number,received:t.parsedType}),Lm}let t;const n=new zm;for(const r of this._def.checks)if("int"===r.kind)Mm.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Im(t,{code:Em.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),Im(t,{code:Em.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),Im(t,{code:Em.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==ib(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),Im(t,{code:Em.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Im(t,{code:Em.not_finite,message:r.message}),n.dirty()):Mm.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Vm.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Vm.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Vm.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Vm.toString(t))}setLimit(e,t,n,r){return new ab({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Vm.toString(r)}]})}_addCheck(e){return new ab({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Vm.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Vm.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Vm.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Vm.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Vm.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Vm.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Vm.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Vm.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Vm.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&&Mm.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)}}ab.create=e=>new ab({checks:[],typeName:Bb.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...qm(e)});class sb extends Gm{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)!==Am.bigint){const t=this._getOrReturnCtx(e);return Im(t,{code:Em.invalid_type,expected:Am.bigint,received:t.parsedType}),Lm}let t;const n=new zm;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),Im(t,{code:Em.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),Im(t,{code:Em.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),Im(t,{code:Em.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):Mm.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Vm.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Vm.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Vm.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Vm.toString(t))}setLimit(e,t,n,r){return new sb({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Vm.toString(r)}]})}_addCheck(e){return new sb({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Vm.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Vm.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Vm.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Vm.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Vm.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}}sb.create=e=>{var t;return new sb({checks:[],typeName:Bb.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...qm(e)})};class lb extends Gm{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==Am.boolean){const t=this._getOrReturnCtx(e);return Im(t,{code:Em.invalid_type,expected:Am.boolean,received:t.parsedType}),Lm}return Bm(e.data)}}lb.create=e=>new lb({typeName:Bb.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...qm(e)});class ub extends Gm{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==Am.date){const t=this._getOrReturnCtx(e);return Im(t,{code:Em.invalid_type,expected:Am.date,received:t.parsedType}),Lm}if(isNaN(e.data.getTime())){return Im(this._getOrReturnCtx(e),{code:Em.invalid_date}),Lm}const t=new zm;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),Im(n,{code:Em.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),Im(n,{code:Em.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):Mm.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ub({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Vm.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Vm.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}}ub.create=e=>new ub({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Bb.ZodDate,...qm(e)});class cb extends Gm{_parse(e){if(this._getType(e)!==Am.symbol){const t=this._getOrReturnCtx(e);return Im(t,{code:Em.invalid_type,expected:Am.symbol,received:t.parsedType}),Lm}return Bm(e.data)}}cb.create=e=>new cb({typeName:Bb.ZodSymbol,...qm(e)});class db extends Gm{_parse(e){if(this._getType(e)!==Am.undefined){const t=this._getOrReturnCtx(e);return Im(t,{code:Em.invalid_type,expected:Am.undefined,received:t.parsedType}),Lm}return Bm(e.data)}}db.create=e=>new db({typeName:Bb.ZodUndefined,...qm(e)});class fb extends Gm{_parse(e){if(this._getType(e)!==Am.null){const t=this._getOrReturnCtx(e);return Im(t,{code:Em.invalid_type,expected:Am.null,received:t.parsedType}),Lm}return Bm(e.data)}}fb.create=e=>new fb({typeName:Bb.ZodNull,...qm(e)});class pb extends Gm{constructor(){super(...arguments),this._any=!0}_parse(e){return Bm(e.data)}}pb.create=e=>new pb({typeName:Bb.ZodAny,...qm(e)});class hb extends Gm{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Bm(e.data)}}hb.create=e=>new hb({typeName:Bb.ZodUnknown,...qm(e)});class vb extends Gm{_parse(e){const t=this._getOrReturnCtx(e);return Im(t,{code:Em.invalid_type,expected:Am.never,received:t.parsedType}),Lm}}vb.create=e=>new vb({typeName:Bb.ZodNever,...qm(e)});class mb extends Gm{_parse(e){if(this._getType(e)!==Am.undefined){const t=this._getOrReturnCtx(e);return Im(t,{code:Em.invalid_type,expected:Am.void,received:t.parsedType}),Lm}return Bm(e.data)}}mb.create=e=>new mb({typeName:Bb.ZodVoid,...qm(e)});class bb extends Gm{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==Am.array)return Im(t,{code:Em.invalid_type,expected:Am.array,received:t.parsedType}),Lm;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,o=t.data.length<r.exactLength.value;(e||o)&&(Im(t,{code:e?Em.too_big:Em.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&&(Im(t,{code:Em.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&&(Im(t,{code:Em.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 Km(t,e,t.path,n))))).then((e=>zm.mergeArray(n,e)));const o=[...t.data].map(((e,n)=>r.type._parseSync(new Km(t,e,t.path,n))));return zm.mergeArray(n,o)}get element(){return this._def.type}min(e,t){return new bb({...this._def,minLength:{value:e,message:Vm.toString(t)}})}max(e,t){return new bb({...this._def,maxLength:{value:e,message:Vm.toString(t)}})}length(e,t){return new bb({...this._def,exactLength:{value:e,message:Vm.toString(t)}})}nonempty(e){return this.min(1,e)}}function gb(e){if(e instanceof xb){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Db.create(gb(r))}return new xb({...e._def,shape:()=>t})}return e instanceof bb?new bb({...e._def,type:gb(e.element)}):e instanceof Db?Db.create(gb(e.unwrap())):e instanceof Fb?Fb.create(gb(e.unwrap())):e instanceof Cb?Cb.create(e.items.map((e=>gb(e)))):e}bb.create=(e,t)=>new bb({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Bb.ZodArray,...qm(t)});class xb extends Gm{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=Mm.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==Am.object){const t=this._getOrReturnCtx(e);return Im(t,{code:Em.invalid_type,expected:Am.object,received:t.parsedType}),Lm}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:o}=this._getCached(),i=[];if(!(this._def.catchall instanceof vb&&"strip"===this._def.unknownKeys))for(const s in n.data)o.includes(s)||i.push(s);const a=[];for(const s of o){const e=r[s],t=n.data[s];a.push({key:{status:"valid",value:s},value:e._parse(new Km(n,t,n.path,s)),alwaysSet:s in n.data})}if(this._def.catchall instanceof vb){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&&(Im(n,{code:Em.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 Km(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=>zm.mergeObjectSync(t,e))):zm.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return Vm.errToObj,new xb({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,o,i,a;const s=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=Vm.errToObj(e).message)&&void 0!==a?a:s}:{message:s}}}:{}})}strip(){return new xb({...this._def,unknownKeys:"strip"})}passthrough(){return new xb({...this._def,unknownKeys:"passthrough"})}extend(e){return new xb({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new xb({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Bb.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new xb({...this._def,catchall:e})}pick(e){const t={};return Mm.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new xb({...this._def,shape:()=>t})}omit(e){const t={};return Mm.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new xb({...this._def,shape:()=>t})}deepPartial(){return gb(this)}partial(e){const t={};return Mm.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new xb({...this._def,shape:()=>t})}required(e){const t={};return Mm.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Db;)e=e._def.innerType;t[n]=e}})),new xb({...this._def,shape:()=>t})}keyof(){return Ob(Mm.objectKeys(this.shape))}}xb.create=(e,t)=>new xb({shape:()=>e,unknownKeys:"strip",catchall:vb.create(),typeName:Bb.ZodObject,...qm(t)}),xb.strictCreate=(e,t)=>new xb({shape:()=>e,unknownKeys:"strict",catchall:vb.create(),typeName:Bb.ZodObject,...qm(t)}),xb.lazycreate=(e,t)=>new xb({shape:e,unknownKeys:"strip",catchall:vb.create(),typeName:Bb.ZodObject,...qm(t)});class wb extends Gm{_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 Tm(e.ctx.common.issues)));return Im(t,{code:Em.invalid_union,unionErrors:n}),Lm}));{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 Tm(e)));return Im(t,{code:Em.invalid_union,unionErrors:o}),Lm}}get options(){return this._def.options}}wb.create=(e,t)=>new wb({options:e,typeName:Bb.ZodUnion,...qm(t)});function yb(e,t){const n=jm(e),r=jm(t);if(e===t)return{valid:!0,data:e};if(n===Am.object&&r===Am.object){const n=Mm.objectKeys(t),r=Mm.objectKeys(e).filter((e=>-1!==n.indexOf(e))),o={...e,...t};for(const i of r){const n=yb(e[i],t[i]);if(!n.valid)return{valid:!1};o[i]=n.data}return{valid:!0,data:o}}if(n===Am.array&&r===Am.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const o=yb(e[r],t[r]);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}return n===Am.date&&r===Am.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class kb extends Gm{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if($m(e)||$m(r))return Lm;const o=yb(e.value,r.value);return o.valid?((Hm(e)||Hm(r))&&t.dirty(),{status:t.value,value:o.data}):(Im(n,{code:Em.invalid_intersection_types}),Lm)};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}))}}kb.create=(e,t,n)=>new kb({left:e,right:t,typeName:Bb.ZodIntersection,...qm(n)});class Cb extends Gm{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Am.array)return Im(n,{code:Em.invalid_type,expected:Am.array,received:n.parsedType}),Lm;if(n.data.length<this._def.items.length)return Im(n,{code:Em.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Lm;!this._def.rest&&n.data.length>this._def.items.length&&(Im(n,{code:Em.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 Km(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>zm.mergeArray(t,e))):zm.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new Cb({...this._def,rest:e})}}Cb.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Cb({items:e,typeName:Bb.ZodTuple,rest:null,...qm(t)})};class Nb extends Gm{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Am.map)return Im(n,{code:Em.invalid_type,expected:Am.map,received:n.parsedType}),Lm;const r=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map((([e,t],i)=>({key:r._parse(new Km(n,e,n.path,[i,"key"])),value:o._parse(new Km(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 Lm;"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 Lm;"dirty"!==r.status&&"dirty"!==o.status||t.dirty(),e.set(r.value,o.value)}return{status:t.value,value:e}}}}Nb.create=(e,t,n)=>new Nb({valueType:t,keyType:e,typeName:Bb.ZodMap,...qm(n)});class Sb extends Gm{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Am.set)return Im(n,{code:Em.invalid_type,expected:Am.set,received:n.parsedType}),Lm;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(Im(n,{code:Em.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&&(Im(n,{code:Em.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 Lm;"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 Km(n,e,n.path,t))));return n.common.async?Promise.all(a).then((e=>i(e))):i(a)}min(e,t){return new Sb({...this._def,minSize:{value:e,message:Vm.toString(t)}})}max(e,t){return new Sb({...this._def,maxSize:{value:e,message:Vm.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Sb.create=(e,t)=>new Sb({valueType:e,minSize:null,maxSize:null,typeName:Bb.ZodSet,...qm(t)});class _b extends Gm{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})}}_b.create=(e,t)=>new _b({getter:e,typeName:Bb.ZodLazy,...qm(t)});class Mb extends Gm{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Im(t,{received:t.data,code:Em.invalid_literal,expected:this._def.value}),Lm}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Ob(e,t){return new Ab({values:e,typeName:Bb.ZodEnum,...qm(t)})}Mb.create=(e,t)=>new Mb({value:e,typeName:Bb.ZodLiteral,...qm(t)});class Ab extends Gm{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return Im(t,{expected:Mm.joinValues(n),received:t.parsedType,code:Em.invalid_type}),Lm}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return Im(t,{received:t.data,code:Em.invalid_enum_value,options:n}),Lm}return Bm(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 Ab.create(e)}exclude(e){return Ab.create(this.options.filter((t=>!e.includes(t))))}}Ab.create=Ob;class jb extends Gm{_parse(e){const t=Mm.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Am.string&&n.parsedType!==Am.number){const e=Mm.objectValues(t);return Im(n,{expected:Mm.joinValues(e),received:n.parsedType,code:Em.invalid_type}),Lm}if(-1===t.indexOf(e.data)){const e=Mm.objectValues(t);return Im(n,{received:n.data,code:Em.invalid_enum_value,options:e}),Lm}return Bm(e.data)}get enum(){return this._def.values}}jb.create=(e,t)=>new jb({values:e,typeName:Bb.ZodNativeEnum,...qm(t)});class Eb extends Gm{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Am.promise&&!1===t.common.async)return Im(t,{code:Em.invalid_type,expected:Am.promise,received:t.parsedType}),Lm;const n=t.parsedType===Am.promise?t.data:Promise.resolve(t.data);return Bm(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Eb.create=(e,t)=>new Eb({type:e,typeName:Bb.ZodPromise,...qm(t)});class Tb extends Gm{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Bb.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null;if("preprocess"===r.type){const e=r.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 o={addIssue:e=>{Im(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),"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?Lm:("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?Lm:("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(!Um(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=>Um(e)?Promise.resolve(r.transform(e.value,o)).then((e=>({status:t.value,value:e}))):e))}Mm.assertNever(r)}}Tb.create=(e,t,n)=>new Tb({schema:e,typeName:Bb.ZodEffects,effect:t,...qm(n)}),Tb.createWithPreprocess=(e,t,n)=>new Tb({schema:t,effect:{type:"preprocess",transform:e},typeName:Bb.ZodEffects,...qm(n)});class Db extends Gm{_parse(e){return this._getType(e)===Am.undefined?Bm(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Db.create=(e,t)=>new Db({innerType:e,typeName:Bb.ZodOptional,...qm(t)});class Fb extends Gm{_parse(e){return this._getType(e)===Am.null?Bm(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Fb.create=(e,t)=>new Fb({innerType:e,typeName:Bb.ZodNullable,...qm(t)});class Pb extends Gm{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===Am.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Pb.create=(e,t)=>new Pb({innerType:e,typeName:Bb.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...qm(t)});class Rb extends Gm{_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 Wm(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Tm(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new Tm(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Rb.create=(e,t)=>new Rb({innerType:e,typeName:Bb.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...qm(t)});class Ib extends Gm{_parse(e){if(this._getType(e)!==Am.nan){const t=this._getOrReturnCtx(e);return Im(t,{code:Em.invalid_type,expected:Am.nan,received:t.parsedType}),Lm}return{status:"valid",value:e.data}}}Ib.create=e=>new Ib({typeName:Bb.ZodNaN,...qm(e)});class zb extends Gm{_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 Lb extends Gm{_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?Lm:"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?Lm:"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 Lb({in:e,out:t,typeName:Bb.ZodPipeline})}}var Bb;xb.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"}(Bb||(Bb={}));const $b=ob.create;ab.create,Ib.create,sb.create;const Hb=lb.create;ub.create,cb.create,db.create,fb.create,pb.create,hb.create,vb.create,mb.create;const Ub=bb.create,Wb=xb.create;xb.strictCreate,wb.create,kb.create,Cb.create,Nb.create,Sb.create,_b.create,Mb.create,Ab.create;const Vb=jb.create;
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -13,5 +13,5 @@
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 Kb(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}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,s)}l((r=r.apply(e,t||[])).next())}))}Eb.create,Tb.create,Db.create,Fb.create,Tb.createWithPreprocess,Lb.create;var Zb=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 qb="__googleMapsScriptId";var Gb;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(Gb||(Gb={}));class Xb{constructor({apiKey:e,authReferrerPolicy:t,channel:n,client:r,id:o=qb,language:i,libraries:a=[],mapIds:s,nonce:l,region:u,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||qb,this.language=i,this.libraries=a,this.mapIds=s,this.nonce=l,this.region=u,this.retries=c,this.url=d,this.version=f,Xb.instance){if(!Zb(this.options,Xb.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Xb.instance.options)}`);return Xb.instance}Xb.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?Gb.FAILURE:this.done?Gb.SUCCESS:this.loading?Gb.LOADING:Gb.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",s="__ib__",l=document,u=window;u=u[i]||(u[i]={});const c=u.maps||(u.maps={}),d=new Set,f=new URLSearchParams,p=()=>t||(t=new Promise(((a,u)=>Kb(this,void 0,void 0,(function*(){var p;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."+s),n.src=this.url+"?"+f,c[s]=a,n.onerror=()=>t=u(Error(o+" could not load.")),n.nonce=this.nonce||(null===(p=l.querySelector("script[nonce]"))||void 0===p?void 0:p.nonce)||"",l.head.append(n)})))));c[a]?console.warn(o+" only loads once. Ignoring:",e):c[a]=(e,...t)=>d.add(e)&&p().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 Yb={},Jb={},Qb="object"==typeof il&&il&&il.Object===Object&&il,eg=Qb,tg="object"==typeof self&&self&&self.Object===Object&&self,ng=eg||tg||Function("return this")(),rg=ng.Symbol,og=rg,ig=Object.prototype,ag=ig.hasOwnProperty,sg=ig.toString,lg=og?og.toStringTag:void 0;var ug=function(e){var t=ag.call(e,lg),n=e[lg];try{e[lg]=void 0;var r=!0}catch(i){}var o=sg.call(e);return r&&(t?e[lg]=n:delete e[lg]),o},cg=Object.prototype.toString;var dg=ug,fg=function(e){return cg.call(e)},pg=rg?rg.toStringTag:void 0;var hg=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":pg&&pg in Object(e)?dg(e):fg(e)},vg=Array.isArray;var mg=function(e){return null!=e&&"object"==typeof e},bg=hg,gg=vg,xg=mg;var wg=function(e){return"string"==typeof e||!gg(e)&&xg(e)&&"[object String]"==bg(e)};var yg=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}},kg=yg();var Cg=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},Ng=hg,Sg=mg;var _g=function(e){return Sg(e)&&"[object Arguments]"==Ng(e)},Mg=mg,Og=Object.prototype,Ag=Og.hasOwnProperty,jg=Og.propertyIsEnumerable,Eg=_g(function(){return arguments}())?_g:function(e){return Mg(e)&&Ag.call(e,"callee")&&!jg.call(e,"callee")},Tg=Eg,Dg={exports:{}};var Fg=function(){return!1};!function(e,t){var n=ng,r=Fg,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;e.exports=s}(Dg,Dg.exports);var Pg=Dg.exports,Rg=/^(?:0|[1-9]\d*)$/;var Ig=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Rg.test(e))&&e>-1&&e%1==0&&e<t};var zg=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Lg=hg,Bg=zg,$g=mg,Hg={};Hg["[object Float32Array]"]=Hg["[object Float64Array]"]=Hg["[object Int8Array]"]=Hg["[object Int16Array]"]=Hg["[object Int32Array]"]=Hg["[object Uint8Array]"]=Hg["[object Uint8ClampedArray]"]=Hg["[object Uint16Array]"]=Hg["[object Uint32Array]"]=!0,Hg["[object Arguments]"]=Hg["[object Array]"]=Hg["[object ArrayBuffer]"]=Hg["[object Boolean]"]=Hg["[object DataView]"]=Hg["[object Date]"]=Hg["[object Error]"]=Hg["[object Function]"]=Hg["[object Map]"]=Hg["[object Number]"]=Hg["[object Object]"]=Hg["[object RegExp]"]=Hg["[object Set]"]=Hg["[object String]"]=Hg["[object WeakMap]"]=!1;var Ug=function(e){return $g(e)&&Bg(e.length)&&!!Hg[Lg(e)]};var Wg=function(e){return function(t){return e(t)}},Vg={exports:{}};!function(e,t){var n=Qb,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(t){}}();e.exports=a}(Vg,Vg.exports);var Kg=Vg.exports,Zg=Ug,qg=Wg,Gg=Kg&&Kg.isTypedArray,Xg=Gg?qg(Gg):Zg,Yg=Cg,Jg=Tg,Qg=vg,ex=Pg,tx=Ig,nx=Xg,rx=Object.prototype.hasOwnProperty;var ox=function(e,t){var n=Qg(e),r=!n&&Jg(e),o=!n&&!r&&ex(e),i=!n&&!r&&!o&&nx(e),a=n||r||o||i,s=a?Yg(e.length,String):[],l=s.length;for(var u in e)!t&&!rx.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||tx(u,l))||s.push(u);return s},ix=Object.prototype;var ax=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ix)};var sx=function(e,t){return function(n){return e(t(n))}},lx=sx(Object.keys,Object),ux=ax,cx=lx,dx=Object.prototype.hasOwnProperty;var fx=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},px=hg,hx=fx;var vx=function(e){if(!hx(e))return!1;var t=px(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},mx=vx,bx=zg;var gx=function(e){return null!=e&&bx(e.length)&&!mx(e)},xx=ox,wx=function(e){if(!ux(e))return cx(e);var t=[];for(var n in Object(e))dx.call(e,n)&&"constructor"!=n&&t.push(n);return t},yx=gx;var kx=function(e){return yx(e)?xx(e):wx(e)},Cx=kg,Nx=kx;var Sx=function(e,t){return e&&Cx(e,t,Nx)};var _x=function(e){return e},Mx=_x;var Ox=Sx,Ax=function(e){return"function"==typeof e?e:Mx};var jx=function(e,t){return e&&Ox(e,Ax(t))},Ex=sx(Object.getPrototypeOf,Object),Tx=hg,Dx=Ex,Fx=mg,Px=Function.prototype,Rx=Object.prototype,Ix=Px.toString,zx=Rx.hasOwnProperty,Lx=Ix.call(Object);var Bx=function(e){if(!Fx(e)||"[object Object]"!=Tx(e))return!1;var t=Dx(e);if(null===t)return!0;var n=zx.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ix.call(n)==Lx};var $x=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 Hx=function(){this.Z=[],this.size=0};var Ux=function(e,t){return e===t||e!=e&&t!=t},Wx=Ux;var Vx=function(e,t){for(var n=e.length;n--;)if(Wx(e[n][0],t))return n;return-1},Kx=Vx,Zx=Array.prototype.splice;var qx=function(e){var t=this.Z,n=Kx(t,e);return!(n<0)&&(n==t.length-1?t.pop():Zx.call(t,n,1),--this.size,!0)},Gx=Vx;var Xx=function(e){var t=this.Z,n=Gx(t,e);return n<0?void 0:t[n][1]},Yx=Vx;var Jx=Vx;var Qx=function(e,t){var n=this.Z,r=Jx(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ew=Hx,tw=qx,nw=Xx,rw=function(e){return Yx(this.Z,e)>-1},ow=Qx;function iw(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])}}iw.prototype.clear=ew,iw.prototype.delete=tw,iw.prototype.get=nw,iw.prototype.has=rw,iw.prototype.set=ow;var aw=iw,sw=aw;var lw=function(){this.Z=new sw,this.size=0};var uw=function(e){var t=this.Z,n=t.delete(e);return this.size=t.size,n};var cw=function(e){return this.Z.get(e)};var dw,fw=function(e){return this.Z.has(e)},pw=ng["q"],hw=(dw=/[^.]+$/.exec(pw&&pw.keys&&pw.keys.IE_PROTO||""))?"Symbol(src)_1."+dw:"";var vw=function(e){return!!hw&&hw in e},mw=Function.prototype.toString;var bw=function(e){if(null!=e){try{return mw.call(e)}catch(t){}try{return e+""}catch(t){}}return""},gw=vx,xw=vw,ww=fx,yw=bw,kw=/^\[object .+?Constructor\]$/,Cw=Function.prototype,Nw=Object.prototype,Sw=Cw.toString,_w=Nw.hasOwnProperty,Mw=RegExp("^"+Sw.call(_w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ow=function(e){return!(!ww(e)||xw(e))&&(gw(e)?Mw:kw).test(yw(e))},Aw=function(e,t){return null==e?void 0:e[t]};var jw=function(e,t){var n=Aw(e,t);return Ow(n)?n:void 0},Ew=jw(ng,"Map"),Tw=jw(Object,"create"),Dw=Tw;var Fw=function(){this.Z=Dw?Dw(null):{},this.size=0};var Pw=function(e){var t=this.has(e)&&delete this.Z[e];return this.size-=t?1:0,t},Rw=Tw,Iw=Object.prototype.hasOwnProperty;var zw=function(e){var t=this.Z;if(Rw){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Iw.call(t,e)?t[e]:void 0},Lw=Tw,Bw=Object.prototype.hasOwnProperty;var $w=Tw;var Hw=Fw,Uw=Pw,Ww=zw,Vw=function(e){var t=this.Z;return Lw?void 0!==t[e]:Bw.call(t,e)},Kw=function(e,t){var n=this.Z;return this.size+=this.has(e)?0:1,n[e]=$w&&void 0===t?"__lodash_hash_undefined__":t,this};function Zw(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])}}Zw.prototype.clear=Hw,Zw.prototype.delete=Uw,Zw.prototype.get=Ww,Zw.prototype.has=Vw,Zw.prototype.set=Kw;var qw=Zw,Gw=aw,Xw=Ew;var Yw=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Jw=function(e,t){var n=e.Z;return Yw(t)?n["string"==typeof t?"string":"hash"]:n.map},Qw=Jw;var ey=Jw;var ty=Jw;var ny=Jw;var ry=function(e,t){var n=ny(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},oy=function(){this.size=0,this.Z={hash:new qw,map:new(Xw||Gw),string:new qw}},iy=function(e){var t=Qw(this,e).delete(e);return this.size-=t?1:0,t},ay=function(e){return ey(this,e).get(e)},sy=function(e){return ty(this,e).has(e)},ly=ry;function uy(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])}}uy.prototype.clear=oy,uy.prototype.delete=iy,uy.prototype.get=ay,uy.prototype.has=sy,uy.prototype.set=ly;var cy=uy,dy=aw,fy=Ew,py=cy;var hy=aw,vy=lw,my=uw,by=cw,gy=fw,xy=function(e,t){var n=this.Z;if(n instanceof dy){var r=n.Z;if(!fy||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.Z=new py(r)}return n.set(e,t),this.size=n.size,this};function wy(e){var t=this.Z=new hy(e);this.size=t.size}wy.prototype.clear=vy,wy.prototype.delete=my,wy.prototype.get=by,wy.prototype.has=gy,wy.prototype.set=xy;var yy=wy;var ky=cy,Cy=function(e){return this.Z.set(e,"__lodash_hash_undefined__"),this},Ny=function(e){return this.Z.has(e)};function Sy(e){var t=-1,n=null==e?0:e.length;for(this.Z=new ky;++t<n;)this.add(e[t])}Sy.prototype.add=Sy.prototype.push=Cy,Sy.prototype.has=Ny;var _y=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 My=Sy,Oy=_y,Ay=function(e,t){return e.has(t)};var jy=function(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=2&n?new My:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var h=e[d],v=t[d];if(r)var m=a?r(v,h,d,t,e,i):r(h,v,d,e,t,i);if(void 0!==m){if(m)continue;f=!1;break}if(p){if(!Oy(t,(function(e,t){if(!Ay(p,t)&&(h===e||o(h,e,n,r,i)))return p.push(t)}))){f=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f},Ey=ng.Uint8Array;var Ty=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var Dy=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Fy=Ey,Py=Ux,Ry=jy,Iy=Ty,zy=Dy,Ly=rg?rg.prototype:void 0,By=Ly?Ly.valueOf:void 0;var $y=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 Fy(e),new Fy(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Py(+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 s=Iy;case"[object Set]":var l=1&r;if(s||(s=zy),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=Ry(s(e),s(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(By)return By.call(e)==By.call(t)}return!1};var Hy=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},Uy=Hy,Wy=vg;var Vy=function(e,t,n){var r=t(e);return Wy(e)?r:Uy(r,n(e))};var Ky=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 Zy=function(){return[]},qy=Ky,Gy=Zy,Xy=Object.prototype.propertyIsEnumerable,Yy=Object.getOwnPropertySymbols,Jy=Yy?function(e){return null==e?[]:(e=Object(e),qy(Yy(e),(function(t){return Xy.call(e,t)})))}:Gy,Qy=Vy,ek=Jy,tk=kx;var nk=function(e){return Qy(e,tk,ek)},rk=nk,ok=Object.prototype.hasOwnProperty;var ik=function(e,t,n,r,o,i){var a=1&n,s=rk(e),l=s.length;if(l!=rk(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:ok.call(t,c)))return!1}var d=i.get(e),f=i.get(t);if(d&&f)return d==t&&f==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=a;++u<l;){var v=e[c=s[u]],m=t[c];if(r)var b=a?r(m,v,c,t,e,i):r(v,m,c,e,t,i);if(!(void 0===b?v===m||o(v,m,n,r,i):b)){p=!1;break}h||(h="constructor"==c)}if(p&&!h){var g=e.constructor,x=t.constructor;g==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof x&&x instanceof x||(p=!1)}return i.delete(e),i.delete(t),p},ak=jw(ng,"DataView"),sk=Ew,lk=jw(ng,"Promise"),uk=jw(ng,"Set"),ck=jw(ng,"WeakMap"),dk=hg,fk=bw,pk="[object Map]",hk="[object Promise]",vk="[object Set]",mk="[object WeakMap]",bk="[object DataView]",gk=fk(ak),xk=fk(sk),wk=fk(lk),yk=fk(uk),kk=fk(ck),Ck=dk;(ak&&Ck(new ak(new ArrayBuffer(1)))!=bk||sk&&Ck(new sk)!=pk||lk&&Ck(lk.resolve())!=hk||uk&&Ck(new uk)!=vk||ck&&Ck(new ck)!=mk)&&(Ck=function(e){var t=dk(e),n="[object Object]"==t?e.constructor:void 0,r=n?fk(n):"";if(r)switch(r){case gk:return bk;case xk:return pk;case wk:return hk;case yk:return vk;case kk:return mk}return t});var Nk=Ck,Sk=yy,_k=jy,Mk=$y,Ok=ik,Ak=Nk,jk=vg,Ek=Pg,Tk=Xg,Dk="[object Arguments]",Fk="[object Array]",Pk="[object Object]",Rk=Object.prototype.hasOwnProperty;var Ik=function(e,t,n,r,o,i){var a=jk(e),s=jk(t),l=a?Fk:Ak(e),u=s?Fk:Ak(t),c=(l=l==Dk?Pk:l)==Pk,d=(u=u==Dk?Pk:u)==Pk,f=l==u;if(f&&Ek(e)){if(!Ek(t))return!1;a=!0,c=!1}if(f&&!c)return i||(i=new Sk),a||Tk(e)?_k(e,t,n,r,o,i):Mk(e,t,l,n,r,o,i);if(!(1&n)){var p=c&&Rk.call(e,"__wrapped__"),h=d&&Rk.call(t,"__wrapped__");if(p||h){var v=p?e.value():e,m=h?t.value():t;return i||(i=new Sk),o(v,m,n,r,i)}}return!!f&&(i||(i=new Sk),Ok(e,t,n,r,o,i))},zk=mg;var Lk=function e(t,n,r,o,i){return t===n||(null==t||null==n||!zk(t)&&!zk(n)?t!=t&&n!=n:Ik(t,n,r,o,e,i))},Bk=yy,$k=Lk;var Hk=function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var l=(s=n[o])[0],u=e[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in e))return!1}else{var d=new Bk;if(r)var f=r(u,c,l,e,t,d);if(!(void 0===f?$k(c,u,3,r,d):f))return!1}}return!0},Uk=fx;var Wk=function(e){return e==e&&!Uk(e)},Vk=Wk,Kk=kx;var Zk=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},qk=Hk,Gk=function(e){for(var t=Kk(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Vk(o)]}return t},Xk=Zk;var Yk=function(e){var t=Gk(e);return 1==t.length&&t[0][2]?Xk(t[0][0],t[0][1]):function(n){return n===e||qk(n,e,t)}},Jk=hg,Qk=mg;var eC=function(e){return"symbol"==typeof e||Qk(e)&&"[object Symbol]"==Jk(e)},tC=vg,nC=eC,rC=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oC=/^\w*$/;var iC=function(e,t){if(tC(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!nC(e))||(oC.test(e)||!rC.test(e)||null!=t&&e in Object(t))},aC=cy;function sC(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(sC.Cache||aC),n}sC.Cache=aC;var lC=sC;var uC=function(e){var t=lC(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t},cC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dC=/\\(\\)?/g,fC=uC((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(cC,(function(e,n,r,o){t.push(r?o.replace(dC,"$1"):n||e)})),t})),pC=$x,hC=vg,vC=eC,mC=rg?rg.prototype:void 0,bC=mC?mC.toString:void 0;var gC=function e(t){if("string"==typeof t)return t;if(hC(t))return pC(t,e)+"";if(vC(t))return bC?bC.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},xC=gC;var wC=vg,yC=iC,kC=fC,CC=function(e){return null==e?"":xC(e)};var NC=function(e,t){return wC(e)?e:yC(e,t)?[e]:kC(CC(e))},SC=eC;var _C=function(e){if("string"==typeof e||SC(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},MC=NC,OC=_C;var AC=function(e,t){for(var n=0,r=(t=MC(t,e)).length;null!=e&&n<r;)e=e[OC(t[n++])];return n&&n==r?e:void 0},jC=AC;var EC=NC,TC=Tg,DC=vg,FC=Ig,PC=zg,RC=_C;var IC=function(e,t,n){for(var r=-1,o=(t=EC(t,e)).length,i=!1;++r<o;){var a=RC(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&PC(o)&&FC(a,o)&&(DC(e)||TC(e))},zC=function(e,t){return null!=e&&t in Object(e)},LC=IC;var BC=Lk,$C=function(e,t,n){var r=null==e?void 0:jC(e,t);return void 0===r?n:r},HC=function(e,t){return null!=e&&LC(e,t,zC)},UC=iC,WC=Wk,VC=Zk,KC=_C;var ZC=AC;var qC=function(e){return function(t){return null==t?void 0:t[e]}},GC=function(e){return function(t){return ZC(t,e)}},XC=iC,YC=_C;var JC=Yk,QC=function(e,t){return UC(e)&&WC(t)?VC(KC(e),t):function(n){var r=$C(n,e);return void 0===r&&r===t?HC(n,e):BC(t,r,3)}},eN=_x,tN=vg,nN=function(e){return XC(e)?qC(YC(e)):GC(e)};var rN=function(e){return"function"==typeof e?e:null==e?eN:"object"==typeof e?tN(e)?QC(e[0],e[1]):JC(e):nN(e)},oN=gx;var iN=function(e,t){return function(n,r){if(null==n)return n;if(!oN(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}},aN=iN(Sx),sN=gx;var lN=function(e,t){var n=-1,r=sN(e)?Array(e.length):[];return aN(e,(function(e,o,i){r[++n]=t(e,o,i)})),r},uN=$x,cN=rN,dN=lN,fN=vg;var pN=function(e,t){return(fN(e)?uN:dN)(e,cN(t))};Object.defineProperty(Jb,"M",{value:!0}),Jb.flattenNames=void 0;var hN=gN(wg),vN=gN(jx),mN=gN(Bx),bN=gN(pN);function gN(e){return e&&e.M?e:{default:e}}var xN=Jb.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,bN.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,mN.default)(t)?(0,vN.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,hN.default)(t)&&n.push(t)})),n};Jb.default=xN;var wN={};var yN=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},kN=jw,CN=function(){try{var e=kN(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),NN=CN;var SN=function(e,t,n){"__proto__"==t&&NN?NN(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},_N=SN,MN=Ux,ON=Object.prototype.hasOwnProperty;var AN=function(e,t,n){var r=e[t];ON.call(e,t)&&MN(r,n)&&(void 0!==n||t in e)||_N(e,t,n)},jN=AN,EN=SN;var TN=function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?EN(n,s,l):jN(n,s,l)}return n},DN=TN,FN=kx;var PN=function(e,t){return e&&DN(t,FN(t),e)};var RN=fx,IN=ax,zN=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},LN=Object.prototype.hasOwnProperty;var BN=ox,$N=function(e){if(!RN(e))return zN(e);var t=IN(e),n=[];for(var r in e)("constructor"!=r||!t&&LN.call(e,r))&&n.push(r);return n},HN=gx;var UN=function(e){return HN(e)?BN(e,!0):$N(e)},WN=TN,VN=UN;var KN=function(e,t){return e&&WN(t,VN(t),e)},ZN={exports:{}};!function(e,t){var n=ng,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}}(ZN,ZN.exports);var qN=ZN.exports;var GN=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},XN=TN,YN=Jy;var JN=function(e,t){return XN(e,YN(e),t)},QN=Hy,eS=Ex,tS=Jy,nS=Zy,rS=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)QN(t,tS(e)),e=eS(e);return t}:nS,oS=TN,iS=rS;var aS=function(e,t){return oS(e,iS(e),t)},sS=Vy,lS=rS,uS=UN;var cS=function(e){return sS(e,uS,lS)},dS=Object.prototype.hasOwnProperty;var fS=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&dS.call(e,"index")&&(n.index=e.index,n.input=e.input),n},pS=Ey;var hS=function(e){var t=new e.constructor(e.byteLength);return new pS(t).set(new pS(e)),t},vS=hS;var mS=function(e,t){var n=t?vS(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},bS=/\w*$/;var gS=function(e){var t=new e.constructor(e.source,bS.exec(e));return t.lastIndex=e.lastIndex,t},xS=rg?rg.prototype:void 0,wS=xS?xS.valueOf:void 0;var yS=hS;var kS=hS,CS=mS,NS=gS,SS=function(e){return wS?Object(wS.call(e)):{}},_S=function(e,t){var n=t?yS(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var MS=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return kS(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return CS(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 _S(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 NS(e);case"[object Symbol]":return SS(e)}},OS=fx,AS=Object.create,jS=function(){function e(){}return function(t){if(!OS(t))return{};if(AS)return AS(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),ES=Ex,TS=ax;var DS=function(e){return"function"!=typeof e.constructor||TS(e)?{}:jS(ES(e))},FS=Nk,PS=mg;var RS=function(e){return PS(e)&&"[object Map]"==FS(e)},IS=Wg,zS=Kg&&Kg.isMap,LS=zS?IS(zS):RS,BS=Nk,$S=mg;var HS=function(e){return $S(e)&&"[object Set]"==BS(e)},US=Wg,WS=Kg&&Kg.isSet,VS=WS?US(WS):HS,KS=yy,ZS=yN,qS=AN,GS=PN,XS=KN,YS=qN,JS=GN,QS=JN,e_=aS,t_=nk,n_=cS,r_=Nk,o_=fS,i_=MS,a_=DS,s_=vg,l_=Pg,u_=LS,c_=fx,d_=VS,f_=kx,p_=UN,h_="[object Arguments]",v_="[object Function]",m_="[object Object]",b_={};b_[h_]=b_["[object Array]"]=b_["[object ArrayBuffer]"]=b_["[object DataView]"]=b_["[object Boolean]"]=b_["[object Date]"]=b_["[object Float32Array]"]=b_["[object Float64Array]"]=b_["[object Int8Array]"]=b_["[object Int16Array]"]=b_["[object Int32Array]"]=b_["[object Map]"]=b_["[object Number]"]=b_[m_]=b_["[object RegExp]"]=b_["[object Set]"]=b_["[object String]"]=b_["[object Symbol]"]=b_["[object Uint8Array]"]=b_["[object Uint8ClampedArray]"]=b_["[object Uint16Array]"]=b_["[object Uint32Array]"]=!0,b_["[object Error]"]=b_[v_]=b_["[object WeakMap]"]=!1;var g_=function e(t,n,r,o,i,a){var s,l=1&n,u=2&n,c=4&n;if(r&&(s=i?r(t,o,i,a):r(t)),void 0!==s)return s;if(!c_(t))return t;var d=s_(t);if(d){if(s=o_(t),!l)return JS(t,s)}else{var f=r_(t),p=f==v_||"[object GeneratorFunction]"==f;if(l_(t))return YS(t,l);if(f==m_||f==h_||p&&!i){if(s=u||p?{}:a_(t),!l)return u?e_(t,XS(s,t)):QS(t,GS(s,t))}else{if(!b_[f])return i?t:{};s=i_(t,f,l)}}a||(a=new KS);var h=a.get(t);if(h)return h;a.set(t,s),d_(t)?t.forEach((function(o){s.add(e(o,n,r,o,t,a))})):u_(t)&&t.forEach((function(o,i){s.set(i,e(o,n,r,i,t,a))}));var v=d?void 0:(c?u?n_:t_:u?p_:f_)(t);return ZS(v||t,(function(o,i){v&&(o=t[i=o]),qS(s,i,e(o,n,r,i,t,a))})),s},x_=g_;var w_=function(e){return x_(e,5)};Object.defineProperty(wN,"M",{value:!0}),wN.mergeClasses=void 0;var y_=N_(jx),k_=N_(w_),C_=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 N_(e){return e&&e.M?e:{default:e}}var S_=wN.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,k_.default)(e.default)||{};return t.map((function(t){var r=e[t];return r&&(0,y_.default)(r,(function(e,t){n[t]||(n[t]={}),n[t]=C_({},n[t],r[t])})),t})),n};wN.default=S_;var __={};Object.defineProperty(__,"M",{value:!0}),__.autoprefix=void 0;var M_,O_=(M_=jx)&&M_.M?M_:{default:M_},A_=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 j_={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}}},E_=__.autoprefix=function(e){var t={};return(0,O_.default)(e,(function(e,n){var r={};(0,O_.default)(e,(function(e,t){var n=j_[t];n?r=A_({},r,n(e)):r[t]=e})),t[n]=r})),t};__.default=E_;var T_={};Object.defineProperty(T_,"M",{value:!0}),T_.hover=void 0;var D_=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},F_=function(e){return e&&e.M?e:{default:e}}(e);function P_(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 R_=T_.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,s=Array(a),l=0;l<a;l++)s[l]=arguments[l];return o=i=P_(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(s))),i.state={hover:!1},i.handleMouseOver=function(){return i.setState({hover:!0})},i.handleMouseOut=function(){return i.setState({hover:!1})},i.render=function(){return F_.default.createElement(t,{onMouseOver:i.handleMouseOver,onMouseOut:i.handleMouseOut},F_.default.createElement(e,D_({},i.props,i.state)))},P_(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}(F_.default.Component)};T_.default=R_;var I_={};Object.defineProperty(I_,"M",{value:!0}),I_.active=void 0;var z_=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},L_=function(e){return e&&e.M?e:{default:e}}(e);function B_(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 $_=I_.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,s=Array(a),l=0;l<a;l++)s[l]=arguments[l];return o=i=B_(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(s))),i.state={active:!1},i.handleMouseDown=function(){return i.setState({active:!0})},i.handleMouseUp=function(){return i.setState({active:!1})},i.render=function(){return L_.default.createElement(t,{onMouseDown:i.handleMouseDown,onMouseUp:i.handleMouseUp},L_.default.createElement(e,z_({},i.props,i.state)))},B_(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}(L_.default.Component)};I_.default=$_;var H_={};Object.defineProperty(H_,"M",{value:!0});H_.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(Yb,"M",{value:!0}),Yb.ReactCSS=Yb.loop=Yb.handleActive=X_=Yb.handleHover=Yb.hover=void 0;var U_=G_(Jb),W_=G_(wN),V_=G_(__),K_=G_(T_),Z_=G_(I_),q_=G_(H_);function G_(e){return e&&e.M?e:{default:e}}Yb.hover=K_.default;var X_=Yb.handleHover=K_.default;Yb.handleActive=Z_.default,Yb.loop=q_.default;var Y_=Yb.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,U_.default)(n),i=(0,W_.default)(e,o);return(0,V_.default)(i)},J_=Yb.default=Y_,Q_={},eM=function(e,t,n,r){var o=e+"-"+t+"-"+n+(r?"-server":"");if(Q_[o])return Q_[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 Q_[o]=i,i},tM=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},nM=function(t){var n=t.white,r=t.grey,o=t.size,i=t.renderers,a=t.borderRadius,s=t.boxShadow,l=t.children,u=J_({default:{grid:{borderRadius:a,boxShadow:s,absolute:"0px 0px 0px 0px",background:"url("+eM(n,r,o,i.canvas)+") center left"}}});return e.isValidElement(l)?e.cloneElement(l,tM({},l.props,{style:tM({},l.props.style,u.grid)})):e.createElement("div",{style:u.grid})};nM.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var rM=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},oM=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 iM(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 aM=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=iM(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,s="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,u=s-(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=u<0?0:u>i?1:Math.round(100*u/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)},iM(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),oM(n,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var t=this,n=this.props.rgb,r=J_({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:rM({},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(nM,{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),sM=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 lM=[38,40],uM=1,cM=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,lM.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-"+uM++,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),sM(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=J_({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),dM=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 fM(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 pM=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=fM(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,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=a-(r.getBoundingClientRect().left+window.pageXOffset),u=s-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var c=void 0;if(c=u<0?359:u>i?0:360*(-100*u/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()},fM(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),dM(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=J_({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),hM={exports:{}};function vM(){}function mM(){}mM.resetWarningCache=vM;hM.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:mM,resetWarningCache:vM};return n.PropTypes=n,n}();var bM=al(hM.exports);function gM(e,t){return e===t||e!=e&&t!=t}function xM(e,t){for(var n=e.length;n--;)if(gM(e[n][0],t))return n;return-1}var wM=Array.prototype.splice;function yM(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])}}yM.prototype.clear=function(){this.Z=[],this.size=0},yM.prototype.delete=function(e){var t=this.Z,n=xM(t,e);return!(n<0)&&(n==t.length-1?t.pop():wM.call(t,n,1),--this.size,!0)},yM.prototype.get=function(e){var t=this.Z,n=xM(t,e);return n<0?void 0:t[n][1]},yM.prototype.has=function(e){return xM(this.Z,e)>-1},yM.prototype.set=function(e,t){var n=this.Z,r=xM(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var kM="object"==typeof global&&global&&global.Object===Object&&global,CM="object"==typeof self&&self&&self.Object===Object&&self,NM=kM||CM||Function("return this")(),SM=NM.Symbol,_M=Object.prototype,MM=_M.hasOwnProperty,OM=_M.toString,AM=SM?SM.toStringTag:void 0;var jM=Object.prototype.toString;var EM="[object Null]",TM="[object Undefined]",DM=SM?SM.toStringTag:void 0;function FM(e){return null==e?void 0===e?TM:EM:DM&&DM in Object(e)?function(e){var t=MM.call(e,AM),n=e[AM];try{e[AM]=void 0;var r=!0}catch(i){}var o=OM.call(e);return r&&(t?e[AM]=n:delete e[AM]),o}(e):function(e){return jM.call(e)}(e)}function PM(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var RM="[object AsyncFunction]",IM="[object Function]",zM="[object GeneratorFunction]",LM="[object Proxy]";function BM(e){if(!PM(e))return!1;var t=FM(e);return t==IM||t==zM||t==RM||t==LM}var $M=NM["q"],HM=function(){var e=/[^.]+$/.exec($M&&$M.keys&&$M.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var UM=Function.prototype.toString;function WM(e){if(null!=e){try{return UM.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var VM=/^\[object .+?Constructor\]$/,KM=Function.prototype,ZM=Object.prototype,qM=KM.toString,GM=ZM.hasOwnProperty,XM=RegExp("^"+qM.call(GM).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function YM(e){return!(!PM(e)||(t=e,HM&&HM in t))&&(BM(e)?XM:VM).test(WM(e));var t}function JM(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return YM(n)?n:void 0}var QM=JM(NM,"Map"),eO=JM(Object,"create");var tO=Object.prototype.hasOwnProperty;var nO=Object.prototype.hasOwnProperty;function rO(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 oO(e,t){var n,r,o=e.Z;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 iO(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])}}rO.prototype.clear=function(){this.Z=eO?eO(null):{},this.size=0},rO.prototype.delete=function(e){var t=this.has(e)&&delete this.Z[e];return this.size-=t?1:0,t},rO.prototype.get=function(e){var t=this.Z;if(eO){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return tO.call(t,e)?t[e]:void 0},rO.prototype.has=function(e){var t=this.Z;return eO?void 0!==t[e]:nO.call(t,e)},rO.prototype.set=function(e,t){var n=this.Z;return this.size+=this.has(e)?0:1,n[e]=eO&&void 0===t?"__lodash_hash_undefined__":t,this},iO.prototype.clear=function(){this.size=0,this.Z={hash:new rO,map:new(QM||yM),string:new rO}},iO.prototype.delete=function(e){var t=oO(this,e).delete(e);return this.size-=t?1:0,t},iO.prototype.get=function(e){return oO(this,e).get(e)},iO.prototype.has=function(e){return oO(this,e).has(e)},iO.prototype.set=function(e,t){var n=oO(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function aO(e){var t=this.Z=new yM(e);this.size=t.size}aO.prototype.clear=function(){this.Z=new yM,this.size=0},aO.prototype.delete=function(e){var t=this.Z,n=t.delete(e);return this.size=t.size,n},aO.prototype.get=function(e){return this.Z.get(e)},aO.prototype.has=function(e){return this.Z.has(e)},aO.prototype.set=function(e,t){var n=this.Z;if(n instanceof yM){var r=n.Z;if(!QM||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.Z=new iO(r)}return n.set(e,t),this.size=n.size,this};var sO=function(){try{var e=JM(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),lO=sO;function uO(e,t,n){"__proto__"==t&&lO?lO(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function cO(e,t,n){(void 0!==n&&!gM(e[t],n)||void 0===n&&!(t in e))&&uO(e,t,n)}var dO,fO=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[dO?a:++r];if(!1===t(o[s],s,o))break}return e},pO=fO,hO="object"==typeof exports&&exports&&!exports.nodeType&&exports,vO=hO&&"object"==typeof module&&module&&!module.nodeType&&module,mO=vO&&vO.exports===hO?NM.Buffer:void 0,bO=mO?mO.allocUnsafe:void 0;var gO=NM.Uint8Array;function xO(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new gO(r).set(new gO(n)),r):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}var wO=Object.create,yO=function(){function e(){}return function(t){if(!PM(t))return{};if(wO)return wO(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function kO(e,t){return function(n){return e(t(n))}}var CO=kO(Object.getPrototypeOf,Object),NO=Object.prototype;function SO(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||NO)}function _O(e){return null!=e&&"object"==typeof e}function MO(e){return _O(e)&&"[object Arguments]"==FM(e)}var OO=Object.prototype,AO=OO.hasOwnProperty,jO=OO.propertyIsEnumerable,EO=MO(function(){return arguments}())?MO:function(e){return _O(e)&&AO.call(e,"callee")&&!jO.call(e,"callee")},TO=EO,DO=Array.isArray,FO=9007199254740991;function PO(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=FO}function RO(e){return null!=e&&PO(e.length)&&!BM(e)}var IO="object"==typeof exports&&exports&&!exports.nodeType&&exports,zO=IO&&"object"==typeof module&&module&&!module.nodeType&&module,LO=zO&&zO.exports===IO?NM.Buffer:void 0,BO=(LO?LO.isBuffer:void 0)||function(){return!1},$O="[object Object]",HO=Function.prototype,UO=Object.prototype,WO=HO.toString,VO=UO.hasOwnProperty,KO=WO.call(Object);var ZO={};ZO["[object Float32Array]"]=ZO["[object Float64Array]"]=ZO["[object Int8Array]"]=ZO["[object Int16Array]"]=ZO["[object Int32Array]"]=ZO["[object Uint8Array]"]=ZO["[object Uint8ClampedArray]"]=ZO["[object Uint16Array]"]=ZO["[object Uint32Array]"]=!0,ZO["[object Arguments]"]=ZO["[object Array]"]=ZO["[object ArrayBuffer]"]=ZO["[object Boolean]"]=ZO["[object DataView]"]=ZO["[object Date]"]=ZO["[object Error]"]=ZO["[object Function]"]=ZO["[object Map]"]=ZO["[object Number]"]=ZO["[object Object]"]=ZO["[object RegExp]"]=ZO["[object Set]"]=ZO["[object String]"]=ZO["[object WeakMap]"]=!1;var qO,GO="object"==typeof exports&&exports&&!exports.nodeType&&exports,XO=GO&&"object"==typeof module&&module&&!module.nodeType&&module,YO=XO&&XO.exports===GO&&kM.process,JO=function(){try{var e=XO&&XO.require&&XO.require("util").types;return e||YO&&YO.binding&&YO.binding("util")}catch(t){}}(),QO=JO&&JO.isTypedArray,eA=QO?(qO=QO,function(e){return qO(e)}):function(e){return _O(e)&&PO(e.length)&&!!ZO[FM(e)]};function tA(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var nA=Object.prototype.hasOwnProperty;function rA(e,t,n){var r=e[t];nA.call(e,t)&&gM(r,n)&&(void 0!==n||t in e)||uO(e,t,n)}var oA=9007199254740991,iA=/^(?:0|[1-9]\d*)$/;function aA(e,t){var n=typeof e;return!!(t=null==t?oA:t)&&("number"==n||"symbol"!=n&&iA.test(e))&&e>-1&&e%1==0&&e<t}var sA=Object.prototype.hasOwnProperty;function lA(e,t){var n=DO(e),r=!n&&TO(e),o=!n&&!r&&BO(e),i=!n&&!r&&!o&&eA(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var u in e)!t&&!sA.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||aA(u,l))||s.push(u);return s}var uA=Object.prototype.hasOwnProperty;function cA(e){if(!PM(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=SO(e),n=[];for(var r in e)("constructor"!=r||!t&&uA.call(e,r))&&n.push(r);return n}function dA(e){return RO(e)?lA(e,!0):cA(e)}function fA(e){return function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],l=r?r(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?uO(n,s,l):rA(n,s,l)}return n}(e,dA(e))}function pA(e,t,n,r,o,i,a){var s=tA(e,n),l=tA(t,n),u=a.get(l);if(u)cO(e,n,u);else{var c,d=i?i(s,l,n+"",e,t,a):void 0,f=void 0===d;if(f){var p=DO(l),h=!p&&BO(l),v=!p&&!h&&eA(l);d=l,p||h||v?DO(s)?d=s:_O(c=s)&&RO(c)?d=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(s):h?(f=!1,d=function(e,t){if(t)return e.slice();var n=e.length,r=bO?bO(n):new e.constructor(n);return e.copy(r),r}(l,!0)):v?(f=!1,d=xO(l,!0)):d=[]:function(e){if(!_O(e)||FM(e)!=$O)return!1;var t=CO(e);if(null===t)return!0;var n=VO.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&WO.call(n)==KO}(l)||TO(l)?(d=s,TO(s)?d=fA(s):PM(s)&&!BM(s)||(d=function(e){return"function"!=typeof e.constructor||SO(e)?{}:yO(CO(e))}(l))):f=!1}f&&(a.set(l,d),o(d,l,r,i,a),a.delete(l)),cO(e,n,d)}}function hA(e,t,n,r,o){e!==t&&pO(t,(function(i,a){if(o||(o=new aO),PM(i))pA(e,t,a,n,hA,r,o);else{var s=r?r(tA(e,a),i,a+"",e,t,o):void 0;void 0===s&&(s=i),cO(e,a,s)}}),dA)}function vA(e){return e}var mA=Math.max;var bA=lO?function(e,t){return lO(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:vA,gA=bA,xA=Date.now;var wA=function(e){var t=0,n=0;return function(){var r=xA(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(gA),yA=wA;function kA(e,t){return yA(function(e,t,n){return t=mA(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=mA(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[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,s)}}(e,t,vA),e+"")}var CA,NA=(CA=function(e,t,n){hA(e,t,n)},kA((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=CA.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!PM(n))return!1;var r=typeof t;return!!("number"==r?RO(n)&&aA(t,n.length):"string"==r&&t in n)&&gM(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&&CA(e,a,n,o)}return e}))),SA=NA,_A=function(t){var n=t.zDepth,r=t.radius,o=t.background,i=t.children,a=t.styles,s=J_(SA({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:s.wrap},e.createElement("div",{style:s.bg}),e.createElement("div",{style:s.content},i))};_A.propTypes={background:bM.string,zDepth:bM.oneOf([0,1,2,3,4,5]),radius:bM.number,styles:bM.object},_A.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var MA=function(){return NM.Date.now()},OA=/\s/;var AA=/^\s+/;function jA(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&OA.test(e.charAt(t)););return t}(e)+1).replace(AA,""):e}var EA="[object Symbol]";function TA(e){return"symbol"==typeof e||_O(e)&&FM(e)==EA}var DA=NaN,FA=/^[-+]0x[0-9a-f]+$/i,PA=/^0b[01]+$/i,RA=/^0o[0-7]+$/i,IA=parseInt;function zA(e){if("number"==typeof e)return e;if(TA(e))return DA;if(PM(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=PM(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=jA(e);var n=PA.test(e);return n||RA.test(e)?IA(e.slice(2),n?2:8):FA.test(e)?DA:+e}var LA="Expected a function",BA=Math.max,$A=Math.min;function HA(e,t,n){var r,o,i,a,s,l,u=0,c=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError(LA);function p(t){var n=r,i=o;return r=o=void 0,u=t,a=e.apply(i,n)}function h(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-u>=i}function v(){var e=MA();if(h(e))return m(e);s=setTimeout(v,function(e){var n=t-(e-l);return d?$A(n,i-(e-u)):n}(e))}function m(e){return s=void 0,f&&r?p(e):(r=o=void 0,a)}function b(){var e=MA(),n=h(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(v,t),c?p(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(v,t),p(l)}return void 0===s&&(s=setTimeout(v,t)),a}return t=zA(t)||0,PM(n)&&(c=!!n.leading,i=(d="maxWait"in n)?BA(zA(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f),b.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=o=s=void 0},b.flush=function(){return void 0===s?a:m(MA())},b}var UA=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 WA=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,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=a-(n.getBoundingClientRect().left+window.pageXOffset),u=s-(n.getBoundingClientRect().top+window.pageYOffset);l<0?l=0:l>o&&(l=o),u<0?u=0:u>i&&(u=i);var c=l/o,d=1-u/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 PM(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),HA(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),UA(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,s=n.circle,l=J_({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:s}},{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 VA(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}var KA=kO(Object.keys,Object),ZA=Object.prototype.hasOwnProperty;function qA(e){return RO(e)?lA(e):function(e){if(!SO(e))return KA(e);var t=[];for(var n in Object(e))ZA.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var GA=function(e,t){return function(n,r){if(null==n)return n;if(!RO(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&&pO(e,t,qA)})),XA=GA;function YA(e,t){var n;return(DO(e)?VA:XA)(e,"function"==typeof(n=t)?n:vA)}function JA(e){return JA="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},JA(e)}var QA=/^\s+/,ej=/\s+$/;function tj(e,t){if(t=t||{},(e=e||"")instanceof tj)return e;if(!(this instanceof tj))return new tj(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,s=!1;"string"==typeof e&&(e=function(e){e=e.replace(QA,"").replace(ej,"").toLowerCase();var t,n=!1;if(gj[e])e=gj[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=Ej.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=Ej.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=Ej.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=Ej.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=Ej.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=Ej.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=Ej.hex8.exec(e))return{r:Cj(t[1]),g:Cj(t[2]),b:Cj(t[3]),a:Mj(t[4]),format:n?"name":"hex8"};if(t=Ej.hex6.exec(e))return{r:Cj(t[1]),g:Cj(t[2]),b:Cj(t[3]),format:n?"name":"hex"};if(t=Ej.hex4.exec(e))return{r:Cj(t[1]+""+t[1]),g:Cj(t[2]+""+t[2]),b:Cj(t[3]+""+t[3]),a:Mj(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=Ej.hex3.exec(e))return{r:Cj(t[1]+""+t[1]),g:Cj(t[2]+""+t[2]),b:Cj(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==JA(e)&&(Tj(e.r)&&Tj(e.g)&&Tj(e.b)?(t=function(e,t,n){return{r:255*yj(e,255),g:255*yj(t,255),b:255*yj(n,255)}}(e.r,e.g,e.b),a=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):Tj(e.h)&&Tj(e.s)&&Tj(e.v)?(r=Sj(e.s),o=Sj(e.v),t=function(e,t,n){e=6*yj(e,360),t=yj(t,100),n=yj(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6,u=[n,a,i,i,s,n][l],c=[s,n,n,a,i,i][l],d=[i,i,s,n,n,a][l];return{r:255*u,g:255*c,b:255*d}}(e.h,r,o),a=!0,s="hsv"):Tj(e.h)&&Tj(e.s)&&Tj(e.l)&&(r=Sj(e.s),i=Sj(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=yj(e,360),t=yj(t,100),n=yj(n,100),0===t)r=o=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),o=a(l,s,e),i=a(l,s,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,r,i),a=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a));return n=wj(n),{ok:a,format:e.format||s,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 nj(e,t,n){e=yj(e,255),t=yj(t,255),n=yj(n,255);var r,o,i=Math.max(e,t,n),a=Math.min(e,t,n),s=(i+a)/2;if(i==a)r=o=0;else{var l=i-a;switch(o=s>.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:s}}function rj(e,t,n){e=yj(e,255),t=yj(t,255),n=yj(n,255);var r,o,i=Math.max(e,t,n),a=Math.min(e,t,n),s=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:s}}function oj(e,t,n,r){var o=[Nj(Math.round(e).toString(16)),Nj(Math.round(t).toString(16)),Nj(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 ij(e,t,n,r){return[Nj(_j(r)),Nj(Math.round(e).toString(16)),Nj(Math.round(t).toString(16)),Nj(Math.round(n).toString(16))].join("")}function aj(e,t){t=0===t?0:t||10;var n=tj(e).toHsl();return n.s-=t/100,n.s=kj(n.s),tj(n)}function sj(e,t){t=0===t?0:t||10;var n=tj(e).toHsl();return n.s+=t/100,n.s=kj(n.s),tj(n)}function lj(e){return tj(e).desaturate(100)}function uj(e,t){t=0===t?0:t||10;var n=tj(e).toHsl();return n.l+=t/100,n.l=kj(n.l),tj(n)}function cj(e,t){t=0===t?0:t||10;var n=tj(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))),tj(n)}function dj(e,t){t=0===t?0:t||10;var n=tj(e).toHsl();return n.l-=t/100,n.l=kj(n.l),tj(n)}function fj(e,t){var n=tj(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,tj(n)}function pj(e){var t=tj(e).toHsl();return t.h=(t.h+180)%360,tj(t)}function hj(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=tj(e).toHsl(),r=[tj(e)],o=360/t,i=1;i<t;i++)r.push(tj({h:(n.h+i*o)%360,s:n.s,l:n.l}));return r}function vj(e){var t=tj(e).toHsl(),n=t.h;return[tj(e),tj({h:(n+72)%360,s:t.s,l:t.l}),tj({h:(n+216)%360,s:t.s,l:t.l})]}function mj(e,t,n){t=t||6,n=n||30;var r=tj(e).toHsl(),o=360/n,i=[tj(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(tj(r));return i}function bj(e,t){t=t||6;for(var n=tj(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(tj({h:r,s:o,v:i})),i=(i+s)%1;return a}tj.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=wj(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=rj(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=rj(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=nj(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=nj(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 oj(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=[Nj(Math.round(e).toString(16)),Nj(Math.round(t).toString(16)),Nj(Math.round(n).toString(16)),Nj(_j(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*yj(this._r,255))+"%",g:Math.round(100*yj(this._g,255))+"%",b:Math.round(100*yj(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*yj(this._r,255))+"%, "+Math.round(100*yj(this._g,255))+"%, "+Math.round(100*yj(this._b,255))+"%)":"rgba("+Math.round(100*yj(this._r,255))+"%, "+Math.round(100*yj(this._g,255))+"%, "+Math.round(100*yj(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(xj[oj(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+ij(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=tj(e);n="#"+ij(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 tj(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(uj,arguments)},brighten:function(){return this._applyModification(cj,arguments)},darken:function(){return this._applyModification(dj,arguments)},desaturate:function(){return this._applyModification(aj,arguments)},saturate:function(){return this._applyModification(sj,arguments)},greyscale:function(){return this._applyModification(lj,arguments)},spin:function(){return this._applyModification(fj,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(mj,arguments)},complement:function(){return this._applyCombination(pj,arguments)},monochromatic:function(){return this._applyCombination(bj,arguments)},splitcomplement:function(){return this._applyCombination(vj,arguments)},triad:function(){return this._applyCombination(hj,[3])},tetrad:function(){return this._applyCombination(hj,[4])}},tj.fromRatio=function(e,t){if("object"==JA(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:Sj(e[r]));e=n}return tj(e,t)},tj.equals=function(e,t){return!(!e||!t)&&tj(e).toRgbString()==tj(t).toRgbString()},tj.random=function(){return tj.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},tj.mix=function(e,t,n){n=0===n?0:n||50;var r=tj(e).toRgb(),o=tj(t).toRgb(),i=n/100;return tj({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})},tj.readability=function(e,t){var n=tj(e),r=tj(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},tj.isReadable=function(e,t,n){var r,o,i=tj.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},tj.mostReadable=function(e,t,n){var r,o,i,a,s=null,l=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var u=0;u<t.length;u++)(r=tj.readability(e,t[u]))>l&&(l=r,s=tj(t[u]));return tj.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,tj.mostReadable(e,["#fff","#000"],n))};var gj=tj.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"},xj=tj.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(gj);function wj(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function yj(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 kj(e){return Math.min(1,Math.max(0,e))}function Cj(e){return parseInt(e,16)}function Nj(e){return 1==e.length?"0"+e:""+e}function Sj(e){return e<=1&&(e=100*e+"%"),e}function _j(e){return Math.round(255*parseFloat(e)).toString(16)}function Mj(e){return Cj(e)/255}var Oj,Aj,jj,Ej=(Aj="[\\s|\\(]+("+(Oj="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+Oj+")[,|\\s]+("+Oj+")\\s*\\)?",jj="[\\s|\\(]+("+Oj+")[,|\\s]+("+Oj+")[,|\\s]+("+Oj+")[,|\\s]+("+Oj+")\\s*\\)?",{CSS_UNIT:new RegExp(Oj),rgb:new RegExp("rgb"+Aj),rgba:new RegExp("rgba"+jj),hsl:new RegExp("hsl"+Aj),hsla:new RegExp("hsla"+jj),hsv:new RegExp("hsv"+Aj),hsva:new RegExp("hsva"+jj),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 Tj(e){return!!Ej.CSS_UNIT.exec(e)}var Dj=function(e){var t=0,n=0;return YA(["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},Fj=function(e,t){var n=e.hex?tj(e.hex):tj(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}},Pj=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&tj(e).isValid()},Rj=function(e){if(!e)return"#fff";var t=Fj(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"},Ij=function(e,t){return tj(t+" ("+e.replace("°","")+")")._ok},zj=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},Lj=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 Bj=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(Dj(e)){var r=Fj(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(Dj(e)){var r=Fj(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=zj({},Fj(e.color,0)),t.debounce=HA((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),Lj(r,[{key:"render",value:function(){var n={};return this.props.onSwatchHover&&(n.onSwatchHover=this.handleSwatchHover),e.createElement(t,zj({},this.props,this.state,{onChange:this.handleChange},n))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return zj({},Fj(e.color,t.oldHue))}}]),r}(e.PureComponent||e.Component);return n.propTypes=zj({},t.propTypes),n.defaultProps=zj({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),n},$j=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},Hj=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 Uj(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 Wj=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},Vj=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=Uj(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})},Uj(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),Hj(o,[{key:"render",value:function(){return e.createElement(n,{onFocus:this.handleFocus,onBlur:this.handleBlur},e.createElement(t,$j({},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,s=t.title,l=void 0===s?n:s,u=t.children,c=t.focus,d=t.focusStyle,f="transparent"===n,p=J_({default:{swatch:Wj({background:n,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,c?void 0===d?{}:d:{})}}),h={};return a&&(h.onMouseOver=function(e){return a(n,e)}),e.createElement("div",Wj({style:p.swatch,onClick:function(e){return i(n,e)},title:l,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&i(n,e)}},h),u,f&&e.createElement(nM,{borderRadius:p.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))})),Kj=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},Zj=function(t){var n=t.rgb,r=t.hsl,o=t.width,i=t.height,a=t.onChange,s=t.direction,l=t.style,u=t.renderers,c=t.pointer,d=t.className,f=void 0===d?"":d,p=J_({default:{picker:{position:"relative",width:o,height:i},alpha:{radius:"2px",style:l}}});return e.createElement("div",{style:p.picker,className:"alpha-picker "+f},e.createElement(aM,Kj({},p.alpha,{rgb:n,hsl:r,pointer:c,renderers:u,onChange:a,direction:s})))};function qj(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}Zj.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:function(t){var n=t.direction,r=J_({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})}},Bj(Zj);function Gj(e){var t=-1,n=null==e?0:e.length;for(this.Z=new iO;++t<n;)this.add(e[t])}function Xj(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}Gj.prototype.add=Gj.prototype.push=function(e){return this.Z.set(e,"__lodash_hash_undefined__"),this},Gj.prototype.has=function(e){return this.Z.has(e)};var Yj=1,Jj=2;function Qj(e,t,n,r,o,i){var a=n&Yj,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=n&Jj?new Gj:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var h=e[d],v=t[d];if(r)var m=a?r(v,h,d,t,e,i):r(h,v,d,e,t,i);if(void 0!==m){if(m)continue;f=!1;break}if(p){if(!Xj(t,(function(e,t){if(a=t,!p.has(a)&&(h===e||o(h,e,n,r,i)))return p.push(t);var a}))){f=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f}function eE(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function tE(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var nE=1,rE=2,oE="[object Boolean]",iE="[object Date]",aE="[object Error]",sE="[object Map]",lE="[object Number]",uE="[object RegExp]",cE="[object Set]",dE="[object String]",fE="[object Symbol]",pE="[object ArrayBuffer]",hE="[object DataView]",vE=SM?SM.prototype:void 0,mE=vE?vE.valueOf:void 0;var bE=Object.prototype.propertyIsEnumerable,gE=Object.getOwnPropertySymbols,xE=gE?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}(gE(e),(function(t){return bE.call(e,t)})))}:function(){return[]},wE=xE;function yE(e){return function(e,t,n){var r=t(e);return DO(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,qA,wE)}var kE=1,CE=Object.prototype.hasOwnProperty;var NE=JM(NM,"DataView"),SE=JM(NM,"Promise"),_E=JM(NM,"Set"),ME=JM(NM,"WeakMap"),OE="[object Map]",AE="[object Promise]",jE="[object Set]",EE="[object WeakMap]",TE="[object DataView]",DE=WM(NE),FE=WM(QM),PE=WM(SE),RE=WM(_E),IE=WM(ME),zE=FM;(NE&&zE(new NE(new ArrayBuffer(1)))!=TE||QM&&zE(new QM)!=OE||SE&&zE(SE.resolve())!=AE||_E&&zE(new _E)!=jE||ME&&zE(new ME)!=EE)&&(zE=function(e){var t=FM(e),n="[object Object]"==t?e.constructor:void 0,r=n?WM(n):"";if(r)switch(r){case DE:return TE;case FE:return OE;case PE:return AE;case RE:return jE;case IE:return EE}return t});var LE=zE,BE=1,$E="[object Arguments]",HE="[object Array]",UE="[object Object]",WE=Object.prototype.hasOwnProperty;function VE(e,t,n,r,o,i){var a=DO(e),s=DO(t),l=a?HE:LE(e),u=s?HE:LE(t),c=(l=l==$E?UE:l)==UE,d=(u=u==$E?UE:u)==UE,f=l==u;if(f&&BO(e)){if(!BO(t))return!1;a=!0,c=!1}if(f&&!c)return i||(i=new aO),a||eA(e)?Qj(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case hE:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pE:return!(e.byteLength!=t.byteLength||!i(new gO(e),new gO(t)));case oE:case iE:case lE:return gM(+e,+t);case aE:return e.name==t.name&&e.message==t.message;case uE:case dE:return e==t+"";case sE:var s=eE;case cE:var l=r&nE;if(s||(s=tE),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=rE,a.set(e,t);var c=Qj(s(e),s(t),r,o,i,a);return a.delete(e),c;case fE:if(mE)return mE.call(e)==mE.call(t)}return!1}(e,t,l,n,r,o,i);if(!(n&BE)){var p=c&&WE.call(e,"__wrapped__"),h=d&&WE.call(t,"__wrapped__");if(p||h){var v=p?e.value():e,m=h?t.value():t;return i||(i=new aO),o(v,m,n,r,i)}}return!!f&&(i||(i=new aO),function(e,t,n,r,o,i){var a=n&kE,s=yE(e),l=s.length;if(l!=yE(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:CE.call(t,c)))return!1}var d=i.get(e),f=i.get(t);if(d&&f)return d==t&&f==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=a;++u<l;){var v=e[c=s[u]],m=t[c];if(r)var b=a?r(m,v,c,t,e,i):r(v,m,c,e,t,i);if(!(void 0===b?v===m||o(v,m,n,r,i):b)){p=!1;break}h||(h="constructor"==c)}if(p&&!h){var g=e.constructor,x=t.constructor;g==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof x&&x instanceof x||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,r,o,i))}function KE(e,t,n,r,o){return e===t||(null==e||null==t||!_O(e)&&!_O(t)?e!=e&&t!=t:VE(e,t,n,r,KE,o))}var ZE=1,qE=2;function GE(e){return e==e&&!PM(e)}function XE(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function YE(e){var t=function(e){for(var t=qA(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,GE(o)]}return t}(e);return 1==t.length&&t[0][2]?XE(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 s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var l=(s=n[o])[0],u=e[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in e))return!1}else{var d=new aO;if(r)var f=r(u,c,l,e,t,d);if(!(void 0===f?KE(c,u,ZE|qE,r,d):f))return!1}}return!0}(n,e,t)}}var JE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,QE=/^\w*$/;function eT(e,t){if(DO(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!TA(e))||(QE.test(e)||!JE.test(e)||null!=t&&e in Object(t))}var tT="Expected a function";function nT(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(tT);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(nT.Cache||iO),n}nT.Cache=iO;var rT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oT=/\\(\\)?/g,iT=function(e){var t=nT(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(rT,(function(e,n,r,o){t.push(r?o.replace(oT,"$1"):n||e)})),t})),aT=iT,sT=1/0,lT=SM?SM.prototype:void 0,uT=lT?lT.toString:void 0;function cT(e){if("string"==typeof e)return e;if(DO(e))return qj(e,cT)+"";if(TA(e))return uT?uT.call(e):"";var t=e+"";return"0"==t&&1/e==-sT?"-0":t}function dT(e,t){return DO(e)?e:eT(e,t)?[e]:aT(function(e){return null==e?"":cT(e)}(e))}var fT=1/0;function pT(e){if("string"==typeof e||TA(e))return e;var t=e+"";return"0"==t&&1/e==-fT?"-0":t}function hT(e,t){for(var n=0,r=(t=dT(t,e)).length;null!=e&&n<r;)e=e[pT(t[n++])];return n&&n==r?e:void 0}function vT(e,t){return null!=e&&t in Object(e)}function mT(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=dT(t,e)).length,i=!1;++r<o;){var a=pT(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&PO(o)&&aA(a,o)&&(DO(e)||TO(e))}(e,t,vT)}var bT=1,gT=2;function xT(e,t){return eT(e)&&GE(t)?XE(pT(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:hT(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?mT(n,e):KE(t,r,bT|gT)}}function wT(e){return eT(e)?(t=pT(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return hT(t,e)}}(e);var t}function yT(e,t){var n=-1,r=RO(e)?Array(e.length):[];return XA(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function kT(e,t){var n;return(DO(e)?qj:yT)(e,"function"==typeof(n=t)?n:null==n?vA:"object"==typeof n?DO(n)?xT(n[0],n[1]):YE(n):wT(n))}var CT=function(t){var n=t.colors,r=t.onClick,o=t.onSwatchHover,i=J_({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},kT(n,(function(t){return e.createElement(Vj,{key:t,color:t,style:i.swatch,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}})})),e.createElement("div",{style:i.clear}))},NT=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,s=t.triangle,l=t.styles,u=void 0===l?{}:l,c=t.className,d=void 0===c?"":c,f="transparent"===o,p=function(e,t){Pj(e)&&n({hex:e,source:"hex"},t)},h=J_(SA({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:Rj(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"}}},u),{"hide-triangle":"hide"===s});return e.createElement("div",{style:h.card,className:"block-picker "+d},e.createElement("div",{style:h.triangle}),e.createElement("div",{style:h.head},f&&e.createElement(nM,{borderRadius:"6px 6px 0 0"}),e.createElement("div",{style:h.label},o)),e.createElement("div",{style:h.body},e.createElement(CT,{colors:i,onClick:p,onSwatchHover:r}),e.createElement(cM,{style:{input:h.input},value:o,onChange:p})))};NT.propTypes={width:bM.oneOfType([bM.string,bM.number]),colors:bM.arrayOf(bM.string),triangle:bM.oneOf(["top","hide"]),styles:bM.object},NT.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}},Bj(NT);var ST="#ffcdd2",_T="#e57373",MT="#f44336",OT="#d32f2f",AT="#b71c1c",jT="#f8bbd0",ET="#f06292",TT="#e91e63",DT="#c2185b",FT="#880e4f",PT="#e1bee7",RT="#ba68c8",IT="#9c27b0",zT="#7b1fa2",LT="#4a148c",BT="#d1c4e9",$T="#9575cd",HT="#673ab7",UT="#512da8",WT="#311b92",VT="#c5cae9",KT="#7986cb",ZT="#3f51b5",qT="#303f9f",GT="#1a237e",XT="#bbdefb",YT="#64b5f6",JT="#2196f3",QT="#1976d2",eD="#0d47a1",tD="#b3e5fc",nD="#4fc3f7",rD="#03a9f4",oD="#0288d1",iD="#01579b",aD="#b2ebf2",sD="#4dd0e1",lD="#00bcd4",uD="#0097a7",cD="#006064",dD="#b2dfdb",fD="#4db6ac",pD="#009688",hD="#00796b",vD="#004d40",mD="#c8e6c9",bD="#81c784",gD="#4caf50",xD="#388e3c",wD="#dcedc8",yD="#aed581",kD="#8bc34a",CD="#689f38",ND="#33691e",SD="#f0f4c3",_D="#dce775",MD="#cddc39",OD="#afb42b",AD="#827717",jD="#fff9c4",ED="#fff176",TD="#ffeb3b",DD="#fbc02d",FD="#f57f17",PD="#ffecb3",RD="#ffd54f",ID="#ffc107",zD="#ffa000",LD="#ff6f00",BD="#ffe0b2",$D="#ffb74d",HD="#ff9800",UD="#f57c00",WD="#e65100",VD="#ffccbc",KD="#ff8a65",ZD="#ff5722",qD="#e64a19",GD="#bf360c",XD="#d7ccc8",YD="#a1887f",JD="#795548",QD="#5d4037",eF="#3e2723",tF="#cfd8dc",nF="#90a4ae",rF="#607d8b",oF="#455a64",iF="#263238",aF=function(t){var n=t.color,r=t.onClick,o=t.onSwatchHover,i=t.hover,a=t.active,s=t.circleSize,l=t.circleSpacing,u=J_({default:{swatch:{width:s,height:s,marginRight:l,marginBottom:l,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(s/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:u.swatch},e.createElement(Vj,{style:u.Swatch,color:n,onClick:r,onHover:o,focusStyle:{boxShadow:u.Swatch.boxShadow+", 0 0 5px "+n}}))};aF.defaultProps={circleSize:28,circleSpacing:14};var sF=X_(aF),lF=function(t){var n=t.width,r=t.onChange,o=t.onSwatchHover,i=t.colors,a=t.hex,s=t.circleSize,l=t.styles,u=void 0===l?{}:l,c=t.circleSpacing,d=t.className,f=void 0===d?"":d,p=J_(SA({default:{card:{width:n,display:"flex",flexWrap:"wrap",marginRight:-c,marginBottom:-c}}},u)),h=function(e,t){return r({hex:e,source:"hex"},t)};return e.createElement("div",{style:p.card,className:"circle-picker "+f},kT(i,(function(t){return e.createElement(sF,{key:t,color:t,onClick:h,onSwatchHover:o,active:a===t.toLowerCase(),circleSize:s,circleSpacing:c})})))};function uF(e){return void 0===e}lF.propTypes={width:bM.oneOfType([bM.string,bM.number]),circleSize:bM.number,circleSpacing:bM.number,styles:bM.object},lF.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[MT,TT,IT,HT,ZT,JT,rD,lD,pD,gD,kD,MD,TD,ID,HD,ZD,JD,rF],styles:{}},Bj(lF);var cF={};Object.defineProperty(cF,"M",{value:!0});var dF=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},fF=function(e){return e&&e.M?e:{default:e}}(e);var pF=cF.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,s=e.style,l=void 0===s?{}:s,u=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 fF.default.createElement("svg",dF({viewBox:"0 0 24 24",style:dF({fill:n,width:o,height:a},l)},u),fF.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"}))},hF=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 vF=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?Pj(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(uF(e.s)?t.props.hsl.s:e.s),l:Number(uF(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),hF(n,[{key:"render",value:function(){var t=this,n=J_({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(cM,{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(cM,{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(cM,{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(cM,{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(cM,{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(cM,{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(cM,{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(cM,{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(cM,{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(pF,{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);vF.defaultProps={view:"hex"};var mF=function(){var t=J_({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})},bF=function(){var t=J_({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})},gF=function(t){var n=t.width,r=t.onChange,o=t.disableAlpha,i=t.rgb,a=t.hsl,s=t.hsv,l=t.hex,u=t.renderers,c=t.styles,d=void 0===c?{}:c,f=t.className,p=void 0===f?"":f,h=t.defaultView,v=J_(SA({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:v.picker,className:"chrome-picker "+p},e.createElement("div",{style:v.saturation},e.createElement(WA,{style:v.Saturation,hsl:a,hsv:s,pointer:bF,onChange:r})),e.createElement("div",{style:v.body},e.createElement("div",{style:v.controls,className:"flexbox-fix"},e.createElement("div",{style:v.color},e.createElement("div",{style:v.swatch},e.createElement("div",{style:v.active}),e.createElement(nM,{renderers:u}))),e.createElement("div",{style:v.toggles},e.createElement("div",{style:v.hue},e.createElement(pM,{style:v.Hue,hsl:a,pointer:mF,onChange:r})),e.createElement("div",{style:v.alpha},e.createElement(aM,{style:v.Alpha,rgb:i,hsl:a,pointer:mF,renderers:u,onChange:r})))),e.createElement(vF,{rgb:i,hsl:a,hex:l,view:h,onChange:r,disableAlpha:o})))};gF.propTypes={width:bM.oneOfType([bM.string,bM.number]),disableAlpha:bM.bool,styles:bM.object,defaultView:bM.oneOf(["hex","rgb","hsl"])},gF.defaultProps={width:225,disableAlpha:!1,styles:{}},Bj(gF);var xF=function(t){var n=t.color,r=t.onClick,o=void 0===r?function(){}:r,i=t.onSwatchHover,a=t.active,s=J_({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:Rj(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(Vj,{style:s.color,color:n,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},e.createElement("div",{style:s.dot}))},wF=function(t){var n=t.hex,r=t.rgb,o=t.onChange,i=J_({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(cM,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),e.createElement(cM,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:a}),e.createElement(cM,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:a}),e.createElement(cM,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:a}))},yF=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.colors,i=t.hex,a=t.rgb,s=t.styles,l=void 0===s?{}:s,u=t.className,c=void 0===u?"":u,d=J_(SA({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?Pj(e.hex)&&n({hex:e.hex,source:"hex"},t):n(e,t)};return e.createElement(_A,{style:d.Compact,styles:l},e.createElement("div",{style:d.compact,className:"compact-picker "+c},e.createElement("div",null,kT(o,(function(t){return e.createElement(xF,{key:t,color:t,active:t.toLowerCase()===i,onClick:f,onSwatchHover:r})})),e.createElement("div",{style:d.clear})),e.createElement(wF,{hex:i,rgb:a,onChange:f})))};yF.propTypes={colors:bM.arrayOf(bM.string),styles:bM.object},yF.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:{}},Bj(yF);var kF=X_((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)"},s=J_({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return e.createElement("div",{style:s.swatch},e.createElement(Vj,{color:r,onClick:o,onHover:i,focusStyle:a}))})),CF=function(t){var n=t.width,r=t.colors,o=t.onChange,i=t.onSwatchHover,a=t.triangle,s=t.styles,l=void 0===s?{}:s,u=t.className,c=void 0===u?"":u,d=J_(SA({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}),kT(r,(function(t){return e.createElement(kF,{color:t,key:t,onClick:f,onSwatchHover:i})})))};CF.propTypes={width:bM.oneOfType([bM.string,bM.number]),colors:bM.arrayOf(bM.string),triangle:bM.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:bM.object},CF.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},Bj(CF);var NF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SF=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.hsl,a=t.direction,s=t.pointer,l=t.styles,u=void 0===l?{}:l,c=t.className,d=void 0===c?"":c,f=J_(SA({default:{picker:{position:"relative",width:n,height:r},hue:{radius:"2px"}}},u));return e.createElement("div",{style:f.picker,className:"hue-picker "+d},e.createElement(pM,NF({},f.hue,{hsl:i,pointer:s,onChange:function(e){return o({a:1,h:e.h,l:.5,s:1})},direction:a})))};SF.propTypes={styles:bM.object},SF.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:function(t){var n=t.direction,r=J_({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:{}},Bj(SF);Bj((function(t){var n=t.onChange,r=t.hex,o=t.rgb,i=t.styles,a=void 0===i?{}:i,s=t.className,l=void 0===s?"":s,u=J_(SA({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?Pj(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(_A,{styles:a},e.createElement("div",{style:u.material,className:"material-picker "+l},e.createElement(cM,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:r,onChange:c}),e.createElement("div",{style:u.split,className:"flexbox-fix"},e.createElement("div",{style:u.third},e.createElement(cM,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:o.r,onChange:c})),e.createElement("div",{style:u.third},e.createElement(cM,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:o.g,onChange:c})),e.createElement("div",{style:u.third},e.createElement(cM,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:o.b,onChange:c})))))}));var _F=function(t){var n=t.onChange,r=t.rgb,o=t.hsv,i=t.hex,a=J_({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"}}}),s=function(e,t){e["#"]?Pj(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(cM,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"h",value:Math.round(o.h),onChange:s}),e.createElement(cM,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"s",value:Math.round(100*o.s),onChange:s}),e.createElement(cM,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"v",value:Math.round(100*o.v),onChange:s}),e.createElement("div",{style:a.divider}),e.createElement(cM,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:s}),e.createElement(cM,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:s}),e.createElement(cM,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:r.b,onChange:s}),e.createElement("div",{style:a.divider}),e.createElement(cM,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"#",value:i.replace("#",""),onChange:s}),e.createElement("div",{style:a.fieldSymbols},e.createElement("div",{style:a.symbol},"°"),e.createElement("div",{style:a.symbol},"%"),e.createElement("div",{style:a.symbol},"%")))},MF=function(t){var n=t.hsl,r=J_({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})},OF=function(){var t=J_({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})))},AF=function(t){var n=t.onClick,r=t.label,o=t.children,i=t.active,a=J_({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)},jF=function(t){var n=t.rgb,r=t.currentColor,o=J_({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"))},EF=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 TF=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),EF(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=J_(SA({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(WA,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:MF,onChange:this.props.onChange})),e.createElement("div",{style:a.hue},e.createElement(pM,{direction:"vertical",hsl:this.props.hsl,pointer:OF,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(jF,{rgb:this.props.rgb,currentColor:this.state.currentColor})),e.createElement("div",{style:a.actions},e.createElement(AF,{label:"OK",onClick:this.props.onAccept,active:!0}),e.createElement(AF,{label:"Cancel",onClick:this.props.onCancel}),e.createElement(_F,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),n}(e.Component);TF.propTypes={header:bM.string,styles:bM.object},TF.defaultProps={header:"Color Picker",styles:{}},Bj(TF);var DF=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.disableAlpha,s=J_({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?Pj(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:s.fields,className:"flexbox-fix"},e.createElement("div",{style:s.double},e.createElement(cM,{style:{input:s.input,label:s.label},label:"hex",value:i.replace("#",""),onChange:l})),e.createElement("div",{style:s.single},e.createElement(cM,{style:{input:s.input,label:s.label},label:"r",value:r.r,onChange:l,dragLabel:"true",dragMax:"255"})),e.createElement("div",{style:s.single},e.createElement(cM,{style:{input:s.input,label:s.label},label:"g",value:r.g,onChange:l,dragLabel:"true",dragMax:"255"})),e.createElement("div",{style:s.single},e.createElement(cM,{style:{input:s.input,label:s.label},label:"b",value:r.b,onChange:l,dragLabel:"true",dragMax:"255"})),e.createElement("div",{style:s.alpha},e.createElement(cM,{style:{input:s.input,label:s.label},label:"a",value:Math.round(100*r.a),onChange:l,dragLabel:"true",dragMax:"100"})))},FF=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},PF=function(t){var n=t.colors,r=t.onClick,o=void 0===r?function(){}:r,i=t.onSwatchHover,a=J_({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}),s=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(Vj,FF({},n,{style:a.swatch,onClick:s,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+n.color}})))})))};PF.propTypes={colors:bM.arrayOf(bM.oneOfType([bM.string,bM.shape({color:bM.string,title:bM.string})])).isRequired};var RF=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},IF=function(t){var n=t.width,r=t.rgb,o=t.hex,i=t.hsv,a=t.hsl,s=t.onChange,l=t.onSwatchHover,u=t.disableAlpha,c=t.presetColors,d=t.renderers,f=t.styles,p=void 0===f?{}:f,h=t.className,v=void 0===h?"":h,m=J_(SA({default:RF({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)"}},p),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},p),{disableAlpha:u});return e.createElement("div",{style:m.picker,className:"sketch-picker "+v},e.createElement("div",{style:m.saturation},e.createElement(WA,{style:m.Saturation,hsl:a,hsv:i,onChange:s})),e.createElement("div",{style:m.controls,className:"flexbox-fix"},e.createElement("div",{style:m.sliders},e.createElement("div",{style:m.hue},e.createElement(pM,{style:m.Hue,hsl:a,onChange:s})),e.createElement("div",{style:m.alpha},e.createElement(aM,{style:m.Alpha,rgb:r,hsl:a,renderers:d,onChange:s}))),e.createElement("div",{style:m.color},e.createElement(nM,null),e.createElement("div",{style:m.activeColor}))),e.createElement(DF,{rgb:r,hsl:a,hex:o,onChange:s,disableAlpha:u}),e.createElement(PF,{colors:c,onClick:s,onSwatchHover:l}))};IF.propTypes={disableAlpha:bM.bool,width:bM.oneOfType([bM.string,bM.number]),styles:bM.object},IF.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},Bj(IF);var zF=function(t){var n=t.hsl,r=t.offset,o=t.onClick,i=void 0===o?function(){}:o,a=t.active,s=t.first,l=t.last,u=J_({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:s,last:l});return e.createElement("div",{style:u.swatch,onClick:function(e){return i({h:n.h,s:.5,l:r,source:"hsl"},e)}})},LF=function(t){var n=t.onClick,r=t.hsl,o=J_({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(zF,{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(zF,{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(zF,{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(zF,{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(zF,{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}))},BF=function(t){var n=t.hsl,r=t.onChange,o=t.pointer,i=t.styles,a=void 0===i?{}:i,s=t.className,l=void 0===s?"":s,u=J_(SA({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},a));return e.createElement("div",{style:u.wrap||{},className:"slider-picker "+l},e.createElement("div",{style:u.hue},e.createElement(pM,{style:u.Hue,hsl:n,pointer:o,onChange:r})),e.createElement("div",{style:u.swatches},e.createElement(LF,{hsl:n,onClick:r})))};BF.propTypes={styles:bM.object},BF.defaultProps={pointer:function(){var t=J_({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:{}},Bj(BF);var $F={};Object.defineProperty($F,"M",{value:!0});var HF=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},UF=function(e){return e&&e.M?e:{default:e}}(e);var WF=$F.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,s=e.style,l=void 0===s?{}:s,u=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 UF.default.createElement("svg",HF({viewBox:"0 0 24 24",style:HF({fill:n,width:o,height:a},l)},u),UF.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},VF=function(t){var n=t.color,r=t.onClick,o=void 0===r?function(){}:r,i=t.onSwatchHover,a=t.first,s=t.last,l=t.active,u=J_({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:Rj(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:s,active:l,"color-#FFFFFF":"#FFFFFF"===n,transparent:"transparent"===n});return e.createElement(Vj,{color:n,style:u.color,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},e.createElement("div",{style:u.check},e.createElement(WF,null)))},KF=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,i=t.active,a=J_({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return e.createElement("div",{style:a.group},kT(o,(function(t,a){return e.createElement(VF,{key:t,color:t,active:t.toLowerCase()===i,first:0===a,last:a===o.length-1,onClick:n,onSwatchHover:r})})))},ZF=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.onSwatchHover,a=t.colors,s=t.hex,l=t.styles,u=void 0===l?{}:l,c=t.className,d=void 0===c?"":c,f=J_(SA({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),p=function(e,t){return o({hex:e,source:"hex"},t)};return e.createElement("div",{style:f.picker,className:"swatches-picker "+d},e.createElement(_A,null,e.createElement("div",{style:f.overflow},e.createElement("div",{style:f.body},kT(a,(function(t){return e.createElement(KF,{key:t.toString(),group:t,active:s,onClick:p,onSwatchHover:i})})),e.createElement("div",{style:f.clear})))))};ZF.propTypes={width:bM.oneOfType([bM.string,bM.number]),height:bM.oneOfType([bM.string,bM.number]),colors:bM.arrayOf(bM.arrayOf(bM.string)),styles:bM.object},ZF.defaultProps={width:320,height:240,colors:[[AT,OT,MT,_T,ST],[FT,DT,TT,ET,jT],[LT,zT,IT,RT,PT],[WT,UT,HT,$T,BT],[GT,qT,ZT,KT,VT],[eD,QT,JT,YT,XT],[iD,oD,rD,nD,tD],[cD,uD,lD,sD,aD],[vD,hD,pD,fD,dD],["#194D33",xD,gD,bD,mD],[ND,CD,kD,yD,wD],[AD,OD,MD,_D,SD],[FD,DD,TD,ED,jD],[LD,zD,ID,RD,PD],[WD,UD,HD,$D,BD],[GD,qD,ZD,KD,VD],[eF,QD,JD,YD,XD],[iF,oF,rF,nF,tF],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}},Bj(ZF);var qF=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,s=t.triangle,l=t.styles,u=void 0===l?{}:l,c=t.className,d=void 0===c?"":c,f=J_(SA({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"}}},u),{"hide-triangle":"hide"===s,"top-left-triangle":"top-left"===s,"top-right-triangle":"top-right"===s}),p=function(e,t){Pj(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},kT(i,(function(t,n){return e.createElement(Vj,{key:n,color:t,hex:t,style:f.swatch,onClick:p,onHover:r,focusStyle:{boxShadow:"0 0 4px "+t}})})),e.createElement("div",{style:f.hash},"#"),e.createElement(cM,{label:null,style:{input:f.input},value:o.replace("#",""),onChange:p}),e.createElement("div",{style:f.clear})))};qF.propTypes={width:bM.oneOfType([bM.string,bM.number]),triangle:bM.oneOf(["hide","top-left","top-right"]),colors:bM.arrayOf(bM.string),styles:bM.object},qF.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}},Bj(qF);var GF=function(t){var n=J_({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})};GF.propTypes={hsl:bM.shape({h:bM.number,s:bM.number,l:bM.number,a:bM.number})},GF.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var XF=function(t){var n=J_({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})};XF.propTypes={hsl:bM.shape({h:bM.number,s:bM.number,l:bM.number,a:bM.number})},XF.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var YF=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.hsv,s=function(e,t){if(e.hex)Pj(e.hex)&&n({hex:e.hex,source:"hex"},t);else if(e.rgb){var r=e.rgb.split(",");Ij(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(",");Ij(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(",");Ij(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=J_({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"}}}),u=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(cM,{style:{input:l.input,label:l.label},label:"hex",value:i,onChange:s})),e.createElement("div",{style:l.column},e.createElement("div",{style:l.single},e.createElement(cM,{style:{input:l.input2,label:l.label2},label:"rgb",value:u,onChange:s})),e.createElement("div",{style:l.single},e.createElement(cM,{style:{input:l.input2,label:l.label2},label:"hsv",value:d,onChange:s})),e.createElement("div",{style:l.single},e.createElement(cM,{style:{input:l.input2,label:l.label2},label:"hsl",value:c,onChange:s})))))},JF=function(t){var n=t.width,r=t.onChange,o=t.rgb,i=t.hsl,a=t.hsv,s=t.hex,l=t.header,u=t.styles,c=void 0===u?{}:u,d=t.className,f=void 0===d?"":d,p=J_(SA({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:p.picker,className:"google-picker "+f},e.createElement("div",{style:p.head},l),e.createElement("div",{style:p.swatch}),e.createElement("div",{style:p.saturation},e.createElement(WA,{hsl:i,hsv:a,pointer:GF,onChange:r})),e.createElement("div",{style:p.body},e.createElement("div",{style:p.controls,className:"flexbox-fix"},e.createElement("div",{style:p.hue},e.createElement(pM,{style:p.Hue,hsl:i,radius:"4px",pointer:XF,onChange:r}))),e.createElement(YF,{rgb:o,hsl:i,hex:s,hsv:a,onChange:r})))};function QF(...e){return we(j(e))}JF.propTypes={width:bM.oneOfType([bM.string,bM.number]),styles:bM.object,header:bM.string},JF.defaultProps={width:652,styles:{},header:"Color picker"},Bj(JF);var eP=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(TI){return void console.error("Error requesting token:",TI)}},tP=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"}}),nP=r.forwardRef((({className:e,variant:t,size:n,asChild:o=!1,...i},a)=>r.createElement(o?N:"button",{className:QF(tP({variant:t,size:n,className:e})),ref:a,...i})));nP.displayName="Button";var rP=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:QF("rounded-xl border bg-card text-card-foreground shadow",e),...t})));rP.displayName="Card";var oP=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:QF("flex flex-col space-y-1.5 p-6",e),...t})));oP.displayName="CardHeader";var iP=r.forwardRef((({className:e,...t},n)=>r.createElement("h3",{ref:n,className:QF("font-semibold leading-none tracking-tight",e),...t})));iP.displayName="CardTitle";var aP=r.forwardRef((({className:e,...t},n)=>r.createElement("p",{ref:n,className:QF("text-sm text-muted-foreground",e),...t})));aP.displayName="CardDescription";var sP=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:QF("p-6 pt-0",e),...t})));sP.displayName="CardContent";var lP=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:QF("flex items-center p-6 pt-0",e),...t})));lP.displayName="CardFooter";var uP=r.forwardRef((({className:e,...t},n)=>r.createElement(De,{ref:n,className:QF("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t})));uP.displayName=De.displayName;var cP=r.forwardRef((({className:e,...t},n)=>r.createElement(Fe,{ref:n,className:QF("aspect-square h-full w-full",e),...t})));cP.displayName=Fe.displayName;var dP=r.forwardRef((({className:e,...t},n)=>r.createElement(Pe,{ref:n,className:QF("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t})));dP.displayName=Pe.displayName;var fP=r.forwardRef((({className:e,value:t,...n},o)=>r.createElement(qe,{ref:o,className:QF("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n},r.createElement(Ge,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}}))));fP.displayName=qe.displayName;var pP=r.forwardRef((({className:e,sideOffset:t=4,...n},o)=>r.createElement(dr,{ref:o,sideOffset:t,className:QF("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})));pP.displayName=dr.displayName;var hP=({className:e,...t})=>r.createElement(Uo,{className:QF(e),...t});hP.displayName=Uo.displayName;var vP=r.forwardRef((({className:e,...t},n)=>r.createElement(Wo,{className:QF("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})));vP.displayName=Wo.displayName;var mP=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"}}),bP=r.forwardRef((({side:e="right",className:t,children:n,...o},i)=>r.createElement(hP,null,r.createElement(vP,null),r.createElement(Vo,{ref:i,className:QF(mP({side:e}),t),...o},n,r.createElement(qo,{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(ii,{className:"h-4 w-4"}),r.createElement("span",{className:"sr-only"},"Close"))))));bP.displayName=Vo.displayName;var gP=r.forwardRef((({className:e,...t},n)=>r.createElement(Ko,{ref:n,className:QF("text-lg font-semibold text-foreground",e),...t})));gP.displayName=Ko.displayName;var xP=r.forwardRef((({className:e,...t},n)=>r.createElement(Zo,{ref:n,className:QF("text-sm text-muted-foreground",e),...t})));xP.displayName=Zo.displayName;var wP=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{className:"w-full overflow-auto"},r.createElement("table",{ref:n,className:QF("w-full caption-bottom text-sm",e),...t}))));wP.displayName="Table";var yP=r.forwardRef((({className:e,...t},n)=>r.createElement("thead",{ref:n,className:QF("[&_tr]:border-b",e),...t})));yP.displayName="TableHeader";var kP=r.forwardRef((({className:e,...t},n)=>r.createElement("tbody",{ref:n,className:QF("[&_tr:last-child]:border-0",e),...t})));kP.displayName="TableBody";var CP=r.forwardRef((({className:e,...t},n)=>r.createElement("tfoot",{ref:n,className:QF("bg-primary font-medium text-primary-foreground",e),...t})));CP.displayName="TableFooter";var NP=r.forwardRef((({className:e,...t},n)=>r.createElement("tr",{ref:n,className:QF("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})));NP.displayName="TableRow";var SP=r.forwardRef((({className:e,...t},n)=>r.createElement("th",{ref:n,className:QF("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})));SP.displayName="TableHead";var _P=r.forwardRef((({className:e,...t},n)=>r.createElement("td",{ref:n,className:QF("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})));_P.displayName="TableCell";var MP=r.forwardRef((({className:e,...t},n)=>r.createElement("caption",{ref:n,className:QF("mt-4 text-sm text-muted-foreground",e),...t})));MP.displayName="TableCaption";var OP=r.forwardRef((({className:e,...t},n)=>r.createElement(Gi,{ref:n,className:QF("border-b",e),...t})));OP.displayName="AccordionItem";var AP=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Xi,{className:"flex"},r.createElement(Yi,{ref:o,className:QF("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(ti,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})))));AP.displayName=Yi.displayName;var jP=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Ji,{ref:o,className:QF("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))));jP.displayName=Ji.displayName;var EP=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"}}),TP=r.forwardRef((({className:e,variant:t,...n},o)=>r.createElement("div",{ref:o,role:"alert",className:QF(EP({variant:t}),e),...n})));TP.displayName="Alert";var DP=r.forwardRef((({className:e,...t},n)=>r.createElement("h5",{ref:n,className:QF("mb-1 font-medium leading-none tracking-tight",e),...t})));DP.displayName="AlertTitle";var FP=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{ref:n,className:QF("text-sm [&_p]:leading-relaxed",e),...t})));FP.displayName="AlertDescription";var PP=da,RP=fa,IP=({className:e,...t})=>r.createElement(pa,{className:QF(e),...t});IP.displayName=pa.displayName;var zP=r.forwardRef((({className:e,...t},n)=>r.createElement(ha,{className:QF("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})));zP.displayName=ha.displayName;var LP=r.forwardRef((({className:e,...t},n)=>r.createElement(IP,null,r.createElement(zP,null),r.createElement(va,{ref:n,className:QF("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}))));LP.displayName=va.displayName;var BP=({className:e,...t})=>r.createElement("div",{className:QF("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});BP.displayName="AlertDialogFooter";var $P=r.forwardRef((({className:e,...t},n)=>r.createElement(ga,{ref:n,className:QF("text-lg font-semibold",e),...t})));$P.displayName=ga.displayName;var HP=r.forwardRef((({className:e,...t},n)=>r.createElement(xa,{ref:n,className:QF("text-sm text-muted-foreground",e),...t})));HP.displayName=xa.displayName;var UP=r.forwardRef((({className:e,...t},n)=>r.createElement(ma,{ref:n,className:QF(tP(),e),...t})));UP.displayName=ma.displayName;var WP=r.forwardRef((({className:e,...t},n)=>r.createElement(ba,{ref:n,className:QF(tP({variant:"outline"}),"mt-2 sm:mt-0",e),...t})));WP.displayName=ba.displayName;var VP=r.forwardRef((({className:e,...t},n)=>r.createElement(Da,{ref:n,className:QF("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(Fa,{className:QF("flex items-center justify-center text-current")},r.createElement(Qo,{className:"h-4 w-4"})))));VP.displayName=Da.displayName;var KP=({className:e,...t})=>r.createElement(Uo,{className:QF(e),...t});KP.displayName=Uo.displayName;var ZP=r.forwardRef((({className:e,...t},n)=>r.createElement(Wo,{ref:n,className:QF("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})));ZP.displayName=Wo.displayName;var qP=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(KP,null,r.createElement(ZP,null),r.createElement(Vo,{ref:o,className:QF("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(qo,{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(ii,{className:"h-4 w-4"}),r.createElement("span",{className:"sr-only"},"Close"))))));qP.displayName=Vo.displayName;var GP=r.forwardRef((({className:e,...t},n)=>r.createElement(Ko,{ref:n,className:QF("text-lg font-semibold leading-none tracking-tight",e),...t})));GP.displayName=Ko.displayName;var XP=r.forwardRef((({className:e,...t},n)=>r.createElement(Zo,{ref:n,className:QF("text-sm text-muted-foreground",e),...t})));XP.displayName=Zo.displayName;var YP=r.forwardRef((({className:e,...t},n)=>r.createElement(Bl,{ref:n,className:QF("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));YP.displayName=Bl.displayName;var JP=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},r.createElement(ui,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),r.createElement(Bl.Input,{ref:n,className:QF("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}))));JP.displayName=Bl.Input.displayName;var QP=r.forwardRef((({className:e,...t},n)=>r.createElement(Bl.List,{ref:n,className:QF("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));QP.displayName=Bl.List.displayName;var eR=r.forwardRef(((e,t)=>r.createElement(Bl.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));eR.displayName=Bl.Empty.displayName;var tR=r.forwardRef((({className:e,...t},n)=>r.createElement(Bl.Group,{ref:n,className:QF("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})));tR.displayName=Bl.Group.displayName;var nR=r.forwardRef((({className:e,...t},n)=>r.createElement(Bl.Separator,{ref:n,className:QF("-mx-1 h-px bg-border",e),...t})));nR.displayName=Bl.Separator.displayName;var rR=r.forwardRef((({className:e,...t},n)=>r.createElement(Bl.Item,{ref:n,className:QF("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})));rR.displayName=Bl.Item.displayName;var oR=r.forwardRef((({className:e,inset:t,children:n,...o},i)=>r.createElement(Fc,{ref:i,className:QF("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(ri,{className:"ml-auto h-4 w-4"}))));oR.displayName=Fc.displayName;var iR=r.forwardRef((({className:e,...t},n)=>r.createElement(Pc,{ref:n,className:QF("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})));iR.displayName=Pc.displayName;var aR=r.forwardRef((({className:e,...t},n)=>r.createElement(_c,null,r.createElement(Mc,{ref:n,className:QF("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}))));aR.displayName=Mc.displayName;var sR=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(Ac,{ref:o,className:QF("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})));sR.displayName=Ac.displayName;var lR=r.forwardRef((({className:e,children:t,checked:n,...o},i)=>r.createElement(jc,{ref:i,className:QF("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(Tc,null,r.createElement(Qo,{className:"h-4 w-4"}))),t)));lR.displayName=jc.displayName;var uR=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Ec,{ref:o,className:QF("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(Tc,null,r.createElement(si,{className:"h-4 w-4 fill-current"}))),t)));uR.displayName=Ec.displayName;var cR=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(Oc,{ref:o,className:QF("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n})));cR.displayName=Oc.displayName;var dR=r.forwardRef((({className:e,...t},n)=>r.createElement(Dc,{ref:n,className:QF("-mx-1 my-1 h-px bg-border",e),...t})));dR.displayName=Dc.displayName;var fR=r.forwardRef((({className:e,inset:t,children:n,...o},i)=>r.createElement(Xc,{ref:i,className:QF("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(ri,{className:"ml-auto h-4 w-4"}))));fR.displayName=Xc.displayName;var pR=r.forwardRef((({className:e,...t},n)=>r.createElement(Yc,{ref:n,className:QF("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})));pR.displayName=Yc.displayName;var hR=r.forwardRef((({className:e,sideOffset:t=4,...n},o)=>r.createElement(Hc,null,r.createElement(Uc,{ref:o,sideOffset:t,className:QF("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}))));hR.displayName=Uc.displayName;var vR=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(Vc,{ref:o,className:QF("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})));vR.displayName=Vc.displayName;var mR=r.forwardRef((({className:e,children:t,checked:n,...o},i)=>r.createElement(Kc,{ref:i,className:QF("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(qc,null,r.createElement(Qo,{className:"h-4 w-4"}))),t)));mR.displayName=Kc.displayName;var bR=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Zc,{ref:o,className:QF("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(qc,null,r.createElement(si,{className:"h-4 w-4 fill-current"}))),t)));bR.displayName=Zc.displayName;var gR=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(Wc,{ref:o,className:QF("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n})));gR.displayName=Wc.displayName;var xR=r.forwardRef((({className:e,...t},n)=>r.createElement(Gc,{ref:n,className:QF("-mx-1 my-1 h-px bg-muted",e),...t})));xR.displayName=Gc.displayName;var wR=D("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),yR=r.forwardRef((({className:e,...t},n)=>r.createElement(Qc,{ref:n,className:QF(wR(),e),...t})));yR.displayName=Qc.displayName;var kR=r.createContext({}),CR=()=>{let t=r.useContext(kR),n=r.useContext(NR),{getFieldState:o,formState:i}=e.useContext(Jc),a=o(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}},NR=r.createContext({}),SR=r.forwardRef((({className:e,...t},n)=>{let o=r.useId();return r.createElement(NR.Provider,{value:{id:o}},r.createElement("div",{ref:n,className:QF("space-y-2",e),...t}))}));SR.displayName="FormItem";var _R=r.forwardRef((({className:e,...t},n)=>{let{error:o,formItemId:i}=CR();return r.createElement(yR,{ref:n,className:QF(o&&"text-destructive",e),htmlFor:i,...t})}));_R.displayName="FormLabel";var MR=r.forwardRef((({...e},t)=>{let{error:n,formItemId:o,formDescriptionId:i,formMessageId:a}=CR();return r.createElement(N,{ref:t,id:o,"aria-describedby":n?`${i} ${a}`:`${i}`,"aria-invalid":!!n,...e})}));MR.displayName="FormControl";var OR=r.forwardRef((({className:e,...t},n)=>{let{formDescriptionId:o}=CR();return r.createElement("p",{ref:n,id:o,className:QF("text-[0.8rem] text-muted-foreground",e),...t})}));OR.displayName="FormDescription";var AR=r.forwardRef((({className:e,children:t,...n},o)=>{let{error:i,formMessageId:a}=CR(),s=i?String(i?.message):t;return s?r.createElement("p",{ref:o,id:a,className:QF("text-[0.8rem] font-medium text-destructive",e),...n},s):null}));AR.displayName="FormMessage";var jR=r.forwardRef((({className:e,type:t,...n},o)=>r.createElement("input",{type:t,className:QF("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})));jR.displayName="Input";var ER=r.forwardRef((({className:e,...t},n)=>r.createElement(bd,{ref:n,className:QF("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",e),...t})));ER.displayName=bd.displayName;var TR=r.forwardRef((({className:e,...t},n)=>r.createElement(gd,{ref:n,className:QF("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})));TR.displayName=gd.displayName;var DR=r.forwardRef((({className:e,inset:t,children:n,...o},i)=>r.createElement(Md,{ref:i,className:QF("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(ri,{className:"ml-auto h-4 w-4"}))));DR.displayName=Md.displayName;var FR=r.forwardRef((({className:e,...t},n)=>r.createElement(Od,{ref:n,className:QF("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})));FR.displayName=Od.displayName;var PR=r.forwardRef((({className:e,align:t="start",alignOffset:n=-4,sideOffset:o=8,...i},a)=>r.createElement(xd,null,r.createElement(wd,{ref:a,align:t,alignOffset:n,sideOffset:o,className:QF("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}))));PR.displayName=wd.displayName;var RR=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(kd,{ref:o,className:QF("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})));RR.displayName=kd.displayName;var IR=r.forwardRef((({className:e,children:t,checked:n,...o},i)=>r.createElement(Cd,{ref:i,className:QF("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(Sd,null,r.createElement(Qo,{className:"h-4 w-4"}))),t)));IR.displayName=Cd.displayName;var zR=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Nd,{ref:o,className:QF("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(Sd,null,r.createElement(si,{className:"h-4 w-4 fill-current"}))),t)));zR.displayName=Nd.displayName;var LR=r.forwardRef((({className:e,inset:t,...n},o)=>r.createElement(yd,{ref:o,className:QF("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n})));LR.displayName=yd.displayName;var BR=r.forwardRef((({className:e,...t},n)=>r.createElement(_d,{ref:n,className:QF("-mx-1 my-1 h-px bg-muted",e),...t})));BR.displayName=_d.displayName;var $R=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(mf,{ref:o,className:QF("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n},t,r.createElement(KR,null))));$R.displayName=mf.displayName;var HR=r.forwardRef((({className:e,...t},n)=>r.createElement(bf,{ref:n,className:QF("group flex flex-1 list-none items-center justify-center space-x-1",e),...t})));HR.displayName=bf.displayName;var UR=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"),WR=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(gf,{ref:o,className:QF(UR(),"group",e),...n},t," ",r.createElement(ti,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"}))));WR.displayName=gf.displayName;var VR=r.forwardRef((({className:e,...t},n)=>r.createElement(wf,{ref:n,className:QF("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})));VR.displayName=wf.displayName;var KR=r.forwardRef((({className:e,...t},n)=>r.createElement("div",{className:QF("absolute left-0 top-full flex justify-center")},r.createElement(yf,{className:QF("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}))));KR.displayName=yf.displayName;var ZR=r.forwardRef((({className:e,...t},n)=>r.createElement(xf,{ref:n,className:QF("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"}))));ZR.displayName=xf.displayName;var qR=r.forwardRef((({className:e,align:t="center",sideOffset:n=4,...o},i)=>r.createElement(Rf,null,r.createElement(If,{ref:i,align:t,sideOffset:n,className:QF("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}))));qR.displayName=If.displayName;var GR=r.forwardRef((({className:e,...t},n)=>r.createElement(np,{className:QF("grid gap-2",e),...t,ref:n})));GR.displayName=np.displayName,r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(rp,{ref:o,className:QF("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(op,{className:"flex items-center justify-center"},r.createElement(Qo,{className:"h-3.5 w-3.5 fill-primary"}))))).displayName=rp.displayName;var XR=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Lp,{ref:o,className:QF("relative overflow-hidden",e),...n},r.createElement(Bp,{className:"h-full w-full rounded-[inherit]"},t),r.createElement(YR,null),r.createElement($p,null))));XR.displayName=Lp.displayName;var YR=r.forwardRef((({className:e,orientation:t="vertical",...n},o)=>r.createElement(hp,{ref:o,orientation:t,className:QF("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(Sp,{className:"relative flex-1 rounded-full bg-border"}))));YR.displayName=hp.displayName;var JR=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Oh,{ref:o,className:QF("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(Ah,{asChild:!0},r.createElement(Yo,{className:"h-4 w-4 opacity-50"})))));JR.displayName=Oh.displayName;var QR=r.forwardRef((({className:e,children:t,position:n="popper",...o},i)=>r.createElement(jh,null,r.createElement(Eh,{ref:i,className:QF("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(Th,{className:QF("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t)))));QR.displayName=Eh.displayName;var eI=r.forwardRef((({className:e,...t},n)=>r.createElement(Dh,{ref:n,className:QF("px-2 py-1.5 text-sm font-semibold",e),...t})));eI.displayName=Dh.displayName;var tI=r.forwardRef((({className:e,children:t,...n},o)=>r.createElement(Fh,{ref:o,className:QF("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(Rh,null,r.createElement(Qo,{className:"h-4 w-4"}))),r.createElement(Ph,null,t))));tI.displayName=Fh.displayName;var nI=r.forwardRef((({className:e,...t},n)=>r.createElement(Ih,{ref:n,className:QF("-mx-1 my-1 h-px bg-muted",e),...t})));nI.displayName=Ih.displayName;var rI=r.forwardRef((({className:e,orientation:t="horizontal",decorative:n=!0,...o},i)=>r.createElement(Hh,{ref:i,decorative:n,orientation:t,className:QF("shrink-0 bg-border","horizontal"===t?"h-[1px] w-full":"h-full w-[1px]",e),...o})));rI.displayName=Hh.displayName;var oI=r.forwardRef((({className:e,...t},n)=>r.createElement(vv,{ref:n,className:QF("relative flex w-full touch-none select-none items-center",e),...t},r.createElement(mv,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20"},r.createElement(bv,{className:"absolute h-full bg-primary"})),r.createElement(gv,{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"}))));oI.displayName=vv.displayName;var iI=r.forwardRef((({className:e,...t},n)=>r.createElement(Mv,{className:QF("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(Ov,{className:QF("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")}))));iI.displayName=Mv.displayName;var aI=r.forwardRef((({className:e,...t},n)=>r.createElement(zv,{ref:n,className:QF("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t})));aI.displayName=zv.displayName;var sI=r.forwardRef((({className:e,...t},n)=>r.createElement(Lv,{ref:n,className:QF("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})));sI.displayName=Lv.displayName;var lI=r.forwardRef((({className:e,...t},n)=>r.createElement(Bv,{ref:n,className:QF("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));lI.displayName=Bv.displayName;var uI=r.forwardRef((({className:e,...t},n)=>r.createElement("textarea",{className:QF("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})));uI.displayName="Textarea";var cI=r.forwardRef((({className:e,...t},n)=>r.createElement(mm,{ref:n,className:QF("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})));cI.displayName=mm.displayName;var dI=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"}}),fI=r.forwardRef((({className:e,variant:t,...n},o)=>r.createElement(bm,{ref:o,className:QF(dI({variant:t}),e),...n})));fI.displayName=bm.displayName;var pI=r.forwardRef((({className:e,...t},n)=>r.createElement(wm,{ref:n,className:QF("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})));pI.displayName=wm.displayName;var hI=r.forwardRef((({className:e,...t},n)=>r.createElement(ym,{ref:n,className:QF("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(ii,{className:"h-4 w-4"}))));hI.displayName=ym.displayName;var vI=r.forwardRef((({className:e,...t},n)=>r.createElement(gm,{ref:n,className:QF("text-sm font-semibold [&+div]:text-xs",e),...t})));vI.displayName=gm.displayName;var mI=r.forwardRef((({className:e,...t},n)=>r.createElement(xm,{ref:n,className:QF("text-sm opacity-90",e),...t})));mI.displayName=xm.displayName;var bI=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"}}),gI=r.forwardRef((({className:e,variant:t,size:n,...o},i)=>r.createElement(km,{ref:i,className:QF(bI({variant:t,size:n,className:e})),...o})));gI.displayName=km.displayName;var xI=(e=>(e.buyer="buyer",e.seller="seller",e.buyerSeller="buyer-seller",e.broker="broker",e))(xI||{}),wI=class{};wI.ESTIMATES_ENDPOINT_URL="https://api-dev.liberty.percyai.io/property/v1/estimates",wI.ESTIMATED_VALUES_HEADER_TITLE="Estimated Values",wI.ESTIMATED_VALUES_DIALOG_TITLE="How estimated values work",wI.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.",wI.ESTIMATED_VALUES_BUTTON_DESCRIPTION="Contact Mortgage Consultant",wI.FORM_TITLE="Learn more about my options",wI.FORM_DESCRIPTION="Get more insights on how your property valuation",wI.FORM_FIRST_NAME_LABEL="First Name *",wI.FORM_FIRST_NAME_PLACEHOLDER="Enter First Name",wI.FORM_EMAIL_ADDRESS_LABEL="Email Address *",wI.FORM_EMAIL_ADDRESS_PLACEHOLDER="Enter Email Adress",wI.FORM_LAST_NAME_LABEL="Last Name *",wI.FORM_LAST_NAME_PLACEHOLDER="Enter Last Name",wI.FORM_PHONE_NUMBER_LABEL="Phone Number *",wI.FORM_PHONE_NUMBER_PLACEHOLDER="Enter Phone Number",wI.FORM_USER_TYPE_LABEL="I am: *",wI.FORM_USER_TYPE_PLACEHOLDER="Please tell us who you are.",wI.FORM_AGENT_CHECK_BOX_DESCRIPTION="Are you currently working with a",wI.FORM_AGENT_CHECK_BOX_AGENT_TYPE="Agent",wI.FORM_AGENT_CHECK_BOX_BROKERAGE_NAME="Percy Realty",wI.FORM_AGENT_NAME_PLACEHOLDER="Enter Agent's Name",wI.FORM_ACTION_BUTTOM="Submit",wI.FIRST_NAME_REQUIRED_VALIDATION_MESSAGE="First Name is required.",wI.EMAIL_ADDRESS_REQUIRED_VALIDATION_MESSAGE="Email address is required.",wI.EMAIL_ADDRESS_FORMAT_VALIDATION_MESSAGE="Email address format is wrong.",wI.LAST_NAME_REQUIRED_VALIDATION_MESSAGE="Last Name is required.",wI.PHONE_NUMBER_REQUIRED_VALIDATION_MESSAGE="Phone Number is required.",wI.PHONE_NUMBER_FORMAT_VALIDATION_MESSAGE="Phone Number format is wrong.",wI.IAM_REQUIRED_VALIDATION_MESSAGE="Please select an option.",wI.HOME_ADDRESS_REQUIRED_VALIDATION_MESSAGE="Home Address is required.",wI.ON_ERROR_OCCURRED="An error occurred while submitting the form. Please try again.",wI.BUYER="A Buyer",wI.SELLER="A Seller",wI.BUYER_SELLER="A Buyer and Seller",wI.BROKER="A Broker/Agent",wI.PERIOD_1="Immediately",wI.PERIOD_2="1 to 3 Months",wI.PERIOD_3="3 to 6 Months",wI.PERIOD_4="6 to 12 Months",wI.PERIOD_5="12+ Months",wI.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL="Message",wI.DYNAMIC_VALUES_BUYER_MESSAGE_PLACEHOLDER="Hello, I am interested in learning more about this property.",wI.DYNAMIC_VALUES_BROKER_MESSAGE_PLACEHOLDER="Hello, I am interested in learning more about this buyer.",wI.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_LABEL="Home Address *",wI.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_PLACEHOLDER="Enter Home Address",wI.DYNAMIC_VALUES_SELLER_APROXIMATE_VALUE_LABEL="Property's Approximate Value",wI.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_LABEL="Time Frame for Selling",wI.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_PLACEHOLDER="Please select a time frame",wI.sellerBuyerSharedContent=[{label:wI.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_LABEL,type:"text",placeholder:wI.DYNAMIC_VALUES_SELLER_HOME_ADDRESS_PLACEHOLDER},{label:wI.DYNAMIC_VALUES_SELLER_APROXIMATE_VALUE_LABEL,type:"number",placeholder:""},{label:wI.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_LABEL,type:"select",placeholder:wI.DYNAMIC_VALUES_SELLER_TIME_FOR_SELLING_PLACEHOLDER}],wI.DYNAMIC_VALUES={buyer:[{label:wI.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL,type:"textarea",placeholder:wI.DYNAMIC_VALUES_BUYER_MESSAGE_PLACEHOLDER}],seller:wI.sellerBuyerSharedContent,"buyer-seller":wI.sellerBuyerSharedContent,broker:[{label:wI.DYNAMIC_VALUES_BUYER_MESSAGE_LABEL,type:"textarea",placeholder:wI.DYNAMIC_VALUES_BROKER_MESSAGE_PLACEHOLDER}]};var yI=wI;function kI({className:e}){return r.createElement("svg",{className:QF("-ml-1 mr-3 h-5 w-5 animate-spin text-white",e),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},r.createElement("circle",{className:QF("stroke-brand-400 opacity-25"),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.createElement("path",{className:QF("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"}))}kI.displayName="Spinner";var CI=Vb(xI,{required_error:yI.IAM_REQUIRED_VALIDATION_MESSAGE});Wb({firstName:$b().min(2,{message:yI.FIRST_NAME_REQUIRED_VALIDATION_MESSAGE}),emailAdress:$b({required_error:yI.EMAIL_ADDRESS_REQUIRED_VALIDATION_MESSAGE}).email({message:yI.EMAIL_ADDRESS_FORMAT_VALIDATION_MESSAGE}),lastName:$b().min(2,{message:yI.LAST_NAME_REQUIRED_VALIDATION_MESSAGE}),phoneNumber:$b().min(2,{message:yI.PHONE_NUMBER_REQUIRED_VALIDATION_MESSAGE}),iam:CI,agent:Hb().optional(),agentName:$b().optional(),dynamicValues:Ub(Wb({homeAddress:$b().min(2,{message:yI.HOME_ADDRESS_REQUIRED_VALIDATION_MESSAGE}).optional(),value:$b().optional()})).optional()});var NI=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}.`}};function SI({children:e}){return r.createElement("div",{className:QF("flex justify-center w-full")},e)}function _I({trigger:e,content:t,title:n,asChild:o=!1,actionButtomLabel:i=NI.ACTION_OK_BUTTON_LABEL}){return r.createElement(PP,null,r.createElement(RP,{asChild:o},e),r.createElement(LP,{className:QF("flex flex-col gap-2 p-6","h-screen lg:h-auto md:h-auto overflow-y-auto")},n&&r.createElement($P,null,n),t,r.createElement(BP,null,r.createElement(UP,null,i))))}function MI({title:e,infoTitle:t,icon:n,infoDescription:o,titleDescription:i}){let a=r.cloneElement(n,{className:"w-6 h-6"});return r.createElement("div",{className:QF("flex flex-col items-start")},r.createElement("div",{className:QF("flex flex-row items-center gap-2")},r.createElement("div",{className:QF("flex flex-col items-center bg-slate-50 rounded-[100px] p-2")},a),r.createElement("h3",{className:QF("font-semibold leading-8 text-xl md:text-2xl lg:text-2xl text-gray-700")},e),r.createElement(_I,{asChild:!0,title:t,trigger:r.createElement(Sm,{className:QF("w-5 h-5 text-gray-400")}),content:o})),i&&r.createElement("p",{className:QF("text-gray-400 ml-[50px] text-xs md:text-sm lg:text-sm")},i))}function OI({icon:e,infoDescription:t,title:n,titleDescription:o,infoTitle:i,actions:a}){return r.createElement("div",{className:QF("flex flex-row justify-between items-stretch")},r.createElement(MI,{title:n,titleDescription:o,infoTitle:i,icon:e,infoDescription:t}),a&&a)}NI.ACTION_OK_BUTTON_LABEL="OK",NI.DESCRIPTION_YEARS_LABEL="Years",NI.NO_DATA_AVAILABLE_LABEL="No Data Available",NI.CONFIGURATION_ERROR_LABEL="Configuration Error",NI.CONFIGURATION_ERROR_KEY_EXPIRED_LABEL="Key is expired",NI.EQUITY_MORTGAGE_DETAILS_HEADER_TITLE="Equity In Your Home",NI.EQUITY_MORTGAGE_DETAILS_DESCRIPTION="Equity is your home's worth to you!",NI.EQUITY_MORTGAGE_DETAILS_EDIT_DETAILS="Edit Details",NI.EQUITY_MORTGAGE_DETAILS_ALL_GOOD_BUTTON="All Good",NI.EQUITY_MORTGAGE_DETAILS_BANNER_TITLE="Verify Your Mortgage Details",NI.EQUITY_MORTGAGE_DETAILS_TITLE="Estimated Equity Today",NI.EQUITY_MORTGAGE_DETAILS_HOW_CALCULATED="How is this calculated?",NI.EQUITY_MORTGAGE_DETAILS_ACTION_BUTTON_LABEL="Which option is best for me?",NI.EQUITY_MORTGAGE_DETAILS_DISCLAIMER="Disclaimer",NI.EDIT_MORTGAGE_DETAILS_FORM_TITLE="Edit Mortgage Info",NI.EDIT_MORTGAGE_DETAILS_LOAN_START_DATE_LABEL="Loan Start Date",NI.EDIT_MORTGAGE_DETAILS_LOAN_TERM_LABEL="Loan Term",NI.EDIT_MORTGAGE_DETAILS_INTEREST_RATE_LABEL="Interest Rate",NI.EDIT_MORTGAGE_DETAILS_ORIGINAL_LOAN_AMOUNT_LABEL="Original Loan Amount",NI.EDIT_MORTGAGE_DETAILS_BALANCE_LABEL="Estimated Mortgage Balance",NI.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.",NI.HOW_CALCULATE_TITLE="How Is My Net Worth Calculated?",NI.HOW_CALCULATE_DESCRIPTION='Your net worth ("equity") is made up of two things.',NI.HOW_CALCULATE_HOME_VALUE_LABEL="Home Value",NI.HOW_CALCULATE_LOAN_BALANCE_LABEL="Loan Balance",NI.HOW_CALCULATE_YOUR_NET_WORTH_LABEL="Your Net Worth",NI.HOW_CALCULATE_INFORMATION_SUBTITLE="Where does this information come from?",NI.HOW_CALCULATE_NOTE_DESCRIPTION="Note: Only the first lien mortgage and resale are used to calculate the balance of your loan.";var AI=function({apiKey:e,mapOptions:t,geoJsonLayerInput:n,markers:o,markersIcon:i,markerEvents:a}){let s=r.useRef(null),[l,u]=r.useState(null),[c,d]=r.useState(!1);r.useEffect((()=>{s.current&&new Xb({apiKey:e??"AIzaSyCDNlq-LeVQGoubUXL_a8p6LYPXR5Bjs_Q"}).importLibrary("maps").then((()=>{t.center||(t.center={lat:39.8283,lng:-98.5795}),s.current&&f(s.current,t)}))}),[]);let f=(e,t)=>{u(new window.google.maps.Map(e,t)),n&&h(n),p(o),d(!0)},p=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 r=new google.maps.Marker({position:{lat:e.lat,lng:e.lng},map:l,icon:e.icon??i,label:e.label});a&&a(n,r)})),l.setCenter(t.getCenter()),l.setZoom(3)},h=({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:h,setMarkers:p,zoomHandler:(e,t)=>{l&&(l.setCenter(e),l.setZoom(t))},isMapReady:c}},jI=["#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"];function EI(){return r.createElement("div",{className:QF("absolute top-4 left-4 bg-white bg-opacity-70 p-2 shadow-lg flex flex-col")},r.createElement("div",{className:QF("flex justify-between")},r.createElement("div",{className:QF("text-left text-xs")},"Active"),r.createElement("div",{className:QF("text-right text-xs")},"Very Active")),r.createElement("div",{className:QF("flex flex-col items-center space-y-2")},r.createElement("div",{className:QF("flex")},jI.map(((e,t)=>r.createElement("div",{key:t,className:QF("w-4 h-4"),style:{backgroundColor:e}}))))))}var TI=function(e,t={}){return function(e,t,n){var r,o,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={},u={},m={};for(const a of s){l[a]=Array.isArray(t.props)?"string":t.props[a];const e=v(a);u[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[h].container=this.container;for(const e of s){const t=u[e],n=this.getAttribute(t),r=l[e],o=c[r];n&&null!=o&&o.parse&&(this[h][e]=o.parse(n,this))}}static get observedAttributes(){return Object.keys(m)}connectedCallback(){this[f]=!0,this[d]()}disconnectedCallback(){this[f]=!1,this[p]&&n.unmount(this[p])}attributeChangedCallback(e,t,n){const r=m[e],o=l[r],i=c[o];r in l&&null!=i&&i.parse&&(this[h][r]=i.parse(n,this),this[d]())}[(r=f,o=p,i=h,d)](){this[f]&&(this[p]?n.update(this[p],this[h]):this[p]=n.mount(this.container,e,this[h]))}}for(const a of s){const e=u[a],t=l[a];Object.defineProperty(b.prototype,a,{enumerable:!0,configurable:!0,get(){return this[h][a]},set(n){this[h][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:x,unmount:w})}((function({zipcode:e,url:t="https://api.liberty.percyai.io/location/v1/heatmap",zoomLevel:n=10,zoomControl:o=!0,googleApiKey:i,clientKey:s,apiKey:l,height:u="420px"}){let{request:c,isLoading:d,tokens:f}=(({clientKey:e,apiKey:t})=>{let[n,o]=r.useState(!0),[i,a]=r.useState(),s=!!e;r.useEffect((()=>{!async function(){let t=await eP({clientKey:e});a(t)}()}),[]);let l=r.useCallback((async n=>{let{url:r,requestInit:s}=n,{headers:l,...u}=s??{},c=i;!i?.token&&e&&(c=await eP({clientKey:e}));let d={"Content-Type":"application/json",...c?.token&&{Authorization:`Bearer ${c?.token}`},...t&&{"x-api-key":t},...l},f=await fetch(r,{headers:d,...u});try{o(!0);let e=await f.json();return o(!1),c?.token&&a(c),e}catch(Wl){return console.error(`Error requesting ${r}`,Wl),void o(!1)}}),[i,e,t]);return{isLoading:n,tokens:i,request:l,isExternal:s}})({clientKey:s,apiKey:l}),p=r.useMemo((()=>({zoom:n,draggable:!1,scrollwheel:!1,fullscreenControl:!1,gestureHandling:"none",zoomControl:o,mapId:""})),[n,o]),{mapRef:h,setGeojson:v,isMapReady:m}=AI({mapOptions:p,apiKey:i});return r.useEffect((()=>{let n=!0;return m&&async function(){let r=((e,t)=>e?.config?e.config.find((e=>e.name===t)):{})(f?.meta,"color");if(e&&t&&n&&m){let o=new URL(t);o.searchParams.set("zipcode",e),r?.value&&o.searchParams.set("colors",r?.value);try{let e=await c({url:o.toString()});e&&n&&v(e.data)}catch(a){console.error("Error fetching heatmap data:",a)}}}(),()=>{n=!1}}),[s,l,m]),r.createElement("div",{className:QF("flex flex-col bg-white")},r.createElement(OI,{title:"Heat Map",infoDescription:"The best way to visualize the distribution of data in a geographical area.",infoTitle:"Heat Map",icon:r.createElement(_m,null)}),r.createElement(SI,null,r.createElement("div",{className:"relative w-full aspect-video rounded-md overflow-hidden",style:{height:u}},r.createElement("div",{ref:h,className:QF("min-h-full w-full")}),r.createElement(EI,null),d&&r.createElement("div",{className:QF("absolute inset-0 flex items-center justify-center")},r.createElement(kI,null)))))}),{props:{zipcode:"string",url:"string",zoomLevel:"number",zoomControl:"boolean",googleApiKey:"string",clientKey:"string",apiKey:"string"}});customElements&&customElements.define("heat-map",TI)}));
17
17
  //# sourceMappingURL=heatmap.min.js.map